alamb commented on code in PR #13683:
URL: https://github.com/apache/datafusion/pull/13683#discussion_r1874558578


##########
datafusion/functions-nested/src/array_has.rs:
##########
@@ -215,7 +215,11 @@ fn array_has_dispatch_for_array<O: OffsetSizeTrait>(
         let needle_row = Scalar::new(needle.slice(i, 1));
         let eq_array = compare_with_eq(&arr, &needle_row, is_nested)?;
         let is_contained = eq_array.true_count() > 0;
-        boolean_builder.append_value(is_contained)
+        if is_contained || eq_array.null_count() == 0 {

Review Comment:
   I am surprised this isn't 
   
   ```suggestion
           if is_contained && eq_array.null_count() == 0 {
   ```
   
   I thought if the eq_array is null that means there was at least one 
comparison that is not known 🤔 



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to