IO: Consolidate PyArrow logic into io/pyarrow.py before decomposition
还没有人认领这个 Issue。
评估
调研方向
首先比较 table/upsert_util.py 和 pyiceberg/io/pyarrow.py,并查看 #3737 中的相关讨论。先专注于 PR A;完成的标准是 upsert utility 的 PyArrow 逻辑通过 io/pyarrow.py 路由,不改变行为,并且所有现有测试都通过。
由索引模型根据 Issue 内容生成。
描述
Summary
Before decomposing pyiceberg/io/pyarrow.py into focused submodules (#3737, #3738), we should consolidate PyArrow-specific logic that currently lives outside the module. This ensures all PyArrow calls route through a single boundary, making the subsequent split clean and enabling future engine substitution.
Motivation
Per discussion in #3737, @rambleraptor noted that the first useful step is ensuring no PyArrow logic occurs outside pyarrow.py. Currently several modules import pyarrow directly and implement compute logic inline rather than delegating through pyiceberg.io.pyarrow.
When we later introduce a ComputeEngine protocol, any PyArrow logic outside the module boundary bypasses the protocol and prevents clean substitution.
Audit
Grepped pyiceberg/ (excluding io/pyarrow.py and tests) for runtime import pyarrow statements (both top-level and inline). Excluded TYPE_CHECKING-only imports since those have no runtime dependency.
| Location | What it does | Action |
|---|---|---|
table/upsert_util.py |
PyArrow table joins, group_by, compute, cast, take | Absorb |
table/inspect.py |
Builds pa.schema + pa.Table.from_pylist for metadata inspection | TBD |
transforms.py |
pyarrow_transform() dispatch on pa.Array/ChunkedArray |
TBD |
table/__init__.py |
Entry points accept pa.Table, delegate to io.pyarrow | Leave |
table/deletion_vector.py |
Single pa.chunked_array() call | Leave |
catalog/__init__.py |
Delegates to io.pyarrow for schema conversion | Leave |
Plan
One PR per absorption. Each is a pure refactor: move code into io/pyarrow.py, have the caller import from pyiceberg.io.pyarrow instead of pyarrow directly. No behavior change, all existing tests pass unchanged.
- PR A: Absorb
table/upsert_util.pyPyArrow logic - PR B:
table/inspect.py(pending discussion) - PR C:
transforms.py(pending discussion)
Related
- #3737 - Decompose io/pyarrow.py into focused modules
- #3738 - Extract PyArrowFileIO (first decomposition step)
- #3715 / #3716 - Previous pluggable backend attempt (rejected as too large)
- 主要语言
- Python
- 星标
- 1.1k
- 派生
- 589
- 平均合并
- 1 天 20 小时
- 30 天内合并 PR
- 68
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/iceberg-python 的其他 Issue
-
kind:bug
难度 1/5 1 小时以内 新手友好度 92/100
apache/iceberg-python#4006 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
apache/iceberg-python#3996 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
apache/iceberg-python#3979 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
apache/iceberg-python#3885 ·
-
[Bug] PyArrowFileIO fails to propagate s3.ssl.ca-cert to pyarrow.fs.S3FileSystem tls_ca_file_path 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
apache/iceberg-python#3866 · 1 条评论 ·
查看 apache/iceberg-python 的全部 Issue
相似的 Issue
-
bug confirmed issue
难度 2/5 1-3 小时 新手友好度 75/100
open-webui/open-webui#30750 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
good first issue
难度 1/5 1 小时以内 新手友好度 90/100