GitHub user okram opened a pull request:

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

    TINKERPOP-1541: Select should default to Pop.last semantics

    https://issues.apache.org/jira/browse/TINKERPOP-1541
    
    All `Scoping` steps use `Pop.last` semantics (`where()`, `match()`, 
`dedup()`), except `select()` which uses `Pop.mixed`. This is a wart from 
TinkerPop2 days. I changed `select()` to default to `Pop.last` and provided a 
`selectV3d0()` backwards compatibility step (@spmallette -- is that how we 
should name it? or is it `selectV3d2()` now?).
    
    The benefit of this is that we can now introduce a simpler `Path` data 
structure if a traversal is all `Path.last` (which is 99% of traversals out 
there).  That is, if the traversal requirements is `LABELED_PATH` and all pops 
are `Pop.last`, then we don't need to store "historic" path elements and can 
have a `MapPath` which is backed by a `Map<String,Object>`. Less data and a 
simpler/faster equality test for bulking.
    
    @robertdale --
    
    ```
    gremlin> g.V(1).as('a').select(mixed,'a').as('a').select(mixed,'a')
    ==>[v[1],v[1]]
    gremlin> g.V(1).as('a').select('a').as('a').select('a')
    ==>v[1]
    ```
    
    VOTE +1.

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

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

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

    https://github.com/apache/tinkerpop/pull/482.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 #482
    
----
commit 2d147bf8ef2c3f79a8015632c85a8a01a679f2fd
Author: Marko A. Rodriguez <okramma...@gmail.com>
Date:   2016-11-08T14:01:19Z

    Pop.mixed introduced to replace using a null Pop argument. SelectOneStep 
and SelectStep now default to using Pop.last instead of Pop.mixed. All other 
Scoping steps already use Pop.last semantics. This change will allow us to 
introduce a simpler Path data structure for LABELED_PATH traversals with 
complete Pop.last semantics (99 percent of uses).

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to