rubenada commented on a change in pull request #2006:
URL: https://github.com/apache/calcite/pull/2006#discussion_r472941179



##########
File path: core/src/main/java/org/apache/calcite/rel/RelCollations.java
##########
@@ -227,6 +247,21 @@ public static boolean containsOrderless(List<RelCollation> 
collations,
     return false;
   }
 
+  /**
+   * Returns whether one of a list of collations is contained by the given 
list of keys
+   * regardless the order.
+   */
+  public static boolean keysContainCollationsOrderless(
+      List<Integer> keys,  List<RelCollation> collations) {
+    final List<Integer> distinctKeys = Util.distinctList(keys);

Review comment:
       Given that `containsOrderless` already does a `Util.distinctList(keys)`, 
we could skip it here.
   The same applies to `collationsContainKeysOrderless`




----------------------------------------------------------------
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:
[email protected]


Reply via email to