Writer: vortex.onpair throws on a string chunk past 2 GB instead of stepping aside

Geschlossen
#643 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Ein zugehöriger Pull Request wurde bereits gemerged.

  • #656 von @dfa1 — gemerged

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
Ein halber Tag
Anfängerfreundlichkeit
42/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
java

Rechercherichtung

Start in OnPairEncodingEncoder.java: the Encoder.rows method near line 152 throws when a chunk's row bytes exceed 2 GB, and encodeCascade around line 86 calls it. The fix is for the encoder to return CascadeStep.notApplicable() so CascadingCompressor.encodeChoice (line 326) lets the other string encodings win. Done when a forced vortex.onpair import of a >2 GB chunk falls back instead of throwing, verified by a case in LargeChunkInteropIntegrationTest under the large tag.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug

A default (non-compact) Parquet import of Raincloud's websight-v01 (29 GB Parquet, 822,987 rows of HTML) fails after the first chunk:

UnsupportedOperationException: vortex.onpair: chunk exceeds 2 GB of row bytes
    at io.github.dfa1.vortex.writer.encode.OnPairEncodingEncoder$Encoder.rows(OnPairEncodingEncoder.java:152)
    at io.github.dfa1.vortex.writer.encode.OnPairEncodingEncoder.encodeCascade(OnPairEncodingEncoder.java:86)
    at io.github.dfa1.vortex.writer.encode.CascadingCompressor.spliceResult(CascadingCompressor.java:478)
    at io.github.dfa1.vortex.writer.encode.CascadingCompressor.encodeChoice(CascadingCompressor.java:326)

OnPairEncodingEncoder lays a chunk's rows out contiguously (VarBinBytes.toContiguous) and throws when they don't fit one byte[]. Since #633 every other string encoding (varbin, varbinview, fsst, zstd) handles a chunk past 2 GiB, so an encoder that cannot should decline (CascadeStep.notApplicable()) and let those win, rather than abort the write. The compact import of the same file (which doesn't offer onpair) succeeds, and the file passes conformance.

open-food-facts (15 GB Parquet) failed its default import at the same step; its log was overwritten, so the cause is unconfirmed but likely the same.

Check against Rust: whether its onpair scheme bounds its input size or declines large arrays.

A cross-check belongs in LargeChunkInteropIntegrationTest (large tag): force vortex.onpair alongside the others, expecting a fallback rather than an exception.

Vorherrschende Sprache
Java
Sterne
3
Forks
2
Ø Merge
9 Std. 51 Min.
Gemergte PRs (30 T.)
127

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus dfa1/vortex-java

Alle Issues in dfa1/vortex-java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.