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 ·