Github user dbtsai commented on a diff in the pull request: https://github.com/apache/spark/pull/23171#discussion_r237227892 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala --- @@ -335,6 +343,41 @@ case class In(value: Expression, list: Seq[Expression]) extends Predicate { """.stripMargin) } + private def genCodeWithSwitch(ctx: CodegenContext, ev: ExprCode): ExprCode = { + val (nullLiterals, nonNullLiterals) = list.partition { + case Literal(null, _) => true + case _ => false + } --- End diff -- If there is null in the list, it will be only one. As a result, we may not need to use `nullLiterals`. ```scala val containNullInList = ... val nonNullLiterals = ... ```
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org