XN137 commented on code in PR #2492:
URL: https://github.com/apache/polaris/pull/2492#discussion_r2317960806


##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java:
##########
@@ -1182,8 +1184,11 @@ private <T extends PolarisEntity & LocationBasedEntity> 
void validateNoLocationO
                     tbl -> {
                       PolarisResolvedPathWrapper resolveTablePath =
                           resolutionManifest.getResolvedPath(tbl);
-                      return 
IcebergTableLikeEntity.of(resolveTablePath.getRawLeafEntity())
-                          .getBaseLocation();
+                      PolarisEntity tableEntity = 
resolveTablePath.getRawLeafEntity();
+                      if (tableEntity.getSubType() == 
PolarisEntitySubType.GENERIC_TABLE) {
+                        return 
GenericTableEntity.of(tableEntity).getBaseLocation();

Review Comment:
   since the `getBaseLocation()` impl is different between `GenericTableEntity` 
and `IcebergTableLikeEntity` this might have actually fixed a bug?



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

Reply via email to