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

select at start of match traversal on Map can fail

    XMLWordPrintableJSON

Details

    Description

      g.V().valueMap()
        .match(__.as('a').select('name').as('name'))
        .select('name')
      The provided match pattern is unsolvable: [[MatchStartStep(a), SelectOneStep(name), MatchEndStep(name)]]
      

      What I think it happening is that the select inside the match is using Scope.GLOBAL. The workaround is to insert identity, but I'm not sure why this works, as identity steps appear to be removed by strategy.

      g.V().valueMap()
        .match(__.as('a').identity().select('name').as('name'))
        .select('name')
      ==>[marko]
      ==>[vadas]
      ==>[lop]
      ==>[josh]
      ==>[ripple]
      ==>[peter]
      

      Attachments

        Activity

          People

            okram Marko A. Rodriguez
            mhfrantz Matt Frantz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: