{"record":{"id":"681f7f73a39a8fc4","repo":"risingwavelabs/risingwave","slug":"compaction-write-parquet-compression-must-be-one","errorCode":null,"errorMessage":"`compaction.write_parquet_compression` must be one of {:?}, got: {}","messagePattern":"`compaction\\.write_parquet_compression` must be one of (.+?), got: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/iceberg/mod.rs","lineNumber":366,"sourceCode":"        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\n                );\n            }\n        }\n\n        Ok(())\n    }\n\n    async fn new_log_sinker(&self, writer_param: SinkWriterParam) -> Result<Self::LogSinker> {\n        let writer = IcebergSinkWriter::new(\n            self.config.clone(),\n            self.param.clone(),\n            writer_param.clone(),\n            self.upsert_primary_key_column_names.clone(),\n        );\n","sourceCodeStart":348,"sourceCodeEnd":384,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/iceberg/mod.rs#L348-L384","documentation":"When altering an Iceberg sink config, `compaction.write_parquet_compression` must name a Parquet codec the writer supports. The value is lowercased and checked against a fixed list (uncompressed, snappy, gzip, lzo, brotli, lz4, zstd, etc.); anything else fails validation.","triggerScenarios":"`ALTER SINK ... SET` with `compaction.write_parquet_compression` set to a misspelled or unsupported codec such as `Snappy!`, `zstd1`, `GZIP_LEVEL6`, or `lz4_raw`.","commonSituations":"Users copying codec names from other engines that accept extra variants (e.g. `lz4_raw`, `zstd-1`) or appended compression levels; case-sensitive assumptions (lowercasing is applied, so casing alone is fine).","solutions":["Set the value to one of the valid codec names, e.g. `zstd` or `snappy` (lowercase).","Remove the property to use the default compression codec.","If you need codec-level options (like zstd levels), remove the level suffix and check whether a separate tuning option exists."],"exampleFix":"-- before\nALTER SINK s SET ('compaction.write_parquet_compression'='zstd-3');\n-- after\nALTER SINK s SET ('compaction.write_parquet_compression'='zstd');","handlingStrategy":"validation","validationCode":"const VALID_CODECS: &[&str] = &[\"uncompressed\",\"snappy\",\"gzip\",\"lzo\",\"brotli\",\"lz4\",\"zstd\"];\nfn valid_codec(cfg: &std::collections::BTreeMap<String, String>) -> Result<(), String> {\n    if let Some(c) = cfg.get(\"compaction.write_parquet_compression\") {\n        if !VALID_CODECS.contains(&c.to_lowercase().as_str()) {\n            return Err(format!(\"write_parquet_compression must be one of {VALID_CODECS:?}, got {c}\"));\n        }\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use bare codec names without levels or variants (no 'zstd-3', no 'lz4_raw').","Copy codec names from the error message's valid list.","Keep a shared constants list in your deployment tooling matching the engine."],"tags":["iceberg","sink","config","parquet","compression"],"backgroundTag":"invalid-enum-value","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"}