pvary commented on code in PR #17873:
URL: https://github.com/apache/iceberg/pull/17873#discussion_r4014295439


##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java:
##########
@@ -440,34 +441,77 @@ public boolean tableExists(ObjectPath tablePath) throws 
CatalogException {
   @Override
   public void dropTable(ObjectPath tablePath, boolean ignoreIfNotExists)
       throws TableNotExistException, CatalogException {
+    TableIdentifier identifier = toIdentifier(tablePath);
+
+    boolean dropped;
     try {
-      icebergCatalog.dropTable(toIdentifier(tablePath));
+      dropped = icebergCatalog.dropTable(identifier);
     } catch (org.apache.iceberg.exceptions.NoSuchTableException e) {
+      // some catalogs signal "not a table" by throwing (e.g. Hive for a view 
entry)
+      if (canBeView(tablePath) && asViewCatalog.dropView(identifier)) {
+        return;

Review Comment:
   I hate these `return` statements in the middle of the code



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