perf(lazy): sink key predicates below mean, min and max aggregations - #429
Merged
Merged
Conversation
The conservative fence on mean/min/max was argued from an all-null group's null cell flipping the stitched column's backend - a difference column equality no longer observes. The crossing now carries its own argument: a predicate that reads only bare keys gives every row of a group the same verdict, so the group set and every group's cells are fixed by the crossing conditions themselves, and these ops are pure functions of their group's cells - per-group values, null-ness, and raised errors all unchanged. The row_stable-operand demand stays (a value-raising operand still fences), and std/var/median/first/last remain fenced as a conservative bound, pinned by tests.
ihb2032
force-pushed
the
perf/aggregate-predicate-crossing
branch
from
September 26, 2026 10:59
7d055bd to
30f017b
Compare
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.
Unfreezes the first deferred optimizer item. The fence on
mean/min/maxwas argued from an all-null group's null cell flipping the stitched column's backend — a difference column equality no longer observes, so the old argument is void rather than merely weakened. The crossing now carries its own group-invariance argument: a predicate reading only bare keys gives every row of a group the same verdict, so the group set and every group's cells are fixed, and these ops are pure functions of their group's cells. Therow_stable-operand demand stays (a value-raising operand still fences), andstd/var/median/first/lastremain fenced, pinned by tests. Behaviour-verified against the eager chain on the all-null-group shape the old fence was argued from. 1449 tests green, coverage fully covered, mbti unchanged.