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

Allow `V()` to accept a traversal such as `select(<label>)`

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.6.1
    • None
    • process
    • None

    Description

      Users are unable to use previously fetched components of a traversal and supply them as IDs within a mid-traversal `V()` lookup.

      As shown on StackOverflow:

      https://stackoverflow.com/questions/73137055/how-to-select-value-to-be-the-value-in-the-property-step-in-gremlin/73138481#comment129175360_73138481

      g.inject([['twitterPostId': 'tay','like': 'true','retweet': 'false'],['twitterPostId': 'fay','like': 'true','retweet': 'false' ]]).unfold()
         .V(select('twitterPostId')).fold().coalesce(}.unfold(),addV().property(t.id, select('twitterPostId').unfold())

      No error is returned in this case.  The query returns zero results.

      This can be repeated using the air routes dataset:

      g.inject(['1','2','3']).as('a').V(select('a'))

      Returns 0 results

      g.V(['1','2','3'])

      Returns:  

      [v[1], v[2], v[3]]

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            Riggan Taylor Riggan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: