Github user aarondav commented on a diff in the pull request:
https://github.com/apache/spark/pull/3553#discussion_r21213023
--- Diff:
core/src/main/scala/org/apache/spark/shuffle/hash/HashShuffleReader.scala ---
@@ -45,7 +45,7 @@ private[spark] class HashShuffleReader[K, C](
} else {
new InterruptibleIterator(context,
dep.aggregator.get.combineValuesByKey(iter, context))
}
- } else if (dep.aggregator.isEmpty && dep.mapSideCombine) {
+ } else if (dep.mapSideCombine) {
--- End diff --
Could also write this as
```scala
if (dep.aggregator.isDefined) {
...
} else {
require(!dep.mapSideCombine, "Map-side combine requested without
Aggregator specified!")
// Convert the Product2s to pairs since this is what downstream RDDs
currently expect
iter.asInstanceOf[Iterator[Product2[K, C]]].map(pair => (pair._1,
pair._2))
}
```
---
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]