[
https://issues.apache.org/jira/browse/TINKERPOP3-757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14608566#comment-14608566
]
Marko A. Rodriguez commented on TINKERPOP3-757:
-----------------------------------------------
{{mapKeys}} and {{mapValues}} is good. Note that for {{Element}} we have --
{{properties().key()}} and {{properties().value()}} (or, typically,
{{values()}}). These also take a var args of String to say what properties you
want -- i.e. {{properties("name","age").key()}}. Does this change any thinking
on these proposed steps?
> Steps to convert a Map to a List
> --------------------------------
>
> Key: TINKERPOP3-757
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-757
> Project: TinkerPop 3
> Issue Type: Improvement
> Reporter: Daniel Kuppitz
>
> We need 2 steps to convert a map to a list (either keys or values).
> *Example:*
> {code}
> g.V().hasLabel("song").match(
>
> __.as("song").out("followedBy").groupCount().order(local).by(valueDecr).flatMap
> {it.get().keySet().iterator()}.limit(1).as("mostCommonFollower")
> ).select("song","mostCommonFollower").by("name")
> {code}
> *Should be:*
> {code}
> g.V().hasLabel("song").match(
>
> __.as("song").out("followedBy").groupCount().order(local).by(valueDecr).keys().limit(1).as("mostCommonFollower")
> ).select("song","mostCommonFollower").by("name")
> {code}
> Not sure about the names. Maybe {{mapKeys()}} and {{mapValues()}}..?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)