GCP: Fix listNamespaces to return empty list for existing namespaces
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start in bigquery/src/main/java/org/apache/iceberg/gcp/bigquery/BigQueryMetastoreCatalog.java at lines 233-238, then compare HiveCatalog#listNamespaces in hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java. Reproduce the listed createNamespace and listNamespaces calls; done means an existing non-empty namespace returns an empty list while a missing namespace still raises NoSuchNamespaceException.
Written by the indexing model from the issue text.
Description
Apache Iceberg version
main @ 035fc1e40
Query engine
N/A — catalog-level bug, engine-agnostic
Please describe the bug
BigQueryMetastoreCatalog#listNamespaces(Namespace) always throws NoSuchNamespaceException for any non-empty namespace argument, even when the namespace exists (bigquery/src/main/java/org/apache/iceberg/gcp/bigquery/BigQueryMetastoreCatalog.java line 233-238, prior to fix).
This contradicts the method's own Javadoc: "Since this catalog only supports one-level namespaces, it always returns an empty list unless passed an empty namespace to list all namespaces within the catalog."
HiveCatalog#listNamespaces(Namespace) (hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java line 530-537) implements the correct pattern: check namespaceExists(namespace) first, return ImmutableList.of() if it exists, throw only if it does not.
Steps to reproduce
catalog.createNamespace(Namespace.of("existing_ns"))catalog.listNamespaces(Namespace.of("existing_ns"))
Expected: empty list. Actual: NoSuchNamespaceException.
Additional context
N/A — covered above.
- Dominant language
- Java
- Stars
- 9.3k
- Forks
- 3.5k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 143
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/iceberg
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
improvement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100