/// <summary>
        /// Look at the QM and find all Concat operators - split the query into multiple queries.
        /// </summary>
        /// <param name="source"></param>
        /// <returns></returns>
        public static QueryModel[] Split(QueryModel source)
        {
            // Extract the from clauses, and then from that extract the result clauses.
            // This function, Split, is called recursively during this processing.
            var qvf = new SplitFromClauses();
            qvf.VisitQueryModel(source);

            var qvr = new SplitResultClauses(qvf._models.Count > 1);
            foreach(var q in qvf._models)
            {
                qvr.VisitQueryModel(q);
            }

            return qvr._allModels.ToArray();
        }
        /// <summary>
        /// Look at the QM and find all Concat operators - split the query into multiple queries.
        /// </summary>
        /// <param name="source"></param>
        /// <returns></returns>
        public static QueryModel[] Split(QueryModel source)
        {
            // Extract the from clauses, and then from that extract the result clauses.
            // This function, Split, is called recursively during this processing.
            var qvf = new SplitFromClauses();

            qvf.VisitQueryModel(source);

            var qvr = new SplitResultClauses(qvf._models.Count > 1);

            foreach (var q in qvf._models)
            {
                qvr.VisitQueryModel(q);
            }

            return(qvr._allModels.ToArray());
        }