Details
-
Task
-
Status: In Progress (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
| Columnstore_commit_hash | 7ec8f3d-dirty |
| Columnstore_version | 23.10.0 |
-
2024-2
Description
SELECT CONCAT(<cols not in GROUP BY list>) throws error: MCS-2021.
Repro
------
CREATE TABLE t1 (
cid mediumint(9) NOT NULL,
firstname varchar(32) DEFAULT '' NOT NULL,
surname varchar(32) DEFAULT '' NOT NULL
) ENGINE=columnstore;
INSERT INTO t1 VALUES (1,'That','Guy');
INSERT INTO t1 VALUES (2,'Another','Gent');
MariaDB [testMcs]> SELECT cid, CONCAT(firstname, ' ', surname) AS fullname, COUNT FROM t1 GROUP BY cid;
ERROR 1815 (HY000): Internal error: MCS-2021: 'fullname' 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.
But SELECT without CONCAT() works.
MariaDB [testMcs]> SELECT cid, firstname, surname, COUNT FROM t1 GROUP BY cid;
-----------------------------+
cid | firstname | surname | COUNT |
-----------------------------+
1 | That | Guy | 1 |
2 | Another | Gent | 1 |
-----------------------------+
2 rows in set (0.055 sec)
Expected behavior:
SELECT CONCAT(<cols not in GROUP BY list>) should work.
Attachments
Issue Links
- relates to
-
MCOL-4234 ORDER BY clause if not included in the GROUP BY clause fails
- Closed