[
https://issues.apache.org/jira/browse/TINKERPOP3-670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14544409#comment-14544409
]
ASF GitHub Bot commented on TINKERPOP3-670:
-------------------------------------------
GitHub user mhfrantz opened a pull request:
https://github.com/apache/incubator-tinkerpop/pull/61
TINKERPOP3-670 tail step (v2)
Replaces PR #60
Based on feedback on the initial PR:
* correctly (I hope) tested and implemented "bulk" support
* `ComputerVerificationStrategy` balks at mid-traversal global tail steps
* `__` (anonymous traversals) include `tail` methods
* deferred execution during MR (using `Bypassing`)
The hadoop-gremlin tests pass for me.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/RedSeal-co/incubator-tinkerpop
TINKERPOP3-670-tail-step.v2
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-tinkerpop/pull/61.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 #61
----
commit 3204ee7cbeb3708f72d1bb3b75469fab299da83b
Author: mhfrantz <[email protected]>
Date: 2015-05-08T02:04:00Z
Implement RangeLocalStep.toString
commit ae6bd7b28271f3201c7e9fe9599b832c67eb1302
Author: mhfrantz <[email protected]>
Date: 2015-05-08T01:29:22Z
TINKERPOP3-670: Add 'tail' step
commit 3bd83e3b69bccb36bd81f39c0c8050a62ee4b6a4
Author: mhfrantz <[email protected]>
Date: 2015-05-08T13:30:43Z
TINKERPOP3-670: Avoid ID's in unit tests, since they're not vendor agnostic
commit 39900f2c27c6a6ba42a5639fad6b470278c0e6b1
Author: mhfrantz <[email protected]>
Date: 2015-05-08T13:52:09Z
TINKERPOP3-670: Add overloads to default tail limit to 1
commit 46a63e1476916e17384f564e90ec24c8db3424af
Author: mhfrantz <[email protected]>
Date: 2015-05-14T01:17:10Z
TINKERPOP3-670: Add tail step to __
commit f90f9301d80bd6cd1eb06dd04088c4bd7b51cddd
Author: mhfrantz <[email protected]>
Date: 2015-05-14T06:55:00Z
TINKERPOP3-670: Add repeat test for tail step
commit ed1b8dde07c43f89f3805327a5f0be71236eb339
Author: mhfrantz <[email protected]>
Date: 2015-05-14T07:45:12Z
TINKERPOP3-670: Cloned tail step should not include traverser buffer
contents
commit e4692f8cec5d79145c22e6b59376bc6e6e2fb973
Author: mhfrantz <[email protected]>
Date: 2015-05-14T21:38:28Z
TINKERPOP3-670: Tail handles bulk and bypass during MapReduce
----
> tail step
> ---------
>
> Key: TINKERPOP3-670
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-670
> Project: TinkerPop 3
> Issue Type: Improvement
> Components: process
> Reporter: Matt Frantz
>
> The tail step has two scopes:
> * global: emits the last N traversers that pass through it.
> * local: emits a {{List}} containing the last N elements of the inbound
> {{List}}
> Additionally, for {{tail(local, 1)}}, it emits a single element rather than a
> {{List}} containing a single element.
> TINKERPOP3-639 provides motivation.
> Scenario: Global scope
> {noformat}
> gremlin> g.V().order().by(T.id, incr).tail(global, 2)
> ==>v[5]
> ==>v[6]
> {noformat}
> Scenario: Default scope is global
> {noformat}
> gremlin> g.V().order().by(T.id, incr).tail(2)
> ==>v[5]
> ==>v[6]
> {noformat}
> Scenario: Local scope, {{List}} input, N>1
> {noformat}
> gremlin> g.V().as('a').out().as('a').out().as('a').select('a').tail(local, 2)
> ==>[v[4], v[5]]
> ==>[v[4], v[3]]
> {noformat}
> Scenario: Local scope, {{List}} input, N=1
> {noformat}
> gremlin> g.V().as('a').out().as('a').out().as('a').select('a').tail(local, 1)
> ==>v[5]
> ==>v[3]
> {noformat}
> Scenario: Local scope, {{Map}} input, N>1
> {noformat}
> gremlin> g.V().as('a').out().as('b').out().as('c').select().tail(local, 2)
> ==>[b:v[4], c:v[5]]
> ==>[b:v[4], c:v[3]]
> {noformat}
> Scenario: Local scope, {{Map}} input, N=1
> {noformat}
> gremlin> g.V().as('a').out().as('b').out().as('c').select().tail(local, 1)
> ==>[c:v[5]]
> ==>[c:v[3]]
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)