Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/21611
  
    In `ExpressionEncoder.apply`, we have
    ```
        val flat = !ScalaReflection.definedByConstructorParams(tpe)
    
        val inputObject = BoundReference(0, ScalaReflection.dataTypeFor[T], 
nullable = !cls.isPrimitive)
        val nullSafeInput = if (flat) {
          inputObject
        } else {
          // For input object of Product type, we can't encode it to row if 
it's null, as Spark SQL
          // doesn't allow top-level row to be null, only its columns can be 
null.
          AssertNotNull(inputObject, Seq("top level Product input object"))
        }
    ```
    
    does it mean we will not have the null check for `Option[Int]`?


---

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

Reply via email to