[MCOL-5554] Identical expressions in SELECT part are not recognized as being part of GROUP BY part Created: 2023-08-15  Updated: 2023-08-25

Status: Open
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Sergey Zefirov Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

The script:

DROP DATABASE IF EXISTS MCOL_678;
 
CREATE DATABASE MCOL_678;
 
USE MCOL_678;
 
CREATE TABLE t(ci1 integer, ci2 integer) engine=columnstore;
 
INSERT INTO t(ci1, ci2) VALUES (NULL, 1), (NULL, 2), (1,3), (1,4), (2,5), (2,6), (3,7), (3,8);
SELECT ci1+ci2, ci1+ci2, SUM(ci2), AVG(ci2) FROM t GROUP BY ci1+ci2, ci1+ci2;
DROP TABLE t;
 
DROP DATABASE MCOL_678;

Columnstore complains with ERROR 1815 (HY000) at line 14: Internal error: MCS-2021: 'ci1+ci2' 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..

Server accepts and returns correct results.


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