code: func simplifyOuterJoin(p *LogicalJoin, predicates []expression.Expression) {
  	if p.JoinType != LeftOuterJoin && p.JoinType != RightOuterJoin && p.JoinType != InnerJoin {
  		return
  	}
  
  	innerTable := p.children[0]
  	outerTable := p.children[1]
  	if p.JoinType == LeftOuterJoin {
  		innerTable, outerTable = outerTable, innerTable
  	}
  
  	// first simplify embedded outer join.
  	if innerPlan, ok := innerTable.(*LogicalJoin); ok {
  		simplifyOuterJoin(innerPlan, predicates)
  	}
  	if outerPlan, ok := outerTable.(*LogicalJoin); ok {
  		simplifyOuterJoin(outerPlan, predicates)
  	}
  
  	if p.JoinType == InnerJoin {
  		return
  	}
  	// then simplify embedding outer join.
  	canBeSimplified := false
  	for _, expr := range predicates {
  		isOk := isNullRejected(p.ctx, innerTable.Schema(), expr)
  		if isOk {
  			canBeSimplified = true
  			break
  		}
  	}
  	if canBeSimplified {
  		p.JoinType = InnerJoin
  	}
  }
docs: // simplifyOuterJoin transforms "LeftOuterJoin/RightOuterJoin" to "InnerJoin" if possible.