Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/16719#discussion_r98345869 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Canonicalize.scala --- @@ -78,14 +78,18 @@ object Canonicalize extends { case GreaterThanOrEqual(l, r) if l.hashCode() > r.hashCode() => LessThanOrEqual(r, l) case LessThanOrEqual(l, r) if l.hashCode() > r.hashCode() => GreaterThanOrEqual(r, l) - case Not(GreaterThan(l, r)) if l.hashCode() > r.hashCode() => GreaterThan(r, l) - case Not(GreaterThan(l, r)) => LessThanOrEqual(l, r) - case Not(LessThan(l, r)) if l.hashCode() > r.hashCode() => LessThan(r, l) - case Not(LessThan(l, r)) => GreaterThanOrEqual(l, r) - case Not(GreaterThanOrEqual(l, r)) if l.hashCode() > r.hashCode() => GreaterThanOrEqual(r, l) - case Not(GreaterThanOrEqual(l, r)) => LessThan(l, r) - case Not(LessThanOrEqual(l, r)) if l.hashCode() > r.hashCode() => LessThanOrEqual(r, l) - case Not(LessThanOrEqual(l, r)) => GreaterThan(l, r) + case Not(GreaterThan(l, r)) => + assert(l.hashCode() <= r.hashCode()) --- End diff -- It should be fine to get rid of `assert`, as long as we add the code comments and the needed test cases.
--- 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