spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milad Khajavi (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-12863) missing api for renaming and mapping result of operations on GroupedDataset to case classes
Date Sun, 17 Jan 2016 10:12:39 GMT

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

Milad Khajavi updated SPARK-12863:
----------------------------------
    Component/s: SQL

> missing api for renaming and mapping result of operations on GroupedDataset to case classes
> -------------------------------------------------------------------------------------------
>
>                 Key: SPARK-12863
>                 URL: https://issues.apache.org/jira/browse/SPARK-12863
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core, SQL
>            Reporter: Milad Khajavi
>
> Here I struggle with spark api to convert the result of count to convert that to KeyValue
case class. I think there is no api for changing the column of Dataset and mapping them to
new case class.
> case class LogRow(id: String, location: String, time: Long)
> case class KeyValue(key: (String, String), value: Long)
> val log = LogRow("1", "a", 1) :: and so on
> log.toDS().groupBy(l => {(l.id, l.location)}).count().toDF().toDF("key", "value").as[KeyValue].printSchema()



--
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


Mime
View raw message