REST: Add support for page-size in list_namespaces, list_tables, and list_views#3377
Merged
Merged
Conversation
3fc0768 to
9377d82
Compare
kevinjqliu
approved these changes
May 23, 2026
Comment on lines
+1131
to
+1136
| params = {} | ||
| page_size = property_as_int(self.properties, PAGE_SIZE, None) | ||
| if page_size is not None: | ||
| if page_size <= 0: | ||
| raise ValueError(f"{PAGE_SIZE} must be a positive integer") | ||
| params["pageSize"] = str(page_size) |
Contributor
There was a problem hiding this comment.
Suggested change
| params = {} | |
| page_size = property_as_int(self.properties, PAGE_SIZE, None) | |
| if page_size is not None: | |
| if page_size <= 0: | |
| raise ValueError(f"{PAGE_SIZE} must be a positive integer") | |
| params["pageSize"] = str(page_size) | |
| page_size = property_as_int(self.properties, PAGE_SIZE, None) | |
| if page_size is not None and page_size <= 0: | |
| raise ValueError(f"{PAGE_SIZE} must be a positive integer") |
nit
Comment on lines
+1142
to
+1143
| if page_token: | ||
| params["pageToken"] = page_token |
Contributor
There was a problem hiding this comment.
Member
Author
There was a problem hiding this comment.
The page size remains constant throughout the while loop, unlike the page token. That is why I set the value outside the loop.
Let me know if you still want me to commit this suggestion.
9377d82 to
ceb612c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Follows REST catalog spec:
/v1/{prefix}/views: https://github.com/apache/iceberg/blob/e7a5a87f26f9de5b200254155aa037368b13a29c/open-api/rest-catalog-open-api.yaml#L1525-L1538page-size: https://github.com/apache/iceberg/blob/e7a5a87f26f9de5b200254155aa037368b13a29c/open-api/rest-catalog-open-api.yaml#L2029-L2038Are these changes tested?
Yes.
Are there any user-facing changes?
Add support for
page-sizein list_views in REST catalog.