[VL] A broadcast anti join drops build rows that its filter can still match through coalesce or nvl

Aperta
#13,711 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

@LuciferYang ci sta già lavorando.

Dal 21/11/2026.

  • #13712 di @LuciferYang — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
32/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
scala, sql
Ambito
databases

Direzione di ricerca

Start at SparkShims.isNullIntolerant(condition), which only inspects the root of the join filter; compare that decision with the native hash-table build path that drops null build rows. Use the issue's probe/build SQL to reproduce, then check both coalesce and nvl variants against Spark. Done when the broadcast anti join returns only (2, 1) with default config, and the driver-side build path agrees. Note linked PR #13712 is already open.

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

Descrizione

For a broadcast anti join with a filter, the native hash table build leaves out the build rows that are null in any build column the filter references, when it is told the filter is null-intolerant. Gluten decides that with SparkShims.isNullIntolerant(condition), which only checks the root of the condition. A filter like p.x > coalesce(b.y, 0) has a null-intolerant root (GreaterThan), so the rows with a null y are dropped, although coalesce(null, 0) is 0 and they can match.

With the default configuration:

-- probe(k, x) = (1, 5), (2, 1)
-- build(k, y) = (1, null), (2, 3)
SELECT * FROM probe WHERE NOT EXISTS
  (SELECT 1 FROM build WHERE probe.k = build.k AND probe.x > coalesce(build.y, 0))

Spark returns (2, 1). Gluten returns (1, 5) and (2, 1). nvl, LEFT ANTI JOIN and the driver-side hash table build behave the same. It reproduces on v1.8.0-rc1.

This issue was written with the assistance of AI (Claude Opus).

Lingua principale
Scala
Stelle
1.6k
Fork
685
Merge medio
4g 16h
PR unite (30g)
84

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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/gluten

Tutte le issue di apache/gluten

Issue simili

Altre issue su Scala

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.