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

    https://github.com/apache/spark/pull/22375#discussion_r222604455
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelper.scala
 ---
    @@ -69,11 +69,17 @@ trait ExpressionEvalHelper extends 
GeneratorDrivenPropertyChecks with PlanTestBa
     
       /**
        * Check the equality between result of expression and expected value, 
it will handle
    -   * Array[Byte], Spread[Double], MapData and Row.
    +   * Array[Byte], Spread[Double], MapData and Row. Also check whether 
exprNullable is true
    +   * if result of expression is null
        */
    -  protected def checkResult(result: Any, expected: Any, exprDataType: 
DataType): Boolean = {
    +  protected def checkResult(
    +      result: Any,
    +      expected: Any,
    +      exprDataType: DataType,
    +      exprNullable: Boolean): Boolean = {
         val dataType = UserDefinedType.sqlType(exprDataType)
     
    +    assert(result != null || exprNullable)
    --- End diff --
    
    Can we add a description which is more clear about the issue? Something 
like: `The result is null for a non-nullable expression`?


---

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

Reply via email to