Repository navigation
perf(reader): fold an i32 global dict column off its codes, not a per-row copy - #603
Merged
Merged
Conversation
…-row copy A dict chunk that spans several scan windows (a global dict column's codes chunk at 512Ki rows against 128Ki-row windows) was canonicalized once per covering flat: DictIntArray.materialize wrote a 4-byte value for every row, and each window then folded that copy. The shared flat now keeps an i32 dict as a dict over canonical codes and pool; each window slices only the codes, and DictIntArray.fold/materialize gather straight off the pool. For that to reach the fast path, the byte/short/int/long offset views report their window as their segment when the inner buffer covers it, and DictIntArray's gathers handle u8 codes as well as u16 (without u8, TPC-DS store_sales lost 4%). ParquetVsVortexReadBenchmark.vortexReadMultiColumn (PULocationID is a global dict): 162 -> 182 ops/s single fork on a quiet machine; 3 forks base vs change in one later, noisier session 133.8 -> 155.4 (+16%). RealFileScanBenchmark A/B on all seven real files: within noise (store_sales and appian-order re-checked at 3 forks, alternating). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SwhK4W5cgj7y7s4ZPCif5x
dfa1
force-pushed
the
perf/global-dict-fold
branch
from
October 24, 2026 17:34
37ce2b0 to
6521a71
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.
A dict chunk spanning several scan windows was expanded to one 4-byte value per row before each window folded it. The shared flat now keeps an
i32dict as a dict; windows slice only the codes, andDictIntArraygathers straight off the pool (u8 and u16 codes).OffsetByte/Short/Int/LongArray) report their window viasegmentIfPresent()when the inner buffer covers it, so a sliced dict's codes are flat.ParquetVsVortexReadBenchmark.vortexReadMultiColumn: 162 → 182 ops/s single fork (quiet); 133.8 → 155.4 (+16%) at 3 forks, base and change in one noisier session.RealFileScanBenchmarkA/B on all seven real files: within noise (store_sales,appian-orderre-checked at 3 forks).Full
./mvnw verifypasses locally.🤖 Generated with Claude Code
https://claude.ai/code/session_01SwhK4W5cgj7y7s4ZPCif5x