diff options
author | Liang-Chi Hsieh <simonh@tw.ibm.com> | 2016-04-01 14:02:32 -0700 |
---|---|---|
committer | Davies Liu <davies.liu@gmail.com> | 2016-04-01 14:02:32 -0700 |
commit | 3e991dbc310a4a33eec7f3909adce50bf8268d04 (patch) | |
tree | fde4fe5795f815d06f5be22020618d52411ec0ae /core/src/main/scala/org | |
parent | 1b829ce13990b40fd8d7c9efcc2ae55c4dbc861c (diff) | |
download | spark-3e991dbc310a4a33eec7f3909adce50bf8268d04.tar.gz spark-3e991dbc310a4a33eec7f3909adce50bf8268d04.tar.bz2 spark-3e991dbc310a4a33eec7f3909adce50bf8268d04.zip |
[SPARK-13674] [SQL] Add wholestage codegen support to Sample
JIRA: https://issues.apache.org/jira/browse/SPARK-13674
## What changes were proposed in this pull request?
Sample operator doesn't support wholestage codegen now. This pr is to add support to it.
## How was this patch tested?
A test is added into `BenchmarkWholeStageCodegen`. Besides, all tests should be passed.
Author: Liang-Chi Hsieh <simonh@tw.ibm.com>
Author: Liang-Chi Hsieh <viirya@gmail.com>
Closes #11517 from viirya/add-wholestage-sample.
Diffstat (limited to 'core/src/main/scala/org')
-rw-r--r-- | core/src/main/scala/org/apache/spark/util/random/RandomSampler.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/util/random/RandomSampler.scala b/core/src/main/scala/org/apache/spark/util/random/RandomSampler.scala index 2921b939bc..d397cca4b4 100644 --- a/core/src/main/scala/org/apache/spark/util/random/RandomSampler.scala +++ b/core/src/main/scala/org/apache/spark/util/random/RandomSampler.scala @@ -186,7 +186,7 @@ class BernoulliSampler[T: ClassTag](fraction: Double) extends RandomSampler[T, T * @tparam T item type */ @DeveloperApi -class PoissonSampler[T: ClassTag]( +class PoissonSampler[T]( fraction: Double, useGapSamplingIfPossible: Boolean) extends RandomSampler[T, T] { |