spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viirya <...@git.apache.org>
Subject [GitHub] spark pull request #19899: [SPARK-22704][SQL] Least and Greatest use less gl...
Date Wed, 06 Dec 2017 04:40:21 GMT
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19899#discussion_r155145453
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
---
    @@ -602,23 +602,36 @@ case class Least(children: Seq[Expression]) extends Expression {
     
       override def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = {
         val evalChildren = children.map(_.genCode(ctx))
    -    ctx.addMutableState(ctx.JAVA_BOOLEAN, ev.isNull)
    -    ctx.addMutableState(ctx.javaType(dataType), ev.value)
    -    def updateEval(eval: ExprCode): String = {
    +    val isNull = ctx.freshName("isNull")
    --- End diff --
    
    `greatestTmpIsNull`?


---

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


Mime
View raw message