Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.2.1
-
None
Description
In current implementation of RDD.take, we overestimate the number of partitions we need to try by 50%:
`(1.5 * num * partsScanned / buf.size).toInt`
However, when the number is small, the result of `.toInt` is not what we want.
E.g, 2.9 will become 2, which should be 3.
Use math.Ceil fix the problem.