zhengyingying opened a new issue, #2132: URL: https://github.com/apache/incubator-hugegraph/issues/2132
### Bug Type (问题类型) gremlin (结果不合预期) ### Before submit - [X] 我已经确认现有的 [Issues](https://github.com/hugegraph/hugegraph/issues) 与 [FAQ](https://hugegraph.github.io/hugegraph-doc/guides/faq.html) 中没有相同 / 重复问题 ### Environment (环境信息) - Server Version: v1.0.0 - Backend: in memory - OS: xx CPUs, xx G RAM, Centos 7.x - Data Size: xx vertices, xx edges <!-- (like 1000W 点, 9000W 边) --> ### Expected & Actual behavior (期望与实际表现) When we query vertices without HugeVertexStepStrategy, Hugegraph returns incorrect query result. ``` gremlin> :> hugegraph.traversal().V().in('teach').both('knows') ==>{id=694926166728900608, label=person, properties={age=12}} gremlin> :> hugegraph.traversal().withoutStrategies(HugeVertexStepStrategy).V().in('teach').both('knows') ``` This problem also exists when we remove edge labels. ``` gremlin> :> hugegraph.traversal().V().in().both() ==>[id:694926166728900608,label:person,type:vertex,properties:[age:12]] ==>[id:694926166728900608,label:person,type:vertex,properties:[age:12]] ==>[id:694926166728900610,label:person,type:vertex,properties:[age:24]] ==>[id:694926166728900610,label:person,type:vertex,properties:[age:24]] ==>[id:694926166728900611,label:person,type:vertex,properties:[age:34]] ==>[id:694926166728900609,label:person,type:vertex,properties:[age:23]] ==>[id:694926166728900610,label:person,type:vertex,properties:[age:24]] ==>[id:694926166728900608,label:person,type:vertex,properties:[age:12]] ==>[id:694926166728900609,label:person,type:vertex,properties:[age:23]] gremlin> :> hugegraph.traversal().withoutStrategies(HugeVertexStepStrategy.class).V().in().both() ==>[id:694926166728900610,label:person,type:vertex,properties:[age:24]] ==>[id:694926166728900610,label:person,type:vertex,properties:[age:24]] ==>[id:694926166728900611,label:person,type:vertex,properties:[age:34]] ==>[id:694926166728900608,label:person,type:vertex,properties:[age:12]] ``` The example data is as following. ``` hugegraph.schema().propertyKey("age").asInt().ifNotExist().create(); hugegraph.schema().propertyKey("year").asInt().ifNotExist().create(); // vertex hugegraph.schema().vertexLabel("person").properties("age").nullableKeys("age").create(); hugegraph.schema().indexLabel("personbyage").onV("person").by("age").shard().ifNotExist().create(); // edge hugegraph.schema().edgeLabel("knows").sourceLabel("person").targetLabel("person").properties("year").ifNotExist().create(); hugegraph.schema().edgeLabel("teach").sourceLabel("person").targetLabel("person").properties("year").ifNotExist().create(); hugegraph.schema().indexLabel("knowsbyperson").onE("knows").by("year").shard().ifNotExist().create(); hugegraph.schema().indexLabel("teachbyperson").onE("teach").by("year").shard().ifNotExist().create(); GraphManager graph = connection.getHugespecial().graph(); /** create graph data */ Vertex person1 = new Vertex("person").property("age", 12); Vertex person2 = new Vertex("person").property("age", 23); Vertex person3 = new Vertex("person").property("age", 24); Vertex person4 = new Vertex("person").property("age", 34); graph.addVertices(Arrays.asList(person1, person2, person3, person4)); Edge edge1 = new Edge("knows").source(person2).target(person1).property("year", 1); Edge edge2 = new Edge("teach").source(person3).target(person1).property("year", 2); Edge edge3 = new Edge("teach").source(person2).target(person3).property("year", 3); Edge edge4 = new Edge("knows").source(person1).target(person4).property("year", 4); graph.addEdges(Arrays.asList(edge1, edge2, edge3, edge4)); ``` ### Vertex/Edge example (问题点 / 边数据举例) _No response_ ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构) _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
