rdblue commented on code in PR #4946:
URL: https://github.com/apache/iceberg/pull/4946#discussion_r889719083
##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java:
##########
@@ -246,11 +246,26 @@ public org.apache.iceberg.Table
registerTable(TableIdentifier identifier, String
TableOperations ops = newTableOps(identifier);
InputFile metadataFile = fileIO.newInputFile(metadataFileLocation);
TableMetadata metadata = TableMetadataParser.read(ops.io(), metadataFile);
+
+ if (!isMetastoreTable(metadataFileLocation)) {
+ // Metastore table and filesystem tables will have different naming
conventions as per the spec.
Review Comment:
This seems unnecessary. Why not just update `parseVersion` to return `-1` if
the version isn't valid? I think that's a better solution than rewriting the
metadata.
--
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]