[MCOL-958] expressions on group by columns in select list not supported Created: 2017-10-04  Updated: 2022-11-05  Resolved: 2022-11-05

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: 1.0.11
Fix Version/s: Icebox

Type: New Feature Priority: Major
Reporter: David Thompson (Inactive) Assignee: Todd Stoffel (Inactive)
Resolution: Won't Do Votes: 1
Labels: None

Epic Link: ColumnStore Compatibility Improvements

 Description   

it is technically valid to have the following query:

MariaDB [test]> select y, substr(c,1,2), count(*) from o1 group by y,c;
ERROR 1815 (HY000): Internal error: IDB-2021: 'substr(c,1,2)' is not in GROUP BY clause. All non-aggregate columns in the SELECT and ORDER BY clause must be included in the GROUP BY clause.

the intent of this would be to group by y,c then apply the substr expression on the resulting group by columns.

A workaround is to move the group by to a subquery and apply the substr in the outer sql:

select y, substr(c, 1,2) c, cnt from (select y, c, count(*) cnt from o1 group by y,c) t;



 Comments   
Comment by Todd Stoffel (Inactive) [ 2022-11-05 ]

This item is being closed because it was well passed the expiration date with no activity. If you suspect this was done in error please create a new ticket.

Generated at Thu Feb 08 02:25:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.