code: func Compile(ctx context.Context, rawStmt ast.StmtNode) (plan.Plan, error) {
  	info := ctx.GetSessionVars().TxnCtx.InfoSchema.(infoschema.InfoSchema)
  
  	node := rawStmt
  	err := resolver.ResolveName(node, info, ctx)
  	if err != nil {
  		return nil, errors.Trace(err)
  	}
  	p, err := plan.Optimize(ctx, node, info)
  	if err != nil {
  		return nil, errors.Trace(err)
  	}
  	return p, nil
  }
docs: // Compile is safe for concurrent use by multiple goroutines.