Repository navigation
Aggregate nested columns under nullable parents with a definedness mask - #10961
Open
robert3005 wants to merge 1 commit into
Open
robert3005 wants to merge 1 commit into
robert3005 wants to merge 1 commit into
Conversation
robert3005
force-pushed
the
rk/aggregate-demand-mask
branch
from
October 29, 2026 14:03
113bdd2 to
47befaf
Compare
Merging this PR will regress 1 benchmark1 warning
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing |
robert3005
force-pushed
the
rk/aggregate-demand-mask
branch
5 times, most recently
from
November 2, 2026 17:06
a603eae to
c25fb66
Compare
Struct fields are stored unmasked, so aggregates over them saw values under null struct rows. Each chunk of a sequential write stream now carries a definedness mask, false in the rows an ancestor nulls out, and DynAccumulator gains accumulate_defined to aggregate the logical column without masking first. Aggregates give definedness meaning through AggregateFnVTable::try_accumulate_defined. By default undefined rows read as null, which requires the same partial dtype for a nullable input as for the non-nullable one, and a test asserts this for every built-in aggregate that keeps the default. Combined aggregates hand the definedness to their children, and UncompressedSizeInBytes measures the stored batch, which definedness does not change. The struct writer intersects the definedness with its validity for each field, the list writer drops the elements of null and undefined lists so every element written is defined, and re-chunking writers carry the mask with the rows. Zone maps, in either layout, and file statistics are now written for children of nullable structs, and the fuzzer generates nullable structs. Signed-off-by: Robert Kruszewski <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01X1HnweRGxeDWgQwXXM6f5s
robert3005
force-pushed
the
rk/aggregate-demand-mask
branch
from
November 5, 2026 13:28
c25fb66 to
2ea5835
Compare
This branch has not been deployed
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.
Struct fields are stored unmasked, so aggregates over them saw values under null struct rows. Each chunk of a sequential write stream now carries a definedness mask, false in the rows an ancestor nulls out, and DynAccumulator gains accumulate_defined to aggregate the logical column without masking first.
Aggregates give definedness meaning through
AggregateFnVTable::try_accumulate_defined. By default undefined rows read as null, which requires the same partial dtype for a nullable input as for the non-nullable one; a test asserts this for every built-in aggregate that keeps the default. Combined aggregates hand the definedness to their children, andUncompressedSizeInBytesmeasures the stored batch, which definedness does not change.The struct writer intersects the definedness with its validity for each field, the list writer drops the elements of null and undefined lists so every element written is defined, and re-chunking writers carry the mask with the rows. Zone maps and file statistics are now written for children of nullable structs, and the fuzzer generates nullable structs.
fixes #9205