{"record":{"id":"4d9697ca92e1a575","repo":"risingwavelabs/risingwave","slug":"alter-table-is-not-supported-for-iceberg-table-4d9697","errorCode":null,"errorMessage":"ALTER TABLE {} is not supported for iceberg table: {}.{}. Existing column schema mutation is not supported currently","messagePattern":"ALTER TABLE (.+?) is not supported for iceberg table: (.+?)\\.(.+?)\\. Existing column schema mutation is not supported currently","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/frontend/src/handler/mod.rs","lineNumber":1759,"sourceCode":"                    schema_name,\n                    table_name\n                );\n            }\n        }\n        AlterTableOperation::DropColumn { .. } => {\n            if !has_auto_refresh_schema_sink {\n                bail!(\n                    \"ALTER TABLE {} is not supported for iceberg table without auto schema change sink: {}.{}\",\n                    operation,\n                    schema_name,\n                    table_name\n                );\n            }\n        }\n        AlterTableOperation::RenameColumn { .. }\n        | AlterTableOperation::ChangeColumn { .. }\n        | AlterTableOperation::AlterColumn { .. } => {\n            bail!(\n                \"ALTER TABLE {} is not supported for iceberg table: {}.{}. Existing column schema mutation is not supported currently\",\n                operation,\n                schema_name,\n                table_name\n            );\n        }\n        AlterTableOperation::RenameTable { .. } => {\n            bail!(\n                \"ALTER TABLE RENAME is not supported for iceberg table: {}.{}\",\n                schema_name,\n                table_name\n            );\n        }\n        AlterTableOperation::SetParallelism { .. } => {\n            bail!(\n                \"ALTER TABLE SET PARALLELISM is not supported for iceberg table: {}.{}\",\n                schema_name,\n                table_name","sourceCodeStart":1741,"sourceCodeEnd":1777,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/handler/mod.rs#L1741-L1777","documentation":"Mutating an existing column's definition (RENAME COLUMN, CHANGE COLUMN, ALTER COLUMN) on an Iceberg table is rejected unconditionally. Iceberg connector schema evolution in RisingWave only supports additive changes (add/drop via an auto-refresh-schema sink); in-place column mutation is not implemented.","triggerScenarios":"Executing `ALTER TABLE <iceberg_table> RENAME COLUMN ...`, `CHANGE COLUMN ...`, or `ALTER COLUMN ...` on any Iceberg-backed table, regardless of sink settings.","commonSituations":"Renaming a misnamed column or widening its type on an Iceberg table; porting Postgres ALTER TABLE habits to Iceberg-backed tables.","solutions":["Add a new column with the desired name/type (via ADD COLUMN with an auto-refresh-schema sink), backfill it, then DROP the old column.","Perform the rename/type change directly on the Iceberg side and refresh the RisingWave schema with REFRESH SCHEMA where applicable.","Drop and recreate the table and sink with the corrected schema if feasible."],"exampleFix":"// before\nALTER TABLE t RENAME COLUMN a TO b;\n// after\nALTER TABLE t ADD COLUMN b <type>;\n-- backfill b from a, then\nALTER TABLE t DROP COLUMN a;","handlingStrategy":"validation","validationCode":"-- Never issue RENAME/CHANGE/ALTER COLUMN on iceberg tables\nSELECT relation_kind FROM rw_catalog.rw_relations WHERE name = 't';\n-- if iceberg-backed, use add-new + backfill + drop-old instead","typeGuard":"fn is_column_mutation(op: &AlterTableOperation) -> bool {\n    matches!(op,\n        AlterTableOperation::RenameColumn {..}\n        | AlterTableOperation::ChangeColumn {..}\n        | AlterTableOperation::AlterColumn {..})\n}","tryCatchPattern":"match client.alter_table(op).await {\n    Err(e) if e.message().contains(\"Existing column schema mutation is not supported\") => {\n        // fall back to add-new-column + drop-old workflow\n    }\n    other => other?,\n}","preventionTips":["Treat existing-column mutation as unsupported for all Iceberg tables.","Adopt the add-new/backfill/drop-old pattern for renames and type changes.","Document this limitation in schema-migration runbooks."],"tags":["sql","iceberg","schema-change","unsupported-operation"],"backgroundTag":"operation-not-supported","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}