Skip to content

branch-4.0: [fix](nereids)EliminateGroupByKeyByUniform should replace exprId for alias #60020#61266

Open
github-actions[bot] wants to merge 1 commit into
branch-4.0from
auto-pick-60020-branch-4.0
Open

branch-4.0: [fix](nereids)EliminateGroupByKeyByUniform should replace exprId for alias #60020#61266
github-actions[bot] wants to merge 1 commit into
branch-4.0from
auto-pick-60020-branch-4.0

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Cherry-picked from #60020

@github-actions github-actions Bot requested a review from yiguolei as a code owner March 12, 2026 09:32
@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring reopened this Mar 12, 2026
@hello-stephen
Copy link
Copy Markdown
Contributor

run buildall

2 similar comments
@hello-stephen
Copy link
Copy Markdown
Contributor

run buildall

@englefly
Copy link
Copy Markdown
Contributor

run buildall

…alias (#60020)

### What problem does this PR solve?
Input plan has:
```
Sink(output #8)
+->LogicalProject[projects=[200 AS `field1`#8, field2#9]]
    +-->Aggregate(gropuBy=[field1#8, field2], output=[field1#8, ...] ...)
               +->Project(a#7 as field1, ...)
                         +->Filter(a=2)
                                 +->Scan(T)
```
`a` has unique value, so it could be removed from groupBy
the output plan is
```
Sink(output #10)
+->LogicalProject[projects=[200 AS `field1`#8, field2#9]]
    +-->Aggregate(gropuBy=[field2],  output=[any_value(field1#8) as #10, ...])
               +->Project(a#7 as field1, ...)
                         +->Filter(a=2)
                                 +->Scan(T)
```
if `200 AS field1#8` is not rewritten by EliminateGroupByKeyByUniform,
planner cannot find the input slot #10 for Sink from its child.
@morrySnow morrySnow force-pushed the auto-pick-60020-branch-4.0 branch from 2593cb9 to 34807cb Compare May 22, 2026 06:18
@morrySnow morrySnow requested a review from morningman as a code owner May 22, 2026 06:18
@morrySnow
Copy link
Copy Markdown
Contributor

run buildall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants