code: func (b *PlanBuilder) rewrite(exprNode ast.ExprNode, p LogicalPlan, aggMapper map[*ast.AggregateFuncExpr]int, asScalar bool) (expression.Expression, LogicalPlan, error) {
  	expr, resultPlan, err := b.rewriteWithPreprocess(exprNode, p, aggMapper, asScalar, nil)
  	return expr, resultPlan, err
  }
docs: // rewrite function rewrites ast expr to expression.Expression.
  // aggMapper maps ast.AggregateFuncExpr to the columns offset in p's output schema.
  // asScalar means whether this expression must be treated as a scalar expression.
  // And this function returns a result expression, a new plan that may have apply or semi-join.