Github user viirya commented on a diff in the pull request: https://github.com/apache/spark/pull/23176#discussion_r237397442 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala --- @@ -367,11 +367,29 @@ case class InSet(child: Expression, hset: Set[Any]) extends UnaryExpression with } @transient lazy val set: Set[Any] = child.dataType match { - case _: AtomicType => hset + case t: AtomicType if !t.isInstanceOf[BinaryType] => hset case _: NullType => hset case _ => + val ord = TypeUtils.getInterpretedOrdering(child.dataType) + val ordering = if (hasNull) { + new Ordering[Any] { + override def compare(x: Any, y: Any): Int = { --- End diff -- InSet overrides nullSafeEval, and for codegen we look into `set` only if `!ev.isNull`, so I think we only need to consider the case one side is null.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org