Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20402#discussion_r164337457
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -62,7 +62,11 @@ import org.apache.spark.util.Utils
     
     private[sql] object Dataset {
       def apply[T: Encoder](sparkSession: SparkSession, logicalPlan: 
LogicalPlan): Dataset[T] = {
    -    new Dataset(sparkSession, logicalPlan, implicitly[Encoder[T]])
    +    val dataset = new Dataset(sparkSession, logicalPlan, 
implicitly[Encoder[T]])
    +    // Eagerly bind the encoder so we verify that the encoder matches the 
underlying
    +    // schema. The user will get an error if this is not the case.
    --- End diff --
    
    shall we do the same for `ofRows` below?


---

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

Reply via email to