nastra commented on code in PR #7196:
URL: https://github.com/apache/iceberg/pull/7196#discussion_r1150527154
##########
api/src/main/java/org/apache/iceberg/catalog/SupportsNamespaces.java:
##########
@@ -78,7 +78,7 @@ default List<Namespace> listNamespaces() {
* List namespaces from the namespace.
*
* <p>For example, if table a.b.t exists, use 'SELECT NAMESPACE IN a' this
method must return
- * Namepace.of("a","b") {@link Namespace}.
+ * Namespace.of("a","b") {@link Namespace}.
*
* @return a List of namespace {@link Namespace} names
* @throws NoSuchNamespaceException If the namespace does not exist
(optional)
Review Comment:
For REST it should only return the child elements of the Namespace. So if
you have two tables `a.b.c.table` & `a.b.d.table` and list namespaces:
* with `Namespace.empty()` -> should return `Namespace.of("a")`
* with `Namespace.of("a")` -> should return `Namespace.of("a.b")`
* with `Namespace.of("a.b")` -> should return `Namespace.of("a.b.c")` &
`Namespace.of("a.b.d")`
* with `Namespace.of("a.b.c")` -> should return nothing, because there are
no child namespaces
I think it would be good to make the Javadoc clearer with an example like
the above. Additionally, we should probably update
`CatalogTests.testListNestedNamespaces()` so show this example.
--
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]