REST: Send empty first-page pageToken when rest-page-size is set
维护者通常 1 天内回复
评估
调研方向
从 list_tables、list_views 和 list_namespaces 的 REST 目录分页代码入手,然后检查 SigV4 适配器的查询解析。当设置了 rest-page-size 时,在第一个请求中发送一个空的 pageToken,并在适配器中保留空查询值。验证请求包含 pageToken=,且分页在页面大小为 1 时正常工作。
由索引模型根据 Issue 内容生成。
描述
Apache Iceberg version
0.12.0 (latest release)
Please describe the bug 🐞
When rest-page-size is set, list_tables, list_views and list_namespaces send pageSize without pageToken on the first request:
GET /v1/namespaces/ns/tables?pageSize=100
The REST spec says servers must return all results in one response when pageToken is not set, and that clients start pagination by sending an empty pageToken (PageToken). So compliant servers ignore rest-page-size, and some servers fail on the request. With tabulario/iceberg-rest:1.6.0 and namespaces a, b, c:
RestCatalog("t", uri=uri).list_namespaces()
# [('a',), ('b',), ('c',)]
RestCatalog("t", uri=uri, **{"rest-page-size": "1"}).list_namespaces()
# ServerError: NumberFormatException: Cannot parse null string
GET /v1/namespaces?pageSize=1 -> 500 NumberFormatException
GET /v1/namespaces?pageSize=1&pageToken= -> {"namespaces": [["a"]], "next-page-token": "1"}
The first request should include pageToken= when rest-page-size is set. The Java client always sends pageToken, starting with an empty value. The SigV4 adapter also needs to keep blank query values, since parse_qsl drops them by default.
rest-page-size was added in #3377. The same error in apache/iceberg-rest-fixture was reported in apache/iceberg#13119.
Willingness to contribute
- I can contribute a fix for this bug independently
- I would be willing to contribute a fix for this bug with guidance from the Iceberg community
- I cannot contribute a fix for this bug at this time
- 主要语言
- Python
- 星标
- 1.2k
- 派生
- 618
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 45
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/iceberg-python 的其他 Issue
-
CLI: --output=json list-refs emits one object per retention property instead of per ref可能已有人在做 @tomron 于 1 天前认领。 未关闭kind:bug
难度 2/5 1-3 小时 新手友好度 87/100
apache/iceberg-python#4098 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
apache/iceberg-python#4093 · 1 条评论 ·
维护者通常 1 天内回复
-
View does not expose metadata_location: RestCatalog.load_view discards it from the server's response可能已有人在做 @Soumo-git-hub 于 6 天前认领。 未关闭kind:bug
难度 2/5 1-3 小时 新手友好度 84/100
apache/iceberg-python#4073 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
apache/iceberg-python#4010 · 3 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
to_bytes silently rescales a Decimal with a negative scale可能已有人在做 @Rodrigo-Palma 于 26 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
apache/iceberg-python#3996 ·
维护者通常 1 天内回复
查看 apache/iceberg-python 的全部 Issue
相似的 Issue
-
[Bug]: Streamed /v1/chat/completions sends unredacted agent error text (keys) in the final chunk可能已有人在做 @rodricksz4h5 今天认领。 未关闭area/streaming comp/gateway P2 type/security
难度 2/5 1-3 小时 新手友好度 78/100
NousResearch/hermes-agent#138245 ·
维护者通常 1 天内回复
-
[oblt-aw][autodoc] Update user onboarding guide for mandatory trigger CODEOWNERS step可能已有人在做 @github-actions 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
correction metadata
难度 2/5 1 小时以内 新手友好度 68/100
acl-org/acl-anthology#10378 · 1 条评论 ·
维护者通常 1 天内回复
-
cloudtrail_multi_region_enabled_logging_management_events fails when the advanced event selector has a custom name可能已有人在做 @12YYCCYY16 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
prowler-cloud/prowler#13033 ·
维护者通常 1 天内回复
-
enhancement
难度 1/5 1-3 小时 新手友好度 88/100
graygarbage/HermesKey#23 ·