[BUG] Comparison operators only compare the first element for arrays against a scalar value #3136
Labels
bug
Something isn't working
catch-all acknowledged
Marks issues caught in catch-all triage for searchability
What is the bug?
The comparison operators (=, !=, >, >=, <, <=) do not properly compare arrays. The comparison is performed on each element against a scalar value. If any element passes the comparison, then the whole array is considered to pass the comparison.
Consider an index with the following data:
and this query:
Expected result:
Throw an exception since the types for the comparison are different. If both sides are arrays, then perform the comparison element by element until there is a difference.
How can one reproduce the bug?
Steps to reproduce the behavior:
What is the expected behavior?
Throw an exception if the comparison is between an array and a scalar value. If the comparison is between two arrays, perform the comparison element by element.
What is your host/environment?
Do you have any screenshots?
N/A
Do you have any additional context?
Issue #1300 had a change recently merged in that allows array values to be used in query evaluation and in the result set.
The text was updated successfully, but these errors were encountered: