Github user maropu commented on a diff in the pull request: https://github.com/apache/spark/pull/22270#discussion_r214351711 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala --- @@ -1464,12 +1465,14 @@ case class ArrayContains(left: Expression, right: Expression) nullSafeCodeGen(ctx, ev, (arr, value) => { val i = ctx.freshName("i") val getValue = CodeGenerator.getValue(arr, right.dataType, i) + val setIsNullCode = if (nullable) s"${ev.isNull} = true;" else "" + val unsetIsNullCode = if (nullable) s"${ev.isNull} = false;" else "" s""" for (int $i = 0; $i < $arr.numElements(); $i ++) { if ($arr.isNullAt($i)) { --- End diff -- (This is also not related to this pr though....) when `left.dataType.asInstanceOf[ArrayType].containsNull = false`, I think we don't need this condition `if ($arr.isNullAt($i)) {`?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org