You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2019/11/26 14:08:56 UTC

[GitHub] [tinkerpop] javeme edited a comment on issue #1224: TINKERPOP-1733 Support g.E().properties().hasKey('xx') & hasValue('xx')

javeme edited a comment on issue #1224: TINKERPOP-1733 Support g.E().properties().hasKey('xx') & hasValue('xx')
URL: https://github.com/apache/tinkerpop/pull/1224#issuecomment-558643444
 
 
   > what's an example of the "same edges with two directions"?
   
   Such as there are two vertices: `person1` and `person2`, one edge with id "follow_1_2" linked from `person1` to `person2`, it can be expressed like this: `person1 -- follow -> person2`.
   When querying edges from vertex `person1` by `g.V(person1).outE()`, got an edge with OUT direction:
     `person1 -- follow -> person2`
   and querying edges from vertex `person2` by `g.V(person2).inE()`, got an edge with IN direction:
     `person2 <- follow -- person1`. 
   These two edges are essentially one edge, so it makes sense their comparison should be equal, but it's not equal for StarOutEdge and StarInEdge, no such issue for TinkerEdge.
   
   There seem to be 2 ways to fix OUT & IN StarEdge comparison:
   
   1. Override edge id of StarEdge, like [add StarEdgeId class](https://github.com/apache/tinkerpop/pull/1224/commits/8f604df919bdb9452068eb7ea41273e7aee5b2a7). (but there are still some problems: not registered kryo)
     ```c
   org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Error during serialization: java.lang.IllegalArgumentException: Class is not registered: org.apache.tinkerpop.gremlin.structure.util.star.StarGraph$StarEdgeId
   Note: To register this class use: kryo.register(org.apache.tinkerpop.gremlin.structure.util.star.StarGraph$StarEdgeId.class);
   	at org.apache.tinkerpop.gremlin.server.GremlinResultSetIntegrateTest.shouldHandleTinkerGraphResult(GremlinResultSetIntegrateTest.java:207)
   Caused by: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: 
   Error during serialization: java.lang.IllegalArgumentException: Class is not registered: org.apache.tinkerpop.gremlin.structure.util.star.StarGraph$StarEdgeId
   Note: To register this class use: kryo.register(org.apache.tinkerpop.gremlin.structure.util.star.StarGraph$StarEdgeId.class);
   ```
   2. Override StarEdge equals()
   
   Which way is better, or any other ideas?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services