private void Process( out List <ProviderCommandInfo> childCommands, out ColumnMap resultColumnMap, out int columnCount) { PhysicalProjectOp op = (PhysicalProjectOp)this.Command.Root.Op; this.m_subCommands = new List <System.Data.Entity.Core.Query.InternalTrees.Node>((IEnumerable <System.Data.Entity.Core.Query.InternalTrees.Node>) new System.Data.Entity.Core.Query.InternalTrees.Node[1] { this.Command.Root }); childCommands = new List <ProviderCommandInfo>((IEnumerable <ProviderCommandInfo>) new ProviderCommandInfo[1] { ProviderCommandInfoUtils.Create(this.Command, this.Command.Root) }); resultColumnMap = this.BuildResultColumnMap(op); columnCount = op.Outputs.Count; }
// <summary> // The real driver. This routine walks the tree, converts each subcommand // into a CTree, and converts the columnmap into a real column map. // Finally, it produces a "real" plan that can be used by the bridge execution, and // returns this plan // The root of the tree must be a PhysicalProjectOp. Each child of this Op // represents a command to be executed, and the ColumnMap of this Op represents // the eventual columnMap to be used for result assembly // </summary> // <param name="childCommands"> CQTs for store commands </param> // <param name="resultColumnMap"> column map for result assembly </param> private void Process(out List <ProviderCommandInfo> childCommands, out ColumnMap resultColumnMap, out int columnCount) { var projectOp = (PhysicalProjectOp)Command.Root.Op; m_subCommands = new List <Node>(new[] { Command.Root }); childCommands = new List <ProviderCommandInfo>( new[] { ProviderCommandInfoUtils.Create( Command, Command.Root // input node ) }); // Build the final column map, and count the columns we expect for it. resultColumnMap = BuildResultColumnMap(projectOp); columnCount = projectOp.Outputs.Count; }