Skip to content
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

update/upsert issues #2256

Closed
panda-sheep opened this issue Jul 28, 2020 · 1 comment
Closed

update/upsert issues #2256

panda-sheep opened this issue Jul 28, 2020 · 1 comment
Assignees
Labels
type/bug Type: something is unexpected

Comments

@panda-sheep
Copy link
Contributor

panda-sheep commented Jul 28, 2020

three questions in nebula 1.0

case 1
create tag t1 (a int , b int default 1);
upsert vertex 5 set t1.a = 1, t1.b = $^.t1.a + 1;
The upsert statement should be executed successfully, but currently it has failed
The reason is that` b = $^.t1.a + 1 `requires `a` to have a default value, which is wrong

case 2
create edge e1 (c  int , d int default 1);
upsert edge  111 -> 222@0 of e1  set  c= 3,  d = e1.c+ 10;
The upsert statement should be executed successfully, but currently it has failed
The reason is that` d = e1.c+ 10 `  requires` c`  to have a default value, which is wrong

case 3
update/upsert edge 111->333 @0 of e1 set  c = 1,  d = $^.t1.a; 
$^ is different in the forward edge and the reverse edge
$^ in the positive edge is 5
$^ in the reverse edge is 10002
Cause the properties of the forward and reverse edges to be inconsistent.
Therefore, tag properties are not allowed in the` set clause` and `when clause` in update edge



case 1 and case 2  case 3   are ok in   2.0 
@panda-sheep panda-sheep added the type/bug Type: something is unexpected label Jul 28, 2020
@panda-sheep panda-sheep self-assigned this Aug 6, 2020
@panda-sheep panda-sheep changed the title Upsert should succeed, not an error update/upsert bug Aug 9, 2020
@panda-sheep panda-sheep changed the title update/upsert bug update/upsert issues Aug 9, 2020
@CPWstatic
Copy link
Contributor

We had improve the update/upsert logic in version 2.0. This issue remains no longer. And i'll close the related pr since it would not be fixed in version 1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants