fresh-borzoni opened a new issue, #2592:
URL: https://github.com/apache/fluss/issues/2592

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/fluss/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
   
   - [x] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to