rdblue commented on code in PR #9754:
URL: https://github.com/apache/iceberg/pull/9754#discussion_r1494846660


##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -717,8 +718,15 @@ public Transaction createTransaction() {
 
     @Override
     public Transaction replaceTransaction() {
-      if (viewExists(context, ident)) {
-        throw new AlreadyExistsException("View with same name already exists: 
%s", ident);
+      try {
+        if (viewExists(context, ident)) {
+          throw new AlreadyExistsException("View with same name already 
exists: %s", ident);
+        }
+      } catch (RESTException | UnsupportedOperationException e) {
+        // don't fail if the server doesn't support views, which could be due 
to:
+        // 1. server or backing catalog doesn't support views
+        // 2. newer client talks to an older server that doesn't support views
+        LOG.debug("Could not check whether view {} exists: {}", ident, 
e.getMessage(), e);

Review Comment:
   Style: typically we would use "Failed to check whether view {} exists" and 
leave the message to the exception trace.



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