diff options
author | petermaxlee <petermaxlee@gmail.com> | 2016-08-21 00:25:55 +0800 |
---|---|---|
committer | Wenchen Fan <wenchen@databricks.com> | 2016-08-21 00:25:55 +0800 |
commit | 9560c8d29542a5dcaaa07b7af9ef5ddcdbb5d14d (patch) | |
tree | 388d35f3f0833bbd2a653ad22f185569b55ed12b /bin/spark-shell2.cmd | |
parent | 31a015572024046f4deaa6cec66bb6fab110f31d (diff) | |
download | spark-9560c8d29542a5dcaaa07b7af9ef5ddcdbb5d14d.tar.gz spark-9560c8d29542a5dcaaa07b7af9ef5ddcdbb5d14d.tar.bz2 spark-9560c8d29542a5dcaaa07b7af9ef5ddcdbb5d14d.zip |
[SPARK-17124][SQL] RelationalGroupedDataset.agg should preserve order and allow multiple aggregates per column
## What changes were proposed in this pull request?
This patch fixes a longstanding issue with one of the RelationalGroupedDataset.agg function. Even though the signature accepts vararg of pairs, the underlying implementation turns the seq into a map, and thus not order preserving nor allowing multiple aggregates per column.
This change also allows users to use this function to run multiple different aggregations for a single column, e.g.
```
agg("age" -> "max", "age" -> "count")
```
## How was this patch tested?
Added a test case in DataFrameAggregateSuite.
Author: petermaxlee <petermaxlee@gmail.com>
Closes #14697 from petermaxlee/SPARK-17124.
Diffstat (limited to 'bin/spark-shell2.cmd')
0 files changed, 0 insertions, 0 deletions