node-cypher-parser
node-cypher-parser copied to clipboard
CALL procedure used as subquery is not getting parsed
Hi Loupi, If I have a call procedure in the subquery (example below), it is not getting parsed and I get a cypher parser error from the AST generated. Could you please check this?
I am using a query like this
MATCH (a:Movie)-[:HAS]->(s:DIRECTOR) CALL { WITH s MATCH (n:Person)-[r:IS]->(s:DIRECTOR{id: s.id}) RETURN
count(distinct(n)) as total_directors_in_people } WITH s, a, total_directors_in_people
where total_directors_in_people > 10 RETURN a.name, s.name;
the error is
CALL { WITH s MATCH (n:Person)-[r:IS]->(s:DIRECTOR{id: s.id}) RETURN count(distinct(n)) as total_directors_in_people }
this subquery is not recognized by the parser now.
This is related to this libcypher-parser issue, on which node-cypher-parser depends: https://github.com/cleishm/libcypher-parser/issues/33
Hi Loupi, If I have a call procedure in the subquery (example below), it is not getting parsed and I get a cypher parser error from the AST generated. Could you please check this?
I am using a query like this
MATCH (a:Movie)-[:HAS]->(s:DIRECTOR) CALL { WITH s MATCH (n:Person)-[r:IS]->(s:DIRECTOR{id: s.id}) RETURN count(distinct(n)) as total_directors_in_people } WITH s, a, total_directors_in_people where total_directors_in_people > 10 RETURN a.name, s.name;
the error is
CALL { WITH s MATCH (n:Person)-[r:IS]->(s:DIRECTOR{id: s.id}) RETURN count(distinct(n)) as total_directors_in_people }
this subquery is not recognized by the parser now.
Look like this feature is not in Open Cypher 9 Standard, you can read this railroad.