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

オープン 初心者向け
#7,557 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
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時間
マージ済み PR(30日)
228

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/datafusion-comet のほかの issue

apache/datafusion-comet の issue をすべて見る

似ている issue

Scala の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。