Comet Native Executors: run a query in Spark when Comet is turned off

未关闭 适合新手
#7,557 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
scala, spark
领域
backend, testing

调研方向

阅读 CometNativeExecutors.applies 以及 CometScanRule 和 CometExecRule 中的提前返回逻辑,追踪 Spark 设置如何影响计划卸载。将所述用例添加到 CometNativeExecutorsSuite:在禁用 Comet 的情况下运行聚合,并检查其计划中没有 CometNativeExecutorsExec。Issue 指明了预期行为和测试;完成标准是查询在 Spark 中运行,且回归检查通过。

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

描述

enhancement requires-triage
What is the problem the feature request solves?

With spark.comet.nativeExecutors.enabled on (#7289), a query run with spark.comet.enabled=false is still sent to the Comet Native Executor cluster, and the driver refuses it. CometNativeExecutors.applies checks spark.comet.nativeExecutors.enabled but not spark.comet.enabled. So CometRule offloads a plan that CometScanRule and CometExecRule left unconverted, because both return early when Comet is off (isCometLoaded). The stage-graph builder then fails on the plan's top operator with "Comet Native Executors cannot run this query, because of ...: it does not run natively".

Turning Comet off for a single query is the usual way to keep that query in Spark, for example a step that generates data with a Scala UDF before the queries Comet should run, or a test's withSQLConf. With the native executors on, that query fails instead.

Describe the potential solution

Have CometNativeExecutors.applies require spark.comet.enabled as well as spark.comet.nativeExecutors.enabled, so a query with Comet off runs in Spark, as it would without the cluster. Add a test in CometNativeExecutorsSuite that runs an aggregate with Comet off and checks that its plan has no CometNativeExecutorsExec.

Additional context

Part of #7288.

Willingness to contribute

Yes. I can contribute this fix independently.

主要语言
Scala
星标
1.3k
派生
414
平均合并
3 天 5 小时
30 天内合并 PR
228

环境准备

从这里开始

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

apache/datafusion-comet 的其他 Issue

查看 apache/datafusion-comet 的全部 Issue

相似的 Issue

更多 Scala Issue

把新 issue 发到你的邮箱

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