GitHub user okram opened a pull request:

    https://github.com/apache/tinkerpop/pull/702

    TINKERPOP-1764: Generalize MatchStep to localize all barriers, not just 
reducing barriers.

    https://issues.apache.org/jira/browse/TINKERPOP-1764
    
    Prior to this moment, only reducing barrier steps in a `match()`-clause 
forced the clause to be computed locally (via a `flatMap()`-wrap). However, it 
has been deemed important to generalize this behavior to all barriers (e.g. 
`order()`, `limit()`, etc.) as identified by @doanduyhai (Gremlin power user). 
As such, the generalization has been done, but at the expense of a breaking 
change. However, realize that this breaking change would only be breaking 
behavior that is "random" (and most users should not be doing anyways -- but 
you never know).
    
    *PREVIOUSLY*
    
    ```
    gremlin> g.V().match(
    ......1>   
__.as('a').outE('created').order().by('weight',decr).limit(1).inV().as('b'),
    ......2>   __.as('b').has('lang','java')
    ......3> ).select('a','b').by('name')
    ==>[a:marko,b:lop]
    ```
    
    *CURRENTLY*
    
    ```
    gremlin> g.V().match(
    ......1>   
__.as('a').outE('created').order().by('weight',decr).limit(1).inV().as('b'),
    ......2>   __.as('b').has('lang','java')
    ......3> ).select('a','b').by('name')
    ==>[a:marko,b:lop]
    ==>[a:josh,b:ripple]
    ==>[a:peter,b:lop]
    ```
    
    VOTE +1

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-1764

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/702.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #702
    
----
commit 04b61d5943ecf12338ff15181ff01ba6fd2f143b
Author: Marko A. Rodriguez <[email protected]>
Date:   2017-08-30T14:33:34Z

    generalized match() to locally compute with all barriers, not just reducing 
barriers.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to