/// <summary> /// Converts the reference to a TVF as following: Collect(PhysicalProject(Unnest(Func))) /// </summary> /// <param name="op">current function op</param> /// <param name="n">current function subtree</param> /// <returns>the new expression that corresponds to the TVF</returns> private Node VisitCollectionFunction(FunctionOp op, Node n) { PlanCompiler.Assert(TypeSemantics.IsCollectionType(op.Type), "non-TVF function?"); Node unnestNode = BuildUnnest(n); UnnestOp unnestOp = unnestNode.Op as UnnestOp; PhysicalProjectOp projectOp = m_command.CreatePhysicalProjectOp(unnestOp.Table.Columns[0]); Node projectNode = m_command.CreateNode(projectOp, unnestNode); CollectOp collectOp = m_command.CreateCollectOp(n.Op.Type); Node collectNode = m_command.CreateNode(collectOp, projectNode); return(collectNode); }
/// <summary> /// CollectOp handling. /// </summary> /// <param name="op"></param> /// <param name="n"></param> public override void Visit(CollectOp op, Node n) { // Simply visit the children without pushing down any references to them. VisitChildren(n); }
/// <summary> /// CollectOp /// Nothing much to do - simply update the result type /// </summary> /// <param name="op"> the NestOp </param> /// <param name="n"> corresponding node </param> /// <returns> new subtree </returns> public override Node Visit(CollectOp op, Node n) { VisitChildren(n); // simply update the desired type n.Op = m_command.CreateCollectOp(GetNewType(op.Type)); return n; }
/// <summary> /// Default processing for a CollectOp. But make sure that we /// go through the NestPullUp phase /// </summary> /// <param name="op"></param> /// <param name="n"></param> /// <returns></returns> public override Node Visit(CollectOp op, Node n) { m_compilerState.MarkPhaseAsNeeded(PlanCompilerPhase.NestPullup); return VisitScalarOpDefault(op, n); }
public override void Visit(CollectOp op, Node n) { VisitScalarOpDefault(op, n); AssertOpType(n.Child0.Op, OpType.PhysicalProject); AssertCollectionType(op.Type); }
/// <summary> /// Copies a CollectOp /// </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(CollectOp op, Node n) { return(CopyDefault(m_destCmd.CreateCollectOp(op.Type), n)); }
public override void Visit(CollectOp op, Node n) { using (new AutoXml(this, op)) { VisitChildren(n); } }
/// <summary> /// Visitor pattern method for NestOp /// </summary> /// <param name="op"> The NestOp being visited </param> /// <param name="n"> The Node that references the Op </param> public virtual void Visit(CollectOp op, Node n) { VisitScalarOpDefault(op, n); }
public override Node Visit(CollectOp op, Node n) { return(null); }
/// <summary> /// CollectOp handling. /// </summary> /// <param name="op"> </param> /// <param name="n"> </param> public override void Visit(CollectOp op, Node n) { // Simply visit the children without pushing down any references to them. VisitChildren(n); }
public override Node Visit(CollectOp op, Node n) { return null; }
public override System.Data.Entity.Core.Query.InternalTrees.Node Visit(CollectOp op, System.Data.Entity.Core.Query.InternalTrees.Node n) { return((System.Data.Entity.Core.Query.InternalTrees.Node)null); }
// <summary> // Copies a CollectOp // </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(CollectOp op, Node n) { return CopyDefault(m_destCmd.CreateCollectOp(op.Type), n); }
public override void Visit(CollectOp op, Node n) { VisitScalarOpDefault(op, n); AssertOpType(n.Child0.Op, OpType.PhysicalProject); AssertCollectionType(op.Type); }
public override void Visit(CollectOp op, System.Data.Entity.Core.Query.InternalTrees.Node n) { this.VisitChildren(n); }