openCypher icon indicating copy to clipboard operation
openCypher copied to clipboard

Validating ``WHERE (value in property)``

Open nafraf opened this issue 2 years ago • 0 comments

Hi, I have a question about the following query:

CREATE (a{z:1}), (b{z:'a'}), (c{z:[1,2]}), (d)
MATCH (a) WHERE (1 in a.z) RETURN a

a.z is not a list, then I'm not sure what of the following options is the expected result:

  1. Type mismatch error, because IN expects a list as argument.
  2. Process each a.z individually, and if a.z is a list returns 1 in a.z, else return 1 = a.z For the example above, the result would be: TRUE, FALSE, TRUE, NULL

Thanks in advance

nafraf avatar Mar 03 '23 13:03 nafraf