Github user srowen commented on the pull request:
https://github.com/apache/spark/pull/4634#issuecomment-74643730
@sryza The logical difference is small. `aggregateByKey` is for when you
have a single immutable 'zero' value to start from for each key. `combineByKey`
lets this be a function, and of the first value. That is useful, for example,
if I were trying to combine into a `mutable.Set` since I need to make a
different one for each key. Whether or not it was worth different methods in
retrospect, I don't know, but that much seems OK since they're there already.
The rest of the difference is just that `combineByKey` exposes control over
map side combine and serializer. That is a little more internal. If there is
clear evidence this should have been a developer API then I'd say at least we
can not open it up in the Java API. But is that clear? Otherwise I'd say, well,
let's at least shoot for consistency.
---
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]