-
Type:
Improvement
-
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:
The current specification of the aggregate function (ODATA-1244) leaves undefined what the "input collection" is in cases like
$filter=Sales/any(p:aggregate(p/Amount mul TaxRate with sum) gt 5)
that include property paths with and without lambda variable.
Context instance is an excellent name for the existing symbol $this.
How about defining an explicit symbol $these for the context collection and requiring the aggregate(...) common expression to be prefixed with a collection path, which can be $these?
So we could use pathToCollection/aggregate(...) to aggregate a collection within the context instance, and $these/aggregate(...) to aggregate the context collection itself.
This would avoid to make aggregate working implicitly on the not yet defined context collection, in contrast to all other expressions.