feat(writer): run-length encode float columns like Rust's FloatRLEScheme - #438
Merged
Merged
Conversation
Parity gap found while porting IntRLEScheme (#437): Rust also RLE-encodes floats, while RleEncodingEncoder refused them. It now accepts every primitive. Runs compare raw bits (as toLongs already did for floats), so the encoding is lossless: -0.0, +0.0 and NaN payloads stay distinct. The cascade's values child is the column's own float[]/double[], so ALP can compete on the run values; Rust's float scheme shares the int one's children and exclusions, so nothing else changes. vortex-jni reads Java-written float RLE back bit for bit, forced and through the cascade. Size comparisons are byte-identical. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Closes the parity gap found in #437: Rust's
vortex-btrblockshas aFloatRLESchemenext toIntRLEScheme, while ourRleEncodingEncoderrefused floats (acceptsreturned false for them).acceptstakes every primitive. Rust's float scheme matchesis_float(), and its int schemeis_int().toLongsalready read floats that way), so-0.0/+0.0are separate runs and a NaN payload survives.==would merge the zeros and split every NaN.double[]/float[](F16:short[]), so ALP and friends can compete on the run values. Indices and offsets work exactly as for integers. Rust's float scheme reusesrle_descendant_exclusionsandrle_compress, so the exclusions are identical.PTypeIO.setreinterprets the long as raw bits for F32/F64/F16). It just had never been reachable.Tests
RleEncodingEncoderTest.Floats): accepts F32/F64, an F64 round-trip keeping-0.0and a NaN payload bit-exact, and an F32 cascade values child asfloat[].javaWriter_rustReader_rle_f64(forced RLE; vortex-jni reads raw bits back exactly, including-0.0and the NaN payload) andjavaWriter_jniReader_rle_f64_cascading.Docs:
docs/compatibility.mdRLE row, plus the CHANGELOG.🤖 Generated with Claude Code