eric-maynard commented on code in PR #1555:
URL: https://github.com/apache/polaris/pull/1555#discussion_r2112261345
##########
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:
> That aside, what information would need to flow from the previous page
token to the next directly?
In the case of `OffsetPageToken`, the new token's offset was `data.size +
currentToken.offset`.
> I suppose all of that is inside PageRequest now
In the sense that `PageRequest` is entirely duplicative of `PageToken`, yes.
--
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]