thswlsqls opened a new pull request, #17060:
URL: https://github.com/apache/iceberg/pull/17060
Closes #17058
## Summary
- `listNamespaces(Namespace)` threw `NoSuchNamespaceException` for any
non-empty namespace, even existing ones, contradicting its own Javadoc ("always
returns an empty list" for an existing single-level namespace).
- Now checks `namespaceExists(namespace)`: returns `ImmutableList.of()` if
it exists, throws only if it does not.
- Matches `HiveCatalog#listNamespaces(Namespace)`
(hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java line
530-537), which uses the same existence-check-then-throw pattern.
## Testing done
- Added
`TestBigQueryCatalog#testListNamespacesWithExistingNamespaceReturnsEmptyList`
covering the existing-namespace case.
- `./gradlew :iceberg-bigquery:check` — 110 tests, 0 failures, 0 errors (23
skipped, pre-existing `@Disabled` cases unrelated to this change).
--
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]