Quarantine the greedy ForeignExecutionPlan claim so it cannot be copied by accident
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Bắt đầu với examples/datafusion-ffi-example/src/physical_extension_codec.rs:125-150 và phần hướng dẫn liên quan trong extension-guide/checklist.md. Theo dõi các statics và helpers được MyPhysicalExtensionCodec sử dụng, sau đó tách workaround đằng sau claims(), park() và take() trong src/foreign_plan_workaround.rs cùng với tài liệu module được chỉ định. Được xem là hoàn tất khi grep tìm thấy chính xác một “NOT A PATTERN” trong examples/ và cargo clippy --no-deps --all-targets chạy sạch.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
examples/datafusion-ffi-example/src/physical_extension_codec.rs:150 claims node.is::<DataSourceExec>() || node.is::<ForeignExecutionPlan>(). The second arm takes every other library's nodes, which extension-guide/checklist.md tells authors never to do.
This is not a bug to fix. It is G2 in #1719: the arm is load-bearing for upstream defect apache/datafusion#25152, and narrowing it to DataSourceExec alone makes 31 of the 51 tests in datafusion-ffi-query-planner-example fail. The object registry in the same file is downstream of it — once you claim a node you cannot introspect, there is nothing to write down about it, so parking it is all that is left.
The goal is to make it impossible to copy by accident while it stays. Proposal: move the statics and helpers into a new src/foreign_plan_workaround.rs behind three deliberately blunt functions — claims(), park(), take(). Nobody reads foreign_plan_workaround::park(node, buf) and thinks they are looking at serialization. The 25-line explanation currently buried inside a function body at lines 125-149 becomes the module //! doc, with three greppable fields:
//! # NOT A PATTERN
//! **Blocked on:** <https://github.com/apache/datafusion/issues/25152>
//! **Delete when:** `FFI_PlanProperties` carries `scheduling_type`, or
//! `ForeignExecutionPlan` gains a reachable `try_to_proto`.
//! **Copying this will:** claim every other library's plan nodes, and produce
//! payloads that decode only in the writing process, exactly once each.
One honesty note belongs in that doc: the DataSourceExec arm could be durable and is not, because the registry has to exist for the ForeignExecutionPlan arm regardless. Splitting the two arms across two wire formats costs real code and removes nothing. Saying so lets the guide claim the registry cannot be removed without also claiming every byte of it is forced.
Do not rename MyPhysicalExtensionCodec — 21 call sites plus two doc references, and the module doc already carries the label.
Done when: grep -rn "NOT A PATTERN" examples/ returns exactly one site, and cargo clippy --no-deps --all-targets is clean. No test changes expected; this is code motion plus documentation.
- 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 ·