Skip to content

Conversation

@dimas-b
Copy link
Contributor

@dimas-b dimas-b commented Aug 19, 2025

The enforcement of the LIST_PAGINATION_ENABLED flag was missed in #1938. This change make the flag effective as discussed in #2296.

Note: this causes a change in the default Polaris behaviour (no pagination by default) with respect to the previous state of main. However, there is no behaviour change with respect to 1.0.0 or 1.0.1 as previous releases did not have #1938.

return PageTokenUtil.decodePageRequest(serializedPageToken, requestedPageSize);
@Nullable String serializedPageToken,
@Nullable Integer requestedPageSize,
Supplier<Boolean> shouldDecodeToken) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a Supplier? None of the call sites is really "dynamic".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not called when the token is null, so it avoids touching the config look up in most cases... I'm fine with an unconditional config lookup too. What is preferable from your POV?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, neither getResolvedCatalogEntity nor getConfig are really simple.
Mind making this at least a Predicate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Predicate is a one-argument function, but here we just need to have a deferred getter for a simple boolean 🤔

Updated to BooleanSupplier. WDYT?

The enforcement of the LIST_PAGINATION_ENABLED flag was missed in apache#1938.
This change make the flag effective as discussed in apache#2296.

Note: this causes a change in the default Polaris behaviour (no pagination
by default) with respect to the previous state of `main`. However, there
is no behaviour change with respect to 1.0.0 or 1.0.1 as previous releases
did not have apache#1938.
@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Aug 20, 2025
@dimas-b dimas-b merged commit a0a2b87 into apache:main Aug 20, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in Basic Kanban Board Aug 20, 2025
@dimas-b dimas-b deleted the paging-flag branch August 20, 2025 18:19
dimas-b added a commit to dimas-b/polaris that referenced this pull request Aug 20, 2025
Correct method args (follow-up to apache#2401)
@dimas-b dimas-b mentioned this pull request Aug 20, 2025
dimas-b added a commit that referenced this pull request Aug 20, 2025
Correct method args (follow-up to #2401)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants