Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19813#discussion_r156057964
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
 ---
    @@ -105,6 +105,11 @@ abstract class Expression extends TreeNode[Expression] 
{
           val isNull = ctx.freshName("isNull")
           val value = ctx.freshName("value")
           val eval = doGenCode(ctx, ExprCode("", isNull, value))
    +
    +      // Records current input row and variables of this expression.
    +      eval.inputRow = ctx.INPUT_ROW
    +      eval.inputVars = findInputVars(ctx, eval)
    --- End diff --
    
    actually we can be more aggresive and do `val isNull = if (this.nullable) 
eval.isNull else "false"`, and see if there is any compile errors.


---

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

Reply via email to