adutra commented on code in PR #4506:
URL: https://github.com/apache/polaris/pull/4506#discussion_r3282892912
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java:
##########
@@ -337,6 +367,64 @@ public Table registerTable(TableIdentifier identifier,
String metadataFileLocati
return new BaseTable(ops, fullTableName(name(), identifier),
metricsReporter());
}
+ private Table overwriteRegisteredTable(
+ TableIdentifier identifier, String metadataFileLocation, String
locationDir) {
+ PolarisResolvedPathWrapper resolvedPath =
+ resolvedEntityView.getPassthroughResolvedPath(
+ ResolvedPathKey.ofTableLike(identifier),
PolarisEntitySubType.ANY_SUBTYPE);
+ if (resolvedPath == null || resolvedPath.getRawLeafEntity() == null) {
+ throw new NoSuchTableException("Table does not exist: %s", identifier);
Review Comment:
On line 330 we call `tableExists` already. Here, we need the resolved path
instance. It should normally never be null (since we know already that the
table exists), but I think the original author introduced this check in case
the entity is dropped between the check on line 330 and this line.
--
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]