-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support MERGE SET #305
support MERGE SET #305
Conversation
src/execution_plan/ops/op_merge.c
Outdated
|
||
if(op->matched || op->created) return NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the matched
part of this logic is not quite right, since it will cause only one entity to be updated:
$ redis-cli GRAPH.QUERY social "MATCH (a) WHERE a.age = 31 RETURN COUNT(a)"
1) 1) 1) "COUNT(a)"
2) 1) "4.000000"
2) 1) "Query internal execution time: 0.277327 milliseconds"
$ redis-cli GRAPH.QUERY social "MERGE (a {age: 31}) SET a.newprop = 100"
1) (empty list or set)
2) 1) "Properties set: 1"
2) "Query internal execution time: 0.107706 milliseconds"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check if that's the expected behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed that's the case 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment not on updated files:
op_update.c:100
op_update.c:
100:
change from =
to +=
so that the properties_set
count created by MERGE doesn't get overwritten.
$ redis-cli GRAPH.QUERY social "MERGE (a:newlabel {name: 'ewweccwd'}) SET a.secondprop = 4"
1) (empty list or set)
2) 1) "Labels added: 1"
2) "Nodes created: 1"
3) "Properties set: 1"
4) "Query internal execution time: 0.611405 milliseconds"
* support MERGE SET * merge pass down multiple matches * merge clause name anonymou nodes * adding to resultset stats instead of overwriting
No description provided.