src/LogicalPlanner/LogicalPlan.cs
/// <summary>
/// Update the list of actual fields referenced for each entity alias in the return 
/// body or clauses such as WHERE, ORDER BY, etc.
/// This helps to trim out unreferenced fields early in the logical plan tree
/// </summary>
Update the list of actual fields referenced for each entity alias in the return
body or clauses such as WHERE, ORDER BY, etc.
This helps to trim out unreferenced fields early in the logical plan tree
Update the list of actual fields referenced for each entity alias in the return body or clauses such as WHERE ORDER BY etc . This helps to trim out unreferenced fields early in the logical plan tree
private void UpdateActualFieldReferencesForEntityFields()
        {
            var allOperators = StartingOperators
                .SelectMany(op => op.GetAllDownstreamOperatorsOfType<LogicalOperator>())
                .Distinct()
                .GroupBy(op => op.Depth)
                .OrderByDescending(g => g.Key); 
            foreach (var opGrp in allOperators)
            {
                opGrp.ToList().ForEach(op => op.PropagateReferencedPropertiesForEntityFields());
            }
        }
private void UpdateActualFieldReferencesForEntityFields ( ) { var allOperators = StartingOperators . SelectMany ( op => op . GetAllDownstreamOperatorsOfType < LogicalOperator > ( ) ) . Distinct ( ) . GroupBy ( op => op . Depth ) . OrderByDescending ( g => g . Key ) ; foreach ( var opGrp in allOperators ) { opGrp . ToList ( ) . ForEach ( op => op . PropagateReferencedPropertiesForEntityFields ( ) ) ; } }
Update the list of actual fields referenced for each entity alias in the return
body or clauses such as WHERE, ORDER BY, etc.
Update the list of actual fields referenced for each entity alias in the return body or clauses such as WHERE ORDER BY etc .
// Bottom-up to keep accumulating until the source