That's correct. It's LoptOptimizeJoinRule who is enumerating different join order. JoinToMultiJoinRule is a prerequisite step for LoptOptimizeJoinRule.
On Wed, Mar 22, 2017 at 4:35 AM, weijie tong <[email protected]> wrote: > I think , this transformation is done by two rules. First > ,JoinToMultiJoinRule translates the joins to MultiJoin ,then > LoptOptimizeJoinRule do the actual transformation by matching the MultiJoin > RelNode created last step. > > On Wed, Mar 22, 2017 at 1:20 AM, Arina Yelchiyeva < > [email protected]> wrote: > >> Hi all, >> >> Drill uses DRILL_JOIN_TO_MULTIJOIN_RULE (=new >> JoinToMultiJoinRule(DrillJoinRel.class) during planning stage. I have >> noticed that after using this rule, left join can be transformed into right >> join when right table is greater than left one. After reading >> JoinToMultiJoinRule java doc, I am not quite sure this rule actually does >> such transformation but if I disable it, my query is not transformed. Can >> anybody point me out where this rule applies such logic? Or suggest what >> can be responsible for transforming left join into right one? >> >> >> Thank you in advance. >> >> Kind regards >> Arina >>
