Edge traveresal .hasId() not returning expected results
@ g.E("4r6-39s-69zp-3c8").toList
res49: List[Edge] = List(e[4r6-39s-69zp-3c8][4240-RetrocomputerPurchaser->4328])
@ g.E().hasId("4r6-39s-69zp-3c8").toList
res50: List[Edge] = List()
@ g.E("4r6-39s-69zp-3c8").traversal.profile().toList
res51: java.util.List[org.apache.tinkerpop.gremlin.process.traversal.util.TraversalMetrics] = [Traversal Metrics
Step Count Traversers Time (ms) % Dur
=============================================================================================================
GraphStep(edge,[4r6-39s-69zp-3c8]) 1 1 0.237 100.00
>TOTAL - - 0.237 -]
@ g.E().hasId("4r6-39s-69zp-3c8").traversal.profile().toList
res52: java.util.List[org.apache.tinkerpop.gremlin.process.traversal.util.TraversalMetrics] = [Traversal Metrics
Step Count Traversers Time (ms) % Dur
=============================================================================================================
JanusGraphStep(edge,[4r6-39s-69zp-3c8]) 0.039 100.00
>TOTAL - - 0.039 -]
On Nov 5, 2021, at 2:01 PM, Adam Crane via lists.lfaidata.foundation <acrane=twitter.com@...> wrote:Hey folks, I'm seeing strange results trying to use the hasId step on an edge traversal:@ g.E("4r6-39s-69zp-3c8").toListres49: List[Edge] = List(e[4r6-39s-69zp-3c8][4240-RetrocomputerPurchaser->4328])@ g.E().hasId("4r6-39s-69zp-3c8").toListres50: List[Edge] = List()@ g.E("4r6-39s-69zp-3c8").traversal.profile().toListres51: java.util.List[org.apache.tinkerpop.gremlin.process.traversal.util.TraversalMetrics] = [Traversal MetricsStep Count Traversers Time (ms) % Dur=============================================================================================================GraphStep(edge,[4r6-39s-69zp-3c8]) 1 1 0.237 100.00>TOTAL - - 0.237 -]@ g.E().hasId("4r6-39s-69zp-3c8").traversal.profile().toListres52: java.util.List[org.apache.tinkerpop.gremlin.process.traversal.util.TraversalMetrics] = [Traversal MetricsStep Count Traversers Time (ms) % Dur=============================================================================================================JanusGraphStep(edge,[4r6-39s-69zp-3c8]) 0.039 100.00>TOTAL - - 0.039 -]1) Why would these two traversals produce different results?2) What's the difference between the GraphStep and JanusGraphStep representations of these traversals? They look the same otherwise via explain/profile.3) Is there any working encoding of this query starting with an edge traversal g.E() that can produce the same result?Thanks,- Adam
Fixed by https://github.com/JanusGraph/janusgraph/pull/2849 and will be included in the next release (0.6.1).