Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

REST: Send empty first-page pageToken when rest-page-size is set

未关闭 适合新手
#4,096 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@ehddnr301 已经在做这个了。

开始于 2026年10月12日。

  • #4097 来自 @ehddnr301 —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
api, backend

调研方向

从 list_tables、list_views 和 list_namespaces 的 REST 目录分页代码入手,然后检查 SigV4 适配器的查询解析。当设置了 rest-page-size 时,在第一个请求中发送一个空的 pageToken,并在适配器中保留空查询值。验证请求包含 pageToken=,且分页在页面大小为 1 时正常工作。

由索引模型根据 Issue 内容生成。

描述

kind:bug
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 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/iceberg-python 的其他 Issue

查看 apache/iceberg-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。