edmondop commented on code in PR #7897:
URL: https://github.com/apache/arrow-datafusion/pull/7897#discussion_r1387344969


##########
datafusion/sqllogictest/test_files/array.slt:
##########
@@ -1752,6 +1752,34 @@ select array_to_string(make_array(), ',')
 ----
 (empty)
 
+
+## array_union (aliases: `list_union`)
+
+# array_union scalar function #1
+query ?
+select array_union([1, 2, 3, 4], [5, 6, 3, 4]);
+----
+[1, 2, 3, 4, 5, 6]
+
+# array_union scalar function #2
+query ?
+select array_union([1, 2, 3, 4], [5, 6, 7, 8]);
+----
+[1, 2, 3, 4, 5, 6, 7, 8]
+
+# array_union scalar function #3
+query ?
+select array_union([1,2,3], []);
+----
+[1, 2, 3]
+
+# array_union scalar function #4
+query ?
+select array_union([1, 2, 3, 4], [5, 4]);
+----
+[1, 2, 3, 4, 5]

Review Comment:
   Fixed with 
https://github.com/apache/arrow-datafusion/commit/648ae5d659142082d085418dc7b84ad857ba8136



##########
datafusion/expr/src/expr_fn.rs:
##########
@@ -704,6 +704,8 @@ scalar_expr!(
     array delimiter,
     "converts each element to its text representation."
 );
+nary_scalar_expr!(ArrayUnion, array_union, "returns an array of the elements 
in the union of array1 and array2 without duplicates.");

Review Comment:
   Fixed with 
https://github.com/apache/arrow-datafusion/commit/648ae5d659142082d085418dc7b84ad857ba8136



-- 
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]

Reply via email to