public override void Visit(PhysicalProjectOp op, Node n) { VisitPhysicalOpDefault(op, n); Assert(n.Children.Count >= 1, "PhysicalProjectOp needs at least 1 arg: found {0}", n.Children.Count); foreach (Node chi in n.Children) { AssertRelOpOrPhysicalOp(chi.Op); } }
/// <summary> /// Copies a PhysicalProjectOp /// </summary> /// <param name="op"></param> /// <param name="n"></param> /// <returns></returns> public override Node Visit(PhysicalProjectOp op, Node n) { // Visit the Node's children and map their Vars List <Node> children = ProcessChildren(n); // Copy the ProjectOp's VarSet VarList newVarList = Copy(op.Outputs); SimpleCollectionColumnMap newColumnMap = Copy(op.ColumnMap) as SimpleCollectionColumnMap; Debug.Assert(newColumnMap != null, "Coping of a physical project's columnMap did not return a SimpleCollectionColumnMap"); // Create a new ProjectOp based on the copied VarSet PhysicalProjectOp newProject = m_destCmd.CreatePhysicalProjectOp(newVarList, newColumnMap); // Return a new Node that references the copied ProjectOp and has the copied child Nodes as its children return(m_destCmd.CreateNode(newProject, children)); }
public override void Visit(PhysicalProjectOp op, Node n) { using (new AutoXml(this, op)) { using (new AutoXml(this, "outputs")) { foreach (Var v in op.Outputs) { DumpVar(v); } } using (new AutoXml(this, "columnMap")) { op.ColumnMap.Accept(ColumnMapDumper.Instance, this); } using (new AutoXml(this, "input")) { VisitChildren(n); } } }