[MCOL-5221] window function expression error (Error: should be in GROUP BY clause) Created: 2022-09-16  Updated: 2022-10-25

Status: Open
Project: MariaDB ColumnStore
Component/s: DMLProc
Affects Version/s: 6.4.2
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: Majdi Bsoul Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Centos 7
MariaDB 10.8.4
Columnstore 6.4.3 (though not in affected versions list. see releasnum below)



 Description   

This is causing the query to fail and error stating it should be in GROUP BY clause. This is only occurs for Columnstore table, while MyISAM table has no issue.

MariaDB [com_db]> SELECT hour_ct,
> ADDDATE( DATE_FORMAT( hour_ct, '%Y%m-%d 00:00:00' ), INTERVAL 0 SECOND ) AS temp0,
-> count(hour_ct) over(partition by left(hour_ct,10))
-> FROM com_db.DC_MNI_mvcore_video_hourly
-> WHERE ((hour_ct >= TIMESTAMP('2022-08-07 00:00:00')) AND (hour_ct < TIMESTAMP('2022-08-08 00:00:00')))
-> GROUP BY hour_ct,temp0;
ERROR 1815 (HY000): Internal error: MCS-2021: 'Expression/Function' 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.
MariaDB [com_db]>

[root@f68eac01f002 columnstore]# pwd
/usr/share/columnstore
[root@f68eac01f002 columnstore]# cat releasenum
version=6.4.3
release=1


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