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

    https://github.com/apache/spark/pull/20637#discussion_r212621229
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelper.scala
 ---
    @@ -223,8 +223,9 @@ trait ExpressionEvalHelper extends 
GeneratorDrivenPropertyChecks with PlanTestBa
               }
             } else {
               val lit = InternalRow(expected, expected)
    +          val dtAsNullable = expression.dataType.asNullable
    --- End diff --
    
    Without this change (`asNullable`), `NullPointerException` occurs if 
`expected` has `null` for a primitive type (e.g. `int`).
    If you run `"MapZipWith"` test suite without this PR, you can see 
`NullPointerException`. If you run `"MapZipWith"` with [the 
PR](https://github.com/apache/spark/pull/22126), you can see the failure (i.e. 
hidden potential bug).


---

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

Reply via email to