Marko A. Rodriguez created TINKERPOP3-753: ---------------------------------------------
Summary: Should Scoping steps assume Map<String,Object> first and then Path? Key: TINKERPOP3-753 URL: https://issues.apache.org/jira/browse/TINKERPOP3-753 Project: TinkerPop 3 Issue Type: Bug Components: process Reporter: Marko A. Rodriguez Assignee: Marko A. Rodriguez Scoping is more complicated then lots of test cases make out. Here is a case in point: {code} g.V().out().as("v"). match( __.as("v").outE().count().as("outDegree"), __.as("v").inE().count().as("inDegree")). select("v","outDegree","inDegree").by(valueMap()).by().by(). local(union(select(local,"v"), select("inDegree", "outDegree")).unfold().fold()) {code} The {{select(local,"v")}} is required because {{union}} is a non-scoping step and thus, {{select()}} without local would compile to {{Scope.global}}, but what you really want is {{Scope.local}} (hence the hard coded {{local}}). Would it be best if Scoping worked like this? . Get the Traverser and see if the bindings are in sideEffects. . If not, see if its {{.get()}} is a {{Map}}. . If it is a {{Map}}, assume the bindings are in the {{Map}} (fully). . If it is not a {{Map}}, then get the {{Path}} a try and bind. This would allow us to remove the need for specifying {{Scope.local}} in the user API, however, we would still need, under the hood, {{Scoping}} to account for determining if Path calculations are needed at execution time. -- This message was sent by Atlassian JIRA (v6.3.4#6332)