[
https://issues.apache.org/jira/browse/TINKERPOP3-754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Kuppitz closed TINKERPOP3-754.
-------------------------------------
Resolution: Unresolved
Haven't found a good use case so far. The only use case I've had can now be
solved using {{select()}}. Will close for now.
> MergeStep
> ---------
>
> Key: TINKERPOP3-754
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-754
> Project: TinkerPop 3
> Issue Type: Improvement
> Components: process
> Reporter: Daniel Kuppitz
> Assignee: Marko A. Rodriguez
>
> Given the traversal in https://issues.apache.org/jira/browse/TINKERPOP3-753 I
> thought it would be nice to have a step that lets us modify a {{sideEffect}}
> map - basically {{store()}} for maps. For example:
> {code}
> g.V().match(
> __.as("v").outE().count().as("outDegree"),
> __.as("v").inE().count().as("inDegree")).
> select("v").by(valueMap()).merge("outDegree","inDegree")
> {code}
> **Expected result:**
> {noformat}
> ==>[name=[marko], age=[29], inDegree=0, outDegree=3]
> ==>[name=[vadas], age=[27], inDegree=1, outDegree=0]
> ==>[name=[lop], lang=[java], inDegree=3, outDegree=0]
> ==>[name=[josh], age=[32], inDegree=1, outDegree=2]
> ==>[name=[ripple], lang=[java], inDegree=1, outDegree=0]
> ==>[name=[peter], age=[35], inDegree=0, outDegree=1]
> {noformat}
> Instead of {{.merge(keys...)}} we could also make it {{.merge(mapKey,
> keys...)}} (which is probably better as it allows more flexible traversals).
> [~okram] already mentioned that {{merge()}} might not be the best name (and I
> agree), so both - the name and the functionality - are still open for
> discussions.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)