davidradl commented on code in PR #25810:
URL: https://github.com/apache/flink/pull/25810#discussion_r1894987435
##########
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:
Interesting the tests did not show too much difference - I was always told
avoid reflection unless necessary - if you feel strongly about this - happy to
leave this as-is given what you found with your testing.
sorry another optional nit: tableOrView -> kindStr
--
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]