Repository navigation
fix(writer): the root node of a flat segment carries the array stats Rust keeps - #673
Merged
Merged
Conversation
…Rust keeps (#583) Rust's flat layout computes no stats; it keeps what the compressor had cached on the array, and each encoding passes on only some. Java wrote min, max and null_count on every root. Now an integer root under vortex.primitive or fastlanes.bitpacked carries min, max, is_constant (only without nulls), null_count and the uncompressed size, a float root the flag, count and size, a bool root the flag and size, and every other encoding none. As in a Rust-written file, a string column then has no flat min/max, so columnStats() reports none for it. Child nodes and vortex.sequence's sorted flags are still to do. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011fRbYsrGtpKHp9APhU8qDV
This was referenced Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #583 (PR 1 of 3; does not close it). Parity with Rust is the target, so Java-only extras are dropped.
Rust's flat layout computes no stats; it keeps what the compressor had cached on the array (
flat/writer.rs), and each encoding passes on only some (vortex-compressor/src/stats/*,compressor/cascade.rs). Java wrotemin,maxandnull_counton every root. Now the root node carries:vortex.primitive/fastlanes.bitpackedmin,max,is_constant(only without nulls),null_count,uncompressed_size_in_bytesvortex.primitiveis_constant(only without nulls),null_count,uncompressed_size_in_bytesis_constant,uncompressed_size_in_bytesalp,alprd,fsst,onpair,constant,for,dict, strings, ...)EncodeNodegains aNodeStats, written for every node bybuildArrayNodeFlatBuffer.Consequence (intended). A Java-written string column has no flat
min/max, as a Rust-written one has none, socolumnStats()reports none for it; the zoned layout's stats table still holds string bounds in both. Three tests that read string bounds from flat stats now expect none (globalDict_utf8_reportsColumnStats,filteredUtf8_prunesOnTruncatedBounds, the global-dict inspector profile), andutf8ChunkStats_inUtf8ByteOrdernow prunes against the zone map. The reader does not decode decimal bounds from the zone table, so those bounds are unreadable for Rust-written files too.Test.
NodeStatsInteropIntegrationTestwrites the same rows (sorted/random/small ints, floats, low/high-cardinality strings, bool, nullable int) through vortex-jni and Java and compares the root line of every flat segment, stats and values included (zone tables too).vortex.sequenceis compared by id until its sorted flags land.RootNodeStatsTestpins the rules. Full./mvnw verifypasses, and so do the slow-tagged integration classes.Still to do for #583: child-node stats (PR 2: sequence flags, ALP/FSST/bitpacked children, validity), and the zone-table segments' shape (PR 3).
🤖 Generated with Claude Code