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

    https://github.com/apache/spark/pull/22375#discussion_r223783598
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelper.scala
 ---
    @@ -221,6 +227,12 @@ trait ExpressionEvalHelper extends 
GeneratorDrivenPropertyChecks with PlanTestBa
             val unsafeRow = evaluateWithUnsafeProjection(expression, inputRow)
             val input = if (inputRow == EmptyRow) "" else s", input: $inputRow"
     
    +        val dataType = expression.dataType
    +        if (!checkResult(unsafeRow.get(0, dataType), expected, dataType, 
expression.nullable)) {
    --- End diff --
    
    I think `checkResult` already validates `expression` according to the 
nullability of the given expression at 1. Thus, if the `expected` is not 
correct, 2. will detect an incorrect point.


---

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

Reply via email to