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/05/14 02:54:23 UTC

[GitHub] [calcite] hsyuan commented on a change in pull request #1973: [CALCITE-3993] Add utility methods to RelTrait, RelDistribution and RelCollation

hsyuan commented on a change in pull request #1973:
URL: https://github.com/apache/calcite/pull/1973#discussion_r424842177



##########
File path: core/src/main/java/org/apache/calcite/plan/RelTraitSet.java
##########
@@ -417,13 +420,34 @@ public int size() {
    * @return true if traits are equal and in the same order, false otherwise
    */
   @Override public boolean equals(Object obj) {
-    return this == obj
-        || obj instanceof RelTraitSet
-        && Arrays.equals(traits, ((RelTraitSet) obj).traits);
+    if (this == obj) {

Review comment:
       Given that the RelTraitSet is always canonized, can we just `return this == obj;` here?




----------------------------------------------------------------
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