risingwavelabs/risingwave · error
`compaction.write_parquet_max_row_group_rows` must be…
Error message
`compaction.write_parquet_max_row_group_rows` must be greater than 0
What it means
The altered Iceberg sink config requires `compaction.write_parquet_max_row_group_rows` to be positive. Zero rows per Parquet row group is invalid (no rows could ever be written per group), so validation rejects it.
Solutions
- Set the property to a positive integer, e.g. `1000000` (1M rows per row group).
- Remove the property to use the sink's default row group size.
- If tuning memory, lower bytes (`compaction.write_parquet_max_row_group_bytes`) instead of zeroing rows.
Example fix
-- before
ALTER SINK s SET ('compaction.write_parquet_max_row_group_rows'='0');
-- after
ALTER SINK s SET ('compaction.write_parquet_max_row_group_rows'='1000000'); Defensive patterns
Strategy: validation
Validate before calling
fn valid_row_group_rows(cfg: &std::collections::BTreeMap<String, String>) -> Result<(), String> {
if let Some(s) = cfg.get("compaction.write_parquet_max_row_group_rows") {
if s.parse::<u64>().unwrap_or(0) == 0 {
return Err("compaction.write_parquet_max_row_group_rows must be > 0".into());
}
}
Ok(())
} Prevention
- Never zero any row-group knob; lower values only if memory constrained.
- Set rows and bytes knobs together consistently.
When it happens
Trigger: `ALTER SINK ... SET` with `compaction.write_parquet_max_row_group_rows = '0'`.
Common situations: Copy-pasted defaults that were zeroed; confusion with parquet writer tuning knobs; templating that substitutes 0 when a variable is unset.
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_bytes` 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/5a0877bedfb77e78.
Report an issue: GitHub.
Appendix: source
Thrown at src/connector/src/sink/iceberg/mod.rs:344
{
bail!(
"`compaction.max_snapshots_num` must be greater than 0, got: {}",
max_snapshots
);
}
// 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",View on GitHub (pinned to 6469eb736d)