Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

IO: Consolidate PyArrow logic into io/pyarrow.py before decomposition

オープン
#3,812 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

まず 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.py PyArrow 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
平均マージ
2日 2時間
マージ済み PR(30日)
70

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/iceberg-python のほかの issue

apache/iceberg-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。