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/26 06:23:25 UTC

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

> 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