Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/19720#discussion_r150423454
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/nullExpressions.scala
---
@@ -357,7 +358,8 @@ case class AtLeastNNonNulls(n: Int, children:
Seq[Expression]) extends Predicate
override def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = {
val nonnull = ctx.freshName("nonnull")
- val code = children.map { e =>
+ ctx.addMutableState("int", nonnull, s"")
--- End diff --
thanks! Anyway, I am refactoring this, since I figured out a way to avoid
the declaration of a global attribute. I can't do the same for coalesce
unfortunately, because there I'd need to return two values from the methods.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]