{"record":{"id":"f06e1685094db2f2","repo":"risingwavelabs/risingwave","slug":"compaction-write-parquet-max-row-group-bytes-mus-f06e16","errorCode":null,"errorMessage":"`compaction.write_parquet_max_row_group_bytes` must be greater than 0","messagePattern":"`compaction\\.write_parquet_max_row_group_bytes` must be greater than 0","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/iceberg/mod.rs","lineNumber":351,"sourceCode":"        // Validate target file size\n        if let Some(target_file_size_mb) = iceberg_config.target_file_size_mb\n            && target_file_size_mb == 0\n        {\n            bail!(\"`compaction.target_file_size_mb` must be greater than 0\");\n        }\n\n        // Validate parquet max row group rows\n        if let Some(max_row_group_rows) = iceberg_config.write_parquet_max_row_group_rows\n            && max_row_group_rows == 0\n        {\n            bail!(\"`compaction.write_parquet_max_row_group_rows` must be greater than 0\");\n        }\n\n        // Validate parquet max row group bytes\n        if let Some(max_row_group_bytes) = iceberg_config.write_parquet_max_row_group_bytes\n            && max_row_group_bytes == 0\n        {\n            bail!(\"`compaction.write_parquet_max_row_group_bytes` must be greater than 0\");\n        }\n\n        // Validate parquet compression codec\n        if let Some(ref compression) = iceberg_config.write_parquet_compression {\n            let valid_codecs = [\n                \"uncompressed\",\n                \"snappy\",\n                \"gzip\",\n                \"lzo\",\n                \"brotli\",\n                \"lz4\",\n                \"zstd\",\n            ];\n            if !valid_codecs.contains(&compression.to_lowercase().as_str()) {\n                bail!(\n                    \"`compaction.write_parquet_compression` must be one of {:?}, got: {}\",\n                    valid_codecs,\n                    compression","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/iceberg/mod.rs#L333-L369","documentation":"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.","triggerScenarios":"`ALTER SINK ... SET` with `compaction.write_parquet_max_row_group_bytes = '0'`.","commonSituations":"Hand-computed byte values that ended up 0; trying to disable byte-based row group rolling; unit mistakes (expecting bytes but writing 0).","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."],"exampleFix":"-- before\nALTER SINK s SET ('compaction.write_parquet_max_row_group_bytes'='0');\n-- after\nALTER SINK s SET ('compaction.write_parquet_max_row_group_bytes'='134217728');","handlingStrategy":"validation","validationCode":"fn valid_row_group_bytes(cfg: &std::collections::BTreeMap<String, String>) -> Result<(), String> {\n    if let Some(s) = cfg.get(\"compaction.write_parquet_max_row_group_bytes\") {\n        if s.parse::<u64>().unwrap_or(0) == 0 {\n            return Err(\"compaction.write_parquet_max_row_group_bytes must be > 0\".into());\n        }\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Specify byte sizes as plain integers (bytes), e.g. 134217728 for 128 MiB.","Double-check unit conversion in any config generator."],"tags":["iceberg","sink","config","parquet"],"backgroundTag":"value-out-of-range","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}