Github user ueshin commented on a diff in the pull request: https://github.com/apache/spark/pull/23176#discussion_r237399670 --- 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 -- Thanks! yeah, I'm updating as @cloud-fan's idea. Also we can use `nullSafeCodeGen` for codegen path, I'll update it as well.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org