guestli commented on code in PR #3375:
URL: https://github.com/apache/calcite/pull/3375#discussion_r1309553303


##########
core/src/main/java/org/apache/calcite/util/Util.java:
##########
@@ -2166,6 +2167,24 @@ public static <E> boolean isDistinct(List<E> list) {
     return firstDuplicate(list) < 0;
   }
 
+
+  /**
+   * Returns whether the elements of {@code list} are distinct according to a 
given
+   * case-sensitivity policy.
+   */
+  public static boolean isDistinct(List<String> list, boolean caseSensitive) {
+    if (caseSensitive) {
+      return isDistinct(list);
+    }
+    final Set<String> set = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);

Review Comment:
   @julianhyde Thank you for taking the time to review, and please review it 
again.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to