[MCOL-4235] Group By ... Order By NULL fails Created: 2020-08-05  Updated: 2021-01-14

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

Type: Bug Priority: Major
Reporter: susil.behera Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Server version: 10.5.5-MariaDB MariaDB Server
Columnstore: 1.5.4-1



 Description   

Group By ... Order By NULL fails on Columnstore.

Repro
------
DROP TABLE IF EXISTS t1, t2;

CREATE TABLE t1 (
spID int(10) unsigned,
userID int(10) unsigned,
score smallint(5) unsigned,
date date
) ENGINE=Columnstore;
INSERT INTO t1 VALUES (1,1,1,'','0000-00-00');

CREATE TABLE t2 (
userID int(10) unsigned NOT NULL,
niName char(15)
) ENGINE=Columnstore;
INSERT INTO t2 VALUES (1,'name');

SELECT t2.userid, MIN(t1.score)
FROM t1, t2 WHERE t1.userID=t2.userID GROUP BY t2.userid ORDER BY NULL;
ERROR 1815 (HY000): Internal error: IDB-2021: 'unknown db.unknown table.unknown field' 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.

On InnoDB
------------
SELECT t2.userid, MIN(t1.score)
-> FROM t1, t2 WHERE t1.userID=t2.userID GROUP BY t2.userid ORDER BY NULL;
Empty set (0.002 sec)


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