Skip to content

Cherry-Pick: Preserve grouping ID during aggregate CSE (#24144) - #165

Closed
notfilippo wants to merge 1 commit into
branch-54from
filippo.rossi/preserve-grouping-id-during-aggregate-cse-24144-pzmssokuyrnr
Closed

Cherry-Pick: Preserve grouping ID during aggregate CSE (#24144)#165
notfilippo wants to merge 1 commit into
branch-54from
filippo.rossi/preserve-grouping-id-during-aggregate-cse-24144-pzmssokuyrnr

Conversation

@notfilippo

Copy link
Copy Markdown
Member

Cherry pick for apache#24144.

@notfilippo notfilippo changed the title Preserve grouping ID during aggregate CSE (#24144) Cherry-Pick: Preserve grouping ID during aggregate CSE (#24144) Aug 7, 2026
## Which issue does this PR close?

<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closes #123` indicates that this PR will close issue #123.
-->

- Closes apache#24143.

## Rationale for this change

<!--
Why are you proposing this change? If this is already explained clearly
in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.

Please explain the problem you are trying to solve in terms of the
user-visible
behavior, rather than the implementation.

For example, "The code in `foo.rs` doesn't handle nulls" is a symptom of
the
implementation. "COUNT(DISTINCT) returns wrong results when the column
contains
nulls" is the user-visible problem.
-->

See apache#24143.

## What changes are included in this PR?

<!--
There is no need to duplicate the description in the issue here, but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->

- Preserve `__grouping_id` in CSE recovery projections for grouping-set
aggregates.
- Add regression coverage.

## Are these changes tested?

<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code

If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->

Yes.

## Are there any user-facing changes?

<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.

If there are any breaking changes to public APIs, please add the `api
change` label.
-->

No.

Co-authored-by: Gabriel <45515538+gabotechs@users.noreply.github.com>
(cherry picked from commit e64e3f7)
@notfilippo
notfilippo force-pushed the filippo.rossi/preserve-grouping-id-during-aggregate-cse-24144-pzmssokuyrnr branch from 560e0c0 to 2f48ec5 Compare August 7, 2026 08:19
@notfilippo notfilippo closed this Aug 7, 2026
@notfilippo
notfilippo deleted the filippo.rossi/preserve-grouping-id-during-aggregate-cse-24144-pzmssokuyrnr branch August 7, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant