my suggestion is you define a rule which matches the DrillJoinRel RelNode ,
then at the onMatch method ,you traverse the join children to find the
ScanRel nodes . You define a new ScanRel which include the ScanRel nodes
you find last step. Then transform the JoinRel to this equivalent new
ScanRel.
Finally , the plan tree will not have the JoinRel but the ScanRel.   You
can let your join plan rule  in the PlannerPhase.JOIN_PLANNING.

Reply via email to