alamb commented on code in PR #8269:
URL: https://github.com/apache/arrow-datafusion/pull/8269#discussion_r1401128663


##########
datafusion/expr/src/built_in_function.rs:
##########
@@ -599,12 +599,24 @@ impl BuiltinScalarFunction {
             BuiltinScalarFunction::ArrayReplaceAll => 
Ok(input_expr_types[0].clone()),
             BuiltinScalarFunction::ArraySlice => 
Ok(input_expr_types[0].clone()),
             BuiltinScalarFunction::ArrayToString => Ok(Utf8),
-            BuiltinScalarFunction::ArrayIntersect => 
Ok(input_expr_types[0].clone()),
-            BuiltinScalarFunction::ArrayUnion => 
Ok(input_expr_types[0].clone()),
+            BuiltinScalarFunction::ArrayUnion | 
BuiltinScalarFunction::ArrayIntersect => {
+                match (input_expr_types[0].clone(), 
input_expr_types[1].clone()) {

Review Comment:
   yes!



##########
datafusion/sqllogictest/test_files/aggregate.slt:
##########
@@ -1396,7 +1396,7 @@ SELECT COUNT(DISTINCT c1) FROM test
 query ?
 SELECT ARRAY_AGG([])
 ----
-[]
+[[]]

Review Comment:
   👍 



##########
datafusion/sqllogictest/test_files/aggregate.slt:
##########
@@ -1396,7 +1396,7 @@ SELECT COUNT(DISTINCT c1) FROM test
 query ?
 SELECT ARRAY_AGG([])
 ----
-[]
+[[]]

Review Comment:
   👍 



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