Github user ilooner commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1117#discussion_r167675404
  
    --- 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 don't see a way to remove a trait with RelTraitSet.replace(). So I made 
this removeCollation method instead.


---

Reply via email to