src/Shared/EntityFramework/Core/Query/PlanCompiler/CodeGen.cs
// <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>
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
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
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 
                            )
                    });
            resultColumnMap = BuildResultColumnMap(projectOp);
            columnCount = projectOp.Outputs.Count;
        }
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 ) } ) ; resultColumnMap = BuildResultColumnMap ( projectOp ) ; columnCount = projectOp . Outputs . Count ; }
The real driver.
The real driver .
// input node // Build the final column map, and count the columns we expect for it.
List<ProviderCommandInfo>
out
ColumnMap
out
int
out
childCommands
CQTs for store commands
CQTs for store commands
resultColumnMap
column map for result assembly
column map for result assembly