fix: DateTimeParts propagates null component rows instead of throwing (#235)#238
Merged
Conversation
…#235) When any component (days/seconds/subseconds) of a vortex.datetimeparts array decodes to a null — as a nullable vortex.runend child now does after PR #225 — the reassembled timestamp row is null. The decoder unwraps each MaskedArray component to its raw values, intersects their validities, and re-wraps the reassembled array with the combined mask, instead of throwing "DateTimeParts: null cell at index". Co-Authored-By: Claude Sonnet 4.6 <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.
What
vortex.datetimepartssplits a date/time into component children (days + seconds + subseconds).DateTimePartsArrays.readLongassembled them per row and threwVortexException: DateTimeParts: null cell at index 0whenever a component decoded to a null.That crash surfaced after PR #225 taught
RunEndEncodingDecoderto propagate nulls: a null run now returns aMaskedArray(previously it decoded as a filler value like 0). A datetimeparts column whose day-component is a nullable RunEnd child then hit the throw, blocking export of the Raincloud slugs bi-yalelanguages and bi-euro2016.Fix
In
DateTimePartsEncodingDecoder.decode, mirror theAlpEncodingDecoder(#210) unwrap+re-wrap pattern:MaskedArray, capture its validity and unwrap to.inner().LazyDateTimePartsLongArrayover the unwrapped raw values.MaskedArraycarrying the combined mask.DateTimePartsArrays.readLongno longer throws on a masked cell — it recurses to the raw value; null rows are now tracked by the reassembled array's own outer mask (downstreamExtensionStorage/decodeAllalready gate on that).Tests
decode_nullDaysComponent_propagatesNullRowInsteadOfThrowing: a stub days-child returning aMaskedArraywith row 0 null yields a masked result (row 0 invalid, row 1 valid and reassembled) instead of throwing.readLong_nullMaskedCell_*to assert the new non-throwing read-through behavior.Matrix updates for the two corpus slugs are handled separately — this PR just removes the crash.
Fixes #235.
🤖 Generated with Claude Code