GitHub user viirya opened a pull request:
https://github.com/apache/spark/pull/9115
[SPARK-11027][SQL] Better group distinct columns in query compilation for
aggregation query
JIRA: https://issues.apache.org/jira/browse/SPARK-11027
Currently, for a query like:
SELECT sum(distinct value1), kEY - 100, count(distinct value1) FROM
agg2 GROUP BY Key - 100
We will treat it as having two distinct columns because sum is working on a
cast of value1. We can ignore cast expression for such cases to have just one
distinct column.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/viirya/spark-1 better-group-distinct
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/9115.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 #9115
----
commit 1b025f87bc8b902d04085ee78b9bd75f38dcf493
Author: Liang-Chi Hsieh <[email protected]>
Date: 2015-10-14T10:42:16Z
When count for the number of distinct columns, we should ignore Cast
expression.
commit f5ebbf66ca2d427f55f91f3b265ae0f2ee115b55
Author: Liang-Chi Hsieh <[email protected]>
Date: 2015-10-14T10:48:52Z
Fix scala style.
----
---
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]