Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-1557

Collection-valued Aggregation.RecursiveHierarchy/ParentNavigationProperty

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: V4.0_CSD04
    • Component/s: Data Aggregation
    • Labels:
      None
    • Environment:

      Applied

      Description

      The Aggregation vocabulary currently specifies that RecursiveHierarchy/ParentNavigationProperty is single-valued, but hierarchies can also be defined with multiple parents of a node.

        Attachments

          Activity

          heiko.theissen Heiko Theissen created issue -
          heiko.theissen Heiko Theissen made changes -
          Field Original Value New Value
          Environment Proposed
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, nodes x are always considered together with a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          σ\(x) is augmented to σ(x,r), which has an additional {{ParentNavigationProperty}} addressing a collection consisting of r or an empty collection if r = null. G is augmented to G(r), which additionally contains the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r.
           {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent. Let ρ(r)=a(t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_(G(r)) (σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_(G(r))(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, nodes x are always considered together with a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          σ\(x) is augmented to σ(x,r), which has an additional {{ParentNavigationProperty}} addressing a collection consisting of r or an empty collection if r = null. G is augmented to G(r), which additionally contains the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r.
           {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent. Let ρ(r)=a(t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, nodes x are always considered together with a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          σ\(x) is augmented to σ(x,r), which has an additional {{ParentNavigationProperty}} addressing a collection consisting of r or an empty collection if r = null. G is augmented to G(r), which additionally contains the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r.
           {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent. Let ρ(r)=a(t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          σ\(x) is augmented to σ(x,r), which has an additional {{ParentNavigationProperty}} addressing a collection consisting of r or an empty collection if r = null. G is augmented to G(r), which additionally contains the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r.
          Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          σ\(x) is augmented to σ(x,r), which has an additional {{ParentNavigationProperty}} addressing a collection consisting of r or an empty collection if r = null. G is augmented to G(r), which additionally contains the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r.
          Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          σ\(x) is augmented to σ(x,r), which has an additional {{ParentNavigationProperty}} addressing a collection consisting of r or an empty collection if r = null. G is augmented to G(r), which additionally contains the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r.
          Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          σ\(x) is augmented to σ(x,r), which has an additional {{ParentNavigationProperty}} addressing a collection consisting of r or an empty collection if r = null. G is augmented to G(r), which additionally contains the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r.
          Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ(x) and R(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let σ(x,r) = σ(x) with additionally σ(x)[{{ParentNavigationProperty}}] = a collection consisting of r or an empty collection if r = null. Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r.
           Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ(x) and R(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let σ(x,r) = σ(x) with additionally σ(x)[{{ParentNavigationProperty}}] = a collection consisting of r or an empty collection if r = null. Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r.
           Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let σ(x,r) = σ(x) with additionally σ(x)[{{ParentNavigationProperty}}] = a collection consisting of r or an empty collection if r = null. Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r.
           Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let σ(x,r) = σ(x) with additionally σ(x)[{{ParentNavigationProperty}}] = a collection consisting of r or an empty collection if r = null. Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r.
           Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let σ(x,r) = σ\(x) with additionally σ\(x)[ParentNavigationProperty] = a collection consisting of r or an empty collection if r = null. Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r.
           Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let σ(x,r) = σ\(x) with additionally σ\(x)[ParentNavigationProperty] = a collection consisting of r or an empty collection if r = null. Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r.
           Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let R be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,R). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty collection,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let R be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,R). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty collection,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ(x) and R(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let R be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ(x),ParentNavigationProperty,R). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ(x) and R(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let R be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ(x),ParentNavigationProperty,R). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let R be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,R). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let R be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,R). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ(x) and R(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ(x) and R(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}.

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ(x) and R(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ(x) and R(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have a path to the root that equals the one which r has:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ(x) and R(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment, optionally followed by a type-cast segment, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ(x) and R(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment, optionally followed by a type-cast segment, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment, optionally followed by a type-cast segment, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment, optionally followed by a type-cast segment, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and any type-cast segment that immediately follows, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} steps in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and any type-cast segment that immediately follows, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} segments in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and any type-cast segment that immediately follows, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208].

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} segments in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and any type-cast segment that immediately follows, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208]. Nodes can then have null and non-null parents simultaneously, meaning that they occur as a root and as a child.

          In [OData-Aggr, section 3.5.2.3] functions σ(x) and R(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} segments in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and any type-cast segment that immediately follows, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208]. Nodes can then have null and non-null parents simultaneously, meaning that they occur as a root and as a child.

          In [OData-Aggr, section 3.5.2.3] functions σ(x) and R(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} segments in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and any type-cast segment that immediately follows, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208]. Nodes can then have null and non-null parents simultaneously, meaning that they occur as a root and as a child.

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} segments in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and any type-cast segment that immediately follows, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208]. Nodes can then have null and non-null parents simultaneously, meaning that they occur as a root and as a child.

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} segments in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and any type-cast segment that immediately follows, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208]. Nodes can then have null and non-null parents simultaneously, meaning that they occur as a root and as a child.

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} sub-paths in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and any type-cast segment that immediately follows, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208]. Nodes can then have null and non-null parents simultaneously, meaning that they occur as a root and as a child.

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} sub-paths in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and any type-cast segment that immediately follows, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208]. Nodes can then have null and non-null parents simultaneously, meaning that they occur as a root and as a child.

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} sub-paths in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and any type-cast segment that immediately follows, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          When the function a(u,v,x) is used to compute σ(x,r), u is not necessarily an empty instance after step 1. There is then an additional prerequisite: All (navigation) property paths starting at u address either a single value or a collection of one value.
          Between steps 3 and 4, the following steps are inserted:
          3.1. If u has no property v_1, go to step 4.
          3.2. If v_1 is single-valued, let u'=u[v_1], otherwise let u' be the single item in u[v_1].
          3.3. If v_2 is present and u' is not of the type v_2 or a subtype thereof, go to step 4, otherwise go to step 5.

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208]. Nodes can then have null and non-null parents simultaneously, meaning that they occur as a root and as a child.

          In [OData-Aggr, section 3.5.2.3] functions σ\(x) and R\(x) are introduced for the single-valued case. Add the following paragraphs for the collection-valued case:
          {quote}If {{ParentNavigationProperty}} is collection-valued, the recursive function R\(x) for a node x is replaced with a recursive function R(x, r) for a node x and a "path to the root", that is, an instance r with zero or one related instances via the {{ParentNavigationProperty}}. Every instance in the output set is related to one pair (x,r).

          Let X be a collection consisting of r or an empty collection if r = null, and let σ(x,r) = a(σ\(x),ParentNavigationProperty,X). Let G(r) be the result of adding to G the (l+1)-fold concatenation of the path {{ParentNavigationProperty}} where l is the number of {{ParentNavigationProperty}} sub-paths in a path to the root in r. Write {{ParentNavigationProperty}}=t_1/t_2 where t_1 ends with the collection-valued segment and any type-cast segment that immediately follows, and /t_2 may be absent and let ρ(r)=a(empty instance,t_1/t_2,r).

          When the function a(u,v,x) is used to compute σ(x,r), u is not necessarily an empty instance after step 1. There is then an additional prerequisite: All (navigation) property paths starting at u address either a single value or a collection of one value.
          Between steps 3 and 4, the following steps are inserted:
          3.1. If u has no property v_1, go to step 4.
          3.2. If v_1 is single-valued, let u'=u[v_1], otherwise let u' be the single item in u[v_1].
          3.3. If v_2 is present and u' is not of the type v_2 or a subtype thereof, go to step 4, otherwise go to step 5.

          {{traverse(H,Q,p,h,S,o)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))
          {code}
          If h = preorder,
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/Π_G(r)(σ(x,r)),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          If h = postorder, [similar].

          Here the entity r has a single path to the root and Φ(x,r) is a boolean function for filtering instances that have the same path to the root:

          If r is a root, then
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q])
          {code}
          Otherwise let r' be the single entity in r/t_1/t_2 and
          {code:java}
          Φ(x,r)=x/t_1/any(y:y/t_2 eq r[q] and Φ(y/t_2,r'))
          {code}
          {quote}
          In section 3.5.3, add the following paragraphs for the collection-valued case:
          {quote}{{groupby((P_1,rolluprecursive(H,Q,p,S),P_2),T)}} is defined as equivalent to
          {code:java}
          concat(R(r_1, null), ..., R(r_n, null))/Z_N
          {code}
          If at least one of P_1 or P_2 is non-empty, then
          {code:java}
          R(x, r)= concat(
            F(x)/filter(Φ($this,r))/groupby((P_1,P_2),T/Π_G(r)(σ(x,r))),
            R(c_1, ρ(r)), ..., R(c_m, ρ(r))
          )
          {code}
          otherwise [similar].
          {quote}
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208]. Nodes can then have null and non-null parents simultaneously, meaning that they occur as a root and as a child.

          See material appended to sections 6.2.2 and 6.3 in https://www.oasis-open.org/apps/org/workgroup/odata/download.php/70988/odata-data-aggregation-ext-v4.0-csd04.docx.
          handl Ralf Handl made changes -
          Fix Version/s V4.0_CS03 [ 17762 ]
          heiko.theissen Heiko Theissen made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208]. Nodes can then have null and non-null parents simultaneously, meaning that they occur as a root and as a child.

          See material appended to sections 6.2.2 and 6.3 in https://www.oasis-open.org/apps/org/workgroup/odata/download.php/70988/odata-data-aggregation-ext-v4.0-csd04.docx.
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208]. Nodes can then have null and non-null parents simultaneously, meaning that they occur as a root and as a child.

          See material appended to sections 6.2.2 and 6.3 in [https://www.oasis-open.org/apps/org/workgroup/odata/download.php/70988/odata-data-aggregation-ext-v4.0-csd04.docx].

          https://github.com/oasis-tcs/odata-specs/pull/1
          handl Ralf Handl made changes -
          handl Ralf Handl made changes -
          Proposal Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208]. Nodes can then have null and non-null parents simultaneously, meaning that they occur as a root and as a child.

          See material appended to sections 6.2.2 and 6.3 in [https://www.oasis-open.org/apps/org/workgroup/odata/download.php/70988/odata-data-aggregation-ext-v4.0-csd04.docx].

          https://github.com/oasis-tcs/odata-specs/pull/1
          Allow a collection-valued {{RecursiveHierarchy/ParentNavigationProperty}} in the [Aggregation vocabulary|https://github.com/oasis-tcs/odata-vocabularies/blob/13de8f242e505761940cff7e2f5c22eb614b7ae5/vocabularies/Org.OData.Aggregation.V1.xml#L208]. Nodes can then have null and non-null parents simultaneously, meaning that they occur as a root and as a child.

          See material appended to sections 6.2.2 and 6.3 in [https://www.oasis-open.org/apps/org/workgroup/odata/download.php/70988/odata-data-aggregation-ext-v4.0-csd04.docx].
          handl Ralf Handl made changes -
          Fix Version/s V4.0_CSD04 [ 10567 ]
          Fix Version/s V4.0_CS03 [ 17762 ]
          heiko.theissen Heiko Theissen made changes -
          Status New [ 10000 ] Open [ 1 ]
          heiko.theissen Heiko Theissen made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          heiko.theissen Heiko Theissen made changes -
          Environment Proposed Applied
          Status Resolved [ 5 ] Applied [ 10002 ]
          heiko.theissen Heiko Theissen made changes -
          Status Applied [ 10002 ] Closed [ 6 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              heiko.theissen Heiko Theissen
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: