Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kiszk committed Dec 6, 2017
1 parent d322931 commit facaf1c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ case class Least(children: Seq[Expression]) extends Expression {

override def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = {
val evalChildren = children.map(_.genCode(ctx))
val isNull = ctx.freshName("isNull")
val isNull = ctx.freshName("leastTmpIsNull")
ctx.addMutableState(ctx.JAVA_BOOLEAN, isNull)
val evals = evalChildren.map(eval =>
s"""
Expand Down Expand Up @@ -631,7 +631,7 @@ case class Least(children: Seq[Expression]) extends Expression {
$isNull = true;
${ctx.javaType(dataType)} ${ev.value} = ${ctx.defaultValue(dataType)};
$codes
boolean ${ev.isNull} = $isNull;""")
final boolean ${ev.isNull} = $isNull;""")
}
}

Expand Down Expand Up @@ -710,6 +710,6 @@ case class Greatest(children: Seq[Expression]) extends Expression {
$isNull = true;
${ctx.javaType(dataType)} ${ev.value} = ${ctx.defaultValue(dataType)};
$codes
boolean ${ev.isNull} = $isNull;""")
final boolean ${ev.isNull} = $isNull;""")
}
}

0 comments on commit facaf1c

Please sign in to comment.