[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] (ODATA-1349) Calculate Custom Aggregates from Aggregated Instances
Gerald Krause created ODATA-1349:
------------------------------------
Summary: Calculate Custom Aggregates from Aggregated Instances
Key: ODATA-1349
URL: https://issues.oasis-open.org/browse/ODATA-1349
Project: OASIS Open Data Protocol (OData) TC
Issue Type: New Feature
Components: Data Aggregation
Affects Versions: V4.0_CS02
Environment: [Proposed]
Reporter: Gerald Krause
Fix For: V4.0_CSD04
A CustomAggregate annotation defines a dynamic property that can be used in the aggregate transformation. The current document states in [6.2.3 Custom Aggregates|http://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/cs02/odata-data-aggregation-ext-v4.0-cs02.html#_Toc435016600], second paragraph: âWhen applied to a structured type, the annotation specifies custom aggregates that are available for collections of _instances of that structured type_.â
This also means that a custom aggregate cannot be applied to an intermediate, already aggregated result produced by $apply transformations. Such a result consists of aggregated instances that are based on the structure of the instances from which they have been calculated ([4ÂÂÂÂÂÂÂ Representation of Aggregated Instances|http://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/cs02/odata-data-aggregation-ext-v4.0-cs02.html#_Toc435016593]) and some properties from the originating type have been aggregated away.
This limits the applicability of custom aggregates and prevents requests for use cases like this example: For a custom aggregate âAmountâ, determine the total amount for countries with a sales amount greater than X:
{{GET ~/Sales?$apply=groupby((Country),Amount)/filter(Amount gt X)/aggregate(Amount)}}
This can be a valid request under the assumption that {{Amount}} can be calculated for a set of aggregated instances each having a value for the {{Amount}} property.
--
This message was sent by Atlassian Jira
(v8.3.3#803004)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]