Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2540

Unexpected count() step result

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 3.4.10
    • None
    • process, tinkergraph
    • None
    • OS: Ubuntu 20.04.2 LTS
      Java: Java(TM) SE Runtime Environment (build 1.8.0_241-b07)

    Description

      After installing latest (tinkerpop version 3.4.10), it's found that running a specific gremlin script with 'count()' step gives unexpected result.

      Steps to reproduce

      1 Install tinkerpop 3.4.10, and connect to this server with gremlin console client

      2 create a modern graph with TinkerFactory

      gremlin> graph = TinkerFactory.createModern()
       ==>tinkergraph[vertices:6 edges:6]
      gremlin> g=graph.traversal()
      ==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
      gremlin> g
      ==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]

      3 run following script:

      gremlin> g.V().hasLabel('person').has('name','testuser1').or().has('name','testuser1').values('name','age').dedup().count()
      

      Note that usser 'testuser1' doesn't exist in the created 'modern' graph.

      Expected result

      a numeric number showing the count (or 0 if there is no vertices from previous steps before count() step)

      Actual result
      See a list of vertices:

      gremlin> g.V().hasLabel('person').has('name','testuser1').or().has('name','testuser1').values('name','age').dedup().count()
       ==>v[1]
       ==>v[2]
       ==>v[3]
       ==>v[4]
       ==>v[5]
       ==>v[6]

      Attachments

        Activity

          People

            Unassigned Unassigned
            guobaochen Guobao Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: