Writer: flat array stats should match the ones Rust keeps per encoding node
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 30/100
Línea de trabajo
Start by reading flat/writer.rs and the listed encoding files in the Rust source to trace which statistics each encoding inherits and retains. Then inspect Java's flat writer and cascade, along with the vortex-jni integration tests, to compare stats on every node for the listed column shapes. Done means the per-node stats match between writers, with the string min/max and null-count expectations updated where Rust omits them.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Follow-up to #581. vortex-java and vortex-jni write different stats into flat segments' ArrayNodes.
What Rust does
FlatLayoutStrategy doesn't compute stats; it keeps the ones already cached on the array (flat/writer.rs: "flat layouts do not force compute stats during write, they only retain pre-computed stats"). It serializes them on every node of the tree. So what ends up in a node depends on what the compressor computed while picking a scheme, and on which encodings pass those stats on to their output array (statistics().inherit* / with_stats_set in encodings/fastlanes/src/bitpacking/array/bitpack_compress/{global,blocked}.rs, vortex-btrblocks/src/schemes/integer/{bitpacking,for_}.rs, vortex-btrblocks/src/schemes/float/alp.rs, encodings/sequence/src/array.rs, encodings/runend/src/array.rs, encodings/zstd/src/zstd_buffers.rs, vortex-array/src/executor.rs).
Observed (same 20k-row data through both writers, all stats Exact)
| root encoding (Rust) | Rust writes | Java writes |
|---|---|---|
vortex.primitive, fastlanes.bitpacked |
min, max, is_constant=false, null_count | min, max, null_count |
vortex.sequence |
is_sorted, is_strict_sorted | min, max, null_count |
vortex.alp, vortex.alprd, vortex.fsst, vortex.constant |
nothing | min, max, null_count |
vortex.bool |
is_constant | min, max, null_count |
| child nodes (ALP's sequence, FSST offsets, validity bool, dict codes) | often stats (sorted flags, min/max/sum/null_count) | never: Java writes stats on the root only |
Zone-map table segments differ too. Rust's struct children carry stats and aren't masked; Java wraps each field in vortex.masked and writes no child stats.
Plan
- Port the inheritance rules per encoding from the Rust source (not from the table above), applied through Java's cascade to every node, root and children.
- Cross-check: the same data through vortex-jni and vortex-java, asserting identical per-node stats (encoding, stat set, values, precision) for each column shape: sorted/random/small-range ints, random/sorted floats, low- and high-cardinality strings, bool, nullable, constant.
Expected consequences (intended, per the parity directive)
- Java-written string columns lose their flat min/max (FSST and dict values keep none in Rust). So
VortexReader.columnStats()string min/max and the SQLMIN/MAXstats shortcut go away for them, as already happens for Rust-written files.JavaWritesRustReadsIntegrationTest#javaWriter_jniReader_filteredUtf8_prunesOnTruncatedBounds(and the emoji test above it) then expectnullmin/max. - Flat-path pruning with zone maps disabled mostly stops for non-primitive encodings.
- Numeric
columnStatsare unaffected, because they come from the zone table. VortexWriter.buildArrayFlatBuffer's comment saysnull_countis always written "matching the Rust writer". vortex-jni no longer does that for every encoding, so the comment and the IS NULL pruning it enables need checking.
The zone-table segment shape (masked fields, child stats) is a separate gap and could be split out.
- Lenguaje dominante
- Java
- Estrellas
- 3
- Forks
- 2
- Merge medio
- 9 h 47 min
- PR fusionados (30 d)
- 128
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dfa1/vortex-java
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
dfa1/vortex-java#636 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 70/100
dfa1/vortex-java#655 ·
Los mantenedores suelen responder en 1 día
-
perf
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
dfa1/vortex-java#651 ·
Los mantenedores suelen responder en 1 día
-
Writer: string columns written as per-chunk dicts where Rust uses its dict layout (up to 2x larger)Abiertoperf
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
dfa1/vortex-java#650 ·
Los mantenedores suelen responder en 1 día
-
perf
Dificultad 4/5 3-5 días Aptitud para principiantes 28/100
dfa1/vortex-java#649 ·
Los mantenedores suelen responder en 1 día
Todos los issues de dfa1/vortex-java
Issues similares
-
Dificultad 2/5 Menos de una hora Aptitud para principiantes 70/100
Vakore/ZappierGames#248 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
thelastpickle/cassandra-reaper#1748 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 3 días
-
A proxy that fails to start logs a RejectedExecutionException stack trace from its shutdown hookAbiertofollow-up
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Sanne/incus-spawn#1953 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
OneBusAway/maglev#1917 · 1 comentario ·
Los mantenedores suelen responder en 3 días