Discuss partitioned execution for ASOF joins
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- databases, performance
Direzione di ricerca
Read the discussion and linked context in #26592, especially the feedback on the earlier pull request. The proposal concerns AsOfJoinExec, InputCursor, and hash-partitioned execution; compare its memory benefits with the reported slowdown for skewed keys. Done means reaching agreement on an execution design and a clear approach for a follow-up implementation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Following #26592, I'd like to discuss the design before attempting another implementation.
I should have discussed the approach before opening the PR. Sorry about that.
Proposed approach
The main issue I'm trying to address is that AsOfJoinExec currently collects the entire right input into memory. This means ASOF joins can run out of memory on large right inputs, even when the upstream sorts can spill.
My idea was to use hash-partitioned execution when equality keys are present. Then i could just sort each partition according to the ordering required by the join and have each left partition stream its corresponding right partition instead of collecting and broadcasting the complete right input. Since InputCursor already advances through the right input, I thought this could reuse much of the existing join logic while removing the need to materialize the complete right side. The join would still need memory for its active batches, candidate matches, and pending output rows, but it would no longer need to collect the entire right input.
Tradeoffs
Hash-partitioning both inputs adds work compared to the existing broadcast approach. If most rows share the same equality key, one partition can end up doing most of the work. In my benchmarks, partitioned execution was nearly twice as slow for skewed keys.
Alternatives
Another possibility would be to make the existing right-input collection spillable. However, this would still require merging the right input into a single stream, and each left partition could end up rereading the spilled data.
I think supporting both broadcast and partitioned execution could make sense, depending on input size and key distribution
Additional context
The comment about my PR mentions proto and config as changes i made, highlighting them as something bad. Are we not allowed to
@Xuanwo implemented the original ASOF joins, so i'd appreciate his perspective on this. I noticed he hasnt been active on DataFusion recently, so I'm not sure if he will see this.
@jayzhan211 @alamb I'd also appreciate your thoughts on the design and on how i should approach it.
One thing I was also wondering about is the mention of config and proto changes in the feedback on my PR. Are these generally changes I should avoid making, or was the concern more about how many parts of DataFusion the PR touched without discussing the design first?
- Lingua principale
- Rust
- Stelle
- 9.6k
- Fork
- 2.6k
- Merge medio
- 3g 4h
- PR unite (30g)
- 345
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/datafusion
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/datafusion#27315 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/datafusion#27094 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Substrait consumer doesn't recognise `shift_left` / `shift_right` from functions_arithmetic.yamlForse già presa @jonasHanhan l’ha presa 9 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/datafusion#27059 ·
I maintainer di solito rispondono entro 1 giorno
-
`ProjectionExprs::project_statistics` computes approximate `Statistics::total_byte_size` ignoring column statsForse già presa @joseph-isaacs l’ha presa 10 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/datafusion#27050 ·
I maintainer di solito rispondono entro 1 giorno
-
physical-plan: decoding an Unnest or Explain node with an unset field panicsForse già presa @geoHeil l’ha presa 8 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/datafusion#26999 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/datafusion
Issue simili
-
P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
HerringtonDarkholme/hd-lang#1770 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
jonathanong/no-mistakes#3332 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
swc-project/swc-next-issues#310 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
swc-project/swc-ai-issues#653 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
lbjlaq/Antigravity-Manager#3937 ·
I maintainer di solito rispondono entro 1 giorno