diff options
author | Herman van Hovell <hvanhovell@databricks.com> | 2016-09-15 20:24:15 +0200 |
---|---|---|
committer | Herman van Hovell <hvanhovell@databricks.com> | 2016-09-15 20:24:15 +0200 |
commit | d403562eb4b5b1d804909861d3e8b75d8f6323b9 (patch) | |
tree | d83e7ca7f9f3508a44c8fa0f613e9a33d156c5d0 /sql/core/src/test/scala/org | |
parent | 5b8f7377d54f83b93ef2bfc2a01ca65fae6d3032 (diff) | |
download | spark-d403562eb4b5b1d804909861d3e8b75d8f6323b9.tar.gz spark-d403562eb4b5b1d804909861d3e8b75d8f6323b9.tar.bz2 spark-d403562eb4b5b1d804909861d3e8b75d8f6323b9.zip |
[SPARK-17114][SQL] Fix aggregates grouped by literals with empty input
## What changes were proposed in this pull request?
This PR fixes an issue with aggregates that have an empty input, and use a literals as their grouping keys. These aggregates are currently interpreted as aggregates **without** grouping keys, this triggers the ungrouped code path (which aways returns a single row).
This PR fixes the `RemoveLiteralFromGroupExpressions` optimizer rule, which changes the semantics of the Aggregate by eliminating all literal grouping keys.
## How was this patch tested?
Added tests to `SQLQueryTestSuite`.
Author: Herman van Hovell <hvanhovell@databricks.com>
Closes #15101 from hvanhovell/SPARK-17114-3.
Diffstat (limited to 'sql/core/src/test/scala/org')
0 files changed, 0 insertions, 0 deletions