eric-maynard commented on code in PR #1528: URL: https://github.com/apache/polaris/pull/1528#discussion_r2080120839
########## extension/persistence/eclipselink/src/main/java/org/apache/polaris/extension/persistence/impl/eclipselink/PolarisEclipseLinkMetaStoreSessionImpl.java: ########## @@ -450,27 +455,33 @@ public List<EntityNameLookupRecord> lookupEntityActiveBatchInCurrentTxn( entity.getParentId(), entity.getName(), entity.getTypeCode(), - entity.getSubTypeCode())); + entity.getSubTypeCode()), + pageToken); } @Override - public @Nonnull <T> List<T> listEntitiesInCurrentTxn( + public @Nonnull <T> Page<T> listEntitiesInCurrentTxn( @Nonnull PolarisCallContext callCtx, long catalogId, long parentId, @Nonnull PolarisEntityType entityType, - int limit, @Nonnull Predicate<PolarisBaseEntity> entityFilter, - @Nonnull Function<PolarisBaseEntity, T> transformer) { + @Nonnull Function<PolarisBaseEntity, T> transformer, + @Nonnull PageToken pageToken) { // full range scan under the parent for that type - return this.store - .lookupFullEntitiesActive(localSession.get(), catalogId, parentId, entityType) - .stream() - .map(ModelEntity::toEntity) - .filter(entityFilter) - .limit(limit) - .map(transformer) - .collect(Collectors.toList()); + Stream<PolarisBaseEntity> data = + this.store + .lookupFullEntitiesActive( + localSession.get(), catalogId, parentId, entityType, pageToken) + .stream() + .map(ModelEntity::toEntity) + .filter(entityFilter); + + if (pageToken instanceof HasPageSize hasPageSize) { Review Comment: This is correct for the current code, where `HasPageSize` is just used as a limit. When page tokens are implemented this logic will definitely change! -- 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...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org