src/LogicalPlanner/Logical/LogicalOperator.cs
/// <summary>
/// Operator graph traverse: get all upstream operators of a particular type
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
Operator graph traverse: get all upstream operators of a particular type
Operator graph traverse : get all upstream operators of a particular type
public IEnumerable<T> GetAllUpstreamOperatorsOfType<T>() where T : LogicalOperator
        {
            var opList = new List<T>();
            if (InOperators.Count() > 0)
            {
                opList.AddRange(
                    InOperators
                    .SelectMany(op => op.GetAllUpstreamOperatorsOfType<T>())
                    .Distinct() 
                    );
            }
            if (this is T)
            {
                opList.Add(this as T);
            }
            return opList;
        }
public IEnumerable < T > GetAllUpstreamOperatorsOfType < T > ( ) where T : LogicalOperator { var opList = new List < T > ( ) ; if ( InOperators . Count ( ) > 0 ) { opList . AddRange ( InOperators . SelectMany ( op => op . GetAllUpstreamOperatorsOfType < T > ( ) ) . Distinct ( ) ) ; } if ( this is T ) { opList . Add ( this as T ) ; } return opList ; }
Operator graph traverse: get all upstream operators of a particular type
Operator graph traverse : get all upstream operators of a particular type
// we do have multiplexing (multiple output) for operators in some scenarios, so we need to distinct here
None
typeparam
None