Offset overflow - JVM columnar shuffle cuts row-to-Arrow batches by row count only
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- backend, data-engineering
Direzione di ricerca
Start with native/shuffle/src/spark_unsafe/row.rs, especially process_sorted_row_partition at lines 1579–1588 and its existing row size handling; compare it with process_sorted_partitions at line 1686. Add byte budget coverage alongside the row limit, then follow the issue’s test plan: use a small budget and verify several blocks are written and the same rows read back.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Part of #7267.
Problem
The JVM columnar shuffle hands sorted UnsafeRows to native code, which converts them to Arrow in batches of spark.comet.shuffle.jvm.batchSize rows, capped by spark.comet.batchSize. Both entry points cut batches by row count only: process_sorted_partitions splits each partition's rows with run.chunks(batch_size) (native/shuffle/src/spark_unsafe/row.rs:1686), and process_sorted_row_partition does the same at :1579-1588. Strings and binaries are appended with arrow's append_value (:1173-1203), which panics with byte array offset overflow once a column passes 2 GiB. Strings inside arrays, maps and structs go through the same builders.
So a batch fails when one string or binary column holds more than 2 GiB, which is more than about 256 KiB per value at 8192 rows. When the column is dictionary-encoded, the writer succeeds and the reader fails instead (#7496). When the dictionary doesn't pay off, the cast back to plain values returns OffsetOverflowError (row.rs:1777). Spark shuffles rows and has no batch to overflow.
#7269 covers the native shuffle writer, which is separate code.
Line references are for main at 4e6b12290f.
Workaround
Lower spark.comet.shuffle.jvm.batchSize.
Proposed fix
Cut batches by bytes as well as rows. The row sizes are known before conversion (row_sizes), and a row's size bounds the bytes it adds to any column, so ending a batch before the sum of its row sizes passes i32::MAX keeps every column valid without looking at the values.
Tests
Inject a small byte budget and check that process_sorted_row_partition writes several blocks for rows that would otherwise share one, with the same rows read back.
- Lingua principale
- Scala
- Stelle
- 1.3k
- Fork
- 414
- Merge medio
- 3g 5h
- PR unite (30g)
- 210
Preparare l'ambiente
- 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-comet
-
requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
apache/datafusion-comet#7559 ·
I maintainer di solito rispondono entro 2 giorni
-
requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/datafusion-comet#7558 ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/datafusion-comet#7557 ·
I maintainer di solito rispondono entro 2 giorni
-
`rand` and `randn` with an integer seed fall back to Spark without a fallback reasonForse già presa @galaxytemple l’ha presa 2 giorni fa. Apertarequires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/datafusion-comet#7479 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
area:writer enhancement requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
apache/datafusion-comet#7463 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di apache/datafusion-comet
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
chipsalliance/rocket-chip#3845 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
I maintainer di solito rispondono entro 13 giorni
-
gesticulate: the `FastInfoset` suffix is written `fast-infoset`, not the registered `fastinfoset`Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
propensive/soundness#2437 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ergoplatform/ergo#2918 ·
I maintainer di solito rispondono entro 2 giorni