Skip to content

[Bug] hasLabel() cannot be queried after inE() #1950

Description

@zhengyingying

Bug Type (问题类型)

No response

Before submit

  • 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题

Environment (环境信息)

  • Server Version: v0.12.0
  • Backend: memory
  • OS: CentOS
  • Data Size: 100 vertices, 200 edges

Expected & Actual behavior (期望与实际表现)

We execute the query g.V().inE('el0').hasLabel('el0','el1') and expect it returns some edges.

But it throws an exception java.lang.IllegalStateException: Illegal key 'LABEL' with more than one value.

Reproduce

The schema of the simplify graph as follows.

connection.getHugespecial().schema().propertyKey("ep0").asBoolean().ifNotExist().create();
connection.getHugespecial().schema().propertyKey("ep1").asBoolean().ifNotExist().create();
connection.getHugespecial().schema().edgeLabel("el0").sourceLabel("vl0").targetLabel("vl0").properties("ep0").ifNotExist().create();     
connection.getHugespecial().schema().edgeLabel("el1").sourceLabel("vl0").targetLabel("vl0").properties("ep1").ifNotExist().create();
connection.getHugespecial().schema().indexLabel("el0Byep0").onE("el0").by("ep0").shard().ifNotExist().create();
connection.getHugespecial().schema().indexLabel("el1Byep0").onE("el1").by("ep1").shard().ifNotExist().create();

Vertex vertex1 = new Vertex("vl0").property("vp0", true);
Vertex vertex2 = new Vertex("vl0").property("vp0", false);
Vertex vertex3 = new Vertex("vl0").property("vp0", true);
graph.addVertices(Arrays.asList(vertex1, vertex2, vertex3));

Edge edge1 = new Edge("el0").source(vertex1).target(vertex2).property("ep0", true);
Edge edge2 = new Edge("el1").source(vertex1).target(vertex3).property("ep1", false);
graph.addEdges(Arrays.asList(edge1, edge2));

GremlinManager gremlin = connection.getHugespecial().gremlin();

String query = "g.V().inE('el0').hasLabel('el0','el1')";

### Vertex/Edge example (问题点 / 边数据举例)

_No response_

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

_No response_

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggremlinTinkerPop gremlin

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions