apache / apache/datafusion-python
from_pycapsule! / try_from_pycapsule! macros don't support dunder methods that take arguments
- 主要語言
- Python
- 星號
- 604
- 分支
- 174
- 平均合併
- 2 天 22 小時
- 30 天內合併 PR
- 5
描述
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.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
從 context.rs 中的 register_table_factory 開始,檢查 from_pycapsule! 和 try_from_pycapsule! 的定義。將它們與 crates/util/src/lib.rs 中的 table_provider_from_pycapsule 進行比較,然後在修改巨集或新增 helper 之前,釐清預期的參數傳遞形式。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python, rust
- 領域
- backend-api-design
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100