Github user kiszk commented on a diff in the pull request: https://github.com/apache/spark/pull/19418#discussion_r142844714 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala --- @@ -697,7 +697,14 @@ class CodegenContext { } """ s"${addNewFunction(compareFunc, funcCode)}($c1, $c2)" - case other if other.isInstanceOf[AtomicType] => s"$c1.compare($c2)" + case other if other.isInstanceOf[AtomicType] => + s""" + if ($c1.getClass.getMethods.map(_.getName).filter(_ matches "compare").size == 1) { + $c1.compare($c2) --- End diff -- +1
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org