Give the two FFI example crates a runnable entry point
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- developer-experience, documentation, testing
Hướng nghiên cứu
Bắt đầu với examples/tpch/run_tpch.py, các tệp pytest hiện có bên dưới python/tests trong cả hai FFI crates và test.yml:136-150 để xác nhận lệnh kiểm thử. Thêm từng run_demo.py ở root, subprocess driver của nó với anchor assertions và tiêu đề Role trong README; được xem là hoàn tất khi cả hai script chạy standalone và các bài kiểm thử driver của chúng đều đạt, trong đó phần decode thứ hai tuân theo logical-codec sub-issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Neither datafusion-ffi-example nor datafusion-ffi-query-planner-example has a script you can run. They are 51 and 47 pytest assertions respectively. Meanwhile user-guide/data-sources.md:219 calls the first one a "user example" and sends Python users there from the user guide, and io/table_provider.md:30 calls it "a complete example". We promise a runnable example and deliver a test suite.
Precedent: examples/tpch/ — the script is the artifact and a pytest keeps it honest. CI already runs pytest python/tests/_test*.py in each crate directory (test.yml:136-150), so a driver test needs zero workflow changes.
Layout per crate: run_demo.py at the tree root, parallel to the existing examples/distributed/run_tpch.py, and a driver at python/tests/_test_run_demo.py that runs it via subprocess.run([sys.executable, script]) and asserts on anchor lines. Subprocess rather than import_module or runpy, because it proves the thing being asked for: that it runs standalone with no pytest around it.
Each script should open with an import guard that turns the one real failure mode into an instruction rather than a traceback:
try:
from datafusion_ffi_example import MyTableProvider
except ImportError:
sys.exit("build the extension first:\n uv run maturin develop\nSee README.md.")
-
datafusion-ffi-example/run_demo.py— walk the conformance matrix in numbered sections: table provider, functions, catalog provider, config extension, codec round-trip, then the same bytes decoded a second time. That last section is only truthful after the logical-codec sub-issue lands, and it is the one place in the repository where the guide's central rule is demonstrated rather than asserted. -
datafusion-ffi-query-planner-example/run_demo.py— print plans, not rows. Planner nesting is understood by seeing the indented tree, and the existing tests assert on plan strings they never show. Cover the logical plan handed to the planner, the physical plan returned, the effect ofSET ffi_query_planner.max_rows, and two planners nesting. Use.display_indent(). -
Role:header on each tree's README, so the label survives the click fromexamples/README.md, which already distinguishes the trees but loses the distinction as soon as you follow the link. Three lines: what this tree is, where to go if you are learning the protocol, and how to run it.
Scope note: make them runnable, but do not promise datafusion-ffi-example reads as a tutorial. It is a coverage matrix — .ai/skills/check-upstream/SKILL.md:455 instructs adding every new FFI type to it — so it grows under protocol pressure rather than narrative need. The planner crate is single-topic and can carry the stronger claim.
- Ngôn ngữ chính
- Python
- Star
- 605
- Fork
- 176
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 8
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/datafusion-python
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
apache/datafusion-python#1757 ·
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/datafusion-python#1726 ·
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 88/100
apache/datafusion-python#1691 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/datafusion-python#1644 ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
apache/datafusion-python#1737 ·
Tất cả issue của apache/datafusion-python
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
canonical/paas-charm#368 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
tech debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
addition to tracking list Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
StevenBlack/hosts#3256 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
qualcomm/qai-appbuilder#275 ·