Пример #1
0
        public List <Row> show()
        {
            bind(null);

            // TBD: route to optimizer here
            QueryOption queryOpt = new QueryOption();

            physicPlan_ = logicPlan_.DirectToPhysical(queryOpt);
            logicPlan_.ResolveColumnOrdinal(outputs_);

            // actual execution
            var finalplan = new PhysicCollect(physicPlan_);

            physicPlan_ = finalplan;
            var context = new ExecContext(queryOpt);

            Console.WriteLine(physicPlan_.Explain());

            finalplan.ValidateThis();
            var code = finalplan.Open(context);

            code += finalplan.Exec(null);
            code += finalplan.Close();

            return(finalplan.rows_);
        }