Call purgeTable in Iceberg REST catalog#15855
Conversation
Upcoming 1.2.0 version doesn't delete data in RESTSessionCatalog.dropTable method.
| public void dropTable(ConnectorSession session, SchemaTableName schemaTableName) | ||
| { | ||
| if (!restSessionCatalog.dropTable(convert(session), toIdentifier(schemaTableName))) { | ||
| if (!restSessionCatalog.purgeTable(convert(session), toIdentifier(schemaTableName))) { |
There was a problem hiding this comment.
@ebyhr Rather than change the current behavior, can we make this a configuration property? There are many situations where you don't want drop to destroy data and I'd rather be explicit about the intent rather than have systems ignore the request (like is done in many cases with Hive Metastore).
There was a problem hiding this comment.
We've been moving towards solving that situation with an unregister_table procedure: #15807 and #15853
DROP TABLE is an unrecoverable operation across all the other Trino connectors, so I think that a separate procedure like this will be clearer to users than a config property that gets set at cluster creation.
There was a problem hiding this comment.
Hopefully the symmetrical naming with the register_table procedure will make it more intuitive too
Description
Call
purgeTablein Iceberg REST catalogRelease notes
(x) This is not user-visible or docs only and no release notes are required.