Github user amansinha100 commented on a diff in the pull request: https://github.com/apache/drill/pull/1117#discussion_r167442088 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/JoinPruleBase.java --- @@ -246,4 +246,17 @@ public RelNode convertChild(final DrillJoinRel join, final RelNode rel) throws } + // DRILL-6089 make sure no collations are added to HashJoin + public static RelTraitSet removeCollation(RelTraitSet traitSet, RelOptRuleCall call) + { + RelTraitSet newTraitSet = call.getPlanner().emptyTraitSet(); + + for (RelTrait trait: traitSet) { + if (!trait.getTraitDef().getTraitClass().equals(RelCollation.class)) { --- End diff -- I suppose you already considered Calcite's RelTraitSet.replace() method and found this to be simpler ?
---