A big-endian data variable registers, then every query fails: Byte-swapped arrays not supported
維護者通常 2 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 72/100
研究方向
從將資料區塊的值轉換為 Arrow 欄位的程式碼著手;issue 沒有指出檔案或測試,因此請找出該轉換並閱讀呼叫它的程式碼。使用提供的 big-endian Dataset 和查詢重現問題,接著檢查附近與 Arrow 轉換相關的測試。對於位元組順序已交換的值,查詢能夠成功;對於已經採用機器位元組順序的值,查詢仍然正常運作,即表示完成。
由索引模型根據 Issue 內容生成。
描述
A Dataset whose data variable is big-endian, as a NetCDF file written on a big-endian machine, or some FITS or binary files, can be, registers without error, and then every query on it fails.
import numpy as np, xarray as xr, xarray_sql as xql
ds = xr.Dataset({"w": (("a",), np.zeros(3, ">f8"))}, coords={"a": np.arange(3)})
ctx = xql.Context()
ctx.from_dataset("t", ds)
ctx.sql("SELECT * FROM t").to_pandas()
On main:
DataFusion error: FFI error: Execution error: Error reading batch from stream: ArrowNotImplementedError: Byte-swapped arrays not supported
pyarrow can't make an array from a byte-swapped NumPy array. With #275, such a Dataset is read lazily, as on main, so it fails the same way.
Expected: the query works. One fix is to convert the values to the machine's byte order (values.astype(values.dtype.newbyteorder("="))) when making a block's Arrow column. That costs a copy, which an array in the machine's byte order doesn't need.
- 主要語言
- Python
- 星號
- 142
- 分支
- 19
- 平均合併
- 3 天 47 分鐘
- 30 天內合併 PR
- 8
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
xqlsystems/xarray-sql 的其他 Issue
-
dependencies github_actions
難度 2/5 1-3 小時 新手友好度 70/100
xqlsystems/xarray-sql#295 ·
維護者通常 2 天內回覆
-
documentation ml
難度 1/5 1-3 小時 新手友好度 85/100
xqlsystems/xarray-sql#268 ·
維護者通常 2 天內回覆
-
enhancement ml
難度 2/5 1-3 小時 新手友好度 64/100
xqlsystems/xarray-sql#267 · 3 則留言 ·
維護者通常 2 天內回覆
-
難度 1/5 1 小時以內 新手友好度 74/100
xqlsystems/xarray-sql#243 ·
維護者通常 2 天內回覆
-
publish.yml: the TestPyPI verification step is unreachable (and installs the wrong package name)未關閉
難度 2/5 1-3 小時 新手友好度 62/100
xqlsystems/xarray-sql#242 ·
維護者通常 2 天內回覆
查看 xqlsystems/xarray-sql 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
aws/sagemaker-python-sdk#6554 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 78/100
huggingface/diffusers#15170 ·
維護者通常 1 天內回覆
-
[BUG] LLM conflict check ignores MNEMOSYNE_LLM_MAX_TOKENS, so reasoning models return empty replies未關閉
難度 2/5 1-3 小時 新手友好度 62/100
mnemosyne-oss/mnemosyne#1325 ·
維護者通常 1 天內回覆
-
enhancement meshtastic-2.8
難度 2/5 1-3 小時 新手友好度 62/100
pskillen/meshflow-api#459 ·