rdblue commented on a change in pull request #4467:
URL: https://github.com/apache/iceberg/pull/4467#discussion_r841101944



##########
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:
       I think this is correct. We need to support passing parent still, but 
the path should be the namespaces resource, not the one with a specific 
namespace.




-- 
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]

Reply via email to