Commit 06008a3
committed
Fix Paginator dropping results on empty token pages
The Paginator stopped iterating at the first empty page even when the
response carried a non-empty next_page_token, silently dropping results
on later pages. Token-paginated list methods (e.g. tables().list()) can
return empty intermediate pages with a valid token, so results could be
under-returned.
Replace the public Paginator constructor with two explicit factories:
- Paginator.newTokenPagination: iterate until nextPageFn returns null;
empty pages are skipped, not treated as the end of results.
- Paginator.newOffsetPagination: stop on the first empty page (offset,
SCIM and legacy SQL APIs have no token and rely on this).
The constructor is now private, so every call site states its strategy.
Regenerate all *API.java list methods to the appropriate factory. Update
hand-written APIs: SharesExtAPI -> newTokenPagination; SCIM
Users/Groups/ServicePrincipals (and Account* variants) -> newOffsetPagination.
Signed-off-by: Hector Castejon Diaz <hector.castejon@databricks.com>1 parent f8c4aa7 commit 06008a3
125 files changed
Lines changed: 353 additions & 181 deletions
File tree
- databricks-sdk-java/src
- main/java/com/databricks/sdk
- service
- apps
- billing
- bundle
- catalog
- cleanrooms
- compute
- dashboards
- database
- dataquality
- disasterrecovery
- environments
- files
- iam
- jobs
- knowledgeassistants
- marketplace
- ml
- networking
- oauth2
- pipelines
- postgres
- qualitymonitorv2
- serving
- settingsv2
- settings
- sharing
- sql
- supervisoragents
- tags
- vectorsearch
- workspace
- support
- test/java/com/databricks/sdk/support
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments