mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-19 01:24:20 +01:00
Fix delimiter handling in group_concat and string_agg
Non-literal delimiters must be translated by AggArgumentSource.
This commit is contained in:
@@ -88,6 +88,10 @@ do_execsql_test select-group-concat-with-column-delimiter {
|
||||
SELECT group_concat(name, id) FROM products;
|
||||
} {hat2cap3shirt4sweater5sweatshirt6shorts7jeans8sneakers9boots10coat11accessories}
|
||||
|
||||
do_execsql_test select-group-concat-with-column-delimiter-group-by {
|
||||
SELECT group_concat(name, id) FROM products GROUP BY '1';
|
||||
} {hat2cap3shirt4sweater5sweatshirt6shorts7jeans8sneakers9boots10coat11accessories}
|
||||
|
||||
do_execsql_test select-string-agg-with-delimiter {
|
||||
SELECT string_agg(name, ',') FROM products;
|
||||
} {hat,cap,shirt,sweater,sweatshirt,shorts,jeans,sneakers,boots,coat,accessories}
|
||||
@@ -96,6 +100,10 @@ do_execsql_test select-string-agg-with-column-delimiter {
|
||||
SELECT string_agg(name, id) FROM products;
|
||||
} {hat2cap3shirt4sweater5sweatshirt6shorts7jeans8sneakers9boots10coat11accessories}
|
||||
|
||||
do_execsql_test select-string-agg-with-column-delimiter-group-by {
|
||||
SELECT string_agg(name, id) FROM products GROUP BY '1';
|
||||
} {hat2cap3shirt4sweater5sweatshirt6shorts7jeans8sneakers9boots10coat11accessories}
|
||||
|
||||
do_execsql_test select-agg-unary-negative {
|
||||
SELECT -max(age) FROM users;
|
||||
} {-100}
|
||||
|
||||
Reference in New Issue
Block a user