shrutimane2409 opened a new pull request, #1035:
URL: https://github.com/apache/incubator-xtable/pull/1035

   Fixes #1034
   
   ## What is the purpose of the pull request
   
   When a record key column changes from required to nullable on an existing 
Iceberg target, `IcebergSchemaSync` made the column optional but kept it as an 
identifier field, so Iceberg rejected the commit with `Cannot add field id as 
an identifier field: not a required field`.
   
   ## Brief change log
   
   - `IcebergSchemaSync.sync` sets the identifier fields of the latest schema 
in the same `UpdateSchema` when they differ from the current schema's.
   - When the identifier fields are unchanged, the update is the same as before.
   
   ## Verify this pull request
   
   - `TestIcebergSchemaSync#testRecordKeyBecomesOptional` syncs a real Hadoop 
Iceberg table whose required record key becomes optional, and checks the column 
is optional and the identifier fields are cleared.
   - `TestIcebergSchemaSync#testIdentifierFieldsUnchanged` checks that 
identifier fields are not touched when they do not change.


-- 
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