Uh oh!
There was an error while loading. Please reload this page.
[SPARK-16391][SQL] KeyValueGroupedDataset.reduceGroups should support partial aggregation - #14222
[SPARK-16391][SQL] KeyValueGroupedDataset.reduceGroups should support partial aggregation#14222viirya wants to merge 3 commits into
Conversation
| implicit val resultEncoder = ExpressionEncoder.tuple(kExprEnc, vExprEnc) | ||
| flatMapGroups(func) | ||
| def zero: (Int, V) = (0, null.asInstanceOf[V]) |
There was a problem hiding this comment.
One problem with Aggregator here is the zero value. This PR uses an Int (can be Boolean too) to indicate if the buffer is initialized.
There was a problem hiding this comment.
pull this out to be a generic ReduceAggregator and add unit test for it?
SparkQA
commented
Jul 15, 2016
Test build #62375 has finished for PR 14222 at commit
|
koertkuipers
commented
Jul 18, 2016
there is a usefulness to this |
4ba124c to
7e8d8c1CompareSparkQA
commented
Jul 18, 2016
Test build #62454 has finished for PR 14222 at commit
|
SparkQA
commented
Jul 18, 2016
Test build #62456 has finished for PR 14222 at commit
|
ping @rxin The change is ok for you? Please review this. Thanks. |
| import org.apache.spark.sql.catalyst.encoders.ExpressionEncoder | ||
| import org.apache.spark.sql.expressions.ReduceAggregator | ||
| class ReduceAggregatorSuite extends SparkFunSuite { |
There was a problem hiding this comment.
just put this in DatasetAggregatorSuite
There was a problem hiding this comment.
Do I need to update this as you want to take over it?
rxin
commented
Jul 19, 2016
@viirya I'm going to take over the PR and play with the API a little bit. |
viirya
commented
Jul 19, 2016
Ok. |
SparkQA
commented
Jul 20, 2016
Test build #62594 has finished for PR 14222 at commit
|
viirya
commented
Jul 21, 2016
@rxin Any thing I need to update for this? Thanks. |
viirya
commented
Jul 25, 2016
ping @rxin |
viirya
commented
Aug 9, 2016
ping @rxin any thoughts on this? It is waiting for a while. Thanks. |
[SPARK-16391][SQL] KeyValueGroupedDataset.reduceGroups should support partial aggregation
rxin
commented
Aug 10, 2016
I've created a pr here for discussion, based on my playing with the API: #14576 |
viirya
commented
Aug 19, 2016
Close this now since the pr #14576 is merged. |
What changes were proposed in this pull request?
KeyValueGroupedDataset.reduceGroupsis currently implemented viaflatMapGroups, which does not support partial aggregation and so is very inefficient.KeyValueGroupedDataset.reduceGroupsshould support partial aggregation. This PR implements it withAggregator.How was this patch tested?
Existing tests.