You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "koert kuipers (JIRA)" <ji...@apache.org> on 2016/06/07 22:35:20 UTC

[jira] [Comment Edited] (SPARK-15780) Support mapValues on KeyValueGroupedDataset

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

koert kuipers edited comment on SPARK-15780 at 6/7/16 10:34 PM:
----------------------------------------------------------------

also see this discussion:
https://www.mail-archive.com/user@spark.apache.org/msg51915.html


was (Author: koert):
also see this discussion:
https://mail.google.com/mail/u/0/#label/Active/1552c23b293b1ac8

> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org