jayzhan211 commented on code in PR #7242:
URL: https://github.com/apache/arrow-datafusion/pull/7242#discussion_r1289432114
##########
datafusion/core/tests/sqllogictests/test_files/array.slt:
##########
@@ -2361,6 +2361,43 @@ from flatten_table;
[1, 2, 3] [1, 2, 3, 4, 5, 6] [1, 2, 3] [1.0, 2.1, 2.2, 3.2, 3.3, 3.4]
[1, 2, 3, 4, 5, 6] [8] [1, 2, 3] [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
+# array aggregate function
+## array aggregate
+query I
+select array_aggregate([1, 3, 5, 7], 'sum');
+----
+16
+
+## array sum
+query IRI
+select array_sum([1, 3, 5, 7]),
+ array_sum([1.1, 2.2, 3.3]),
+ list_sum([1, -1, 0, 23]);
+----
+16 6.6 23
+
+# TODO: Support nulls in array.
+# query error DataFusion error: This feature is not implemented: Arrays with
different types are not supported: \{Int64, Null\}
+# select array_sum([1, null, 3, null]);
Review Comment:
I would like to fix this in the next PR.
--
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]