Repository navigation
feat(sdk): MaterializedSeriesView reports its null samples (1.0.0) - #241
Merged
Merged
Conversation
The view owns an Arrow struct whose value column carries a validity bitmap, but it exposed only the raw value pointers: a null sample (an empty CSV cell, an absent optional field) read as the zero the host puts in its slot, and a consumer had no way to tell. nullCount() and isNull(row) read the bitmap. Client-side helpers only: no host contract change, no feature floor. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This was referenced Nov 14, 2026
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.
Problem
MaterializedSeriesView(whatToolboxHostView::readSeriesreturns) owns an Arrow struct whose value column carries a validity bitmap, but it exposes only the raw value pointers. A null sample (an empty CSV cell, an absent optional field) therefore reads as the zero the host puts in its slot, and a consumer has no way to tell it from a real 0.PlotJuggler's own agent tools hit this:
read_seriesandexport_seriesreport nulls as 0, which corrupts statistics such as a minimum.Change
Two accessors on the view:
nullCount(): how many samples of the value column are null. 0 lets a caller skip the per-row check.isNull(row): whether one sample is null.A column without a bitmap, or with a declared null count of 0, has no nulls. A producer that did not count them (
null_count == -1) gets them counted from the bitmap.Versioning
Additive, client-side helpers compiled into the consumer: no host contract change, no
feature_floors.jsonentry, and no ABI change (inline members of a header-only class). It fits the unreleased 1.0.0; the CHANGELOG has its line there. No version bump of its own.Tests
pj_base/tests/materialized_series_view_test.cpp(new): five cases over hand-built Arrow structs (no bitmap, two nulls, uncounted nulls, a declared count of zero, an empty view).Verification
./build.sh --debug && ./test.sh: 108 of 108 pass, with sanitizers.pre-commit run --all-filesis clean.abidiffagainst the baseline, and the Windows and macOS builds.Follow-up
PlotJuggler pins 0.40.0, so its two readers can use these only after it moves to 1.0.0.
🤖 Generated with Claude Code