risingwavelabs/risingwave · error
`compaction.write_parquet_max_row_group_bytes` must be…
Error message
`compaction.write_parquet_max_row_group_bytes` must be greater than 0
What it means
Guard in validate_alter_config: `compaction.write_parquet_max_row_group_bytes` was set to 0, which is invalid because a Parquet row group cannot be empty. Fires when ALTER SINK applies new connector settings to an existing Iceberg sink.
Solutions
- Set the property to a positive byte count, e.g. `134217728` (128 MiB).
- Remove the property to use the default row group byte size.
- Tune both rows and bytes knobs together so neither is zero.
Example fix
-- before
ALTER SINK s SET ('compaction.write_parquet_max_row_group_bytes'='0');
-- after
ALTER SINK s SET ('compaction.write_parquet_max_row_group_bytes'='134217728'); Defensive patterns
Strategy: validation
Validate before calling
fn valid_row_group_bytes(cfg: &std::collections::BTreeMap<String, String>) -> Result<(), String> {
if let Some(s) = cfg.get("compaction.write_parquet_max_row_group_bytes") {
if s.parse::<u64>().unwrap_or(0) == 0 {
return Err("compaction.write_parquet_max_row_group_bytes must be > 0".into());
}
}
Ok(())
} Prevention
- Specify byte sizes as plain integers (bytes), e.g. 134217728 for 128 MiB.
- Double-check unit conversion in any config generator.
When it happens
Trigger: `ALTER SINK ... SET` with `compaction.write_parquet_max_row_group_bytes = '0'`.
Common situations: Hand-computed byte values that ended up 0; trying to disable byte-based row group rolling; unit mistakes (expecting bytes but writing 0).
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- `compaction.write_parquet_compression` must be one of
- `compaction.write_parquet_max_row_group_rows` must be…
- `compaction-interval-sec` must be greater than 0 when…
- `compaction.max_snapshots_num` must be greater than 0, got
- `compaction.target_file_size_mb` must be greater than 0
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/f06e1685094db2f2.
Report an issue: GitHub.
Appendix: source
Thrown at src/connector/src/sink/iceberg/mod.rs:351
// Validate target file size
if let Some(target_file_size_mb) = iceberg_config.target_file_size_mb
&& target_file_size_mb == 0
{
bail!("`compaction.target_file_size_mb` must be greater than 0");
}
// Validate parquet max row group rows
if let Some(max_row_group_rows) = iceberg_config.write_parquet_max_row_group_rows
&& max_row_group_rows == 0
{
bail!("`compaction.write_parquet_max_row_group_rows` must be greater than 0");
}
// Validate parquet max row group bytes
if let Some(max_row_group_bytes) = iceberg_config.write_parquet_max_row_group_bytes
&& max_row_group_bytes == 0
{
bail!("`compaction.write_parquet_max_row_group_bytes` must be greater than 0");
}
// Validate parquet compression codec
if let Some(ref compression) = iceberg_config.write_parquet_compression {
let valid_codecs = [
"uncompressed",
"snappy",
"gzip",
"lzo",
"brotli",
"lz4",
"zstd",
];
if !valid_codecs.contains(&compression.to_lowercase().as_str()) {
bail!(
"`compaction.write_parquet_compression` must be one of {:?}, got: {}",
valid_codecs,
compressionView on GitHub (pinned to 6469eb736d)