dimas-b commented on code in PR #1378:
URL: https://github.com/apache/polaris/pull/1378#discussion_r2048013301


##########
service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java:
##########
@@ -1328,6 +1383,21 @@ public void doCommit(TableMetadata base, TableMetadata 
metadata) {
       String newLocation = writeNewMetadataIfRequired(base == null, metadata);
       String oldLocation = base == null ? null : base.metadataFileLocation();
 
+      // TODO: we should not need to do this hack, but there's no other way to 
modify
+      // currentMetadata / currentMetadataLocation
+      if (updateMetadataOnCommit) {
+        try {
+          tableMetadataField.set(metadata, newLocation);
+          unsafe.putObject(metadata, changesFieldOffset, new 
ArrayList<MetadataUpdate>());

Review Comment:
   If we have to resolve to this kind of trickery in order to make Iceberg code 
behave as we want it to behave, I wonder if it might be preferable to revamp 
this class as a whole and directly implement the logic for storing and loading 
metadata from storage. WDYT?



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