Fix delimiter handling in group_concat and string_agg

Non-literal delimiters must be translated by AggArgumentSource.
This commit is contained in:
Piotr Rzysko
2025-09-05 20:49:03 +02:00
parent 110ffba2a1
commit 6d84cbedc2
2 changed files with 41 additions and 30 deletions

View File

@@ -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}