-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: V4.0_CS02
-
Fix Version/s: V4.0_CSD04
-
Component/s: Data Aggregation
-
Labels:None
-
Environment:
Applied
-
Proposal:
-
Resolution:
$all is defined in 3.10.2 Grouping with rollup and $all. For unnamed leveled hierarchies it may be used to introduce a virtual root level that allows to aggregate over all specified hierarchy levels. In other words, this feature offers a “grand total” for unnamed leveled hierarchies.
The feature is equally interesting for named hierarchies, where the hierarchy is specified by the qualifier of a LeveledHierarchy annotation. However, in this case, $all cannot be expressed and thus no “grand total” can be requested from a named hierarchy.
The same limitation applies to groupby((rollup(HierQual)),...), if HierQual refers to a qualifier of an annotation with term RecursiveHierarchy, which is discussed in ODATA-1218.
Simply allowing $all also for named hierarchies does not work as the following example shows:
Rollup with named leveled hierarchy:
GET Sales?$apply=groupby(rollup(Product/ProductHierarchy), T)
is equivalent to unnamed leveled hierarchy
GET Sales?$apply=groupby(rollup(Product/Name,Product/Category/Name), T)
Additionally rolling up the root levels:
- For unnamed leveled hierarchy
GET Sales?$apply=groupby(rollup($all,Product/Name,Product/Category/Name), T) - For named hierarchy this does not work, because the qualifier may clash with property name, e.g.
GET Sales?$apply=groupby(rollup($all,Product/ProductHierarchy), T)
- Related to
-
ODATA-1218 Enhance hierarchy processing
- Closed