FalkorDB
FalkorDB copied to clipboard
`ANY` function does not return expected results
Description
Executing a Cypher query using the ANY function in FalkorDB fails to return the expected result.
Steps to Reproduce
CREATE (n:N {v:1});
WITH [0] AS c
MATCH (n:N)
WHERE ANY(v IN c WHERE n.v > v)
RETURN 1;
Expected Result
1
Actual Result
Empty set.
Hi @dracoooooo Thank you for reporting, this do sounds like a bug, we'll investigate.
Execution plan:
"WITH [0] AS c MATCH (n:N) WHERE ANY(v IN c WHERE n.v > v) RETURN 1 as res"
1) "Results"
2) " Project"
3) " Node By Label Scan | (n:N)"
4) " Filter"
5) " Project"
Seems like the Filter operation is miss-placed, probably because we failed to understand the dependency on n which is referenced by the ANY condition.
The same issue exists with other predicates e.g. ALL