Zawa-ll commented on code in PR #47246: URL: https://github.com/apache/spark/pull/47246#discussion_r1669379107
########## 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] { + override def compare(x: Any, y: Any): Int = { + (x, y) match { + // Handle comparison when the left side is a String and the right side is an Integer + case (xs: String, yi: Int) => xs.toIntOption match { Review Comment: Thank you Masykus! I've updated the comparison logic to always convert the integer to a string before performing the comparison, you can check it in the latest commit! -- 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