feat(zstd): multi-frame encode#170
Merged
Merged
Conversation
Add ZstdEncodingEncoder(valuesPerFrame): split the payload into independently compressed zstd frames of valuesPerFrame values each (the last frame holds the remainder), emitting one ZstdFrameMetadata per frame so a slice scan can decompress only the frames overlapping its row range. The no-arg constructor keeps the single-frame behaviour. Frame boundaries fall on value boundaries: fixed stride for primitives, length-prefix walk for varbin. Works for the non-nullable and nullable (frames over packed valid values, validity child trailing the frame buffers) paths alike. The decoder already iterates frames, so this is encode-only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3188a22 to
f3bace2
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.
Summary
Closes the last
vortex.zstdTODO item (multi-frame encode).new ZstdEncodingEncoder(valuesPerFrame)splits the payload into independently compressed zstd frames ofvaluesPerFramevalues each, emitting oneZstdFrameMetadataper frame — so a slice scan can decompress only the frames overlapping its row range. The no-arg constructor keeps the single-frame behaviour.What changed
ZstdEncodingEncoder— newvaluesPerFramefield + configuring constructor. Frame boundaries fall on value boundaries: fixed stride for primitives, length-prefix walk for varbin. Works for non-nullable and nullable paths (frames cover the packed valid values; the validity child's buffers trail the frame buffers). The decoder already iteratesmeta.frames(), so this is encode-only.MultiFrameunit cases (primitive split, varbin value-boundary split, nullable framing) + Rust-interop ITjavaWriter_rustReader_zstd_multiFrameI64(7 values → 3 frames, Rust reads it back).Addedentry.Testing
ZstdEncodingEncoderTest(3 new), single-frame backward-compat intact.failOnWarningsclean (new public constructor).🤖 Generated with Claude Code