You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Question]: if GROUP BY alias nor aggregation function not supported, how do we support this kind of SQL? #3265
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( number INT NOT NULL, alpha CHAR(6) NOT NULL );
INSERT INTO t1 VALUES (1413006,'idlfmv'),
(1413065,'smpsfz'),(1413127,'sljrhx'),(1413304,'qerfnd');
SELECT number, any_value(alpha), CONCAT_WS('<---->',number,any_value(alpha)) AS new
FROM t1 GROUP BY number;
SELECT CONCAT_WS('<---->',number,alpha) AS new
FROM t1 GROUP BY CONCAT_WS('<---->',number,alpha) LIMIT 1;
SELECT any_value(number), any_value(alpha), CONCAT_WS('<->',any_value(number),any_value(alpha)) AS new
FROM t1 GROUP BY new LIMIT 1;
SELECT any_value(number), any_value(alpha), CONCAT_WS('-',any_value(number),any_value(alpha),any_value(alpha),any_value(alpha),any_value(alpha),any_value(alpha),any_value(alpha),any_value(alpha)) AS new
FROM t1 GROUP BY new LIMIT 1;
SELECT any_value(number), any_value(alpha), CONCAT_WS('<------------------>',any_value(number),any_value(alpha)) AS new
FROM t1 GROUP BY new LIMIT 1;
drop table t1;
We report "column "new" does not exist" for this sql now. If we replace alias 'new' by the original CONCAT_WS..., we report 'GROUP BY clause cannot contain aggregate functions!'.
changed the title [-][Bug]: if GROUP BY alias nor aggregation function not supported, how do we support this kind of SQL?[/-][+][Question]: if GROUP BY alias nor aggregation function not supported, how do we support this kind of SQL?[/+]on Jun 23, 2022
CREATE TABLE t1 (a int, b DOUBLE);
INSERT INTO t1 VALUES (NULL, 0), (NULL, 1);
SELECT IF(b, (SELECT a FROM t1 LIMIT 1), b) c FROM t1 GROUP BY c;
DROP TABLE t1;
Activity
[-][Bug]: if GROUP BY alias nor aggregation function not supported, how do we support this kind of SQL?[/-][+][Question]: if GROUP BY alias nor aggregation function not supported, how do we support this kind of SQL?[/+]fengttt commentedon Jun 27, 2022
Both are correct behaviors and correct error messages. @daviszhen please clean tags and hand off to test.
Remove matrixorigin#3265 label and retag matrixorigin#3405 label for …
Remove #3265 label and retag #3405 label for concat_ws function (#3542)
Ariznawlll commentedon Feb 4, 2026
CREATE TABLE t1 (a int, b DOUBLE);
INSERT INTO t1 VALUES (NULL, 0), (NULL, 1);
SELECT IF(b, (SELECT a FROM t1 LIMIT 1), b) c FROM t1 GROUP BY c;
DROP TABLE t1;
没实现
Remove matrixorigin#3265 label and retag matrixorigin#3405 label for …
fix: normalize signed zero in ABS (#30168)