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

    https://github.com/apache/spark/pull/20637#discussion_r212832157
  
    --- 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 asNullable the test fails with NullPointerException (it is 
not passing unexpectedly).
    
    As I wrote 
[here](https://github.com/apache/spark/pull/20637#discussion_r212805339) as 
`The unexpected test pass can be recreated without #22126 and with #20367 by 
removing asNullable.`, the following behavior occurs without #22126,
    
    * Using this `asNullable`: this test fails since the result of `MapZipWith` 
is incorrect
    * Without this `asNullable` the test passes while the result of 
`MapZipWith` is incorrect
    
    The second one is `not` right behavior. Without `asNullable`, we will have 
the risk of non-detecting error situation. Therefore, I introduced `asNullable`.



---

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

Reply via email to