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

    https://github.com/apache/spark/pull/22375#discussion_r223205359
  
    --- 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 --
    
    yes, I just meant that here we are checking the result and we are doing the 
same after too. Shouldn't we just add an assert for `unsafeRow.get(0, dataType) 
!= null || expression.nullable` here instead?


---

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

Reply via email to