haohuaijin commented on code in PR #8148:
URL: https://github.com/apache/arrow-datafusion/pull/8148#discussion_r1390718621
##########
datafusion/sqllogictest/test_files/aggregate.slt:
##########
@@ -2987,3 +2987,66 @@ NULL NULL 1 NULL 3 6 0 0 0
NULL NULL 1 NULL 5 15 0 0 0
3 0 2 1 5.5 16.5 0.5 4.5 1.5
3 0 3 1 6 18 2 18 6
+
+statement error
+SELECT STRING_AGG()
+
+statement error
+SELECT STRING_AGG(1,2,3)
+
+statement error
+SELECT STRING_AGG(STRING_AGG('a', ','))
+
+query T
+SELECT STRING_AGG('a', ',')
+----
+a
+
+query TTTT
+SELECT STRING_AGG('a',','), STRING_AGG('a', NULL), STRING_AGG(NULL, ','),
STRING_AGG(NULL, NULL)
Review Comment:
In postgresql, `select string_agg('a', NULL)` return `a`
but in duckdb, `select string_agg('a', NULL)` return `NULL`
I implemented it according to postgresql.
##########
datafusion/sqllogictest/test_files/aggregate.slt:
##########
@@ -2987,3 +2987,66 @@ NULL NULL 1 NULL 3 6 0 0 0
NULL NULL 1 NULL 5 15 0 0 0
3 0 2 1 5.5 16.5 0.5 4.5 1.5
3 0 3 1 6 18 2 18 6
+
Review Comment:
I ported these tests over from duckdb.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]