kbendick commented on a change in pull request #4467:
URL: https://github.com/apache/iceberg/pull/4467#discussion_r841017103
##########
File path: core/src/main/java/org/apache/iceberg/rest/RESTCatalog.java
##########
@@ -139,61 +138,57 @@ public void createNamespace(Namespace namespace,
Map<String, String> metadata) {
.build();
// for now, ignore the response because there is no way to return it
- client.post("v1/namespaces", request, CreateNamespaceResponse.class,
ErrorHandlers.namespaceErrorHandler());
+ client.post(paths.namespaces(), request, CreateNamespaceResponse.class,
ErrorHandlers.namespaceErrorHandler());
}
@Override
public List<Namespace> listNamespaces(Namespace namespace) throws
NoSuchNamespaceException {
Preconditions.checkArgument(namespace.isEmpty(), "Cannot list namespaces
under parent: %s", namespace);
// String joined = NULL.join(namespace.levels());
ListNamespacesResponse response = client
- .get("v1/namespaces", ListNamespacesResponse.class,
ErrorHandlers.namespaceErrorHandler());
+ .get(paths.namespaces(), ListNamespacesResponse.class,
ErrorHandlers.namespaceErrorHandler());
Review comment:
This route is incorrect. List namespaces underneath a parent namespace
is `GET /v1/namespaces?parent=accounting`, but this will generate `GET
/v1/namespaces/accounting`.
iirc this is to make it easier to list the empty namespace (top-level
namespace or unknown I guess) for systems that might _need_ the variable there
in the path when it's expected
--
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]