eric-maynard commented on code in PR #1555: URL: https://github.com/apache/polaris/pull/1555#discussion_r2105648808
########## extension/persistence/relational-jdbc/src/main/java/org/apache/polaris/extension/persistence/relational/jdbc/JdbcBasePersistenceImpl.java: ########## @@ -425,11 +436,8 @@ public <T> Page<T> listEntities( } data.forEach(results::add); }); - List<T> resultsOrEmpty = - results == null - ? Collections.emptyList() - : results.stream().filter(entityFilter).map(transformer).collect(Collectors.toList()); - return Page.fromItems(resultsOrEmpty); + List<T> resultsOrEmpty = results.stream().map(transformer).collect(Collectors.toList()); + return pageToken.buildNextPage(resultsOrEmpty); Review Comment: > It looks like buildNextPage does not have to be a function of the previous page token. In this particular implementation, no. In other implementations, such as the previous `OffsetPageToken`, it is a function of the previous token. Beyond that, this seems intuitive to me because you're essentially adding data to one page to get a new page. Empty last pages are fine. -- 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