Skip to content

feat(reader): read vortex.parquet.variant (#445) - #456

Merged
dfa1 merged 1 commit into
mainfrom
feat/parquet-variant-read
Oct 4, 2026
Merged

dfa1 merged 1 commit into
mainfrom
feat/parquet-variant-read

Conversation

@dfa1

@dfa1 dfa1 commented Oct 4, 2026

Copy link
Copy Markdown
Owner

vortex-jni's default writer turns an Arrow arrow.parquet.variant column
into vortex.variant over vortex.parquet.variant (core2026.08.3, Rust's
default edition), which vortex-java could not decode.

ParquetVariantEncodingDecoder follows Rust's ParquetVariant::deserialize:
proto metadata {has_value, typed_value_dtype, value_nullable}, no
buffers, children [validity?, metadata, value?, typed_value?]. It decodes
to a StructArray {metadata, value?, typed_value?}, Arrow's own storage
shape for the extension, masked by row validity; no new Array type.

Rust dict-encodes the Binary value child, which exposed that
DictEncodingDecoder only routed Utf8 through its VarBin path: a Binary
dictionary hit a (DType.Primitive) cast and leaked ClassCastException.
Binary now shares the Utf8 path, and any other non-primitive dtype
throws VortexException.

Writing vortex.parquet.variant stays out of scope (ADR 0014).

Closes #445.

Verified with ./mvnw verify (unit + integration), including the new ParquetVariantInteropIntegrationTest (vortex-jni-written plain and shredded columns).

🤖 Generated with Claude Code

vortex-jni's default writer turns an Arrow arrow.parquet.variant column
into vortex.variant over vortex.parquet.variant (core2026.08.3, Rust's
default edition), which vortex-java could not decode.

ParquetVariantEncodingDecoder follows Rust's ParquetVariant::deserialize:
proto metadata {has_value, typed_value_dtype, value_nullable}, no
buffers, children [validity?, metadata, value?, typed_value?]. It decodes
to a StructArray {metadata, value?, typed_value?}, Arrow's own storage
shape for the extension, masked by row validity; no new Array type.

Rust dict-encodes the Binary value child, which exposed that
DictEncodingDecoder only routed Utf8 through its VarBin path: a Binary
dictionary hit a (DType.Primitive) cast and leaked ClassCastException.
Binary now shares the Utf8 path, and any other non-primitive dtype
throws VortexException.

Writing vortex.parquet.variant stays out of scope (ADR 0014).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dfa1
dfa1 merged commit 90176af into main Oct 4, 2026
6 checks passed
@dfa1
dfa1 deleted the feat/parquet-variant-read branch October 4, 2026 06:41
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.parquet.variant (Rust's default writer emits it for variant columns)

1 participant