code: func (b *PlanBuilder) buildApplyWithJoinType(outerPlan, innerPlan LogicalPlan, tp JoinType) LogicalPlan {
  	b.optFlag = b.optFlag | flagPredicatePushDown
  	b.optFlag = b.optFlag | flagBuildKeyInfo
  	b.optFlag = b.optFlag | flagDecorrelate
  	ap := LogicalApply{LogicalJoin: LogicalJoin{JoinType: tp}}.Init(b.ctx)
  	ap.SetChildren(outerPlan, innerPlan)
  	ap.SetSchema(expression.MergeSchema(outerPlan.Schema(), innerPlan.Schema()))
  	for i := outerPlan.Schema().Len(); i < ap.Schema().Len(); i++ {
  		ap.schema.Columns[i].IsReferenced = true
  	}
  	return ap
  }
docs: // buildApplyWithJoinType builds apply plan with outerPlan and innerPlan, which apply join with particular join type for
  // every row from outerPlan and the whole innerPlan.