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

    https://github.com/apache/spark/pull/15901#discussion_r88684544
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
 ---
    @@ -164,23 +233,20 @@ case class Invoke(
           """
         }
     
    -    val setIsNull = if (propagateNull && arguments.nonEmpty) {
    -      s"boolean ${ev.isNull} = ${obj.isNull} || 
${argGen.map(_.isNull).mkString(" || ")};"
    -    } else {
    -      s"boolean ${ev.isNull} = ${obj.isNull};"
    -    }
    -
         // If the function can return null, we do an extra check to make sure 
our null bit is still set
         // correctly.
         val postNullCheck = if (ctx.defaultValue(dataType) == "null") {
           s"${ev.isNull} = ${ev.value} == null;"
         } else {
           ""
         }
    +
         val code = s"""
           ${obj.code}
    -      ${argGen.map(_.code).mkString("\n")}
    -      $setIsNull
    +      if (!${obj.isNull}) {
    +        $argCode
    +      }
    +      boolean ${ev.isNull} = ${obj.isNull} || $resultIsNull;
    --- End diff --
    
    I see. Let's see if it exceeds the limit or not, using local variables.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to