abhiips07 commented on code in PR #47246: URL: https://github.com/apache/spark/pull/47246#discussion_r1668128304
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala: ########## @@ -998,10 +998,27 @@ abstract class BinaryComparison extends BinaryOperator with Predicate { } } - protected lazy val ordering: Ordering[Any] = TypeUtils.getInterpretedOrdering(left.dataType) + protected lazy val ordering: Ordering[Any] = new Ordering[Any] { Review Comment: ```suggestion protected lazy val ordering: Ordering[Any] = new Ordering[Any] { override def compare(x: Any, y: Any): Int = { (x, y) match { case (xs: String, yi: Int) => xs.compareTo(yi.toString) case (xi: Int, ys: String) => xi.toString.compareTo(ys) case _ => TypeUtils.getInterpretedOrdering(left.dataType).compare(x, y) } } } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org