You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Daniel Kuppitz (JIRA)" <ji...@apache.org> on 2015/07/01 02:49:04 UTC

[jira] [Closed] (TINKERPOP3-757) Steps to convert a Map to a List

     [ https://issues.apache.org/jira/browse/TINKERPOP3-757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kuppitz closed TINKERPOP3-757.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.0.GA

Tests and documentation added.

> 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
>          Components: process
>            Reporter: Daniel Kuppitz
>            Assignee: Daniel Kuppitz
>             Fix For: 3.0.0.GA
>
>
> 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)