Native Parquet write falls back on int96RebaseModeInWrite=LEGACY even when timestamps are not written as INT96
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
- 62/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- data-engineering
Direzione di ricerca
Il fallback si trova in NativeWriteUtils.legacyDatetimeRebaseWriteReason; inizia da lì e leggi come controlla int96RebaseModeInWrite prima di verificare il tipo di timestamp di output. Aggiungi una condizione in modo che il controllo INT96 si applichi solo quando spark.sql.parquet.outputTimestampType è INT96, poi aggiungi un test di regressione con TIMESTAMP_MICROS e int96RebaseModeInWrite=LEGACY che verifichi che la scrittura resti nativa. È completato quando quel test passa e il paragrafo in docs/source/user-guide/latest/parquet.md è aggiornato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What is the problem the feature request solves?
Found in review of #7053. The native Parquet writer fallback added there, NativeWriteUtils.legacyDatetimeRebaseWriteReason, treats spark.sql.parquet.int96RebaseModeInWrite=LEGACY as a reason to fall back whenever the output has a timestamp column. That setting only governs the INT96 encoding. When spark.sql.parquet.outputTimestampType is TIMESTAMP_MICROS or TIMESTAMP_MILLIS, Spark writes INT64 and uses datetimeRebaseModeInWrite instead, so the INT96 setting has no effect on the output.
Reproduction: a timestamp column, outputTimestampType=TIMESTAMP_MICROS, datetimeRebaseModeInWrite=CORRECTED. Changing only int96RebaseModeInWrite from CORRECTED to LEGACY makes the helper return a fallback reason instead of None. Spark writes the same INT64 TIMESTAMP(MICROS) either way (for 1500-01-01 12:34:56.123456 both files contain -14831724303876544).
The fallback is safe, but an unrelated legacy INT96 setting disables native write acceleration for a write the native writer handles correctly.
Describe the potential solution
Only apply the INT96 condition when spark.sql.parquet.outputTimestampType is INT96. The native writer always writes INT64 microseconds and ignores outputTimestampType when writing, so the check has to read the session conf.
Add a regression test with a non-INT96 timestamp output and int96RebaseModeInWrite=LEGACY that asserts the write stays native and matches Spark's value. Update the paragraph in docs/source/user-guide/latest/parquet.md that names int96RebaseModeInWrite=LEGACY as a fallback trigger.
Additional context
Reviewer comment: https://github.com/apache/datafusion-comet/pull/7053#discussion_r4458640616
Follow-on to #7053, which should merge first.
- Lingua principale
- Scala
- Stelle
- 1.3k
- Fork
- 405
- Merge medio
- 3g 3h
- PR unite (30g)
- 269
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 78/100
apache/datafusion-comet#7458 ·
I maintainer di solito rispondono entro 2 giorni
-
requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/datafusion-comet#7453 ·
I maintainer di solito rispondono entro 2 giorni
-
area:ci enhancement priority:low requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
apache/datafusion-comet#7319 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
area:ci bug priority:low requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/datafusion-comet#7315 ·
I maintainer di solito rispondono entro 2 giorni
-
requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/datafusion-comet#7240 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di apache/datafusion-comet
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
scylladb/scylla-migrator#432 ·
I maintainer di solito rispondono entro 1 giorno
-
Python: zadd stringifies bytes/bytearray/memoryview members (silent data corruption), including in BatchForse già presa @prateek-kumar-improving l’ha presa oggi. Apertabug 🐞 python 🐍
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
valkey-io/valkey-glide#7521 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
v4 LSU does not mask TLB exceptions on miss: PTW refill causes Load Access Fault on M-mode loadAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
riscv-boom/riscv-boom#835 ·
-
Add a base64url Stringable helperForse già presa @nafg l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
nafg/simple-router#362 ·
I maintainer di solito rispondono entro 1 giorno