Github user kiszk commented on a diff in the pull request:
https://github.com/apache/spark/pull/19733#discussion_r151475305
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
---
@@ -236,24 +236,34 @@ case class In(value: Expression, list:
Seq[Expression]) extends Predicate {
override def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = {
val valueGen = value.genCode(ctx)
val listGen = list.map(_.genCode(ctx))
+ ctx.addMutableState("boolean", ev.value, "")
+ ctx.addMutableState("boolean", ev.isNull, "")
--- End diff --
Yes if we call `ctx.splitExpressions`. One is to keep a value, the other is
to keep nullability.
Is it better to avoid to create 2 mutable if we will not call
`ctx.splitExpressions` (i.e. `!(ctx.INPUT_ROW != null && ctx.currentVars ==
null)))?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]