Uh oh!
There was an error while loading. Please reload this page.
[SQL] Minor: Introduce SchemaRDD#aggregate() for simple aggregations - #874
[SQL] Minor: Introduce SchemaRDD#aggregate() for simple aggregations#874aarondav wants to merge 2 commits into
Conversation
rdd.aggregate(Sum('val)) is just shorthand for
rdd.groupBy()(Sum('val)), but seems be more natural than
doing a groupBy with no grouping expressions when you
really just want an aggregation over all rows.
Did not add a JavaSchemaRDD or Python API, as these seem to
be lacking in several other methods like groupBy() already --
leaving that cleanup for future patches.There was a problem hiding this comment.
This example doesn't compile with the \ in there.
AmplabJenkins
commented
May 25, 2014
Merged build triggered. |
AmplabJenkins
commented
May 25, 2014
Merged build started. |
There was a problem hiding this comment.
Can you say in the scaladoc that this is equivalent to groupBy()(...) ?
rxin
commented
May 25, 2014
LGTM other than the small addition to scaladoc. |
AmplabJenkins
commented
May 25, 2014
Merged build finished. All automated tests passed. |
AmplabJenkins
commented
May 25, 2014
All automated tests passed. |
aarondav
commented
May 25, 2014
Added comment! |
AmplabJenkins
commented
May 25, 2014
Merged build triggered. |
AmplabJenkins
commented
May 25, 2014
Merged build started. |
rxin
commented
May 25, 2014
LGTM |
AmplabJenkins
commented
May 26, 2014
Merged build finished. All automated tests passed. |
AmplabJenkins
commented
May 26, 2014
All automated tests passed. |
rxin
commented
May 26, 2014
I've merged this into master & branch-1.0. |
```scala
rdd.aggregate(Sum('val))
```
is just shorthand for
```scala
rdd.groupBy()(Sum('val))
```
but seems be more natural than doing a groupBy with no grouping expressions when you really just want an aggregation over all rows.
Did not add a JavaSchemaRDD or Python API, as these seem to be lacking several other methods like groupBy() already -- leaving that cleanup for future patches.
Author: Aaron Davidson <aaron@databricks.com>
Closes#874 from aarondav/schemardd and squashes the following commits:
e9e68ee [Aaron Davidson] Add comment
db6afe2 [Aaron Davidson] Introduce SchemaRDD#aggregate() for simple aggregations
(cherry picked from commit c3576ff)
Signed-off-by: Reynold Xin <rxin@apache.org>```scala
rdd.aggregate(Sum('val))
```
is just shorthand for
```scala
rdd.groupBy()(Sum('val))
```
but seems be more natural than doing a groupBy with no grouping expressions when you really just want an aggregation over all rows.
Did not add a JavaSchemaRDD or Python API, as these seem to be lacking several other methods like groupBy() already -- leaving that cleanup for future patches.
Author: Aaron Davidson <aaron@databricks.com>
Closesapache#874 from aarondav/schemardd and squashes the following commits:
e9e68ee [Aaron Davidson] Add comment
db6afe2 [Aaron Davidson] Introduce SchemaRDD#aggregate() for simple aggregations```scala
rdd.aggregate(Sum('val))
```
is just shorthand for
```scala
rdd.groupBy()(Sum('val))
```
but seems be more natural than doing a groupBy with no grouping expressions when you really just want an aggregation over all rows.
Did not add a JavaSchemaRDD or Python API, as these seem to be lacking several other methods like groupBy() already -- leaving that cleanup for future patches.
Author: Aaron Davidson <aaron@databricks.com>
Closesapache#874 from aarondav/schemardd and squashes the following commits:
e9e68ee [Aaron Davidson] Add comment
db6afe2 [Aaron Davidson] Introduce SchemaRDD#aggregate() for simple aggregations
is just shorthand for
but seems be more natural than doing a groupBy with no grouping expressions when you really just want an aggregation over all rows.
Did not add a JavaSchemaRDD or Python API, as these seem to be lacking several other methods like groupBy() already -- leaving that cleanup for future patches.