Expose SessionContext.create_physical_expr for logical-to-physical Expr conversion
还没有人认领这个 Issue。
评估
调研方向
从 SessionContext::create_physical_expr 和提议的 PyPhysicalExpr 入口点开始;跟踪 Python 绑定如何处理 Expr、DFSchema、RecordBatch 和 ColumnarValue。完成的标准是 Python 可以根据 Expr 和 DFSchema 创建物理表达式,调用 evaluate(batch),并接收一个 ColumnarValue。
由索引模型根据 Issue 内容生成。
描述
Background
SessionContext::create_physical_expr converts a logical Expr against a DFSchema into a PhysicalExpr that can be evaluated directly against Arrow record batches. The Python bindings do not expose this.
Upstream signature
pub fn create_physical_expr(
&self,
expr: Expr,
input_dfschema: &DFSchema,
) -> Result<Arc<dyn PhysicalExpr>>
User value
Useful when callers want to evaluate an Expr against an in-memory RecordBatch without going through DataFrame execution -- for example to score / filter individual batches in a custom processing loop, to debug optimization rewrites, or to feed an expression into a custom physical operator. Niche but irreplaceable for that audience.
Why deferred
Effort is small (~180-280 LOC) but requires a new PyPhysicalExpr wrapper exposing the opaque Arc<dyn PhysicalExpr> trait object plus an evaluate(batch) -> ColumnarValue method to make it useful from Python. Zero open user requests at the time of audit. Filed for tracking; revisit when a user surfaces a concrete need or when adjacent FFI work pulls PhysicalExpr into the binding surface.
- 主要语言
- Python
- 星标
- 605
- 派生
- 176
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 8
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/datafusion-python 的其他 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 72/100
apache/datafusion-python#1726 ·
-
难度 2/5 半天 新手友好度 88/100
apache/datafusion-python#1691 ·
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
apache/datafusion-python#1644 ·
-
enhancement
难度 5/5 一周以上 新手友好度 30/100
apache/datafusion-python#1737 ·
-
难度 3/5 1-2 天 新手友好度 76/100
apache/datafusion-python#1735 · 1 条评论 ·
查看 apache/datafusion-python 的全部 Issue
相似的 Issue
-
Add: hunch 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 68/100
DiamondLightSource/dodal#2211 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
openml/openml-python#1749 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
sipyourdrink-ltd/bernstein#6191 ·