Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19901#discussion_r155169114
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/nullExpressions.scala
---
@@ -72,16 +72,16 @@ case class Coalesce(children: Seq[Expression]) extends
Expression {
}
override def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = {
- ctx.addMutableState(ctx.JAVA_BOOLEAN, ev.isNull)
- ctx.addMutableState(ctx.javaType(dataType), ev.value)
+ val coalesceTmpIsNull = ctx.freshName("coalesceTmpIsNull")
--- End diff --
nit: `val tmpIsNull = ctx.freshName("coalesceTmpIsNull")`, to be consistent
with
https://github.com/apache/spark/pull/19901/files#diff-a966ee88604a834221e82916ec051d7dR190
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]