nastra commented on code in PR #9782: URL: https://github.com/apache/iceberg/pull/9782#discussion_r1570124615
########## core/src/main/java/org/apache/iceberg/rest/CatalogHandlers.java: ########## @@ -117,6 +118,29 @@ public static ListNamespacesResponse listNamespaces( return ListNamespacesResponse.builder().addAll(results).build(); } + public static ListNamespacesResponse listNamespaces( + SupportsNamespaces catalog, Namespace parent, String pageToken, String pageSize) { + List<Namespace> results; + List<Namespace> subResults; + + if (parent.isEmpty()) { + results = catalog.listNamespaces(); + } else { + results = catalog.listNamespaces(parent); + } + + int start = pageToken.equals(INTIAL_PAGE_TOKEN) ? 0 : Integer.parseInt(pageToken); Review Comment: ```suggestion int start = INTIAL_PAGE_TOKEN.equals(pageToken) ? 0 : Integer.parseInt(pageToken); ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org