code: func evalAstExpr(ctx sessionctx.Context, expr ast.ExprNode) (types.Datum, error) {
  	if val, ok := expr.(*driver.ValueExpr); ok {
  		return val.Datum, nil
  	}
  	b := &PlanBuilder{
  		ctx:       ctx,
  		colMapper: make(map[*ast.ColumnNameExpr]int),
  	}
  	if ctx.GetSessionVars().TxnCtx.InfoSchema != nil {
  		b.is = ctx.GetSessionVars().TxnCtx.InfoSchema.(infoschema.InfoSchema)
  	}
  	fakePlan := LogicalTableDual{}.Init(ctx)
  	newExpr, _, err := b.rewrite(expr, fakePlan, nil, true)
  	if err != nil {
  		return types.Datum{}, err
  	}
  	return newExpr.Eval(chunk.Row{})
  }
docs: // evalAstExpr evaluates ast expression directly.