GitHub user nongli opened a pull request:
https://github.com/apache/spark/pull/9343
[SPARK-11329] [SQL] Support star expansion for structs.
1. Supporting expanding structs in Projections. i.e.
"SELECT s.*" where s is a struct type.
This is fixed by allowing the expand function to handle structs in
addition to tables.
2. Supporting expanding * inside aggregate functions of structs.
"SELECT max(struct(col1, structCol.*))"
This requires recursively expanding the expressions. In this case, it it
the aggregate
expression "max(...)" and we need to recursively expand its children
inputs.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/nongli/spark spark-11329
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/9343.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #9343
----
commit 54e155e537ef7ab7d03d8c2a7877b91839089458
Author: Nong Li <[email protected]>
Date: 2015-10-28T19:19:57Z
[SPARK-11329] [SQL] Support star expansion for structs.
1. Supporting expanding structs in Projections. i.e.
"SELECT s.*" where s is a struct type.
This is fixed by allowing the expand function to handle structs in
addition to tables.
2. Supporting expanding * inside aggregate functions of structs.
"SELECT max(struct(col1, structCol.*))"
This requires recursively expanding the expressions. In this case, it it
the aggregate
expression "max(...)" and we need to recursively expand its children
inputs.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]