Exemplo n.º 1
0
        public override CGroupMember Apply(CGroupMember expr)
        {
            LogicJoin log      = expr.logic_ as LogicJoin;
            var       l        = new PhysicMemoRef(log.l_());
            var       r        = new PhysicMemoRef(log.r_());
            var       hashjoin = new PhysicHashJoin(log, l, r);

            return(new CGroupMember(hashjoin, expr.group_));
        }
Exemplo n.º 2
0
        public override CGroupMember Apply(CGroupMember expr)
        {
            LogicJoin  log = expr.logic_ as LogicJoin;
            var        l   = new PhysicMemoRef(log.l_());
            var        r   = new PhysicMemoRef(log.r_());
            PhysicNode phy = new PhysicNLJoin(log, l, r);

            return(new CGroupMember(phy, expr.group_));
        }
Exemplo n.º 3
0
 // initialization: enqueue all vertex nodes
 protected void InitByInsertBasicTables(JoinGraph graph)
 {
     graph_ = graph;
     foreach (var logic in graph.vertices_)
     {
         BitVector contained = 1 << graph.vertices_.IndexOf(logic);
         logic.tableContained_ = contained;
         if (graph.memo_ is null)
         {
             bestTree_[contained] = new PhysicScanTable(logic);
         }
         else
         {
             // vertices are already inserted into memo
             var cgroup   = graph.memo_.LookupCGroup(logic);
             var logicref = new LogicMemoRef(cgroup);
             bestTree_[contained] = new PhysicMemoRef(logicref);
         }
     }
 }