jerqi commented on code in PR #14457:
URL: https://github.com/apache/iceberg/pull/14457#discussion_r2488401806


##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/SparkCatalog.java:
##########
@@ -234,6 +234,61 @@ public Table loadTable(Identifier ident, long timestamp) 
throws NoSuchTableExcep
     }
   }
 
+  @Override
+  public boolean tableExists(Identifier ident) {
+    try {
+      if (isPathIdentifier(ident)) {
+        loadFromPathIdentifier((PathIdentifier) ident);
+        return true;
+      } else {
+        boolean isExists = icebergCatalog.tableExists(buildIdentifier(ident));
+        if (isExists) {
+          return true;
+        }
+
+        // if the original load didn't work, try using the namespace as an 
identifier because

Review Comment:
   OK for me. I can reuse the `load` logic. Thanks.



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