opencypher / openCypher

Specification of the Cypher property graph query language
http://www.opencypher.org
Apache License 2.0
841 stars 149 forks source link

Validating ``WHERE (value in property)`` #555

Open nafraf opened 1 year ago

nafraf commented 1 year ago

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