dimas-b commented on code in PR #2302:
URL: https://github.com/apache/polaris/pull/2302#discussion_r2304268846


##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -570,12 +573,15 @@ public boolean sendNotification(TableIdentifier 
identifier, NotificationRequest
    * Fetch the metastore table entity for the given table identifier
    *
    * @param tableIdentifier The identifier of the table
-   * @return the Polaris table entity for the table
+   * @return the Polaris table entity for the table or null for external 
catalogs
    */
-  private IcebergTableLikeEntity getTableEntity(TableIdentifier 
tableIdentifier) {
+  private @Nullable IcebergTableLikeEntity getTableEntity(TableIdentifier 
tableIdentifier) {
     PolarisResolvedPathWrapper target = 
resolutionManifest.getResolvedPath(tableIdentifier);
-
-    return IcebergTableLikeEntity.of(target.getRawLeafEntity());
+    PolarisEntity rawLeafEntity = target.getRawLeafEntity();
+    if (rawLeafEntity.getType() == PolarisEntityType.TABLE_LIKE) {
+      return IcebergTableLikeEntity.of(rawLeafEntity);
+    }
+    return null; // could be an external catalog

Review Comment:
   to be clear: this conversation is interesting, but the changes in this PR 
still make sense from my POV :slightly_smiling_face: 



-- 
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: issues-unsubscr...@polaris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to