1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Small fixes + test sorting

This commit is contained in:
mariadb-AndreyPiskunov
2022-10-31 14:55:12 +02:00
parent b57d2c30fe
commit d7f4ec73c5
3 changed files with 87 additions and 18 deletions

View File

@ -27,7 +27,9 @@ DROP TABLE t1;
CREATE TABLE t1 (a BOOLEAN, b BOOLEAN)ENGINE=COLUMNSTORE;
INSERT INTO t1 VALUES (TRUE, TRUE), (TRUE, FALSE), (FALSE, TRUE), (FALSE, FALSE);
SELECT JSON_VALID(JSON_ARRAYAGG(a)) FROM t1;
sorted_result;
SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1;
sorted_result;
SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1 GROUP BY b;
SELECT JSON_ARRAYAGG(TRUE), JSON_ARRAYAGG(FALSE) FROM t1;
DROP TABLE t1;
@ -59,7 +61,9 @@ SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1 GROUP BY a;
-- echo #
SELECT JSON_ARRAYAGG(b LIMIT 1) FROM t1;
SELECT JSON_ARRAYAGG(b LIMIT 2) FROM t1;
sorted_result;
SELECT JSON_ARRAYAGG(b LIMIT 1) FROM t1 GROUP BY b;
sorted_result;
SELECT JSON_ARRAYAGG(b LIMIT 2) FROM t1 GROUP BY a;
SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1;
SELECT JSON_ARRAYAGG(DISTINCT b) FROM t1;