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

Honor identity sort orders for Arrow table writes

未关闭
#3,848 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
databases

调研方向

首先查看 PR #3830,以及它为 Arrow 表写入添加的单元测试和集成测试覆盖。检查 sort-order IDs、WriteTask、DataFile、manifests 和 bin packing 的处理方式。当受支持的 identity-sort writes 生成具有真实 sort_order_id 值的有序文件,同时不受支持的情况保留当前行为和警告时,即表示完成。

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

描述

Feature Request / Improvement

PyIceberg accepts table sort orders at write time but ignores them. Arrow table writes produce unsorted data files and hard-code sort_order_id=None, so manifests are inconsistent with the sort order the user declared.

Related umbrella issue: #271

Use case / motivation

Without a truthful sort_order_id and physically ordered data files, readers can't use sort-order-aware pruning and the manifest disagrees with the table's sort metadata. Users who declare a sort order expect their writes to honor it.

Proposed change

When every sort field uses an identity transform and null placement is consistent, sort materialized Arrow table writes. Unpartitioned tables are sorted before bin packing and each final partition is sorted independently. The table's sort-order ID is recorded on the data files.

Unsupported transforms, nested or missing fields, mixed null placement, and streaming RecordBatchReader writes keep the current behavior. Files are marked unsorted and sort_order_id stays null, with a warning explaining why.

Implementation

PR #3830 sorts the writes, carries the sort-order ID through WriteTask, writes the truthful DataFile.sort_order_id, and includes unit and integration coverage.

Tooling note

I developed this with assistance from DS v4 Pro and reviewed the changes myself.

References
  • #271
  • #3830
主要语言
Python
星标
1.1k
派生
589
平均合并
1 天 20 小时
30 天内合并 PR
68

贡献指南

这个仓库没有索引到贡献指南

从这里开始

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

apache/iceberg-python 的其他 Issue

查看 apache/iceberg-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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