dawidwys commented on a change in pull request #9971: [FLINK-14490][table] Add
methods for interacting with temporary objects
URL: https://github.com/apache/flink/pull/9971#discussion_r339424993
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/CatalogManager.java
##########
@@ -501,6 +537,11 @@ public void alterTable(CatalogBaseTable table,
ObjectIdentifier objectIdentifier
* does not exist.
*/
public void dropTable(ObjectIdentifier objectIdentifier, boolean
ignoreIfNotExists) {
+ if (temporaryTables.containsKey(objectIdentifier)) {
Review comment:
Spark does not have 3-part qualified temporary objects. We followed MySQL on
that topic.
This behavior is introduced to prevent unintentional drops of temporary
tables, which might have very costly undesirable effects. Users are usually
accustomed with `DROP TABLE`, but not necessarily with `DROP TEMPORARY TABLE`.
If a user issues a `DROP TABLE` with the intent of dropping the temporary table
it will actually drop in a drop of the permanent one.
Dropping tables is a very invasive operation. I tried to design the
behaviour in a way to force the user make a really conscious decision on which
table should be dropped.
BTW, as a side note, this behaviour is described in the FLIP-64. There were
no objections towards that behaviour during the discussion.
----------------------------------------------------------------
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]
With regards,
Apache Git Services