func resolveCommonTableExpressions(ctx *sql.Context, a *Analyzer, n sql.Node, scope *Scope) (sql.Node, error) {
	_, ok := n.(*plan.With)
	if !ok {
		return n, nil
	}
	return resolveCtesInNode(ctx, a, n, scope, make(map[string]sql.Node))
}
resolveCommonTableExpressions operates on With nodes. It replaces any matching UnresolvedTable references in the
tree with the subqueries defined in the CTEs.
package analyzer
import (
	"strings"
	"github.com/dolthub/go-mysql-server/sql"
	"github.com/dolthub/go-mysql-server/sql/plan"
)
const maxCteDepth = 5