GitHub user brkyvz opened a pull request:
https://github.com/apache/spark/pull/7945
[SPARK-9615][SPARK-9616][SQL][MLLIB] Bugs related to FrequentItems when
merging and with Tungsten
In short:
1- FrequentItems should not use the InternalRow representation, because the
keys in the map get messed up. For example, every key in the Map correspond to
the very last element observed in the partition, when the elements are strings.
2- Merging two partitions had a bug:
**Existing behavior with size 3**
Partition A -> Map(1 -> 3, 2 -> 3, 3 -> 4)
Partition B -> Map(4 -> 25)
Result -> Map()
**Correct Behavior:**
Partition A -> Map(1 -> 3, 2 -> 3, 3 -> 4)
Partition B -> Map(4 -> 25)
Result -> Map(3 -> 1, 4 -> 22)
cc @mengxr @rxin @JoshRosen
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/brkyvz/spark freq-fix
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/7945.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 #7945
----
commit 47bfd505ffeeb5cb8e693912bf701f6d54f0ce99
Author: Burak Yavuz <[email protected]>
Date: 2015-08-03T01:17:04Z
pushing
commit 506753e1c12d274040ab2fcabfe72d84befee14c
Author: Burak Yavuz <[email protected]>
Date: 2015-08-04T21:41:48Z
fixed and added reg test
----
---
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]