Comet Native Executors: pass scalar subquery results to the cluster without rewriting the plan

未关闭
#7,374 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 2 天内回复

@andygrove 已经在做这个了。

开始于 2026年11月1日。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust, scala, spark

调研方向

Start by reading withSubqueryResults in CometNativeExecutorsExec.scala, then trace how QueryRequest and Fragment carry data to PhysicalPlanner. Check how ExprStruct::Subquery is handled when planning blocks with native inputs. Done means subquery results are sent once and the planner can look them up without rewriting serialized plans.

由索引模型根据 Issue 内容生成。

描述

enhancement
What is the problem the feature request solves?

Before submitting a query, the driver (#7289) replaces each scalar subquery in the plan with a literal of its result. It parses the serialized plan of every stage that holds a subquery, and every partition's own plan for a stage that reads files, walks them, and serializes them again. For a scan over many files, that is the bulk of the request, redone on the driver for every query.

Describe the potential solution

Send the results once, as map<int64, Expr> subquery_results on QueryRequest and Fragment. Have PhysicalPlanner look up ExprStruct::Subquery in that map when it plans a block with native inputs, where today it fails because there is no JVM. The driver would then serialize only the literals.

Additional context

The rewrite is withSubqueryResults in CometNativeExecutorsExec.scala.

Part of #7288.

Willingness to contribute

Yes. I can contribute this feature independently.

主要语言
Scala
星标
1.3k
派生
405
平均合并
3 天 4 分钟
30 天内合并 PR
282

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/datafusion-comet 的其他 Issue

查看 apache/datafusion-comet 的全部 Issue

相似的 Issue

更多 Scala Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。