Skip to content

Gremlin api "hasLabel" after "has" returns unexpected result #500

Closed

Description

@choeoe

ArcadeDB Version: 22.8.1

JDK Version: jdk11

OS: windows wsl ubuntu1804

  • the query is
g.V().has('vl1','vp1',lt(2)).hasLabel('vl1','vl2','vl3').count()

Expected behavior

1

Actual behavior

3

Steps to reproduce

Cluster cluster=Cluster.open("/arcade.yaml");
Client client=cluster.connect();
client.submit("g.addV('vl1').property('vp1',1)");
client.submit("g.addV('vl2').property('vp1',1)"));
client.submit("g.addV('vl3').property('vp1',1)");
List<Result> results=client.submit("g.V().has('vl1','vp1',lt(2)).hasLabel('vl1','vl2','vl3').count()").all().get();
  • the same query run in TinkerPop returns 1

arcade.yaml.zip

Activity

  1. self-assigned this
    on Sep 2, 2022
  2. added this to the 22.9.1 milestone on Sep 2, 2022
  3. lvca commented on Sep 2, 2022

    @lvca
    Member

    Reproduced. Working to a fix.

  4. added a commit that references this issue on Sep 2, 2022
  5. lvca commented on Sep 2, 2022

    @lvca
    Member

    Fixed, thanks!

  6. choeoe commented on Sep 9, 2022

    @choeoe
    Author

    May I ask the brief cause of this bug?
    @lvca

  7. lvca commented on Sep 9, 2022

    @lvca
    Member

    The cause was in the optimization layer that intercepts queries on the index and speeds up performance by using it. In that case, the index couldn't be used exclusively because of the multiple conditions.

  8. choeoe commented on Sep 11, 2022

    @choeoe
    Author

    Thanks!

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions