[Bug] Throw MissingMethodException for E() syntax
Bug Type (问题类型)
other exception / error (其他异常报错)
Before submit
- [X] 我已经确认现有的 Issues 与 FAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)
Environment (环境信息)
- HugeGraph Version: 0.12.0
- Storage Backend: inmemory
- Mixed Index Backend: none
- Link to discussed bug: none
- Operating system: macOS 13.2.1
- API/Driver: Java
Expected & Actual behavior (期望与实际表现)
I first randomly create a graph. Then when I run the following query: g.E().inV().bothE('el0').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 groovy.lang.MissingMethodException 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.
HugeGraph exception :
groovy.lang.MissingMethodException: No signature of method: org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal.E() is applicable for argument types: () values: []
Possible solutions: by(groovy.lang.Closure), is(java.lang.Object), use([Ljava.lang.Object;), use(java.util.List, groovy.lang.Closure), use(java.lang.Class, groovy.lang.Closure), any()
Vertex/Edge example (问题点 / 边数据举例)
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:
- Create data
Vertex:
g.addV('vl0').property('vp1','-1034048237').property('vp7','-4968669737099627802').property(T.id,701214992111763456)
g.addV('vl1').property('vp4','-1034048237').property('vp7','7047629733357371476').property(T.id,701214992145317888)
g.addV('vl0').property('vp7','-1179034132564916820').property(T.id,701214992162095104)
g.addV('vl0').property('vp1','919387163').property('vp3','0.6857065925545492').property('vp2','8253654377815772618').property('vp5','0.46675998').property(T.id,701214992187260928)
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,701214992212426752)
g.addV('vl1').property('vp1','-1034048237').property('vp2','-818809215999933277').property('vp4','1772872861').property(T.id,701214992233398272)
g.addV('vl1').property('vp7','6091271482790093577').property(T.id,701214992245981184)
g.addV('vl1').property('vp2','-123693295659580542').property('vp4','-621386624').property(T.id,701214992262758400)
g.addV('vl0').property('vp1','886966854').property('vp3','0.5109959583932853').property('vp6','0.3653812858584179').property(T.id,701214992279535616)
g.addV('vl0').property('vp7','1248434616870049539').property('vp6','0.5109959583932853').property(T.id,701214992296312832)
Edge:
g.V(701214992296312832).as('701214992296312832').V(701214992262758400).as('701214992262758400').addE('el0').from('701214992296312832').to('701214992262758400')
g.V(701214992212426752).as('701214992212426752').V(701214992262758400).as('701214992262758400').addE('el0').from('701214992212426752').to('701214992262758400')
g.V(701214992187260928).as('701214992187260928').V(701214992245981184).as('701214992245981184').addE('el0').from('701214992187260928').to('701214992245981184')
g.V(701214992162095104).as('701214992162095104').V(701214992245981184).as('701214992245981184').addE('el0').from('701214992162095104').to('701214992245981184')
g.V(701214992279535616).as('701214992279535616').V(701214992262758400).as('701214992262758400').addE('el0').from('701214992279535616').to('701214992262758400')
g.V(701214992162095104).as('701214992162095104').V(701214992145317888).as('701214992145317888').addE('el0').from('701214992162095104').to('701214992145317888')
g.V(701214992296312832).as('701214992296312832').V(701214992233398272).as('701214992233398272').addE('el0').from('701214992296312832').to('701214992233398272')
g.V(701214992279535616).as('701214992279535616').V(701214992233398272).as('701214992233398272').addE('el0').from('701214992279535616').to('701214992233398272')
g.V(701214992212426752).as('701214992212426752').V(701214992233398272).as('701214992233398272').addE('el0').from('701214992212426752').to('701214992233398272')
g.V(701214992111763456).as('701214992111763456').V(701214992145317888).as('701214992145317888').addE('el0').from('701214992111763456').to('701214992145317888')
g.V(701214992187260928).as('701214992187260928').V(701214992145317888).as('701214992145317888').addE('el0').from('701214992187260928').to('701214992145317888')
g.V(701214992279535616).as('701214992279535616').V(701214992145317888).as('701214992145317888').addE('el0').from('701214992279535616').to('701214992145317888')
g.V(701214992296312832).as('701214992296312832').V(701214992145317888).as('701214992145317888').addE('el0').from('701214992296312832').to('701214992145317888')
g.V(701214992212426752).as('701214992212426752').V(701214992245981184).as('701214992245981184').addE('el0').from('701214992212426752').to('701214992245981184')
g.V(701214992111763456).as('701214992111763456').V(701214992262758400).as('701214992262758400').addE('el0').from('701214992111763456').to('701214992262758400')
g.V(701214992111763456).as('701214992111763456').V(701214992245981184).as('701214992245981184').addE('el0').from('701214992111763456').to('701214992245981184')
g.V(701214992162095104).as('701214992162095104').V(701214992233398272).as('701214992233398272').addE('el0').from('701214992162095104').to('701214992233398272')
g.V(701214992162095104).as('701214992162095104').V(701214992262758400).as('701214992262758400').addE('el0').from('701214992162095104').to('701214992262758400')
g.V(701214992279535616).as('701214992279535616').V(701214992245981184).as('701214992245981184').addE('el0').from('701214992279535616').to('701214992245981184')
g.V(701214992187260928).as('701214992187260928').V(701214992262758400).as('701214992262758400').addE('el0').from('701214992187260928').to('701214992262758400')
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
- Create schema
schema().propertyKey('vp0').asText().ifNotExist().create();
schema().propertyKey('vp1').asInt().ifNotExist().create();
schema().propertyKey('vp2').asLong().ifNotExist().create();
schema().propertyKey('vp3').asDouble().ifNotExist().create();
schema().propertyKey('vp4').asInt().ifNotExist().create();
schema().propertyKey('vp5').asFloat().ifNotExist().create();
schema().propertyKey('vp6').asDouble().ifNotExist().create();
schema().propertyKey('vp7').asLong().ifNotExist().create();
schema().vertexLabel('vl0').ifNotExist().create();
schema().vertexLabel('vl0').properties('vp7').nullableKeys('vp7').append();
schema().indexLabel('vl0byvp7Shard').onV('vl0').by('vp7').shard().ifNotExist().create();
schema().vertexLabel('vl0').properties('vp2').nullableKeys('vp2').append();
schema().indexLabel('vl0byvp2Shard').onV('vl0').by('vp2').shard().ifNotExist().create();
schema().vertexLabel('vl0').properties('vp1').nullableKeys('vp1').append();
schema().indexLabel('vl0byvp1Shard').onV('vl0').by('vp1').shard().ifNotExist().create();
schema().vertexLabel('vl0').properties('vp5').nullableKeys('vp5').append();
schema().indexLabel('vl0byvp5Shard').onV('vl0').by('vp5').shard().ifNotExist().create();
schema().vertexLabel('vl0').properties('vp6').nullableKeys('vp6').append();
schema().indexLabel('vl0byvp6Shard').onV('vl0').by('vp6').shard().ifNotExist().create();
schema().vertexLabel('vl0').properties('vp3').nullableKeys('vp3').append();
schema().indexLabel('vl0byvp3Shard').onV('vl0').by('vp3').shard().ifNotExist().create();
schema().vertexLabel('vl1').ifNotExist().create();
schema().vertexLabel('vl1').properties('vp7').nullableKeys('vp7').append();
schema().indexLabel('vl1byvp7Shard').onV('vl1').by('vp7').shard().ifNotExist().create();
schema().vertexLabel('vl1').properties('vp1').nullableKeys('vp1').append();
schema().indexLabel('vl1byvp1Shard').onV('vl1').by('vp1').shard().ifNotExist().create();
schema().vertexLabel('vl1').properties('vp4').nullableKeys('vp4').append();
schema().indexLabel('vl1byvp4Shard').onV('vl1').by('vp4').shard().ifNotExist().create();
schema().vertexLabel('vl1').properties('vp2').nullableKeys('vp2').append();
schema().indexLabel('vl1byvp2Shard').onV('vl1').by('vp2').shard().ifNotExist().create();
schema().propertyKey('ep0').asDouble().ifNotExist().create();
schema().propertyKey('ep1').asText().ifNotExist().create();
schema().propertyKey('ep2').asInt().ifNotExist().create();
schema().propertyKey('ep3').asDouble().ifNotExist().create();
schema().edgeLabel('el0').link('vl1', 'vl0').ifNotExist().create();
schema().edgeLabel('el0').properties('ep0').nullableKeys('ep0').append();
schema().indexLabel('el0byep0Shard').onE('el0').by('ep0').shard().ifNotExist().create();
schema().edgeLabel('el0').properties('ep2').nullableKeys('ep2').append();
schema().indexLabel('el0byep2Shard').onE('el0').by('ep2').shard().ifNotExist().create();
Sorry, not sure which is the key step in your reproduction process.
I think is the middle E() here.
g.E().inV().bothE('el0').fold().as('x').E().where(__.count()).where(within('x'))
^