Skip to content

[Bug] "hasLabel()" containing more than one labels cannot be queried after "outE" #1735

Description

@choeoe

Bug Type (问题类型)

gremlin (结果不合预期)

Before submit

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

Environment (环境信息)

  • Server Version: v0.12.0
  • Backend: memory
  • OS: 8 CPUs, 32 G RAM, ubuntu
  • Data Size: 3000 vertices, 5000 edges

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

when i was querying "hasLabel()" after "outE()", it occurred an error if "hasLabel()" contains more than one Label.

Expected

The query is "g.V().outE('edge2','edge3','edge4').hasLabel('edge3','edge2')".It was expected to return edges

Actual behavior

java.lang.IllegalStateException: Illegal key 'LABEL' with more than one value

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().outE('edge2','edge3','edge4').hasLabel('edge3','edge2')”;

However,if the query becomes "g.E().hasLabel('edge3','edge2')", no errors ocur.

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 working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions