lasdf1234 opened a new pull request, #14542:
URL: https://github.com/apache/gravitino/pull/14542

   ### What changes were proposed in this pull request?
   
   - Expose an optional `Column.fieldId()` and have Iceberg columns carry the 
Iceberg field id from `ConvertUtil.fromNestedField`.
   - Persist a `gravitino.column.field-ids` map on the table entity (entity-id 
→ field-id).
   - On load/alter column sync, when that map is present, resolve renames/drops 
by field id before matching by name, so column entity ids (and their tags) 
survive IRC/Spark schema evolution.
   
   ### Why are the changes needed?
   
   Fixes #14535. Gravitino API renames already keep tags; schema changes that 
reach the table only through Iceberg REST were matched by name, so a rename 
looked like a drop plus an add.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No public API behavior change for callers that do not use Iceberg field ids. 
Iceberg catalogs now keep column tags across renames made outside the Gravitino 
table API. `Column.fieldId()` is a new optional default method.
   
   ### How was this patch tested?
   
   - `./gradlew :core:test --tests 
'org.apache.gravitino.catalog.TestTableOperationDispatcher.testResolveNameChangesByFieldId'
 -PskipITs -PskipWeb=true`
   - `./gradlew :catalogs:catalog-lakehouse-iceberg:test --tests 
'org.apache.gravitino.catalog.lakehouse.iceberg.converter.TestConvertUtil.testFromNestedField'
 -PskipITs -PskipWeb=true`
   
   
   Made with [Cursor](https://cursor.com)


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