mihaibudiu commented on code in PR #4089:
URL: https://github.com/apache/calcite/pull/4089#discussion_r1882519650


##########
core/src/main/java/org/apache/calcite/rel/metadata/RelMdUniqueKeys.java:
##########
@@ -184,10 +213,14 @@ private static Set<ImmutableBitSet> 
getProjectUniqueKeys(SingleRel rel, RelMetad
       // the resulting unique keys would be {{0},{4}}, {{1},{4}}
 
       Iterable<List<Integer>> product = Linq4j.product(Util.transform(colMask, 
mapInToOutPos::get));
-
-      resultBuilder.addAll(Util.transform(product, ImmutableBitSet::of));
+      for (List<Integer> passKey : product) {

Review Comment:
   Using hashset is not problematic, what may be problematic is getting a 
different set of unique keys for the same relation for each new run of the same 
program.



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