samuelcolvin commented on code in PR #12459:
URL: https://github.com/apache/datafusion/pull/12459#discussion_r1759437767


##########
datafusion/functions-nested/src/array_has.rs:
##########
@@ -200,7 +201,10 @@ fn array_has_dispatch_for_scalar<O: OffsetSizeTrait>(
     // If first argument is empty list (second argument is non-null), return 
false
     // i.e. array_has([], non-null element) -> false
     if values.len() == 0 {
-        return Ok(Arc::new(BooleanArray::from(vec![Some(false)])));
+        return Ok(Arc::new(BooleanArray::new(
+            BooleanBuffer::new_unset(haystack.len()),

Review Comment:
   the point is that in this case the array returned should be the same length 
as the haystack, not 1.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to