netvl opened a new issue #3109: URL: https://github.com/apache/iceberg/issues/3109
The `SparkSessionCatalog.listTables()` method (the V2 Spark catalog API) looks like this: https://github.com/apache/iceberg/blob/838cc652273c1444155bec2e1d6029cfbdbf3ea3/spark3/src/main/java/org/apache/iceberg/spark/SparkSessionCatalog.java#L110-L113 That is, it delegates to the underlying session catalog directly. This results in Iceberg tables not being listed in the result of the `listTables()` call, making a code like this to fail in presence of Iceberg tables: ```scala val tables = catalog.listTables(namespace) tables.foreach(catalog.dropTable) catalog.asInstanceOf[SupportsNamespaces].dropNamespace(namespace) ``` because the namespace is not actually empty, because `listTables()` does not return Iceberg tables. This is highly confusing, because as a user I would expect the catalog API behave consistently to the method names and API description. `listTables()` not returning all tables in a namespace seems like a major breach of the API contract. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
