lirui-apache commented on a change in pull request #14802:
URL: https://github.com/apache/flink/pull/14802#discussion_r568281785



##########
File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/CatalogManager.java
##########
@@ -697,6 +703,9 @@ private void dropTemporaryTableInternal(
         CatalogBaseTable catalogBaseTable = 
temporaryTables.get(objectIdentifier);
         if (filter.test(catalogBaseTable)) {
             temporaryTables.remove(objectIdentifier);
+            Optional<TemporaryOperationListener> listener =
+                    getTemporaryOperationListener(objectIdentifier);
+            listener.ifPresent(l -> 
l.onDropTemporaryTable(objectIdentifier.toObjectPath()));

Review comment:
       I thought more about this and since removing the table is unlikely fail 
compared to `onDropTemporaryTable`, I agree we should call 
`onDropTemporaryTable` before the table is removed.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to