-
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:
Section 3.1 introduces $count as one of several options for aggregate expressions.
Example 57 applies $count relative to a collection-valued navigation property, which is a different use case that is backed by the commonExpr ABNF rule to address the count of a collection (see URL spec, section 4.8). Since section 3.1 requires commonExpr to be augmented with an aggregation method, such a method must be added to the request in the example.
The current aggregation ABNF contains a rule for $count with a path prefix, which needs to be cleaned up accordingly.
Field | Original Value | New Value |
---|---|---|
Resolution |
https://github.com/oasis-tcs/odata-abnf/pull/12
|
Proposal |
Update request in example 57:
{{GET ~/Products?$apply=groupby((Name),aggregate(Sales/$count *with sum* as SalesCount))}} |
Status | New [ 10000 ] | Open [ 1 ] |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Resolved [ 5 ] |
Status | Resolved [ 5 ] | Open [ 1 ] |
Proposal |
Update request in example 57:
{{GET ~/Products?$apply=groupby((Name),aggregate(Sales/$count *with sum* as SalesCount))}} |
Update request in example 57:
{{GET ~/Products?$apply=groupby((Name),aggregate(Sales/$count *with sum* as SalesCount))}} Restrict $count to the top level of aggregate() with the meaning of "put the number of input records into the result record and name it ..." Make sure that $apply=groupby((Name),aggregate($count as ProductCount,Sales(Amount with sum as Total))) still is allowed |
Status | Open [ 1 ] | Resolved [ 5 ] |
Status | Resolved [ 5 ] | Open [ 1 ] |
Proposal |
Update request in example 57:
{{GET ~/Products?$apply=groupby((Name),aggregate(Sales/$count *with sum* as SalesCount))}} Restrict $count to the top level of aggregate() with the meaning of "put the number of input records into the result record and name it ..." Make sure that $apply=groupby((Name),aggregate($count as ProductCount,Sales(Amount with sum as Total))) still is allowed |
Update request in example 57:
{{GET ~/Products?$apply=groupby((Name),aggregate(Sales/$count *with sum* as SalesCount))}} Rewrite section on aggregate, last item in list on "virtual property $count": replace it with "$count, which is a shortcut for 1 with sum" |
Status | Open [ 1 ] | Resolved [ 5 ] |
Environment | Proposed | Applied |
Status | Resolved [ 5 ] | Applied [ 10002 ] |
Status | Applied [ 10002 ] | Closed [ 6 ] |
Resolved as proposed 2018-11-15.