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

    https://github.com/apache/spark/pull/21484#discussion_r192564074
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -390,7 +390,7 @@ class Dataset[T] private[sql](
        */
       // This is declared with parentheses to prevent the Scala compiler from 
treating
       // `ds.toDF("1")` as invoking this toDF and then apply on the returned 
DataFrame.
    -  def toDF(): DataFrame = new Dataset[Row](sparkSession, queryExecution, 
RowEncoder(schema))
    +  def toDF(): DataFrame = new Dataset[Row](sparkSession, planWithBarrier, 
RowEncoder(schema))
    --- End diff --
    
    This will probably create a huge regression if you rerun the `DataFrame`. 
SparkPlans cache shuffle RDDs and we reuse previously executed shuffles when 
you re-run the frame.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to