[ 
https://issues.apache.org/jira/browse/TINKERPOP3-792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marko A. Rodriguez closed TINKERPOP3-792.
-----------------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.1-incubating

This is fixed. However, its "weird." This was the problem. All match-traversals 
start with a {{MatchStartStep}}. These are {{Scoping}}. However, if someone 
does {{where(neq("c"))}}, well you want {{c}} to be a scoping variable. In 
{{MatchStartStep}} the scoping variables were the {{MatchStartStep}} variable 
AND the scoping variables of the subsequent step (iff it is {{Scoping}}).

I made it so ONLY {{WhereTraversalStep}} and {{WherePredicateStep}} are treated 
special like this. Thus, {{SelectOneStep}} and {{SelectStep}} are just normal 
old "selects" in a match-pattern.

I sorta don't like the solution as its sorta ad hoc and what if people want to 
"where" on the {{Map}}, not the patterns. :| .... They would have to insert an 
{{identity()}}-step. Dah..............................................  
However, regardless {{SelectStep}} and {{SelectOneStep}} should not be treated 
special by {{MatchStep}} so we are at least off to a good start.

> select at start of match traversal on Map can fail
> --------------------------------------------------
>
>                 Key: TINKERPOP3-792
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-792
>             Project: TinkerPop 3
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.0.0-incubating
>            Reporter: Matt Frantz
>            Assignee: Marko A. Rodriguez
>             Fix For: 3.0.1-incubating
>
>
> {noformat}
> g.V().valueMap()
>   .match(__.as('a').select('name').as('name'))
>   .select('name')
> The provided match pattern is unsolvable: [[MatchStartStep(a), 
> SelectOneStep(name), MatchEndStep(name)]]
> {noformat}
> 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.
> {noformat}
> g.V().valueMap()
>   .match(__.as('a').identity().select('name').as('name'))
>   .select('name')
> ==>[marko]
> ==>[vadas]
> ==>[lop]
> ==>[josh]
> ==>[ripple]
> ==>[peter]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to