Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow cycles #19

Draft
wants to merge 147 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
5d66d4d
Adapt terminology to the multi-parent case
HeikoTheissen May 19, 2023
09e9929
Avoid the word tree
HeikoTheissen May 23, 2023
23d69c8
Root means zero parents
HeikoTheissen May 23, 2023
890b53b
Subhierarchies have different roots.
HeikoTheissen May 23, 2023
02179ca
Allow for orphans
HeikoTheissen May 23, 2023
b097c0a
Island orphans
HeikoTheissen May 23, 2023
26d9806
Merge remote-tracking branch 'trial/main' into multiple-parents
HeikoTheissen May 25, 2023
36323cc
Errors in JSON code
HeikoTheissen May 25, 2023
8ee987e
style change
HeikoTheissen May 25, 2023
59cbfd9
Variable clean-up
HeikoTheissen May 25, 2023
884e089
CSDL-XML-Link
HeikoTheissen May 25, 2023
3ec3059
Non-standard roots
HeikoTheissen May 25, 2023
125b493
Avoid overlong line
HeikoTheissen May 25, 2023
ec3f3e0
First three parts (#11)
ralfhandl May 25, 2023
802159d
Merge branch 'tc/2023-05-31' of [email protected]:standardapi/odata-spec…
HeikoTheissen May 25, 2023
51d8798
Hierarchy maintenance (#7)
HeikoTheissen May 26, 2023
25ce482
Merge branch 'multiple-parents' of [email protected]:standardapi/odata-s…
HeikoTheissen May 26, 2023
9acc7b3
fine-tuning
HeikoTheissen May 26, 2023
b4ae6d9
fine-tuning
HeikoTheissen May 26, 2023
b6c2eba
extended example 109
HeikoTheissen May 26, 2023
e193e06
corrected example 109
HeikoTheissen May 26, 2023
d771974
rephrased
HeikoTheissen May 26, 2023
416ca06
replace @odata.type with @type etc.
HeikoTheissen May 26, 2023
a60efb9
indentation
HeikoTheissen May 26, 2023
6de8c2e
typos
HeikoTheissen May 26, 2023
c42f5ed
TC 2023-05-31 - additions Ralf (#12)
ralfhandl May 26, 2023
b810924
Merge branch 'tc/2023-05-31' of [email protected]:standardapi/odata-spec…
HeikoTheissen May 26, 2023
1b5da52
References in variable list
HeikoTheissen May 26, 2023
e3e8ebb
Sharpen ancestors definition
HeikoTheissen May 26, 2023
b68f856
Merge remote-tracking branch 'trial/tc/2023-05-31' into multiple-parents
HeikoTheissen May 26, 2023
1aabf22
@odata.id -> @id
HeikoTheissen May 26, 2023
79cf020
indentation
HeikoTheissen May 26, 2023
a2a1331
indentation
HeikoTheissen May 26, 2023
6f87a7f
@ralfhandl's suggestions
HeikoTheissen May 31, 2023
91f5c68
RH 2023-05-31 part 3 (#13)
ralfhandl May 31, 2023
95f4422
For each occurrence
HeikoTheissen May 31, 2023
0c42441
Merge remote-tracking branch 'trial/tc/2023-05-31' into multiple-parents
HeikoTheissen May 31, 2023
5575a69
Explicitly mention other values of M
HeikoTheissen May 31, 2023
bcc7d8e
example for non-standard root
HeikoTheissen May 31, 2023
5f193b0
Remove Phobos South Pole
HeikoTheissen May 31, 2023
657210b
Preserving -> subset, precedence -> order
HeikoTheissen May 31, 2023
50ba8ae
Merge remote-tracking branch 'trial/tc/2023-05-31' into multiple-parents
HeikoTheissen May 31, 2023
fa6a5c7
Merge remote-tracking branch 'trial/main' into multiple-parents
HeikoTheissen May 31, 2023
ba37eff
post-merge
HeikoTheissen May 31, 2023
96e7cdf
typo
HeikoTheissen Jun 1, 2023
eeb6315
@GEricson's suggestion
HeikoTheissen Jun 1, 2023
194c896
Merge remote-tracking branch 'origin/main' into tc/2023-06-07
HeikoTheissen Jun 1, 2023
ff9cbd4
fine-tuning
HeikoTheissen Jun 1, 2023
3c43afd
AvailableOnAggregates
HeikoTheissen Jun 1, 2023
34b0fc2
More detailed revision history
HeikoTheissen Jun 1, 2023
30b0245
Include branch in title
HeikoTheissen Jun 1, 2023
c326f31
Remove redundant statement in `concat`
HeikoTheissen Jun 1, 2023
d793461
@sthagen's suggestion
HeikoTheissen Jun 1, 2023
1109928
fine-tuning
HeikoTheissen Jun 1, 2023
5ca0800
Merge remote-tracking branch 'origin/main' into tc/2023-06-07
HeikoTheissen Jun 1, 2023
afc6b51
@GeraldKrause's suggestions
HeikoTheissen Jun 1, 2023
ee685b3
Merge remote-tracking branch 'origin/main' into multiple-parents
HeikoTheissen Jun 1, 2023
30876fd
Merge remote-tracking branch 'origin/tc/2023-06-07' into
HeikoTheissen Jun 1, 2023
5c93574
post-merge
HeikoTheissen Jun 1, 2023
fce3cc6
Merge remote-tracking branch 'origin/main' into tc/2023-06-07
HeikoTheissen Jun 2, 2023
972d730
Merge remote-tracking branch 'origin/main' into tc/2023-06-07
HeikoTheissen Jun 2, 2023
6f7664c
Merge remote-tracking branch 'origin/main' into tc/2023-06-07
HeikoTheissen Jun 2, 2023
ab570b1
Merge branch 'main' of [email protected]:oasis-tcs/odata-specs.git into
HeikoTheissen Jun 2, 2023
a0c741d
Add reference for $filter=AbsentProperty eq null
HeikoTheissen Jun 2, 2023
716c74c
Merge remote-tracking branch 'origin/tc/2023-06-07' into
HeikoTheissen Jun 2, 2023
efd545c
Allow cycles
HeikoTheissen Jun 2, 2023
34110aa
@GeraldKrause's suggestions
HeikoTheissen Jun 3, 2023
6ea1764
Merge remote-tracking branch 'origin/main' into tc/2023-06-07
HeikoTheissen Jun 3, 2023
aa82a52
Merge remote-tracking branch 'origin/tc/2023-06-07' into
HeikoTheissen Jun 3, 2023
9ee946a
typos
HeikoTheissen Jun 3, 2023
9548d3a
Distance
HeikoTheissen Jun 3, 2023
94fb9fb
@GeraldKrause's suggestions
HeikoTheissen Jun 5, 2023
bc67562
Fine-tuning
HeikoTheissen Jun 5, 2023
f3436aa
typo
HeikoTheissen Jun 5, 2023
8bf6f07
Merge remote-tracking branch 'origin/main' into tc/2023-06-07
HeikoTheissen Jun 5, 2023
e5f4f46
@GeraldKrause - MON
HeikoTheissen Jun 6, 2023
927a7f4
Avoid page break in example data
HeikoTheissen Jun 6, 2023
e767d61
Trigger a PDF generation via GitHub Actions
HeikoTheissen Jun 6, 2023
87fad4b
auto-refreshed
HeikoTheissen Jun 6, 2023
e665708
re-phrasing
HeikoTheissen Jun 6, 2023
377d7cf
typo
HeikoTheissen Jun 6, 2023
e8dd8af
Examples 64 and 65
HeikoTheissen Jun 6, 2023
ae77df0
Merge remote-tracking branch 'origin/tc/2023-06-07' into
HeikoTheissen Jun 6, 2023
adbcf4d
Orphan example
HeikoTheissen Jun 6, 2023
90a1683
Merge remote-tracking branch 'origin/tc/2023-06-07' into
HeikoTheissen Jun 7, 2023
35d7160
@ralfhandl's suggestions
HeikoTheissen Jun 7, 2023
0b20c59
Example 64 rephrased
HeikoTheissen Jun 7, 2023
1709099
fine-tuning
HeikoTheissen Jun 7, 2023
d5b37f3
Merge remote-tracking branch 'origin/main' into tc/2023-06-07
HeikoTheissen Jun 7, 2023
8907fc1
Improve test
HeikoTheissen Jun 7, 2023
92c6ef9
Merge remote-tracking branch 'origin/tc/2023-06-07' into
HeikoTheissen Jun 7, 2023
ed8d26e
Root node <> start node
HeikoTheissen Jun 7, 2023
1664403
Rephrased
HeikoTheissen Jun 7, 2023
37211e1
Merge branch 'tc/2023-06-14' into multiple-parents
HeikoTheissen Jun 7, 2023
803574c
TC 2023-06-14
HeikoTheissen Jun 7, 2023
7e64005
Merge branch 'tc/2023-06-14' into multiple-parents
HeikoTheissen Jun 7, 2023
d42c8f7
Merge branch 'tc/2023-06-14' into multiple-parents
HeikoTheissen Jun 7, 2023
b278ada
Post-merge
HeikoTheissen Jun 7, 2023
db36e2c
No page-break after heading
HeikoTheissen Jun 12, 2023
a6d9035
Recursive hierarchy = parent + start nodes
HeikoTheissen Jun 12, 2023
bc60aeb
UpNode, actual and visible totals
HeikoTheissen Jun 13, 2023
7364668
rephrasing
HeikoTheissen Jun 13, 2023
15329e5
Move actual vs. visual example
HeikoTheissen Jun 14, 2023
59feb92
UpNode -> UpPath
HeikoTheissen Jun 14, 2023
3fb52d4
rephrasing
HeikoTheissen Jun 14, 2023
85c61b5
@ralfhandl's suggestions
HeikoTheissen Jun 14, 2023
6a5e2b5
descendants/ancestors with maximum distance
HeikoTheissen Jun 15, 2023
96d4a2b
Rephrase lib/README.md
HeikoTheissen Jun 15, 2023
c34e9d4
rephrasing
HeikoTheissen Jun 15, 2023
954caf5
Avoid // in web server
HeikoTheissen Jun 15, 2023
807ddb4
Cycle without UpNode is possible
HeikoTheissen Jun 15, 2023
beae7ad
Prohibit term casts in aggregatable expressions
HeikoTheissen Jun 15, 2023
6758209
SHOULD -> MAY
HeikoTheissen Jun 15, 2023
86e83fd
Remove redundancy
HeikoTheissen Jun 16, 2023
4eca918
Remark about start nodes of H'
HeikoTheissen Jun 16, 2023
318b8bd
Hierarchical parameter p
HeikoTheissen Jun 16, 2023
f7cad3a
Merge remote-tracking branch 'origin/tc/2023-06-14' into
HeikoTheissen Jun 16, 2023
ab004bd
missing Nullable
HeikoTheissen Jun 16, 2023
d6bb2f7
Discussion with SADL
HeikoTheissen Jun 19, 2023
f717376
POST multiple parents
HeikoTheissen Jun 19, 2023
44d247f
Avoid referential constraint in example 119
HeikoTheissen Jun 19, 2023
774307d
Rephrased
HeikoTheissen Jun 19, 2023
1b3e754
Merge remote-tracking branch 'origin/main' into multiple-parents
HeikoTheissen Jun 19, 2023
383a22d
PDF generation
invalid-email-address Jun 19, 2023
b502c4a
Example 119
HeikoTheissen Jun 20, 2023
bbb0844
Merge remote-tracking branch 'origin/main' into tc/2023-06-14
HeikoTheissen Jun 20, 2023
be61d82
Merge remote-tracking branch 'origin/tc/2023-06-14' into multiple-par…
HeikoTheissen Jun 20, 2023
040baa8
Merge branch 'multiple-parents' of [email protected]:oasis-tcs/odata-spe…
HeikoTheissen Jun 20, 2023
c1d3a62
Definition of root node
HeikoTheissen Jun 20, 2023
4aee568
Multiple parents with weights
HeikoTheissen Jun 21, 2023
e1c2873
Make root
HeikoTheissen Jun 21, 2023
6ae33b8
last-minute changes
HeikoTheissen Jun 21, 2023
3af5f99
Merge remote-tracking branch 'origin/main' into multiple-parents
HeikoTheissen Jun 22, 2023
0eab13d
Simplify `rolluprecursive` (#18)
HeikoTheissen Jun 23, 2023
ad05bc3
As discussed with @GeraldKrause
HeikoTheissen Jun 23, 2023
338063b
Define orphans only in connection with traverse (general case)
HeikoTheissen Jun 26, 2023
d1d73a9
@GeraldKrause's suggestions
HeikoTheissen Jun 26, 2023
70c068f
rephrased node identifier
HeikoTheissen Jun 26, 2023
159815a
rephrased again
HeikoTheissen Jun 26, 2023
16f9de2
@ThomasChadzelek's correction
HeikoTheissen Jun 26, 2023
eb1ddda
Remove redundancy from recursive hierarchy definition
HeikoTheissen Jun 27, 2023
9210ad6
Remove informative reference
HeikoTheissen Jun 27, 2023
bb5b3ee
Node identifier and parents for non-nodes are arbitrary
HeikoTheissen Jun 27, 2023
305c6f8
last-minute changes
HeikoTheissen Jun 28, 2023
17c2446
As discussed with @Hubert-Heijkers
HeikoTheissen Jun 28, 2023
c8a8fe0
Disallow cycles
HeikoTheissen Jun 28, 2023
e00013b
Re-allow cycles
HeikoTheissen Jun 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
@GeraldKrause's suggestions
  • Loading branch information
HeikoTheissen committed Jun 26, 2023
commit d1d73a911e30ce4293ba3343cde72c191c62aa9b
Original file line number Diff line number Diff line change
Expand Up @@ -2565,11 +2565,11 @@ <h3 id="552-recursive-hierarchy"><a name="RecursiveHierarchy" href="#RecursiveHi
<p>A recursive hierarchy is defined on a collection of entities by</p>
<ul>
<li>associating with every entity zero or more entities from the same collection, called its <em>parents</em>, and</li>
<li>identifying entities that are part of the recursive hierarchy through a single primitive property called the <em>node identifier</em>. The entities in the hierarchy are called <em>nodes</em>.</li>
<li>identifying entities that are part of the recursive hierarchy through a single primitive non-null value called the <em>node identifier</em>. These entities that are part of the hierarchy are called <em>nodes</em>.</li>
</ul>
<p>The recursive hierarchy is described in the model by an annotation of the entity type with the complex term <code>RecursiveHierarchy</code> with these properties:</p>
<ul>
<li>The <code>NodeProperty</code> allows identifying a node in the hierarchy. It MUST be a path with single-valued segments ending in a primitive property. This property holds the node identifier of the node in the hierarchy. Entities for which this path evaluates to null are not nodes of the hierarchy.</li>
<li>The <code>NodeProperty</code> allows identifying a node in the hierarchy. It MUST be a path with single-valued segments ending in a primitive property. This property holds the node identifier of the node in the hierarchy and null if the entity is not in the hierarchy.</li>
<li>The <code>ParentNavigationProperty</code> allows navigation to the instance or instances representing the parent nodes. It MUST be a collection-valued or nullable single-valued navigation property path that addresses the entity type annotated with this term.</li>
</ul>
<p>The term <code>RecursiveHierarchy</code> can only be applied to entity types, and MUST be applied with a qualifier, which is used to reference the hierarchy in transformations operating on recursive hierarchies, in <a href="#Groupingwithrolluprecursive">grouping with <code>rolluprecursive</code></a>, and in <a href="#HierarchyFunctions">hierarchy functions</a>. The same entity can serve as nodes in different recursive hierarchies, given different qualifiers.</p>
Expand Down Expand Up @@ -2750,15 +2750,15 @@ <h2 id="56-functions-on-aggregated-entities"><a name="FunctionsonAggregatedEntit
<hr />
<h1 id="6-hierarchical-transformations"><a name="HierarchicalTransformations" href="#HierarchicalTransformations">6 Hierarchical Transformations</a></h1>
<p>The transformations and the <code>rolluprecursive</code> operator defined in this section are called hierarchical, because they make use of a recursive hierarchy and are defined in terms of hierarchy functions introduced in the previous section.</p>
<p>With the exceptions of <code>traverse</code> and <code>rolluprecursive</code> with <code>traverse</code> as fourth parameter, the hierarchical transformations do not define an order on the output set. An order can be reinstated by a subsequent <code>orderby</code> or <code>traverse</code> transformation or a <code>$orderby</code>.</p>
<p>With the exceptions of <code>traverse</code> and <code>rolluprecursive</code> whose fourth parameter ends with <code>traverse</code>, the hierarchical transformations do not define an order on the output set. An order can be reinstated by a subsequent <code>orderby</code> or <code>traverse</code> transformation or a <code>$orderby</code>.</p>
<p>The algorithmic descriptions of the transformations make use of a <em>union</em> of collections, this is defined as an unordered collection containing the items from all these collections and from which duplicates have been removed.</p>
<p>The notation <span class="math inline">\(u[t]\)</span> is used to denote the value of a property <span class="math inline">\(t\)</span>, possibly preceded by a type-cast segment, in an instance <span class="math inline">\(u\)</span>. It is also used to denote the value of a single-valued data aggregation path <span class="math inline">\(t\)</span>, evaluated relative to <span class="math inline">\(u\)</span>. The value of a collection-valued <a href="#DataAggregationPath">data aggregation path</a> is denoted in the <a href="#EvaluationofDataAggregationPaths"><span class="math inline">\(\Gamma\)</span> notation</a> by <span class="math inline">\(γ(u,t)\)</span>.</p>
<p>The notations introduced here are used throughout the following subsections.</p>
<h2 id="61-common-parameters-for-hierarchical-transformations"><a name="CommonParametersforHierarchicalTransformations" href="#CommonParametersforHierarchicalTransformations">6.1 Common Parameters for Hierarchical Transformations</a></h2>
<p>The parameter lists defined in the following subsections have three mandatory parameters in common.</p>
<p>The recursive hierarchy is defined by a parameter pair <span class="math inline">\((H,Q)\)</span>, where <span class="math inline">\(H\)</span> and <span class="math inline">\(Q\)</span> MUST be specified as the first and second parameter. Here, <span class="math inline">\(H\)</span> MUST be an expression of type <code>Collection(Edm.EntityType)</code> starting with <code>$root</code> that has no multiple occurrences of the same entity. <span class="math inline">\(H\)</span> identifies the collection of node entities forming a recursive hierarchy based on an annotation of their common entity type with term <code>RecursiveHierarchy</code> with a <code>Qualifier</code> attribute whose value MUST be provided in <span class="math inline">\(Q\)</span>. The property paths referenced by <code>NodeProperty</code> and <code>ParentNavigationProperty</code> in the <code>RecursiveHierarchy</code> annotation must be evaluable for the nodes in the recursive hierarchy, otherwise the service MUST reject the request. The <code>NodeProperty</code> is denoted by <span class="math inline">\(q\)</span> in this section.</p>
<p>The third parameter MUST be a data aggregation path <span class="math inline">\(p\)</span> with single- or collection-valued segments whose last segment MUST be a primitive property. The node identifier(s) of an instance <span class="math inline">\(u\)</span> in the input set are the primitive values in <span class="math inline">\(γ(u,p)\)</span>, they are reached via <span class="math inline">\(p\)</span> starting from <span class="math inline">\(u\)</span>. Let <span class="math inline">\(p=p_1/…/p_k/r\)</span> with <span class="math inline">\(k≥0\)</span> be the concatenation where each sub-path <span class="math inline">\(p_1,…,p_k\)</span> consists of a collection-valued segment that is preceded by zero or more single-valued segments, and either <span class="math inline">\(r\)</span> consists of one or more single-valued segments or <span class="math inline">\(k≥1\)</span> and <span class="math inline">\({}/r\)</span> is absent. Each segment can be prefixed with a type cast.</p>
<p>Some parameter lists allow as optional fourth or fifth parameter a non-empty sequence <span class="math inline">\(S\)</span> of transformations. The transformations sequence <span class="math inline">\(S\)</span> will be applied to the node collection <span class="math inline">\(H\)</span>, it MUST consist of transformations listed in <a href="#TransformationsProducingaSubset">section 3.3</a> or <a href="#HierarchicalTransformationsProducingaSubset">section 6.2</a> or service-defined bound functions whose output set is a subset of their input set.</p>
<p>Some parameter lists allow as optional fourth or fifth parameter a non-empty sequence <span class="math inline">\(S\)</span> of transformations. The transformations sequence <span class="math inline">\(S\)</span> will be applied to the node collection <span class="math inline">\(H\)</span>. It MUST consist of transformations listed in <a href="#TransformationsProducingaSubset">section 3.3</a> or <a href="#HierarchicalTransformationsProducingaSubset">section 6.2</a> or service-defined bound functions whose output set is a subset of their input set.</p>
<h2 id="62-hierarchical-transformations-producing-a-subset"><a name="HierarchicalTransformationsProducingaSubset" href="#HierarchicalTransformationsProducingaSubset">6.2 Hierarchical Transformations Producing a Subset</a></h2>
<p>These transformations produce an output set that consists of certain instances from their input set, possibly with repetitions or in a different order.</p>
<h3 id="621-transformations-ancestors-and-descendants"><a name="Transformationsancestorsanddescendants" href="#Transformationsancestorsanddescendants">6.2.1 Transformations <code>ancestors</code> and <code>descendants</code></a></h3>
Expand Down
8 changes: 4 additions & 4 deletions docs/odata-data-aggregation-ext/odata-data-aggregation-ext.md
Original file line number Diff line number Diff line change
Expand Up @@ -2447,10 +2447,10 @@ The term `LeveledHierarchy` MUST be applied with a qualifier that can be used to

A recursive hierarchy is defined on a collection of entities by
- associating with every entity zero or more entities from the same collection, called its _parents_, and
- identifying entities that are part of the recursive hierarchy through a single primitive property called the _node identifier_. The entities in the hierarchy are called _nodes_.
- identifying entities that are part of the recursive hierarchy through a single primitive non-null value called the _node identifier_. These entities that are part of the hierarchy are called _nodes_.

The recursive hierarchy is described in the model by an annotation of the entity type with the complex term `RecursiveHierarchy` with these properties:
- The `NodeProperty` allows identifying a node in the hierarchy. It MUST be a path with single-valued segments ending in a primitive property. This property holds the node identifier of the node in the hierarchy. Entities for which this path evaluates to null are not nodes of the hierarchy.
- The `NodeProperty` allows identifying a node in the hierarchy. It MUST be a path with single-valued segments ending in a primitive property. This property holds the node identifier of the node in the hierarchy and null if the entity is not in the hierarchy.
- The `ParentNavigationProperty` allows navigation to the instance or instances representing the parent nodes. It MUST be a collection-valued or nullable single-valued navigation property path that addresses the entity type annotated with this term.

The term `RecursiveHierarchy` can only be applied to entity types, and MUST be applied with a qualifier, which is used to reference the hierarchy in transformations operating on recursive hierarchies, in [grouping with `rolluprecursive`](#Groupingwithrolluprecursive), and in [hierarchy functions](#HierarchyFunctions). The same entity can serve as nodes in different recursive hierarchies, given different qualifiers.
Expand Down Expand Up @@ -2672,7 +2672,7 @@ Example 59: assume the product is an implicit input for a function bound to a co

The transformations and the `rolluprecursive` operator defined in this section are called hierarchical, because they make use of a recursive hierarchy and are defined in terms of hierarchy functions introduced in the previous section.

With the exceptions of `traverse` and `rolluprecursive` with `traverse` as fourth parameter, the hierarchical transformations do not define an order on the output set. An order can be reinstated by a subsequent `orderby` or `traverse` transformation or a `$orderby`.
With the exceptions of `traverse` and `rolluprecursive` whose fourth parameter ends with `traverse`, the hierarchical transformations do not define an order on the output set. An order can be reinstated by a subsequent `orderby` or `traverse` transformation or a `$orderby`.

The algorithmic descriptions of the transformations make use of a _union_ of collections, this is defined as an unordered collection containing the items from all these collections and from which duplicates have been removed.

Expand All @@ -2688,7 +2688,7 @@ The recursive hierarchy is defined by a parameter pair $(H,Q)$, where $H$ and $Q

The third parameter MUST be a data aggregation path $p$ with single- or collection-valued segments whose last segment MUST be a primitive property. The node identifier(s) of an instance $u$ in the input set are the primitive values in $γ(u,p)$, they are reached via $p$ starting from $u$. Let $p=p_1/…/p_k/r$ with $k≥0$ be the concatenation where each sub-path $p_1,…,p_k$ consists of a collection-valued segment that is preceded by zero or more single-valued segments, and either $r$ consists of one or more single-valued segments or $k≥1$ and ${}/r$ is absent. Each segment can be prefixed with a type cast.

Some parameter lists allow as optional fourth or fifth parameter a non-empty sequence $S$ of transformations. The transformations sequence $S$ will be applied to the node collection $H$, it MUST consist of transformations listed in [section 3.3](#TransformationsProducingaSubset) or [section 6.2](#HierarchicalTransformationsProducingaSubset) or service-defined bound functions whose output set is a subset of their input set.
Some parameter lists allow as optional fourth or fifth parameter a non-empty sequence $S$ of transformations. The transformations sequence $S$ will be applied to the node collection $H$. It MUST consist of transformations listed in [section 3.3](#TransformationsProducingaSubset) or [section 6.2](#HierarchicalTransformationsProducingaSubset) or service-defined bound functions whose output set is a subset of their input set.

## <a name="HierarchicalTransformationsProducingaSubset" href="#HierarchicalTransformationsProducingaSubset">6.2 Hierarchical Transformations Producing a Subset</a>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ The term `LeveledHierarchy` MUST be applied with a qualifier that can be used to

A recursive hierarchy is defined on a collection of entities by
- associating with every entity zero or more entities from the same collection, called its _parents_, and
- identifying entities that are part of the recursive hierarchy through a single primitive property called the _node identifier_. The entities in the hierarchy are called _nodes_.
- identifying entities that are part of the recursive hierarchy through a single primitive non-null value called the _node identifier_. These entities that are part of the hierarchy are called _nodes_.

The recursive hierarchy is described in the model by an annotation of the entity type with the complex term `RecursiveHierarchy` with these properties:
- The `NodeProperty` allows identifying a node in the hierarchy. It MUST be a path with single-valued segments ending in a primitive property. This property holds the node identifier of the node in the hierarchy. Entities for which this path evaluates to null are not nodes of the hierarchy.
- The `NodeProperty` allows identifying a node in the hierarchy. It MUST be a path with single-valued segments ending in a primitive property. This property holds the node identifier of the node in the hierarchy and null if the entity is not in the hierarchy.
- The `ParentNavigationProperty` allows navigation to the instance or instances representing the parent nodes. It MUST be a collection-valued or nullable single-valued navigation property path that addresses the entity type annotated with this term.

The term `RecursiveHierarchy` can only be applied to entity types, and MUST be applied with a qualifier, which is used to reference the hierarchy in transformations operating on recursive hierarchies, in [grouping with `rolluprecursive`](#Groupingwithrolluprecursive), and in [hierarchy functions](#HierarchyFunctions). The same entity can serve as nodes in different recursive hierarchies, given different qualifiers.
Expand Down
4 changes: 2 additions & 2 deletions odata-data-aggregation-ext/6 Hierarchical Transformations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The transformations and the `rolluprecursive` operator defined in this section are called hierarchical, because they make use of a recursive hierarchy and are defined in terms of hierarchy functions introduced in the previous section.

With the exceptions of `traverse` and `rolluprecursive` with `traverse` as fourth parameter, the hierarchical transformations do not define an order on the output set. An order can be reinstated by a subsequent `orderby` or `traverse` transformation or a `$orderby`.
With the exceptions of `traverse` and `rolluprecursive` whose fourth parameter ends with `traverse`, the hierarchical transformations do not define an order on the output set. An order can be reinstated by a subsequent `orderby` or `traverse` transformation or a `$orderby`.

The algorithmic descriptions of the transformations make use of a _union_ of collections, this is defined as an unordered collection containing the items from all these collections and from which duplicates have been removed.

Expand All @@ -20,7 +20,7 @@ The recursive hierarchy is defined by a parameter pair $(H,Q)$, where $H$ and $Q

The third parameter MUST be a data aggregation path $p$ with single- or collection-valued segments whose last segment MUST be a primitive property. The node identifier(s) of an instance $u$ in the input set are the primitive values in $γ(u,p)$, they are reached via $p$ starting from $u$. Let $p=p_1/…/p_k/r$ with $k≥0$ be the concatenation where each sub-path $p_1,…,p_k$ consists of a collection-valued segment that is preceded by zero or more single-valued segments, and either $r$ consists of one or more single-valued segments or $k≥1$ and ${}/r$ is absent. Each segment can be prefixed with a type cast.

Some parameter lists allow as optional fourth or fifth parameter a non-empty sequence $S$ of transformations. The transformations sequence $S$ will be applied to the node collection $H$, it MUST consist of transformations listed in [section ##TransformationsProducingaSubset] or [section ##HierarchicalTransformationsProducingaSubset] or service-defined bound functions whose output set is a subset of their input set.
Some parameter lists allow as optional fourth or fifth parameter a non-empty sequence $S$ of transformations. The transformations sequence $S$ will be applied to the node collection $H$. It MUST consist of transformations listed in [section ##TransformationsProducingaSubset] or [section ##HierarchicalTransformationsProducingaSubset] or service-defined bound functions whose output set is a subset of their input set.

## ##subsec Hierarchical Transformations Producing a Subset

Expand Down