You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
fix(group by, having): MCOL-5776: GROUP BY/HAVING closer to server's (#3371)
This patch introduces an internal aggregate operator SELECT_SOME that is automatically added to columns that are not in GROUP BY. It "computes" some plausible value of the column (actually, last one passed). Along the way it fixes incorrect handling of HAVING being transferred into WHERE, window function handling and a bit of other inconsistencies.
This commit is contained in:
@ -14,14 +14,6 @@ sales 3 4800
|
||||
sales 4 4800
|
||||
select avg(salary),depname, moda(salary) over(partition by depname order by enroll_date) from empsalary group by depname order by depname, avg(salary);
|
||||
avg(salary) depname moda(salary) over(partition by depname order by enroll_date)
|
||||
NULL develop 5200
|
||||
4200.0000 develop 5200
|
||||
4500.0000 develop 5200
|
||||
5200.0000 develop 5200
|
||||
5200.0000 develop 5200
|
||||
6000.0000 develop 6000
|
||||
3500.0000 personnel 3500
|
||||
3900.0000 personnel 3900
|
||||
4800.0000 sales 4800
|
||||
4800.0000 sales 4800
|
||||
5000.0000 sales 5000
|
||||
5020.0000 develop 0
|
||||
3700.0000 personnel 3900
|
||||
4866.6667 sales 4800
|
||||
|
Reference in New Issue
Block a user