-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix](nereids)EliminateGroupBy rule should keep output's datatype unc…
…hanged (#45359) Related PR: #28615 Problem Summary: `select id, count(age) from t group by id` consider t is unique table and it's unique key is id. The sql will be convert to: `select id, if(age is null, 0, 1) from t;` count(age) is replaced by if(age is null, 0, 1). And we should keep if(age is null, 0, 1)'s datatype same as count(age) which is bigint.
- Loading branch information
1 parent
044cb5a
commit ffa02e3
Showing
2 changed files
with
4 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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