-
Notifications
You must be signed in to change notification settings - Fork 871
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 edge | unable to change the edge endpoint #8406
Comments
Hi @gtadudeps I just pushed a fix, it will be released with v 3.0.5 Thanks Luigi |
Hi @luigidellaquila thanks for such a quick response! Thanks |
One follow-up question I had is, with this fix in place would we be able to perform upsert on edges: for example: With Thanks |
Hi @gtadudeps We do not have a date for 3.0.5 yet, but I'd say it will be in one or two weeks. About the upsert, I have to check it, the parser accepts it but I'm not sure that the case is completely covered in the execution planner. Anyway, the snapshot is already available here https://oss.sonatype.org/content/repositories/snapshots/com/orientechnologies/orientdb-community/3.0.5-SNAPSHOT/ so you can try it yourself Thanks Luigi |
Hi @luigidellaquila I looked into the upsert query with this build, though its creating the edge and sets the Case: Command i tried |
Hi @gtadudeps You are right, it doesn't work and it requires a fix. Could you please open another issue for that? What we have now is an UPSERT on edges that works on out/in only. I don't know if you need it, but in case you can use it as follows: define the schema for the edge as follows:
and then
Thanks Luigi |
Thanks for your suggestion, but in our case since there could be multiple edges between two vertices we really couldn't have a unique constraint on out and in properties. I have opened the issue for this case #8424. Unrelated to this but perhaps you could suggest/look into to another issue that we are facing and which has become very critical for us scaling up #8421. Thanks for all your efforts! 👍 |
OrientDB Version: v3.0.3
Java Version: 8
OS: macOS High Sierra
Expected behavior
On issuing update edge command the endpoint should update. This worked in v2.2.35 but its not working in v3.0.3.
Actual behavior
It's throwing a error saying out is not a vertex and is failing on validateOutInForEdge.
`com.orientechnologies.orient.core.exception.OCommandExecutionException: Error updating edge: 'out' is not a vertex - [V#9:0{name:a} v1]
DB name="test"
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep.validateOutInForEdge(UpdateEdgePointersStep.java:126)
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep.handleUpdateEdge(UpdateEdgePointersStep.java:86)
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep.access$000(UpdateEdgePointersStep.java:16)
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep$1.next(UpdateEdgePointersStep.java:35)
at com.orientechnologies.orient.core.sql.executor.SaveElementStep$1.next(SaveElementStep.java:37)
at com.orientechnologies.orient.core.sql.executor.CountStep.syncPull(CountStep.java:53)
at com.orientechnologies.orient.core.sql.executor.OSelectExecutionPlan.fetchNext(OSelectExecutionPlan.java:37)
at com.orientechnologies.orient.core.sql.executor.OUpdateExecutionPlan.executeInternal(OUpdateExecutionPlan.java:46)
at com.orientechnologies.orient.core.sql.parser.OUpdateStatement.execute(OUpdateStatement.java:144)
at com.orientechnologies.orient.core.sql.parser.OStatement.execute(OStatement.java:59)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.command(ODatabaseDocumentEmbedded.java:540)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.executeStatement(OServerCommandPostCommand.java:175)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.execute(OServerCommandPostCommand.java:84)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommandGraph.execute(OServerCommandPostCommandGraph.java:36)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:172)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:633)
at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:82)
Internal server error:
com.orientechnologies.orient.core.exception.OCommandExecutionException: Error updating edge: 'out' is not a vertex - [V#9:0{name:a} v1]
DB name="test"
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep.validateOutInForEdge(UpdateEdgePointersStep.java:126)
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep.handleUpdateEdge(UpdateEdgePointersStep.java:86)
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep.access$000(UpdateEdgePointersStep.java:16)
at com.orientechnologies.orient.core.sql.executor.UpdateEdgePointersStep$1.next(UpdateEdgePointersStep.java:35)
at com.orientechnologies.orient.core.sql.executor.SaveElementStep$1.next(SaveElementStep.java:37)
at com.orientechnologies.orient.core.sql.executor.CountStep.syncPull(CountStep.java:53)
at com.orientechnologies.orient.core.sql.executor.OSelectExecutionPlan.fetchNext(OSelectExecutionPlan.java:37)
at com.orientechnologies.orient.core.sql.executor.OUpdateExecutionPlan.executeInternal(OUpdateExecutionPlan.java:46)
at com.orientechnologies.orient.core.sql.parser.OUpdateStatement.execute(OUpdateStatement.java:144)
at com.orientechnologies.orient.core.sql.parser.OStatement.execute(OStatement.java:59)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.command(ODatabaseDocumentEmbedded.java:540)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.executeStatement(OServerCommandPostCommand.java:175)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.execute(OServerCommandPostCommand.java:84)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommandGraph.execute(OServerCommandPostCommandGraph.java:36)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:172)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:633)`
Steps to reproduce
create vertex v set name = 'a'; --> #9:0
create vertex v set name = 'b'; --> #10:0
create vertex v set name = 'c'; --> #11:0
create edge e from #10:0 to #11:0; --> #17:0
update edge e set out = (select from v where name = 'a' ) where @rid = #17:0
The text was updated successfully, but these errors were encountered: