You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/02/19 02:14:10 UTC

[GitHub] [calcite] chunweilei commented on a change in pull request #1814: [CALCITE-3804] Use RelCollation interface in RelCollationImpl compareTo and satisfies methods

chunweilei commented on a change in pull request #1814: [CALCITE-3804] Use RelCollation interface in RelCollationImpl compareTo and satisfies methods
URL: https://github.com/apache/calcite/pull/1814#discussion_r381042482
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/RelCollationImpl.java
 ##########
 @@ -97,9 +96,11 @@ public boolean isTop() {
   }
 
   public int compareTo(@Nonnull RelMultipleTrait o) {
-    final RelCollationImpl that = (RelCollationImpl) o;
-    final UnmodifiableIterator<RelFieldCollation> iterator =
-        that.fieldCollations.iterator();
+    if (this == o) {
+      return 0;
+    }
+    final RelCollation that = (RelCollation) o;
 
 Review comment:
   Agree with @zabetak .

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services