ehddnr301 opened a new pull request, #4097: URL: https://github.com/apache/iceberg-python/pull/4097
Closes #4096 # Rationale for this change When `rest-page-size` is set, the first list request sends `pageSize` without `pageToken`. Per the REST spec, servers return all results in one response when `pageToken` is not set, so the page size is ignored, and some servers (e.g. `tabulario/iceberg-rest:1.6.0`) fail on the request. `list_tables`, `list_views` and `list_namespaces` now send an empty `pageToken` on the first request when `rest-page-size` is set: ``` before: ?pageSize=100 after: ?pageSize=100&pageToken= ``` Requests without `rest-page-size` are unchanged. The SigV4 adapter now passes `keep_blank_values=True` to `parse_qsl`, so the signed query includes `pageToken=`. ## Are these changes tested? Yes. Tests in `tests/catalog/test_rest.py` cover the empty initial token for all three list APIs, a two-page `list_tables` run, and blank query values reaching the SigV4 signer. Also tested manually against `tabulario/iceberg-rest:1.6.0`: `list_namespaces()` with `rest-page-size=1` previously raised `NumberFormatException` and now returns all namespaces across pages. ## Are there any user-facing changes? With `rest-page-size` set, the first list request includes `pageToken=`. Without it, nothing changes. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
