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

    https://github.com/apache/spark/pull/19813#discussion_r156057427
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
 ---
    @@ -1001,16 +1039,25 @@ class CodegenContext {
         commonExprs.foreach { e =>
           val expr = e.head
           val fnName = freshName("evalExpr")
    -      val isNull = s"${fnName}IsNull"
    +      val isNull = if (expr.nullable) {
    +        s"${fnName}IsNull"
    +      } else {
    +        ""
    +      }
           val value = s"${fnName}Value"
     
           // Generate the code for this expression tree and wrap it in a 
function.
           val eval = expr.genCode(this)
    +      val nullValue = if (expr.nullable) {
    --- End diff --
    
    nit: `assignIsNull`


---

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

Reply via email to