Skip to content

Return UUID column statistics to Java as bytes - #11299

Merged
myrrc merged 1 commit into
developfrom
rk/jni-uuid-stats
Nov 6, 2026
Merged

myrrc merged 1 commit into
developfrom
rk/jni-uuid-stats

Conversation

@robert3005

@robert3005 robert3005 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

In 0.92.0, VortexWriter.finish() fails for any file that has a UUID column:

Vortex Error: cannot return nested scalar statistic with dtype fixed_size_list(u8)[16]? to Java

The writer now records min and max for the arrow.uuid extension type, but scalar_to_java can return only flat scalars to Java. The whole write fails because one bound cannot be represented. Iceberg found this while upgrading to 0.92.0.

A writer that wrote a UUID column failed in finish(), because the min and
max of a fixed-size list of u8 had no Java conversion. These bounds now
return to Java as byte arrays.

Signed-off-by: Robert Kruszewski <[email protected]>
@robert3005 robert3005 added the changelog/fix A bug fix label Nov 6, 2026
@robert3005
robert3005 requested a review from myrrc November 6, 2026 14:30
@codspeed

codspeed Bot commented Nov 6, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 10.08%

1 warning

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

❌ 1 regressed benchmark
✅ 1916 untouched benchmarks
⏩ 47 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Walltime lt_i64_nullable_avx2 9.1 µs 10.1 µs -10.08%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing rk/jni-uuid-stats (cdb2163) with develop (bed9e0c)

Open in CodSpeed

Footnotes

  1. 47 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@myrrc myrrc added the lang/java Relates to the Vortex Java API label Nov 6, 2026
@myrrc
myrrc merged commit c1439e6 into develop Nov 6, 2026
132 of 134 checks passed
@myrrc
myrrc deleted the rk/jni-uuid-stats branch November 6, 2026 14:36
dfa1 added a commit to dfa1/vortex-java that referenced this pull request Nov 12, 2026
From 0.92 Rust imports arrow.uuid as vortex.uuid and records its min and max
in the file statistics: a FixedSizeList(U8, 16) scalar, exact, in unsigned
byte order (vortex-data/vortex#11299 let vortex-jni hand them back to Java).
FileStatsAccumulator now does the same, so a uuid column's footer matches
vortex-jni's byte for byte, and WriteSummary reports the bounds as UUIDs.
UUID.compareTo is not that order: it compares signed longs.

0.93 also unblocks two uuid cross-checks that were skipped:
- DictAllTypesInteropIntegrationTest's uuid case: vortex-jni 0.90 could not
  close a writer with a uuid column;
- JavaWritesRustReadsIntegrationTest#javaWriter_rustReader_nullable_uuid,
  disabled since vortex-jni 0.74, which could not export vortex.uuid to
  Arrow. Rust now exports it as Arrow's arrow.uuid (vortex-data/vortex#11224),
  so the test reads UUIDs instead of 16-byte binaries.

Rust 0.92's canonical-decimal change (vortex-data/vortex#10995) needs nothing
here: vortex-java writes vortex.decimal at its precision's canonical width
and narrows only through vortex.decimal_byte_parts, as Rust does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011fRbYvRdQi45rxQgF3QMMP
dfa1 added a commit to dfa1/vortex-java that referenced this pull request Nov 12, 2026
From 0.92 Rust imports arrow.uuid as vortex.uuid and records its min and max
in the file statistics: a FixedSizeList(U8, 16) scalar, exact, in unsigned
byte order (vortex-data/vortex#11299 let vortex-jni hand them back to Java).
FileStatsAccumulator now does the same, so a uuid column's footer matches
vortex-jni's byte for byte, and WriteSummary reports the bounds as UUIDs.
UUID.compareTo is not that order: it compares signed longs.

0.93 also unblocks two uuid cross-checks that were skipped:
- DictAllTypesInteropIntegrationTest's uuid case: vortex-jni 0.90 could not
  close a writer with a uuid column;
- JavaWritesRustReadsIntegrationTest#javaWriter_rustReader_nullable_uuid,
  disabled since vortex-jni 0.74, which could not export vortex.uuid to
  Arrow. Rust now exports it as Arrow's arrow.uuid (vortex-data/vortex#11224),
  so the test reads UUIDs instead of 16-byte binaries.

Rust 0.92's canonical-decimal change (vortex-data/vortex#10995) needs nothing
here: vortex-java writes vortex.decimal at its precision's canonical width
and narrows only through vortex.decimal_byte_parts, as Rust does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011fRbYvRdQi45rxQgF3QMMP
dfa1 added a commit to dfa1/vortex-java that referenced this pull request Nov 12, 2026
From 0.92 Rust imports arrow.uuid as vortex.uuid and records its min and max
in the file statistics: a FixedSizeList(U8, 16) scalar, exact, in unsigned
byte order (vortex-data/vortex#11299 let vortex-jni hand them back to Java).
FileStatsAccumulator now does the same, so a uuid column's footer matches
vortex-jni's byte for byte, and WriteSummary reports the bounds as UUIDs.
UUID.compareTo is not that order: it compares signed longs.

0.93 also unblocks two uuid cross-checks that were skipped:
- DictAllTypesInteropIntegrationTest's uuid case: vortex-jni 0.90 could not
  close a writer with a uuid column;
- JavaWritesRustReadsIntegrationTest#javaWriter_rustReader_nullable_uuid,
  disabled since vortex-jni 0.74, which could not export vortex.uuid to
  Arrow. Rust now exports it as Arrow's arrow.uuid (vortex-data/vortex#11224),
  so the test reads UUIDs instead of 16-byte binaries.

Rust 0.92's canonical-decimal change (vortex-data/vortex#10995) needs nothing
here: vortex-java writes vortex.decimal at its precision's canonical width
and narrows only through vortex.decimal_byte_parts, as Rust does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011fRbYvRdQi45rxQgF3QMMP
dfa1 added a commit to dfa1/vortex-java that referenced this pull request Nov 12, 2026
From 0.92 Rust imports arrow.uuid as vortex.uuid and records its min and max
in the file statistics: a FixedSizeList(U8, 16) scalar, exact, in unsigned
byte order (vortex-data/vortex#11299 let vortex-jni hand them back to Java).
FileStatsAccumulator now does the same, so a uuid column's footer matches
vortex-jni's byte for byte, and WriteSummary reports the bounds as UUIDs.
UUID.compareTo is not that order: it compares signed longs.

0.93 also unblocks two uuid cross-checks that were skipped:
- DictAllTypesInteropIntegrationTest's uuid case: vortex-jni 0.90 could not
  close a writer with a uuid column;
- JavaWritesRustReadsIntegrationTest#javaWriter_rustReader_nullable_uuid,
  disabled since vortex-jni 0.74, which could not export vortex.uuid to
  Arrow. Rust now exports it as Arrow's arrow.uuid (vortex-data/vortex#11224),
  so the test reads UUIDs instead of 16-byte binaries.

Rust 0.92's canonical-decimal change (vortex-data/vortex#10995) needs nothing
here: vortex-java writes vortex.decimal at its precision's canonical width
and narrows only through vortex.decimal_byte_parts, as Rust does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011fRbYvRdQi45rxQgF3QMMP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix lang/java Relates to the Vortex Java API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants