Skip to content

feat(reader): read vortex.zstd_buffers (#444) - #457

Merged
dfa1 merged 1 commit into
mainfrom
feat/zstd-buffers-read
Oct 4, 2026
Merged

dfa1 merged 1 commit into
mainfrom
feat/zstd-buffers-read

Conversation

@dfa1

@dfa1 dfa1 commented Oct 4, 2026

Copy link
Copy Markdown
Owner

vortex.zstd_buffers (Rust's opt-in zstd2026.02.0 edition) wraps any
array and Zstd-compresses each of its buffers independently, keeping the
layout. ZstdBuffersEncodingDecoder follows Rust's deserialize/build_inner:
decompress every buffer at its declared alignment, append the segments
to the context, and decode the inner encoding (id + metadata from the
proto) over them with its own children. Self-nested zstd_buffers levels,
which nest through metadata the file depth guard never sees, unwrap in a
loop rather than recursing.

vortex-jni cannot emit the encoding, so a checked-in fixture written by
Rust's own ZstdBuffers::compress (scripts/fixtures/zstd-buffers) stands
in. Reading it exposed two pre-existing bugs:

  • VarBinEncodingDecoder ignored the validity child: null rows of a
    Rust-written nullable vortex.varbin read back as empty values.
  • A corrupt vortex.zstd frame leaked the binding's ZstdException; frame
    decompression is now one shared helper that wraps it.

Closes #444. Stacked on #456 — merge that first, then retarget this to main.

Verified with ./mvnw verify (unit + integration).

🤖 Generated with Claude Code

@dfa1
dfa1 force-pushed the feat/zstd-buffers-read branch from dd6e125 to 056f14a Compare October 4, 2026 06:41
@dfa1
dfa1 changed the base branch from feat/parquet-variant-read to main October 4, 2026 06:41
vortex.zstd_buffers (Rust's opt-in zstd2026.02.0 edition) wraps any
array and Zstd-compresses each of its buffers independently, keeping the
layout. ZstdBuffersEncodingDecoder follows Rust's deserialize/build_inner:
decompress every buffer at its declared alignment, append the segments
to the context, and decode the inner encoding (id + metadata from the
proto) over them with its own children. Self-nested zstd_buffers levels,
which nest through metadata the file depth guard never sees, unwrap in a
loop rather than recursing.

vortex-jni cannot emit the encoding, so a checked-in fixture written by
Rust's own ZstdBuffers::compress (scripts/fixtures/zstd-buffers) stands
in. Reading it exposed two pre-existing bugs:
- VarBinEncodingDecoder ignored the validity child: null rows of a
  Rust-written nullable vortex.varbin read back as empty values.
- A corrupt vortex.zstd frame leaked the binding's ZstdException; frame
  decompression is now one shared helper that wraps it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dfa1
dfa1 force-pushed the feat/zstd-buffers-read branch from 056f14a to 80cb739 Compare October 4, 2026 06:41
@dfa1
dfa1 merged commit 14c77bd into main Oct 4, 2026
6 checks passed
@dfa1
dfa1 deleted the feat/zstd-buffers-read branch October 4, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot read vortex.zstd_buffers (Rust zstd edition family)

1 participant