src/Shared/EntityFramework/Core/Query/PlanCompiler/Normalizer.cs
// <summary>
// Pre-processing for a function. Does the default scalar op processing.
// If the function returns a collection (TVF), the method converts this expression into
// Collect(PhysicalProject(Unnest(Func))).
// If the function is a collection aggregate, converts it into the corresponding group aggregate.
// </summary>
Pre-processing for a function. Does the default scalar op processing.
If the function returns a collection (TVF), the method converts this expression into
Collect(PhysicalProject(Unnest(Func))).
If the function is a collection aggregate, converts it into the corresponding group aggregate.
Pre - processing for a function . Does the default scalar op processing . If the function returns a collection ( TVF ) the method converts this expression into Collect ( PhysicalProject ( Unnest ( Func ))) . If the function is a collection aggregate converts it into the corresponding group aggregate .
[SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "functionOp")]
        [SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters",
            MessageId = "System.Data.Entity.Core.Query.PlanCompiler.PlanCompiler.Assert(System.Boolean,System.String)")]
        public override Node Visit(FunctionOp op, Node n)
        {
            VisitScalarOpDefault(op, n);
            Node newNode = null;
            if (TypeSemantics.IsCollectionType(op.Type))
            {
                newNode = VisitCollectionFunction(op, n);
            }
            else if (PlanCompilerUtil.IsCollectionAggregateFunction(op, n))
            {
                newNode = VisitCollectionAggregateFunction(op, n);
            }
            else
            {
                newNode = n;
            }
            PlanCompiler.Assert(newNode != null, "failure to construct a functionOp?");
            return newNode;
        }
[ SuppressMessage ( " " , " " , MessageId = " " ) ] [ SuppressMessage ( " " , " " , MessageId = " " ) ] public override Node Visit ( FunctionOp op , Node n ) { VisitScalarOpDefault ( op , n ) ; Node newNode = null ; if ( TypeSemantics . IsCollectionType ( op . Type ) ) { newNode = VisitCollectionFunction ( op , n ) ; } else if ( PlanCompilerUtil . IsCollectionAggregateFunction ( op , n ) ) { newNode = VisitCollectionAggregateFunction ( op , n ) ; } else { newNode = n ; } PlanCompiler . Assert ( newNode != null , " " ) ; return newNode ; }
Pre-processing for a function.
Pre - processing for a function .
// Is this a TVF? // Is this a collection-aggregate function?
op
FunctionOp
n
Node