Investigate numpy-array-like Arrow view to avoid the scatter copy
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- numpy, python, sqlalchemy
- 領域
- backend, performance
調査の方向性
Start by reading SQLBackendArray._raw_getitem and the eager aggregation path, then review the _array_like contract in xarray/core/variable.py referenced in the issue. Prototype an adapter for float64 PyArrow arrays and compare the copy and round-trip behavior. Done means the prototype shows whether the scatter copy can be avoided and how indexing and .chunk() behave.
索引モデルが issue の本文から書いたものです。
説明
SQLBackendArray._raw_getitem and the eager aggregation path both copy PyArrow RecordBatch columns into a preallocated numpy buffer (one read pass per batch column). The copy is necessary today because PyArrow buffers are immutable views and numpy needs a writable buffer.
xarray.Variable does not strictly require a numpy ndarray; it accepts anything that meets the _array_like contract (see xarray/core/variable.py#L373). If we can wrap a pyarrow.Array in a tiny adapter that satisfies that contract, the scatter step becomes a pointer assignment and the round-trip skips a full read pass.
Open questions:
- Do we need contiguous storage per dim, or can we hand xarray a list of
pyarrow.Arraychunks with a custom__array__that materializes lazily? - How does indexing (slicing, fancy indexing) compose with the adapter once xarray asks for sub-views?
- Does this play nicely with the chunked / dask path users will reach for after
.chunk()?
Worth prototyping on a single dtype family first (float64) to see if the adapter shape is even tractable.
Spun out of #167.
- 主要言語
- Python
- スター
- 142
- フォーク
- 19
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 9
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
xqlsystems/xarray-sql のほかの issue
-
documentation
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
xqlsystems/xarray-sql#268 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
xqlsystems/xarray-sql#267 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
xqlsystems/xarray-sql#243 ·
メンテナーはふだん 1 日以内に返信
-
publish.yml: the TestPyPI verification step is unreachable (and installs the wrong package name)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
xqlsystems/xarray-sql#242 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
xqlsystems/xarray-sql#237 ·
メンテナーはふだん 1 日以内に返信
xqlsystems/xarray-sql の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
Status: Triaged Type: Enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
canonical/craft-store#448 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
good first issue research size:s skill:numerics sub-issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
SKaiNET-developers/SKaiNET#1372 ·
メンテナーはふだん 1 日以内に返信
-
debt
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/vscode-flake8#601 ·
メンテナーはふだん 1 日以内に返信