fix(inspector): read min/max from the zone-map table; unify zone ranges (#416) - #419
Merged
Merged
Conversation
…es (#416) Rust writes bounds only into the vortex.zoned table, so the inspector showed no min/max for Rust-written files. Zones now carry the column rows they cover (ScanIterator#columnZones, new Zone record); pruning and the inspector share one zone-range lookup in place of three per-shape ones, and ZonedStatsSchema#tableDtype replaces the schema dispatch copied in the TUI. Also fixes HTML per-chunk min/max showing dictionary codes for global-dict columns. Closes #416 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
dfa1
force-pushed
the
fix/416-inspector-zone-map-stats
branch
from
September 30, 2026 17:03
f09ad8b to
6bc76dc
Compare
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.
Closes #416.
Problem
vortex inspect(text and--html) showed no min/max for Rust-written files. The inspector read only array-levelArrayStatsfrom flat segments; the Rust writer puts bounds only in thevortex.zonedzone-map table.0/1,2/3) instead of the values. Confirmed with a test against the old code.Fix
Reader: one zone-range model
Zone(firstRow, rowCount, stats)record +ScanIterator#columnZones(String): the zone-map table with each zone placed on its column rows. Empty when there's no usable zone map (no per-chunk fallback, unlikecolumnZoneStats).zoneIndexByOrdinal/zoneIndexByLength/zoneIndexByDictCodeChunk+ZoneWindow+columnChunkCounts+ChunkSpec.chunkOrdinals) collapse intozoneStarts()plus one binary-search range lookup. A window is checked against the zone that contains it, not against its whole covering chunk. That's still conservative (never a partial overlap), and can prune slightly more on merged grids.ZonedStatsSchema#tableDtype(Layout, DType): thevortex.zoned/vortex.statsschema dispatch, previously copied inScanIteratorand the TUI.Inspector
HtmlReportintoInspectorTree#chunkParts, shared with the zone application.Not deduplicated, on purpose
The TUI's zone-table view keeps decoding the raw table. Switching it to
columnZoneswould lose decimal bounds (ArrayStatsboxes decimals tonull), single-stat tables,_is_truncatedflags, multi-segment tables and nested zoned nodes. Only the schema dispatch is shared.Tests
columnZones: legacy one-per-chunk ranges, unknown column → empty, Rust stride tiles[0, n)with each zone's min/max matching its own rows../mvnw verifyis green.🤖 Generated with Claude Code