You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2015/10/29 00:32:27 UTC
[jira] [Assigned] (SPARK-11329) Expand Star when creating a struct
[ https://issues.apache.org/jira/browse/SPARK-11329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-11329:
------------------------------------
Assignee: (was: Apache Spark)
> Expand Star when creating a struct
> ----------------------------------
>
> Key: SPARK-11329
> URL: https://issues.apache.org/jira/browse/SPARK-11329
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Reporter: Yin Huai
>
> It is pretty common for customers to do regular extractions of update data from an external datasource (e.g. mysql or postgres). While this is possible today, the syntax is a little onerous. With some small improvements to the analyzer I think we could make this much easier.
> Goal: Allow users to execute the following two queries as well as their dataframe equivalents
> to find the most recent record for each key
> {{SELECT max(struct(timestamp, *)) as mostRecentRecord GROUP BY key}}
> to unnest the struct from above.
> {{SELECT mostRecentRecord.* FROM data}}
--
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