Пример #1
0
        public override CGroupMember Apply(CGroupMember expr)
        {
            var log      = expr.logic_ as LogicJoinBlock;
            var solver   = new DPccp();
            var joinplan = solver.Reset().Run(log.graph_);

            return(new CGroupMember(joinplan, expr.group_));
        }
Пример #2
0
        static public void Test()
        {
            DPccp solver = new DPccp();

            // book figure 3.12
            var       tables    = new string[] { "T1", "T2", "T3", "T4", "T5" };
            JoinGraph figure312 = new JoinGraph(tables, new string[] { "T1*T2", "T1*T3", "T1*T4", "T3*T4", "T5*T2", "T5*T3", "T5*T4" });

            Debug.Assert(figure312.joinbits_.Count == 5 && figure312.preds_.Count == 7);
            solver.Reset().Run(figure312);

            // full test
            DoTest(new DPccp());
        }