snuyanzin commented on code in PR #25810:
URL: https://github.com/apache/flink/pull/25810#discussion_r1894272407


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/CatalogManager.java:
##########
@@ -1297,30 +1303,42 @@ public void dropMaterializedTable(
      * @param objectIdentifier The fully qualified path of the view to drop.
      * @param ignoreIfNotExists If false exception will be thrown if the view 
to drop does not
      *     exist.
+     * @return true if view existed in the given path and was dropped, false 
if view didn't exist in
+     *     the given path and ignoreIfNotExists was true.
      */
-    public void dropView(ObjectIdentifier objectIdentifier, boolean 
ignoreIfNotExists) {
-        dropTableInternal(objectIdentifier, ignoreIfNotExists, false, false);
-    }
+    public boolean dropView(ObjectIdentifier objectIdentifier, boolean 
ignoreIfNotExists) {
+        return dropTableInternal(objectIdentifier, ignoreIfNotExists, 
TableKind.VIEW);
+    }
+
+    private boolean dropTableInternal(
+            ObjectIdentifier objectIdentifier, boolean ignoreIfNotExists, 
TableKind kind) {
+        final Predicate<CatalogBaseTable> filter;
+        final String tableOrView;
+        switch (kind) {

Review Comment:
   I disagree about overhead here
   1. it doesn't appear in hot code
   2. just for fun I created a small benchmark which doesn't see differences 
   
https://github.com/datafaker-net/datafaker-benchmark/commit/892aecfd39d859a0a92d55b0d8db2b30044ae9a0



-- 
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...@flink.apache.org

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

Reply via email to