miR172 opened a new issue, #8121: URL: https://github.com/apache/iceberg/issues/8121
### Apache Iceberg version 1.3.0 (latest release) ### Query engine Spark ### Please describe the bug 🐞 I was using a customized catalog that on `load` throws `NoSuchNamespaceException` when the `Namespace` component of a `TableIdentifier` is not found. Only when namespace exists, will it check the table and throws `NoSuchTableException` if the table is not found. IMO this behavior respects the Catalog.java API https://github.com/apache/iceberg/blob/master/api/src/main/java/org/apache/iceberg/catalog/Catalog.java#L326 However, when using this customize Catalog with a Spark Catalog, ``` spark.read.option("snapshot-id", id).format("iceberg").load("catalog.namespace.table") ``` I cannot get this correctly resolved because [SparkCatalog will not try further on NoSuchNamespace from my Catalog](https://github.com/apache/iceberg/blob/master/spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/SparkCatalog.java#L573). I believe it failed before trying the pattern that I specified according to doc [here](https://iceberg.apache.org/docs/latest/spark-queries/#catalogs-with-dataframereader): `namespace.table` treated as a namespace according to the code and some debugging. I think this is a bug because SparkCatalog decided to try using `namespace.table` as a namespace, therefore it could optimistically continue trying other formats when that namespace not exist. This should be a simple change, please let me know whether this make sense and I'll put up a merge request soon. -- 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]
