code: func (b *planBuilder) buildSemiApply(outerPlan, innerPlan LogicalPlan, condition []expression.Expression, asScalar, not bool) LogicalPlan {
  	join := b.buildSemiJoin(outerPlan, innerPlan, condition, asScalar, not)
  	ap := &Apply{Join: *join}
  	ap.initIDAndContext(b.ctx)
  	ap.self = ap
  	ap.children[0].SetParents(ap)
  	ap.children[1].SetParents(ap)
  	return ap
  }
docs: // buildSemiApply builds apply plan with outerPlan and innerPlan, which apply semi-join for every row from outerPlan and the whole innerPlan.