rdblue commented on code in PR #4922:
URL: https://github.com/apache/iceberg/pull/4922#discussion_r912532893


##########
core/src/main/java/org/apache/iceberg/BaseMetastoreTableOperations.java:
##########
@@ -174,7 +174,7 @@ protected void refreshFromMetadataLocation(String 
newLocation, int numRetries) {
   protected void refreshFromMetadataLocation(String newLocation, 
Predicate<Exception> shouldRetry,
                                              int numRetries) {
     refreshFromMetadataLocation(newLocation, shouldRetry, numRetries,
-        metadataLocation -> TableMetadataParser.read(io(), metadataLocation));
+        metadataLocation -> TableMetadata.buildFromLocation(io(), 
metadataLocation).build());

Review Comment:
   I don't think we should change the metadata after reading it, so it is 
probably best to fix this up in the `TableMetadata` constructor rather than in 
the builder, which is used to produce new `TableMetadata` objects.



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

Reply via email to