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