-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Apache Iceberg version
1.3.1 (latest release)
Query engine
Spark
Please describe the bug 🐞
Running this command with:
spark.sql(DROP DATABASE IF EXISTS dbname CASCADE)
Gives the below exception:
org.apache.iceberg.exceptions.NamespaceNotEmptyException: Namespace dbname is not empty. One or more tables exist. at org.apache.iceberg.hive.HiveCatalog.dropNamespace(HiveCatalog.java:353) at org.apache.iceberg.spark.SparkCatalog.dropNamespace(SparkCatalog.java:447) at org.apache.spark.sql.execution.datasources.v2.DropNamespaceExec.run(DropNamespaceExec.scala:52) at org.apache.spark.sql.execution.datasources.v2.V2CommandExec.result$lzycompute(V2CommandExec.scala:40) at org.apache.spark.sql.execution.datasources.v2.V2CommandExec.result(V2CommandExec.scala:40) at org.apache.spark.sql.execution.datasources.v2.V2CommandExec.executeCollect(V2CommandExec.scala:46)
The expectation is that with CASCADE specified, command should delete all tables and the db itself.