Jackie-Jiang commented on code in PR #14313:
URL: https://github.com/apache/pinot/pull/14313#discussion_r1819878344


##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/EqualityUtils.java:
##########
@@ -156,9 +156,12 @@ public static boolean isEqualIgnoreOrder(@Nullable List 
left, @Nullable List rig
 
   public static boolean isEqualSet(@Nullable Set left, @Nullable Set right) {
     if (left != null && right != null) {
-      return isEqualIgnoreOrder(Arrays.asList(left.toArray()), 
Arrays.asList(right.toArray()));
+      if (left.size() != right.size()) {
+        return false;
+      }
+      return left.containsAll(right) && right.containsAll(left);

Review Comment:
   When they are the same size, checking one side contains all of the other 
side should be enough



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to