eric-maynard commented on code in PR #1838:
URL: https://github.com/apache/polaris/pull/1838#discussion_r2139126077
##########
service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java:
##########
@@ -798,13 +790,12 @@ private Page<Namespace> listNamespaces(Namespace
namespace, PageToken pageToken)
PolarisEntityType.NAMESPACE,
PolarisEntitySubType.NULL_SUBTYPE,
pageToken);
- List<PolarisEntity.NameAndId> entities =
- PolarisEntity.toNameAndIdList(listResult.getEntities());
- List<Namespace> namespaces =
PolarisCatalogHelpers.nameAndIdToNamespaces(catalogPath, entities);
return listResult
- .getPageToken()
- .map(token -> new Page<>(token, namespaces))
- .orElseGet(() -> Page.fromItems(namespaces));
+ .getEntities()
+ .map(
+ record ->
Review Comment:
Why `record`?
##########
service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java:
##########
@@ -798,13 +790,12 @@ private Page<Namespace> listNamespaces(Namespace
namespace, PageToken pageToken)
PolarisEntityType.NAMESPACE,
PolarisEntitySubType.NULL_SUBTYPE,
pageToken);
- List<PolarisEntity.NameAndId> entities =
- PolarisEntity.toNameAndIdList(listResult.getEntities());
- List<Namespace> namespaces =
PolarisCatalogHelpers.nameAndIdToNamespaces(catalogPath, entities);
return listResult
- .getPageToken()
- .map(token -> new Page<>(token, namespaces))
- .orElseGet(() -> Page.fromItems(namespaces));
+ .getEntities()
+ .map(
+ record ->
Review Comment:
On the whole, this doesn't look less complicated than the existing setup to
me
--
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]