apache / apache/datafusion-python
from_pycapsule! / try_from_pycapsule! macros don't support dunder methods that take arguments
- Ngôn ngữ chính
- Python
- Star
- 604
- Fork
- 174
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 4
Mô tả
Split out from #1577 (item 5).
The inline decode that item 5 points at (`register_table_factory` in `context.rs`) calls `__datafusion_table_provider_factory__` with the logical-extension-codec capsule as an argument. The existing `from_pycapsule!` / `try_from_pycapsule!` macros always call the dunder with `call0()`, so this call site can't be folded into them as-is.
Fitting it into the macro would need either a variant that accepts call arguments, or a separate `Option`-returning helper like `table_provider_from_pycapsule` in `crates/util/src/lib.rs`, which already has the same argument-passing shape.
Leaving this open rather than changing the behavior of that registration path without input from whoever knows the intended macro shape.
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
Hướng nghiên cứu
Start in context.rs at register_table_factory and inspect the from_pycapsule! and try_from_pycapsule! definitions. Compare them with table_provider_from_pycapsule in crates/util/src/lib.rs, then clarify the intended argument-passing shape before changing the macros or adding a helper.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python, rust
- Lĩnh vực
- backend-api-design
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100