Skip to content

fix: AlpRd propagates left_parts validity; null float rows no longer decode as 0.0 (#234)#239

Merged
dfa1 merged 1 commit into
mainfrom
fix/234-alprd-null-loss
Jul 8, 2026
Merged

fix: AlpRd propagates left_parts validity; null float rows no longer decode as 0.0 (#234)#239
dfa1 merged 1 commit into
mainfrom
fix/234-alprd-null-loss

Conversation

@dfa1

@dfa1 dfa1 commented Jul 8, 2026

Copy link
Copy Markdown
Owner

What

AlpRdEncodingDecoder (fastlanes.alprd) dropped the validity mask on its left_parts child: null floating-point rows decoded as 0.0 instead of null — silent corruption. This is the same null-loss family as #210 (ALP), #225 (RunEnd), and #226/#232 (Sparse).

How

Following the #210 template, after decoding the left_parts child:

  • if it is a MaskedArray, capture its .validity() and unwrap to .inner();
  • build the lazy ALP-RD result over the unwrapped inner values (unchanged);
  • if a mask was captured, re-wrap the result in new MaskedArray(decoded, validity).

An ALP-RD array's validity IS its left_parts child's validity, matching the Rust ValidityChild contract.

Tests

New AlpRdEncodingDecoderTest:

  • null left_parts → null output rows (mask survives, valid rows decode via the dictionary);
  • all-valid left_parts → plain DoubleArray, no MaskedArray wrapper (no regression).

All 1192 reader unit tests pass.

Conformance

Flips bi-euro2016 from gap:234 to ok in the Raincloud conformance matrix.

Closes #234.

🤖 Generated with Claude Code

…decode as 0.0 (#234)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dfa1 dfa1 merged commit 1d10aa7 into main Jul 8, 2026
0 of 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.

AlpRdEncodingDecoder drops left_parts validity — nulls decode as 0.0 (silent loss)

1 participant