dehowef commented on issue #724:
URL: https://github.com/apache/age/issues/724#issuecomment-1455433949
> This probably is not the bug rather the MATCH clause using same variable
for the two vertices should be used to match _self-loop_ on a vertex.
`MATCH(a)-[]-(a)` and `MATCH(a {prop: "value"})-[]-(a)` would work fine as they
are used for matching the _self-loop_ but `MATCH(a {prop :"value1")-[]-(a {prop
: "value2"})` or `MATCH(a {prop1 : "value1"})-[]-(a {prop2 : "value2"})` would
through an error below as they are not matching any self-loop (because the
properties are different for two vertices)
>
> > ERROR: variable a already exists
When a property constraint is placed on a variable, it is applied to the
variable at hand. `MATCH(a {prop :"value1")-[]-(a {prop : "value2"})` and
`MATCH(a {prop :"value1", prop2 : "value2"})-[]-(a )` are functionally
equivalent and valid queries, what changes is the position with which the
property constraint is being declared. A node can have many properties stored
within them, and the variable declaration, in this case 'a', denotes that they
should be the same vertex within this pattern.
--
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]