apache / apache/datafusion-python
Expose SessionContext.add_analyzer_rule for Python-defined analyzer rules
- 主要言語
- Python
- スター
- 604
- フォーク
- 174
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 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`.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start by reviewing SessionContext::add_analyzer_rule, issue #1574, and the upstream work for an FFI_AnalyzerRule bridge. The task is ready when Python bindings can expose analyzer rules that meaningfully transform logical plans, including the required LogicalPlan support.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python, rust
- 領域
- api, backend-api-design
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100