src/Shared/EntityFramework/Core/Query/PlanCompiler/Normalizer.cs
// <summary>
// Converts the reference to a TVF as following: Collect(PhysicalProject(Unnest(Func)))
// </summary>
// <param name="op"> current function op </param>
// <param name="n"> current function subtree </param>
// <returns> the new expression that corresponds to the TVF </returns>
Converts the reference to a TVF as following: Collect(PhysicalProject(Unnest(Func)))
Converts the reference to a TVF as following : Collect ( PhysicalProject ( Unnest ( Func )))
[SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters",
            MessageId = "System.Data.Entity.Core.Query.PlanCompiler.PlanCompiler.Assert(System.Boolean,System.String)")]
        private Node VisitCollectionFunction(FunctionOp op, Node n)
        {
            PlanCompiler.Assert(TypeSemantics.IsCollectionType(op.Type), "non-TVF function?");
            var unnestNode = BuildUnnest(n);
            var unnestOp = unnestNode.Op as UnnestOp;
            var projectOp = m_command.CreatePhysicalProjectOp(unnestOp.Table.Columns[0]);
            var projectNode = m_command.CreateNode(projectOp, unnestNode);
            var collectOp = m_command.CreateCollectOp(n.Op.Type);
            var collectNode = m_command.CreateNode(collectOp, projectNode);
            return collectNode;
        }
[ SuppressMessage ( " " , " " , MessageId = " " ) ] private Node VisitCollectionFunction ( FunctionOp op , Node n ) { PlanCompiler . Assert ( TypeSemantics . IsCollectionType ( op . Type ) , " " ) ; var unnestNode = BuildUnnest ( n ) ; var unnestOp = unnestNode . Op as UnnestOp ; var projectOp = m_command . CreatePhysicalProjectOp ( unnestOp . Table . Columns [ 0 ] ) ; var projectNode = m_command . CreateNode ( projectOp , unnestNode ) ; var collectOp = m_command . CreateCollectOp ( n . Op . Type ) ; var collectNode = m_command . CreateNode ( collectOp , projectNode ) ; return collectNode ; }
Converts the reference to a TVF as following: Collect(PhysicalProject(Unnest(Func)))
Converts the reference to a TVF as following : Collect ( PhysicalProject ( Unnest ( Func )))
the new expression that corresponds to the TVF
the new expression that corresponds to the TVF
op
FunctionOp
current function op
current function op
n
Node
current function subtree
current function subtree