-
Notifications
You must be signed in to change notification settings - Fork 501
Open
Description
Search before asking
- I searched in the issues and found nothing similar.
Motivation
PR #2189 added ADD COLUMN support for Paimon-enabled tables, including the server-side infrastructure (syncSchemaChangesToLake, idempotency checks). However, IcebergLakeCatalog.alterTable() still throws UnsupportedOperationException for schema changes.
When a user runs ALTER TABLE ADD COLUMN on a Fluss table with Iceberg datalake enabled, the schema change is applied to Fluss but not propagated to Iceberg, breaking lake queries.
This is the Iceberg counterpart of #2128 and a sub-task of #2067.
Solution
Implement AddColumn handling in IcebergLakeCatalog.alterTable() using Iceberg's UpdateSchema API, matching Paimon's constraints and idempotency pattern:
- Use
updateSchema.addColumn()+moveBefore(__bucket)to position new columns before system columns - 3-way schema compatibility check for crash recovery (same pattern as
PaimonLakeCatalog) - Recursive type comparison ignoring Iceberg-assigned field IDs (needed because Iceberg reassigns field IDs during table creation, which breaks
Type.equals()for complex types like Map/Array/Struct) - Same constraints as Paimon: nullable columns only, LAST position only
Anything else?
No response
Willingness to contribute
- I'm willing to submit a PR!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels