apache / apache/datafusion-python

Nothing in CI runs examples/*.py, and one of them is broken

未關閉
#1,728 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug good first issue
主要語言
Python
星號
604
分支
174
平均合併
1 天 7 小時
30 天內合併 PR
4

描述

Verified: the only `examples` paths in `.github/workflows/` are the five FFI crate directories and `examples/tpch`. **No top-level `examples/*.py` script is executed anywhere in CI.** Two consequences are already in the tree:

**`examples/csv-read-options.py` crashes.** It reads `data.csv` at lines 28, 39, 52, 72 and 78, and `data.csv.gz` at line 67. Neither file exists anywhere in the repository. This is not a script that runs quietly — it raises on line 28. Fix: have it write its own small CSV and gzip copy into a temporary directory at the top, which also makes it self-contained.

**Nine scripts print nothing at all.** `export.py`, `import.py`, `python-udaf.py`, `python-udf.py`, `query-pyarrow-data.py`, `sql-to-pandas.py`, `sql-using-python-udaf.py`, `sql-using-python-udf.py` and `substrait.py` contain zero `print` or `.show()` calls; they end in `assert`. They are tests wearing an example's filename. A script that prints nothing is indistinguishable to a reader from a script that does nothing. Fix is roughly two lines each: a terminal `df.show()` or `print(...)`, keeping the asserts.

**The root cause is the missing CI job**, and it is the part worth designing rather than just doing. A job running `examples/*.py` against the already-built wheel would have caught both, but it needs a skip matrix: `sql-parquet-s3.py` needs network and AWS credentials, and `sql-parquet.py`, `dataframe-parquet.py` and `sql-to-pandas.py` need an NYC taxi Parquet file the README tells you to download by hand. Worth agreeing the shape of that before writing it.

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

先檢查 .github/workflows/ 和 examples/*.py 下的進入點,然後執行 examples/csv-read-options.py 以重現其缺少輸入的失敗。為 AWS 和 NYC 計程車範例定義以 wheel 為基礎的 CI job 及其 skip 矩陣;完成的標準是自足的 CSV 範例能夠執行、指定的靜默腳本在保留 asserts 的同時列印輸出,以及符合條件的範例在 CI 中執行。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
github-actions, python
領域
ci-cd, testing
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
活躍
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。