mohayu22 commented on issue #761:
URL: https://github.com/apache/age/issues/761#issuecomment-1481950675

   @kenwoon Give these queries a try and let's check if you obtain the same 
outcome.
   
   I created the Path like this:
   ```
   SELECT * FROM cypher('github_issue_761', $$
     CREATE ({name: 'A'})-[:NEXT {val: 1}]->({name: 'B'})-[:NEXT {val: 
2}]->({name: 'C'})
   $$) AS (result agtype);
   ```
   Then I added the edge values using this query:
   ```
   SELECT * FROM cypher('github_issue_761', $$
     MATCH path = ({name: 'A'})-[:NEXT*]->({name: 'C'}) 
     UNWIND relationships(path) AS edge
     RETURN sum(edge.val)
   $$) AS (result agtype);
   ```
   
   And I obtained this outcome:
   ```
    result 
   --------
    3
   (1 row)
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to