{"record":{"id":"66f87e79ac8ed5e3","repo":"risingwavelabs/risingwave","slug":"error-from-iceberg-writer-builder-err","errorCode":null,"errorMessage":"error from iceberg writer builder: {err}","messagePattern":"error from iceberg writer builder: (.+?)","errorType":"exception","errorClass":"SinkError::Iceberg","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/iceberg/writer.rs","lineNumber":419,"sourceCode":"            ),\n        );\n        let data_file_builder = DataFileWriterBuilder::new(rolling_builder);\n        let monitored_builder = MonitoredGeneralWriterBuilder::new(\n            data_file_builder,\n            write_qps.clone(),\n            write_latency.clone(),\n        );\n        let writer_builder = TaskWriterBuilderWrapper::new(\n            monitored_builder,\n            fanout_enabled,\n            schema.clone(),\n            partition_spec.clone(),\n            true,\n        );\n        let inner_writer = Some(Box::new(\n            writer_builder\n                .build()\n                .map_err(|err| SinkError::Iceberg(anyhow!(err)))?,\n        ) as Box<dyn IcebergWriter>);\n        Ok(Self {\n            arrow_schema: Arc::new(\n                schema_to_arrow_schema(table.metadata().current_schema())\n                    .map_err(|err| SinkError::Iceberg(anyhow!(err)))?,\n            ),\n            metrics: IcebergWriterMetrics {\n                _write_qps: write_qps,\n                _write_latency: write_latency,\n                write_bytes,\n            },\n            writer: IcebergWriterDispatch::Append {\n                writer: inner_writer,\n                writer_builder,\n            },\n            table,\n            actor_id: actor_id.to_string(),\n            sink_id: sink_id.to_string(),","sourceCodeStart":401,"sourceCodeEnd":437,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/iceberg/writer.rs#L401-L437","documentation":"The iceberg writer_builder.build() call failed while constructing the append-only DataFileWriter from the ParquetWriterBuilder/RollingFileWriterBuilder stack. The iceberg-rs Error is wrapped as SinkError::Iceberg. This indicates the writer configuration (schema, partition spec, writer properties) was rejected by the iceberg library at build time.","triggerScenarios":"Calling build_append_only when the Arrow/Iceberg schema pair, partition spec clone, or parquet writer properties are inconsistent — e.g. a schema the ParquetWriterBuilder cannot support, or an invalid partition spec combination passed to the DataFileWriterBuilder.","commonSituations":"Sinking columns whose types cannot be encoded as parquet by the configured writer properties; mismatched schema/partition-spec after table evolution; misconfigured parquet writer properties (e.g. invalid compression or dictionary settings).","solutions":["Read the wrapped iceberg library error (it carries the root cause) and address the specific build failure it reports","Verify the parquet writer properties (compression, page size) are values the pinned iceberg-rs version supports","Confirm the schema and partition_spec passed to the DataFileWriterBuilder match table.metadata().current_schema() and its default spec","Pin/upgrade iceberg-rs to a version compatible with the RisingWave connector code"],"exampleFix":"// before\nwriter_builder\n    .build()\n    .map_err(|err| SinkError::Iceberg(anyhow!(err)))?,\n// after\nwriter_builder.build().map_err(|err| {\n    SinkError::Iceberg(anyhow::anyhow!(\n        \"error from iceberg writer builder: {err} (schema: {:?}, partition: {:?})\",\n        schema,\n        partition_spec\n    ))\n})?","handlingStrategy":"try-catch","validationCode":"// Pre-check schema/spec consistency before building\nanyhow::ensure!(schema.fields().len() > 0, \"empty schema passed to writer builder\");\nanyhow::ensure!(partition_spec.fields().len() == table.metadata().default_partition_spec().map(|s| s.fields().len()).unwrap_or(0), \"partition spec mismatch\");","typeGuard":null,"tryCatchPattern":"writer_builder.build().map_err(|err| {\n    SinkError::Iceberg(anyhow!(\"error from iceberg writer builder: {err}\"))\n})?","preventionTips":["Use parquet writer property values supported by the pinned iceberg-rs version","Keep schema and partition spec sourced from the same table metadata snapshot","Match iceberg-rs and arrow crate versions when upgrading","Include schema context in the wrapped error for diagnosis"],"tags":["rust","iceberg","writer","parquet"],"backgroundTag":"invalid-config-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"}