[
https://issues.apache.org/jira/browse/TINKERPOP3-723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14582831#comment-14582831
]
ASF GitHub Bot commented on TINKERPOP3-723:
-------------------------------------------
GitHub user mhfrantz opened a pull request:
https://github.com/apache/incubator-tinkerpop/pull/77
TINKERPOP3-723 constant step
Passed TinkerFactory and Hadoop-Gremlin tests.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/RedSeal-co/incubator-tinkerpop
TINKERPOP3-723-constant-step
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-tinkerpop/pull/77.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 #77
----
commit d309af67e1176f85519b9137dec055acd77666ed
Author: mhfrantz <[email protected]>
Date: 2015-06-12T01:50:17Z
TINKERPOP3-723: Add constant step
commit 7f8274c9887fb0237118afb4b9e935f4999d7dd8
Author: mhfrantz <[email protected]>
Date: 2015-06-12T02:02:35Z
TINKERPOP3-723: Add constant step doc
----
> constant step
> -------------
>
> Key: TINKERPOP3-723
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-723
> Project: TinkerPop 3
> Issue Type: Improvement
> Reporter: Matt Frantz
> Assignee: Daniel Kuppitz
>
> The proposed {{constant}} step would be like a {{map}} that always returns
> the same value. It is most useful as an {{option}} or as an argument of
> {{coalesce}} or {{branch}}.
> {noformat}
> gremlin> g.V().coalesce(__.hasLabel('person').values('name'),
> __.constant('nonperson'))
> gremlin> g.V().coalesce(__.hasLabel('person').values('name'), __.map{it ->
> 'nonperson'})
> ==>marko
> ==>vadas
> ==>nonperson
> ==>josh
> ==>nonperson
> ==>peter
> {noformat}
> It was mentioned by [~dkuppitz] in the comments of TINKERPOP3-700.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)