Github user dilipbiswal commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22270#discussion_r216009774
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala 
---
    @@ -1729,10 +1730,8 @@ class DataFrameSuite extends QueryTest with 
SharedSQLContext {
       }
     
       test("SPARK-9083: sort with non-deterministic expressions") {
    -    import org.apache.spark.util.random.XORShiftRandom
    -
         val seed = 33
    -    val df = (1 to 100).map(Tuple1.apply).toDF("i")
    +    val df = (1 to 100).map(Tuple1.apply).toDF("i").repartition(1)
    --- End diff --
    
    @cloud-fan I was just trying get this test case to pass when 
`ConvertToLocalRelation` is enabled as well as disabled. So when this rule is 
active, i saw that all the calls to random.nextXXX happens in one thread. When 
this rule is disabled, the random values get evaluated under the `project` 
operator and gets called from multiple threads. Thats why i am repartitioning 
the data frame to enforce single threaded execution. Is this not the right 
thing to do ? Please let me know ..


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to