diff options
author | Takeshi YAMAMURO <linguin.m.s@gmail.com> | 2016-08-27 08:42:41 +0100 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-08-27 08:42:41 +0100 |
commit | cd0ed31ea9965563a9b1ea3e8bfbeaf8347cacd9 (patch) | |
tree | 6cbe696a14d6bf8aadf9e2ebcd75a089fd3e998c /mllib-local/src | |
parent | 718b6bad2d698b76be6906d51da13626e9f3890e (diff) | |
download | spark-cd0ed31ea9965563a9b1ea3e8bfbeaf8347cacd9.tar.gz spark-cd0ed31ea9965563a9b1ea3e8bfbeaf8347cacd9.tar.bz2 spark-cd0ed31ea9965563a9b1ea3e8bfbeaf8347cacd9.zip |
[SPARK-15382][SQL] Fix a bug in sampling with replacement
## What changes were proposed in this pull request?
This pr to fix a bug below in sampling with replacement
```
val df = Seq((1, 0), (2, 0), (3, 0)).toDF("a", "b")
df.sample(true, 2.0).withColumn("c", monotonically_increasing_id).select($"c").show
+---+
| c|
+---+
| 0|
| 1|
| 1|
| 1|
| 2|
+---+
```
## How was this patch tested?
Added a test in `DataFrameSuite`.
Author: Takeshi YAMAMURO <linguin.m.s@gmail.com>
Closes #14800 from maropu/FixSampleBug.
Diffstat (limited to 'mllib-local/src')
0 files changed, 0 insertions, 0 deletions