Support ANY operator
Hello!
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
// similar to array contains
SELECT 1 = ANY(ARRAY[1,2,3,4])
// negative of array contains
SELECT 1 <> ANY(ARRAY[1,2,3,4])
// Same story for <, <=, >, >=
Thanks
The = case has been implemented by #11849
Still pending work for the other cases (<, <=, etc.)
Some pointers.
Planner code here, need to wire in support for operators other than =:
https://github.com/apache/datafusion/blob/2a08013af3ccf703bee202c959b40bb0d35bdea1/datafusion/functions-nested/src/planner.rs#L124-L136
Implementation in here:
https://github.com/apache/datafusion/blob/2a08013af3ccf703bee202c959b40bb0d35bdea1/datafusion/functions-nested/src/array_has.rs
- Need to consider how to work it into the existing code and try not to duplicate for all operators if possible
Add SLT tests here:
https://github.com/apache/datafusion/blob/2a08013af3ccf703bee202c959b40bb0d35bdea1/datafusion/sqllogictest/test_files/array.slt