Skip to content

fix(writer): admit an integer column to the dict layout as Rust's probe does - #599

Merged
dfa1 merged 1 commit into
mainfrom
fix/dict-admission-probe
Oct 24, 2026
Merged

dfa1 merged 1 commit into
mainfrom
fix/dict-admission-probe

Conversation

@dfa1

@dfa1 dfa1 commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Rust's DictStrategy gives a column a dict layout only when its probe compressor (the full cascade, IntDictScheme included) turns the first 8192-row block into a vortex.dict. Java's cardinality rule admitted columns Rust bit-packs, e.g. 100 small distinct I64 values (found probing vortex-jni 0.89 output; also the known taxi payment_type divergence).

  • Non-null primitive columns now take Rust's probe.
  • Nullable and string columns keep the cardinality check, documented in docs/compatibility.md. Java's nullable cascade runs under vortex.masked without the validity cost Rust's sampled bit-packing size carries, and Java picks OnPair where Rust's StringDictScheme wins, so the probe would diverge more there.
  • DictAdmissionInteropIntegrationTest: eight column shapes through vortex-jni and vortex-java, both must agree on the dict layout.

Full ./mvnw verify passes locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SwhK4W5cgj7y7s4ZPCif5x

@dfa1
dfa1 force-pushed the fix/dict-admission-probe branch from 638cbf4 to 4943906 Compare October 24, 2026 12:16
…be does

Rust's DictStrategy gives a column a dict layout only when its probe
compressor, the full cascade with IntDictScheme, turns the column's
first 8192-row block into a vortex.dict. Java admitted any column with
under half distinct values and at most 2,048 of them, so a column that
bit-packs better (100 small distinct I64 values: 7 bits a row against a
100-value dictionary plus codes) got a dict layout vortex-jni never
writes; the taxi payment_type divergence was this.

A non-null primitive column now takes the same probe: the cascade with
the per-chunk integer dictionary back in, over the column's first block.
Nullable and string columns keep the cardinality check: Java cascades a
nullable column's values under vortex.masked, without the validity cost
Rust's sampled bit-packing size carries, and picks OnPair for strings
where Rust's StringDictScheme wins, so the probe would diverge more
there than the check does.

DictAdmissionInteropIntegrationTest writes ten column shapes with
vortex-jni and vortex-java and asserts both agree on the dict layout.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SwhK4W5cgj7y7s4ZPCif5x
@dfa1
dfa1 force-pushed the fix/dict-admission-probe branch from 4943906 to 4f9ca0b Compare October 24, 2026 12:24
@dfa1
dfa1 merged commit fc4d1fe into main Oct 24, 2026
6 checks passed
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.

1 participant