code: func (b *PlanBuilder) buildSemiApply(outerPlan, innerPlan LogicalPlan, condition []expression.Expression, asScalar, not bool) (LogicalPlan, error) {
  	b.optFlag = b.optFlag | flagPredicatePushDown
  	b.optFlag = b.optFlag | flagBuildKeyInfo
  	b.optFlag = b.optFlag | flagDecorrelate
  
  	join, err := b.buildSemiJoin(outerPlan, innerPlan, condition, asScalar, not)
  	if err != nil {
  		return nil, err
  	}
  
  	ap := &LogicalApply{LogicalJoin: *join}
  	ap.tp = TypeApply
  	ap.self = ap
  	return ap, nil
  }
docs: // buildSemiApply builds apply plan with outerPlan and innerPlan, which apply semi-join for every row from outerPlan and the whole innerPlan.