Make examples/ behave like examples: runnable, and consistent with the extension guide
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
- 48/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá 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 extension-guide/codecs.md và user-guide/data-sources.md:219, sau đó kiểm tra ba cây thư mục bên dưới examples/ và datafusion-ffi-example/logical_extension_codec.rs:148. Chạy các bộ pytest hiện có để xác định các điểm vào hiện tại của chúng. Được xem là hoàn tất khi các ví dụ có thể chạy được, logical codec không còn phụ thuộc vào provider registry toàn cục theo tiến trình, việc cách ly physical plan được thể hiện rõ ràng và guide khớp với code.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
#1721 added examples/distributed as a worked example and, in doing so, exposed two structural problems with the older example trees that the new one throws into relief.
The guide contradicts the code it points at. extension-guide/codecs.md tells authors to encode durable metadata, then spends a paragraph explaining that our own examples do not. Readers copy examples; an example that contradicts the rule beside it is worse than no example. #1719 records the reference-implementation half of this as G9, which examples/distributed/storage-library now satisfies — but the crate a reader is most likely to open first still does the wrong thing.
Two of the three trees have no runnable entry point. datafusion-ffi-example is 13 pytest files and no script; datafusion-ffi-query-planner-example is one pytest file and no script. This is not only an aesthetic problem: user-guide/data-sources.md:219 calls datafusion-ffi-example a "user example" and routes Python users to it from the user guide. They arrive at a test suite.
Investigation while reviewing #1721 found the first problem is smaller and differently shaped than the guide claims. Each item below was checked against the source, not inferred:
datafusion-ffi-query-planner-examplehas no object registry at all —grep -rn "HashMap\|OnceLock\|TOKEN" src/is empty. It claimsnode.is::<DistributedExec>()narrowly and writes a fixed durable marker. The guide named it anyway. Corrected in #1721.datafusion-ffi-example's logical codec parks providers in a process-globalHashMap, and this is cheaply fixable: it claimsMemTablenarrowly (logical_extension_codec.rs:148), and aMemTableis fully describable as schema plus batches.datafusion-ffi-example's physical codec parks plans, and this is not fixable here. It is forced by the greedyForeignExecutionPlanclaim, which is load-bearing for upstream defect apache/datafusion#25152 — that is G2 in #1719. Once you claim a node you cannot introspect, parking it is the only remaining option. The work is to make it uncopyable, not to remove it.
So the end state is one quarantined arm carrying an issue number and a delete-when condition, rather than a systemic contradiction.
Decided while planning this: the example trees stay in examples/. Relocating the conformance beds to an integration-tests/ tree was considered and rejected — making them runnable resolves the "these aren't examples" complaint, and a move would churn roughly 40 doc, README, and agent-skill references, none of which any build step validates.
Sub-issues track the pieces. They are ordered: the prose rewrite describes the state the first two produce.
- 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
-
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 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
apache/datafusion-python#1735 · 1 bình luận ·
Tất cả issue của apache/datafusion-python
Issue tương tự
-
Add: hunch Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
DiamondLightSource/dodal#2211 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
openml/openml-python#1749 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
sipyourdrink-ltd/bernstein#6191 ·