apache / incubator-hugegraph

A graph database that supports more than 100+ billion data, high performance and scalability (Include OLTP Engine & REST-API & Backends)
https://hugegraph.apache.org
Apache License 2.0
2.63k stars 517 forks source link

[Bug] Throw MissingMethodException for E() syntax #2171

Open llooFlashooll opened 1 year ago

llooFlashooll commented 1 year ago

Bug Type (问题类型)

other exception / error (其他异常报错)

Before submit

Environment (环境信息)

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:

Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

javeme commented 1 year ago

Sorry, not sure which is the key step in your reproduction process.

llooFlashooll commented 1 year ago

I think is the middle E() here.

g.E().inV().bothE('el0').fold().as('x').E().where(__.count()).where(within('x'))
                                        ^