yashrb24 opened a new issue, #24985:
URL: https://github.com/apache/datafusion/issues/24985

   ### Describe the bug
   
   `array_has_any` and `array_has_all` return different results for the same row
   depending on whether another row has a non-empty needle.
   
   ### To Reproduce
   
   ```sql
   WITH t(id, haystack, needle) AS (
     VALUES
       (1, [1, 2], arrow_cast(NULL, 'List(Int64)')),
       (2, [3, 4], arrow_cast(NULL, 'List(Int64)'))
   )
   SELECT array_has_any(haystack, needle),
          array_has_all(haystack, needle)
   FROM t
   ORDER BY id;
   ```
   
   This is returning
   
   ```
   false true
   false true
   ```
   
   If the second needle is changed from NULL to something non-null like [9], 
the first row returns
   
   ```
   NULL NULL
   ```
   
   ### Expected behavior
   
   The result should be all nulls
   
   ### Additional context
   
   _No response_


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