GitHub user NarineK opened a pull request:
https://github.com/apache/spark/pull/12966
[SPARK-15196][SparkR] Add a wrapper for dapply(repartiition(col,...), ... )
## What changes were proposed in this pull request?
As mentioned in :
https://github.com/apache/spark/pull/12836#issuecomment-217338855
We would like to create a wrapper for: dapply(repartiition(col,...), ... )
This will allow to run aggregate functions on groups which are identified
by a list of grouping columns.
I called the wrapper method gapply. We can rename it if we want to call it
differently.
We could also have:
` setMethod("dapply", signature(x = "SparkDataFrame", func = "function",
schema = "structType", col = "Column"),` , however, dapply already has many
examples in the doc and if we add new examples for aggregate functions that
will make the documentation longer and less clear.
## How was this patch tested?
Unit tests
1. Group by a column and compute mean
2. Group by a column and train linear model
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/NarineK/spark repartitionWithDapply
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/12966.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 #12966
----
commit be5de6a42e50c42b4af15b87623bc7b49aecb353
Author: NarineK <[email protected]>
Date: 2016-05-06T21:51:35Z
Add a wrapper for dapply(repartiition(col,...), ... )
----
---
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]