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

`as('a')` step followed by `select('a')` not behaving as expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 3.5.1
    • None
    • tinkergraph
    • None

    Description

      The inclusion of the `select()` step changes the result when it should not.

      Steps to replicate.
      Given a graph:

      g.addV('[avm]Design').as('root').
              property('VertexLabel','[avm]Design').
              property('uuid','SRC_UUID').
              property('[]Name', 'Axe').
              addV('[]RootContainer').as('rc').
              property('VertexLabel','[]RootContainer').
              property('[]Name','Axe').
              addV('[]Property').as('p1').
              property('VertexLabel','[]Property').
              property('[]XPosition','56').
              addV('[]Value').as('v1').
              property('VertexLabel','[]Value').
              property('[]stuff','12').
              addV('[]Property').as('p2').
              property('VertexLabel','[]Property').
              property('[]XPosition','80').
              addV('[]Value').as('v2').
              property('VertexLabel','[]Value').
              property('[]stuff','90').
              addE('inside').from('rc').to('root').
              addE('inside').from('p1').to('rc').
              addE('inside').from('v1').to('p1').
              addE('inside').from('p2').to('rc').
              addE('inside').from('v2').to('p2').
              iterate()
      

      The following two queries incorrectly produce different results.
      This first query produces a list of all the vertices with the exception of 'r0'.

      g.V().
        has('[avm]Design', 'uuid', 'SRC_UUID').as('r0').
        repeat(__.in('inside').simplePath()).
          emit().
          until(__.in('inside').count().is(0)).
        toList()
      

      The addition of the `select('r0')` step in this query causes no vertices to be returned.

      g.V().
        has('[avm]Design', 'uuid', 'SRC_UUID').as('r0').
        select('r0').
        repeat(__.in('inside').simplePath()).
          emit().
          until(__.in('inside').count().is(0)).
        toList()
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            phreed Fredrick Eisele
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: