Bug Type (问题类型)
gremlin (结果不合预期)
Before submit
Environment (环境信息)
- Server Version: v0.12.0
- Backend: memory
- OS: 8 CPUs, 32 G RAM, windows wsl
- Data Size: 3000 vertices, 6000 edges
Expected & Actual behavior (期望与实际表现)
An error occurred when querying "has()" after "inE()".
Expected:
The query is "g.V().inE('edge2','edge3','edge4').has('location','8672904391940353816')". It expects to return edges.
Actual behavior:
java.lang.ClassCastException: java.util.Arrays$ArrayList cannot be cast to com.baidu.hugegraph.backend.id.Id
Example to reproduce
hugegraph.schema().propertyKey("prop1").asText().ifNotExist().create();
hugegraph.schema().propertyKey("prop2").asText().ifNotExist().create();
hugegraph.schema().indexLabel("locationindex").onE("read1").by("length4").shard().ifNotExist().create();
hugegraph.schema().edgeLabel("edge1").sourceLabel("vertex1").targetLabel("vertex1").properties("prop1", "prop2").ifNotExist().create();
hugegraph.schema().edgeLabel("edge2").sourceLabel("vertex2").targetLabel("vertex2").properties("prop1", "prop2").ifNotExist().create();
hugegraph.schema().edgeLabel("edge3").sourceLabel("vertex3").targetLabel("vertex3").properties("prop1", "prop2").ifNotExist().create();
hugegraph.schema().edgeLabel("edge4").sourceLabel("vertex4").targetLabel("vertex4").properties("prop1", "prop2").ifNotExist().create();
String query = “g.V().inE('edge2','edge3','edge4').has('location','8672904391940353816')”;
When the query becomes "g.V().E().has('location','8672904391940353816')" or "g.V().inE('edge2','edge3','edge4')",system goes well.
Vertex/Edge example (问题点 / 边数据举例)
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
Bug Type (问题类型)
gremlin (结果不合预期)
Before submit
Environment (环境信息)
Expected & Actual behavior (期望与实际表现)
An error occurred when querying "has()" after "inE()".
Expected:
The query is "g.V().inE('edge2','edge3','edge4').has('location','8672904391940353816')". It expects to return edges.
Actual behavior:
Example to reproduce
When the query becomes "g.V().E().has('location','8672904391940353816')" or "g.V().inE('edge2','edge3','edge4')",system goes well.
Vertex/Edge example (问题点 / 边数据举例)
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)