apache / apache/datafusion-python
Expose SessionContext.add_analyzer_rule for Python-defined analyzer rules
- 主要語言
- Python
- 星號
- 604
- 分支
- 174
- 平均合併
- 1 天 7 小時
- 30 天內合併 PR
- 4
描述
## Background
`SessionContext::add_analyzer_rule` registers an `Arc` that runs during plan analysis (the pre-optimization pass that resolves names, applies type coercion, etc.). The Python bindings do not expose this method.
## Upstream signature
```rust
pub fn add_analyzer_rule(&self, analyzer_rule: Arc)
```
## User value
Lets users intercept and transform a logical plan immediately after analysis, before the main optimizer runs. Useful for custom semantic validation, injecting domain-specific defaults, or rewriting unresolved references against an external catalog.
## Why deferred
Blocked upstream, same root cause as #1574 ([add_optimizer_rule](https://github.com/apache/datafusion-python/issues/1574)): no FFI bridge exists for the logical `AnalyzerRule` trait, and a Python-only adapter can observe but not meaningfully transform `LogicalPlan` nodes because there are no Python constructors for the variants. Tracked here; revisit when upstream lands an `FFI_AnalyzerRule`.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
首先檢視 SessionContext::add_analyzer_rule、issue #1574,以及用於實作 FFI_AnalyzerRule bridge 的上游工作。當 Python bindings 能夠公開可對邏輯計畫進行有意義轉換的分析規則,並包含所需的 LogicalPlan 支援時,此任務即可完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python, rust
- 領域
- api, backend-api-design
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100