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

Aperta
#7,374 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@andygrove ci sta già lavorando.

Dal 1/11/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust, scala, spark

Direzione di ricerca

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.

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

Descrizione

enhancement requires-triage
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.

Lingua principale
Scala
Stelle
1.3k
Fork
405
Merge medio
3g 4m
PR unite (30g)
282

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.