public override System.Data.Entity.Core.Query.InternalTrees.Node Visit( SingleStreamNestOp op, System.Data.Entity.Core.Query.InternalTrees.Node n) { this.AddReference(op.Discriminator); return(this.VisitNestOp((NestBaseOp)op, n)); }
/// <summary> /// SingleStreamNestOp handling /// </summary> /// <param name="op"></param> /// <param name="n"></param> public override void Visit(SingleStreamNestOp op, Node n) { // Cannot occur at this stage of processing throw EntityUtil.NotSupported(); }
private List<SortKey> BuildSortKeyList(SingleStreamNestOp ssnOp) { var sortVars = Command.CreateVarVec(); // First add the prefix sort keys var sortKeyList = new List<SortKey>(); foreach (var sk in ssnOp.PrefixSortKeys) { if (!sortVars.IsSet(sk.Var)) { sortVars.Set(sk.Var); sortKeyList.Add(sk); } } // Then add the nestop keys foreach (var v in ssnOp.Keys) { if (!sortVars.IsSet(v)) { sortVars.Set(v); var sk = Command.CreateSortKey(v); sortKeyList.Add(sk); } } // Then add the discriminator var PlanCompiler.Assert(!sortVars.IsSet(ssnOp.Discriminator), "prefix sort on discriminator?"); sortKeyList.Add(Command.CreateSortKey(ssnOp.Discriminator)); // Finally, add the postfix keys foreach (var sk in ssnOp.PostfixSortKeys) { if (!sortVars.IsSet(sk.Var)) { sortVars.Set(sk.Var); sortKeyList.Add(sk); } } return sortKeyList; }
// <summary> // Build up a sort node above the nestOp's input - only if there // are any sort keys to produce // </summary> private Node BuildSortForNestElimination(SingleStreamNestOp ssnOp, Node nestNode) { Node sortNode; var sortKeyList = BuildSortKeyList(ssnOp); // Now if, at this point, there aren't any sort keys then remove the // sort operation, otherwise, build a new SortNode; if (sortKeyList.Count > 0) { var sortOp = Command.CreateSortOp(sortKeyList); sortNode = Command.CreateNode(sortOp, nestNode.Child0); } else { // No sort keys => single_row_table => no need to sort sortNode = nestNode.Child0; } return sortNode; }
public override void Visit(SingleStreamNestOp op, Node n) { VisitPhysicalOpDefault(op, n); AssertRelOp(n.Child0.Op); }
/// <summary> /// SingleStreamNestOp /// Insist (for now) that all Vars are required /// </summary> /// <param name="op"> </param> /// <param name="n"> </param> /// <returns> </returns> public override Node Visit(SingleStreamNestOp op, Node n) { AddReference(op.Discriminator); return(VisitNestOp(op, n)); }
/// <summary> /// Visitor pattern method for SingleStreamNestOp /// </summary> /// <param name="op"> The op being visited </param> /// <param name="n"> The Node that references the Op </param> public virtual void Visit(SingleStreamNestOp op, Node n) { VisitNestOp(op, n); }
/// <summary> /// SingleStreamNestOp handling /// </summary> /// <param name="op"> </param> /// <param name="n"> </param> public override void Visit(SingleStreamNestOp op, Node n) { // Cannot occur at this stage of processing throw new NotSupportedException(); }
// <summary> // Copies a singleStreamNestOp // </summary> public override Node Visit(SingleStreamNestOp op, Node n) { return VisitNestOp(n); }
public override void Visit(SingleStreamNestOp op, System.Data.Entity.Core.Query.InternalTrees.Node n) { throw new NotSupportedException(); }