node-cypher-parser icon indicating copy to clipboard operation
node-cypher-parser copied to clipboard

CALL procedure used as subquery is not getting parsed

Open bharath-nz opened this issue 3 years ago • 2 comments

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.

bharath-nz avatar Dec 03 '21 08:12 bharath-nz

This is related to this libcypher-parser issue, on which node-cypher-parser depends: https://github.com/cleishm/libcypher-parser/issues/33

Loupi avatar Jun 24 '22 14:06 Loupi

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.

cylindrical2002 avatar Feb 18 '24 12:02 cylindrical2002