You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by GitBox <gi...@apache.org> on 2022/10/17 19:58:11 UTC

[GitHub] [age] jrgemignani commented on issue #330: Invalid Result Returned for OPTIONAL MATCH ... WITH ...

jrgemignani commented on issue #330:
URL: https://github.com/apache/age/issues/330#issuecomment-1281405834

   I would be warry of specifying a match on a specific ID number, unless you verify that it is that ID.
   
   Note the following example -
   
   ```
   psql-11.5-5432-pgsql=# SELECT * from cypher('test', $$ MATCH (a:A) WITH a OPTIONAL MATCH (a)-[:incs]->(c) RETURN c, id(c) $$) as (c agtype, id agtype);
                                   c                                 |        id
   ------------------------------------------------------------------+------------------
    {"id": 1407374883553281, "label": "C", "properties": {}}::vertex | 1407374883553281
    {"id": 1407374883553282, "label": "C", "properties": {}}::vertex | 1407374883553282
   (2 rows)
   
   psql-11.5-5432-pgsql=# SELECT * from cypher('test', $$ MATCH (a:A) WHERE ID(a)=0 WITH a OPTIONAL MATCH (a)-[:incs]->(c) RETURN c, id(c) $$) as (c agtype, id agtype);
    c | id
   ---+----
   (0 rows)
   
   psql-11.5-5432-pgsql=#
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org