Date
1 - 3 of 3
Throw ExecutionException for E() syntax
Flash
- JanusGraph Version: 0.6.2
- Operating system: macOS 13.2.1
- API/Driver: Java
I first randomly create a graph. Then when I run the following query: `g.E().has('ep0').fold().as('x').E().where(__.count()).where(within('x'))` is thrown with an exception. I think this query is syntactically correct, but I keep triggering this kind of problem. ### Expected behavior:
No exception should be expected to throw. Or futher messages or prompts should be thrown.
### Actual behavior:
A `java.util.concurrent.ExecutionException` is thrown. And I'm not really sure whether this problem should happen so I report this. I succeed this kind of collection transition when replacing `g.E()` with `g.V()`. So I guess there's some problems of `g.E()` syntax, and maybe it doesn't support midterm `E()` syntax.
```
JanusGraph exception :
java.util.concurrent.ExecutionException: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: No signature of method: org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal.E() is applicable for argument types: () values: []
Possible solutions: is(java.lang.Object), by(groovy.lang.Closure), use([Ljava.lang.Object;), use(java.lang.Class, groovy.lang.Closure), use(java.util.List, groovy.lang.Closure), any()
```
### Steps to reproduce:
We create a graph with 10 nodes and 20 edges. We try to make it clear to reproduce the bugs, {}hope{} to not cause much inconvenience to your reviewing, but we believe the problem does exist.
Following the following graph data generation query, we can reproduce the bugs:
```
Vertex:
g.addV('vl0').property('vp1','-1034048237').property('vp7','-4968669737099627802').property(T.id,4128)
g.addV('vl1').property('vp4','-1034048237').property('vp7','7047629733357371476').property(T.id,4336)
g.addV('vl0').property('vp7','-1179034132564916820').property(T.id,4120)
g.addV('vl0').property('vp1','919387163').property('vp3','0.6857065925545492').property('vp2','8253654377815772618').property('vp5','0.46675998').property(T.id,4096)
g.addV('vl0').property('vp1','744452324').property('vp3','0.3068707506348314').property('vp2','3726570567130058171').property('vp5','0.21368504').property('vp7','7324225739947442462').property('vp6','0.6857065925545492').property(T.id,4216)
g.addV('vl1').property('vp1','-1034048237').property('vp2','-818809215999933277').property('vp4','1772872861').property(T.id,4224)
g.addV('vl1').property('vp7','6091271482790093577').property(T.id,8320)
g.addV('vl1').property('vp2','-123693295659580542').property('vp4','-621386624').property(T.id,8432)
g.addV('vl0').property('vp1','886966854').property('vp3','0.5109959583932853').property('vp6','0.3653812858584179').property(T.id,8312)
g.addV('vl0').property('vp7','1248434616870049539').property('vp6','0.5109959583932853').property(T.id,12528)
Edge:
g.V(12528).as('12528').V(8432).as('8432').addE('el0').from('12528').to('8432')
g.V(4216).as('4216').V(8432).as('8432').addE('el0').from('4216').to('8432')
g.V(4096).as('4096').V(8320).as('8320').addE('el0').from('4096').to('8320')
g.V(4120).as('4120').V(8320).as('8320').addE('el0').from('4120').to('8320')
g.V(8312).as('8312').V(8432).as('8432').addE('el0').from('8312').to('8432')
g.V(4120).as('4120').V(4336).as('4336').addE('el0').from('4120').to('4336')
g.V(12528).as('12528').V(4224).as('4224').addE('el0').from('12528').to('4224')
g.V(8312).as('8312').V(4224).as('4224').addE('el0').from('8312').to('4224')
g.V(4216).as('4216').V(4224).as('4224').addE('el0').from('4216').to('4224')
g.V(4128).as('4128').V(4336).as('4336').addE('el0').from('4128').to('4336')
g.V(4096).as('4096').V(4336).as('4336').addE('el0').from('4096').to('4336')
g.V(8312).as('8312').V(4336).as('4336').addE('el0').from('8312').to('4336')
g.V(12528).as('12528').V(4336).as('4336').addE('el0').from('12528').to('4336')
g.V(4216).as('4216').V(8320).as('8320').addE('el0').from('4216').to('8320')
g.V(4128).as('4128').V(8432).as('8432').addE('el0').from('4128').to('8432')
g.V(4128).as('4128').V(8320).as('8320').addE('el0').from('4128').to('8320')
g.V(4120).as('4120').V(4224).as('4224').addE('el0').from('4120').to('4224')
g.V(4120).as('4120').V(8432).as('8432').addE('el0').from('4120').to('8432')
g.V(8312).as('8312').V(8320).as('8320').addE('el0').from('8312').to('8320')
g.V(4096).as('4096').V(8432).as('8432').addE('el0').from('4096').to('8432')
```
|
|
hadoopmarc@...
No, the query syntax is not correct.
See https://javadoc.io/doc/org.apache.tinkerpop/gremlin-core/latest/index-all.html#I:V and you not that V() exists for both the GraphTraversalSource, the GraphTraversal and for __. Look again at https://javadoc.io/doc/org.apache.tinkerpop/gremlin-core/latest/index-all.html#I:E and you see that E() only exists for the GraphTraversalSource. In other words: a mid-traversal E() is not allowed and you get the error that more or less says so. Best wishes, Marc |
|
Flash
Dear Marc,
I see! Thanks for your reply. But TinkerGraph would support this syntax in their next major version update: https://issues.apache.org/jira/browse/TINKERPOP-2910. Maybe we can also consider this kind of reasonable features. Best regards |
|