Github user smartnut007 commented on a diff in the pull request:
https://github.com/apache/spark/pull/462#discussion_r11814604
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/SchemaRDD.scala ---
@@ -256,10 +256,11 @@ class SchemaRDD(
* @group Query
*/
@Experimental
+ override
def sample(
- fraction: Double,
withReplacement: Boolean = true,
- seed: Int = (math.random * 1000).toInt) =
+ fraction: Double,
+ seed: Long) =
--- End diff --
Scala does not allow multiple overloaded methods to have default params.
So, if we makde seed default in RDD.sample, then this had to be modified. So,
modified it in a standard way. Also, I believe the author intended to overrride
RDD.sample and not overload. More details on the PR comment.
---
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.
---