amogh-jahagirdar commented on code in PR #4922:
URL: https://github.com/apache/iceberg/pull/4922#discussion_r887275295


##########
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:
   Don't know about this, here we parse the metadata and then again copy over 
the structures in the builder. But ultimately when we read, we need to go 
through a single point in the builder for setting main if it doesn't exist and 
there is a current snapshot. I don't think just setting the ref when parsing 
would work because ultimately it needs to be encapsulated in an update even for 
operations which don't produce snapshots. @rdblue thoughts?



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