Investigate numpy-array-like Arrow view to avoid the scatter copy
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 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 小時
- 30 天內合併 PR
- 9
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 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 小時 新手友好度 79/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
mohitmishra786/readprism#322 ·
維護者通常 1 天內回覆
-
good first issue
難度 2/5 1-3 小時 新手友好度 76/100
-
難度 1/5 1 小時以內 新手友好度 75/100
維護者通常 1 天內回覆
-
API-key credentials accept a blank key: empty via the API, spaces-only via the builder's Add API key dialog可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 77/100
Significant-Gravitas/AutoGPT#15727 ·
維護者通常 1 天內回覆