amaliujia commented on a change in pull request #2006:
URL: https://github.com/apache/calcite/pull/2006#discussion_r437126855
##########
File path:
core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableMergeJoin.java
##########
@@ -101,28 +103,55 @@ public static boolean isMergeJoinSupported(JoinRelType
joinType) {
// Required collation keys can be subset or superset of merge join keys.
RelCollation collation = required.getTrait(RelCollationTraitDef.INSTANCE);
List<Integer> reqKeys = RelCollations.ordinals(collation);
- ImmutableBitSet reqKeySet = ImmutableBitSet.of(reqKeys);
+ // need to copy reqKeys because it is not sortable.
+ reqKeys = new ArrayList<>(reqKeys);
Review comment:
`isPrefixOrderingNotRequired` sorts its input, and reqKeys is used as
this function's parameter below.
But since you have suggested `RelCollations.containsOrderless`, I might not
need this anymore.
----------------------------------------------------------------
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]