[ 
https://issues.apache.org/jira/browse/SPARK-15780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15316943#comment-15316943
 ] 

koert kuipers commented on SPARK-15780:
---------------------------------------

original discussion is here:
https://mail-archives.apache.org/mod_mbox/spark-user/201602.mbox/%3ccaaswr-7kqfmxd_cpr-_wdygafh+rarecm9olm5jkxfk14fc...@mail.gmail.com%3E

> Support mapValues on KeyValueGroupedDataset
> -------------------------------------------
>
>                 Key: SPARK-15780
>                 URL: https://issues.apache.org/jira/browse/SPARK-15780
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: koert kuipers
>            Priority: Minor
>
> Currently when doing groupByKey on a Dataset the key ends up in the values 
> which can be clumsy:
> {noformat}
> val ds: Dataset[(K, V)] = ...
> val grouped: KeyValueGroupedDataset[(K, (K, V))] = ds.groupByKey(_._1)
> {noformat}
> With mapValues one can create something more similar to PairRDDFunctions[K, 
> V]:
> {noformat}
> val ds: Dataset[(K, V)] = ...
> val grouped: KeyValueGroupedDataset[(K, V)] = 
> ds.groupByKey(_._1).mapValues(_._2)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to