dimas-b commented on code in PR #1528:
URL: https://github.com/apache/polaris/pull/1528#discussion_r2080163100
##########
service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -169,6 +170,23 @@ public static boolean isCreate(UpdateTableRequest request)
{
return isCreate;
}
+ public ListNamespacesResponse listNamespaces(
+ Namespace parent, String pageToken, Integer pageSize) {
+ PolarisAuthorizableOperation op =
PolarisAuthorizableOperation.LIST_NAMESPACES;
+ authorizeBasicNamespaceOperationOrThrow(op, parent);
+
+ if (baseCatalog instanceof IcebergCatalog polarisCatalog) {
+ Page<Namespace> results = polarisCatalog.listNamespaces(parent,
pageToken, pageSize);
+ return ListNamespacesResponse.builder()
+ .addAll(results.items)
+ .nextPageToken(results.pageToken.toString())
+ .build();
+ } else {
+ return CatalogHandlers.listNamespaces(
+ namespaceCatalog, parent, pageToken, String.valueOf(pageSize));
Review Comment:
Followup SGTM
--
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]