You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "javeme (GitHub)" <gi...@apache.org> on 2019/11/13 08:29:07 UTC

[GitHub] [tinkerpop] javeme opened pull request #1222: TINKERPOP-2313 Support g.E().properties().hasKey('xx') & hasValue('xx')

https://issues.apache.org/jira/browse/TINKERPOP-2313

Currently, an exception will be thrown for this query: `XxProperty cannot be cast to Element`

[ Full content available at: https://github.com/apache/tinkerpop/pull/1222 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org

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

Posted by "javeme (GitHub)" <gi...@apache.org>.
> It seems there is no effect on HadoopProperty dedup:

According to the implementation of [Property comparison](https://github.com/apache/tinkerpop/blob/be4defb541e9ce99712a53200dbe7794c63f06a3/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/ElementHelper.java#L485), in addition to comparing to the key and value, the parent element is also compared:
```java
ElementHelper.areEqual(final Property a, final Object b) {
    return a.key().equals(((Property) b).key()) && a.value().equals(((Property) b).value()) && areEqual(a.element(), ((Property) b).element());
}
```

For [StarOutEdge and StarInEdge](https://github.com/apache/tinkerpop/blob/c2d7bd9c31b9d48f88017c1a077cb69437924d38/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraph.java#L818), the same edges with two directions are not equal.
For [TinkerEdge](https://github.com/apache/tinkerpop/blob/cff4c161615f2b50bda27b6ba523c7f52b833532/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerEdge.java#L41) the same edges with two directions are equal.

[ Full content available at: https://github.com/apache/tinkerpop/pull/1222 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org

[GitHub] [tinkerpop] javeme commented on issue #1222: TINKERPOP-2313 Support g.E().properties().hasKey('xx') & hasValue('xx')

Posted by "javeme (GitHub)" <gi...@apache.org>.
hi @spmallette Could you accept this change?
And do you think it is necessary to unify the behavior of edges comparison? like StarEdge and TinkerEdge.

[ Full content available at: https://github.com/apache/tinkerpop/pull/1222 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org

[GitHub] [tinkerpop] spmallette commented on issue #1222: TINKERPOP-1733 Support g.E().properties().hasKey('xx') & hasValue('xx')

Posted by "spmallette (GitHub)" <gi...@apache.org>.
looks like you've created a new PR at #1224 against `tp34`. closing this one and we can continue conversation over there. @dkuppitz we'll look for your comment over there.

[ Full content available at: https://github.com/apache/tinkerpop/pull/1222 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org