Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/15929#discussion_r88770432 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala --- @@ -481,8 +481,13 @@ class CodegenContext { case FloatType => s"(java.lang.Float.isNaN($c1) && java.lang.Float.isNaN($c2)) || $c1 == $c2" case DoubleType => s"(java.lang.Double.isNaN($c1) && java.lang.Double.isNaN($c2)) || $c1 == $c2" case dt: DataType if isPrimitiveType(dt) => s"$c1 == $c2" + case dt: DataType if dt.isInstanceOf[AtomicType] => s"$c1.equals($c2)" + case array: ArrayType => genComp(array, c1, c2) + " == 0" + case struct: StructType => genComp(struct, c1, c2) + " == 0" --- End diff -- : ) That is a fun discussion. Also accidentally found how Preso did it in a PR: https://github.com/prestodb/presto/pull/2469/files
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org