src/LogicalPlanner/Logical/LogicalOperator.cs
/// <summary>
/// Helper function to propagate content of fields
/// </summary>
/// <param name="targetFields"></param>
/// <param name="srcFields"></param>
Helper function to propagate content of fields
Helper function to propagate content of fields
internal static void CopyFieldInfoHelper(IEnumerable<Field> targetFields, IEnumerable<Field> srcFields)
        {
            Debug.Assert(targetFields.All(f => srcFields.Any(f2 => f2.FieldAlias == f.FieldAlias && f2.GetType() == f.GetType())));
            var fieldMapping = new Dictionary<Field, Field>();
            foreach (var tarF in targetFields)
            {
                var matchSrcF = srcFields.Where(f => f.FieldAlias == tarF.FieldAlias);
                Debug.Assert(matchSrcF.Count() == 1);
                tarF.Copy(matchSrcF.First());
            }
        }
internal static void CopyFieldInfoHelper ( IEnumerable < Field > targetFields , IEnumerable < Field > srcFields ) { Debug . Assert ( targetFields . All ( f => srcFields . Any ( f2 => f2 . FieldAlias == f . FieldAlias && f2 . GetType ( ) == f . GetType ( ) ) ) ) ; var fieldMapping = new Dictionary < Field , Field > ( ) ; foreach ( var tarF in targetFields ) { var matchSrcF = srcFields . Where ( f => f . FieldAlias == tarF . FieldAlias ) ; Debug . Assert ( matchSrcF . Count ( ) == 1 ) ; tarF . Copy ( matchSrcF . First ( ) ) ; } }
Helper function to propagate content of fields
Helper function to propagate content of fields
// Select operator does not alter schema, so the output should map to input perfectly
targetFields
IEnumerable<Field>
None
srcFields
IEnumerable<Field>
None