[
https://issues.apache.org/jira/browse/TINKERPOP3-723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Kuppitz closed TINKERPOP3-723.
-------------------------------------
Resolution: Fixed
Fix Version/s: 3.0.0-incubating
> constant step
> -------------
>
> Key: TINKERPOP3-723
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-723
> Project: TinkerPop 3
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.0.0-incubating
> Reporter: Matt Frantz
> Assignee: Daniel Kuppitz
> Fix For: 3.0.0-incubating
>
>
> 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)