Exemplo n.º 1
0
        /// <summary>
        /// Copies a group by into node
        /// </summary>
        /// <param name="op">The Op to Copy</param>
        /// <param name="n">The Node that references the Op</param>
        /// <returns>A copy of the original Node that references a copy of the original Op</returns>
        public override Node Visit(GroupByIntoOp op, Node n)
        {
            // Visit the Node's children and map their Vars
            List <Node> children = ProcessChildren(n);

            // Create a new GroupByOp that uses copies of the Key and Output VarSets of the original GroupByOp
            GroupByIntoOp newGroupOp = m_destCmd.CreateGroupByIntoOp(Copy(op.Keys), Copy(op.Inputs), Copy(op.Outputs));

            // Return a new Node that references the copied GroupByOp and has the copied child Nodes as its children
            return(m_destCmd.CreateNode(newGroupOp, children));
        }
Exemplo n.º 2
0
 public override void Visit(GroupByIntoOp op, Node n)
 {
     VisitGroupByOp(op, n);
     Assert(n.Child3.Children.Count > 0, "GroupByInto with no group aggregate vars");
 }