ayushtkn commented on code in PR #3612:
URL: https://github.com/apache/hive/pull/3612#discussion_r984439963
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java:
##########
@@ -386,6 +405,13 @@ private void
assertNotCrossTableMetadataLocationChange(Map<String, String> tblPa
icebergTable.name(), newMetadataLocation)
);
}
+ if (!currentMetadata.metadataFileLocation().equals(newMetadataLocation)
&&
+
!context.getProperties().containsKey(MANUAL_ICEBERG_METADATA_LOCATION_CHANGE)) {
+ // If we got here then this is an alter table operation where the
table to be changed had an Iceberg commit
+ // meanwhile. The base metadata locations differ, while we know that
this wasn't an intentional, manual
+ // metadata_location set by a user. To protect the interim commit we
need to refresh the metadata file location.
+ tblParams.put(BaseMetastoreTableOperations.METADATA_LOCATION_PROP,
currentMetadata.metadataFileLocation());
Review Comment:
Good to have a log line here, as a follow up as we discussed we can have
some logic to figure out whether it is only a Stats upgrade & if so, make this
Alter a NO-OP in future
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]