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

   ### What changes were proposed in this pull request?
   
   Populate `AuditInfo` (creator and create time) when loading Iceberg tables 
via
   `IcebergTable.fromIcebergTable()`, instead of hardcoding `AuditInfo.EMPTY`.
   
   - Extract the `owner` table property as the `creator`
   - Use `lastUpdatedMillis` from Iceberg `TableMetadata` as the `createTime`
   
   ### Why are the changes needed?
   
   When tables are created or updated outside the Gravitino Web UI (e.g., via
   Iceberg REST Catalog, Spark, or other Iceberg clients), the "Created by" /
   "Updated by" user and timestamp fields are not populated in Gravitino's 
metadata
   UI. This is because `IcebergTable.fromIcebergTable()` discards the available
   audit information by using `AuditInfo.EMPTY`.
   
   Fix: #7833
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Tables loaded from Iceberg catalogs will now show the creator (from the
   `owner` table property) and creation timestamp in the Gravitino Web UI and 
API
   responses, where previously these fields were empty.
   
   ### How was this patch tested?
   
   Added two unit tests in `TestIcebergTable`:
   - `testFromIcebergTablePopulatesAuditInfoWithOwner` — verifies creator and
     createTime are populated when the `owner` property is set
   - `testFromIcebergTableWithoutOwnerProperty` — verifies no regression when
     `owner` is absent (creator is null, createTime is still set)
   
   All existing `TestIcebergTable` tests continue to pass.


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