You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "sandszhouSZ (GitHub)" <gi...@apache.org> on 2019/09/23 12:20:22 UTC

[GitHub] [tinkerpop] sandszhouSZ commented on issue #1197: Fix Bytecode.addSource arguments is null bug

Good question, I think outE(null) should behave as outE()。 The reasons are:
1.  [null is a special token ](https://stackoverflow.com/questions/2707322/what-is-null-in-java)
Generally speaking, null are used as a special value to signify:
- Uninitialized state
- Termination condition
- Non-existing object
- An unknown value
I think as outE(null),  null's  meaning will be  An unknown value / Non-existing object,
as outE will be filter by arg **final String... edgeLabels** and  edgeLabels = null means
filter by unknown / Non-existing args which also means no filter at all

2. A readily sample as following,  it indicates null is just ignored directly:
gremlin> g.V(1).outE("knows", null)
==>e[7][1-knows->2]
==>e[8][1-knows->4]

3. In standard  Map structure, when the key is null  the map will return the value just if containsKey(null)  == true or return null otherwise。but as  Industrial grade product, we hardly ever met a map has null as it's key, so null here also means **Non-existing keys**


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