Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-581

Remove parameterless aggregate() transformation



    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_CSD01
    • Fix Version/s: V4.0_CSD02
    • Component/s: Data Aggregation
    • Labels:
    • Environment:



      the groupiby transformation splits the input set into subsets based on the specified grouping properties, applies the specified transformation to each set, and then combines them into a single result.

      In some cases it is useful to do grouping without any transformation of the intermediate subsets in order to get the unique combination of values across the grouping properties. In CSD01 we allowed specification of the aggregate transformation with no parameters as a way to say "apply grouping without any aggregate". so Customers?$apply=groupby((Name),aggregate()) would return the distinct customer names without applying an aggregate.

      Later, we added an overload of the groupby method that took only the grouping properties, not the parameterless aggregate method, and said that the two were equivalent. So the same request could be (more simply and intuitively) Customers?$apply=groupby((Name)).

      However, we didn't get rid of the old syntax, we just defined the new syntax as a shortcut for passing the paramterless aggregate as a second argument. Which means we have two ways of doing the same thing, one short and intuitive, and one through what looks like a bit of a hack.

      We have no other reason to keep the parameterless aggregate, so we should go back to requiring that aggregate have one or more parameters.




            • Assignee:
              mikep Michael Pizzo
            • Watchers:
              0 Start watching this issue


              • Created: