dimas-b commented on code in PR #1938:
URL: https://github.com/apache/polaris/pull/1938#discussion_r2168014176
##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/dao/entity/EntitiesResult.java:
##########
@@ -48,41 +43,19 @@ public static EntitiesResult
fromPage(Page<PolarisBaseEntity> page) {
public EntitiesResult(@Nonnull ReturnStatus errorStatus, @Nullable String
extraInformation) {
super(errorStatus, extraInformation);
this.entities = null;
- this.pageTokenOpt = Optional.empty();
- }
-
- public EntitiesResult(@Nonnull List<PolarisBaseEntity> entities) {
- this(entities, Optional.empty());
}
/**
* Constructor for success
*
* @param entities list of entities being returned, implies success
*/
- public EntitiesResult(
- @Nonnull List<PolarisBaseEntity> entities, @Nonnull Optional<PageToken>
pageTokenOpt) {
+ public EntitiesResult(@Nonnull Page<PolarisBaseEntity> entities) {
super(ReturnStatus.SUCCESS);
this.entities = entities;
- this.pageTokenOpt = pageTokenOpt;
- }
-
- @JsonCreator
- private EntitiesResult(
Review Comment:
I do not see any roundtrips through JSON for `EntitiesResult` in Apache
Polaris code. If this is a use case downstream, it would be nice to have tests
in this repo to assert the expected behaviour.
That said, I think this specific change is not critical to pagination.
`EntitiesResult` is not involved handling paginated data. So, I suppose this
change can be rolled back.
--
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]