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

Aperta Adatta ai principianti
#7,557 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
scala, spark
Ambito
backend, testing

Direzione di ricerca

Leggi CometNativeExecutors.applies e i ritorni anticipati in CometScanRule e CometExecRule per ricostruire come l’impostazione di Spark influisce sullo scaricamento del piano. Aggiungi il caso descritto a CometNativeExecutorsSuite: esegui un’aggregazione con Comet disabilitato e verifica che il suo piano non contenga alcun CometNativeExecutorsExec. L’issue indica il comportamento e il test attesi; il lavoro è concluso quando la query viene eseguita in Spark e il controllo di regressione ha esito positivo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Scala
Stelle
1.3k
Fork
414
Merge medio
3g 5h
PR unite (30g)
228

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/datafusion-comet

Tutte le issue di apache/datafusion-comet

Issue simili

Altre issue su Scala

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.