Mihaly Szjatinya created IMPALA-15819:
-----------------------------------------
Summary: Support DROP DATABASE CASCADE on Iceberg REST catalogs
Key: IMPALA-15819
URL: https://issues.apache.org/jira/browse/IMPALA-15819
Project: IMPALA
Issue Type: Sub-task
Components: Frontend, Catalog
Reporter: Mihaly Szjatinya
IMPALA-15503 supports DROP DATABASE on Iceberg REST catalogs, but rejects
CASCADE: the REST protocol drops empty namespaces only, so a non-empty
namespace is refused by the server.
CASCADE could be implemented on the coordinator, as Trino does for Iceberg
catalogs (IcebergMetadata.dropSchema() with cascade=true: it lists and drops
the views and tables of the schema one by one, then drops the namespace):
# list the tables of the namespace through the REST catalog,
# drop each table,
# drop the (now empty) namespace.
Points to decide:
* The operation is not atomic: a failure, or a concurrent CREATE TABLE in the
namespace, can leave some tables dropped and the namespace in place. The
statement should fail with a clear message, and a retry should finish the job.
* PURGE semantics of the dropped tables (purgeRequested or not), cf. DROP TABLE
... PURGE on REST tables.
* Tables of the namespace that Impala cannot load, or that are blacklisted.
* Views, once REST views are supported (IMPALA-15731).
For comparison, Iceberg's SparkCatalog.dropNamespace() ignores cascade and only
drops empty namespaces.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)