OData TC meeting #213 Thursday May 03, 2018

Acting chair: Mike

Chat transcript from room: odatatc
2018-05-03 0800-1000 PDT

1. Roll call

1.1 Members present

    George Ericson (Dell)
    Gerald Krause (SAP SE)
    Mark Biamonte (Progress Software)
    Martin Zurmuehl (SAP SE)
    Michael Pizzo (Microsoft) a.k.a. Mike
    Ralf Handl (SAP SE)
    Ramesh Reddy (Red Hat)
    Stefan Hagen (Individual)
    Ted Jones (Red Hat)

Quorum achieved. Details cf. normative attendance sheet for this meeting (event_id=46254).

Notes taken by all and subsequently edited for readability by Stefan.

2. Approve agenda

Gerald: two issues for data aggregation:

https://issues.oasis-open.org/browse/ODATA-1158 - Transformations for limiting the number of entities in the result of a $apply transformation
https://issues.oasis-open.org/browse/ODATA-1157 - Transformation for sorting entities created by a $apply transformation

Agenda is approved with the above change

3. Approve minutes from previous meeting(s)

3.1 Minutes from April 26, 2018 TC meeting #212

https://www.oasis-open.org/committees/download.php/63048/odata-meeting-212_on-20180426-minutes.html

Minutes approved unchanged as published.

4. Review action items [Link to Action item list]

4.1 Action items due

4.1.1 #0038 Prepare proposal for REST Profile / OData Essentials

Ted: Not to be confused with RESTEasy. http://resteasy.jboss.org/

Ralf:

Goals: easy to understand, fun to read, as brief as possible
Examples first, then explanations
https://www.whois.com/whois/rest-ez.com is not available!!
https://www.whois.com/whois/rest-ez.org is ok
https://www.whois.com/whois/rest-ez.io is available

Ralf: Next steps:

- Mike: send out document
- all: give feedback

5. Issues

5.1 Data Aggregation

5.1.1 ODATA-1158 - Transformations for limiting the number of entities in the result of a $apply transformation

Ralf: Description:

Transformation concat combines entity collections returned by two or more transformation sequences in a new, concatenated collection.

For limiting the number of items returned from the overall result collection, today the only way is to use system query options $skip and $top. 
It is currently not possible to limit the individual result collections of the transformation sequences passed to concat.

There are use cases requiring this ability. As an example, consider a request asking for (1) the grand total sales amount along 
with (2) the sales figures for the first 10 customers. 
Note that (1) may return a collection with more than one entry in case multiple currencies are involved, hence a global $top does not give 
full control to the client. In the worst case with more than ten currencies, not a single customer sales amount would be returned. 
If the aggregated result is put into a stable order with the orderby transformation (described in <issue>), this can be avoided with a top transformation:

GET ~/Sales?$apply=
concat( groupby( (Currency), Amount with sum as TotalAmount ),
groupby( (Customer,Currency), Amount with sum as TotalAmount )
/orderby( Customer,Currency )
/top( 10 )
)

Another example also involving a skip transformation could be a request fetching sales amounts per customer and month in pages of 
ten data points per request, complemented with minimum and maximum amounts of the entities on this page. 
The request for the fourth page would look like:

GET ~/Sales?$apply=
groupby( (Customer,Time/Month,Currency), Amount with sum as TotalAmount ),
/orderby( Customer,Time/Month,Currency )
/skip( 30 )/top( 10 )
/concat( 
identity, 
aggregate( Amount with min as MinAmount, Amount with max as MaxAmount ) )
[18:29] Ralf Handl (SAP SE): Proposal:
Define transformations skip and top:

The skip transformation takes a non-negative integer n as argument and excludes the first n entities of the input set and returns 
all entities starting at position n+1.
The top transformation takes a non-negative integer n as argument and returns the number of available entities from the input 
set up to but not greater than the specified value n.

Gerald:

GET ~/Sales?$apply=
concat( groupby( (Currency), Amount with sum as TotalAmount ),
groupby( (Customer,Currency), Amount with sum as TotalAmount )
/orderby( Customer,Currency )
/top( 10 )
)

GET ~/Sales?$apply=
groupby( (Customer,Time/Month,Currency), Amount with sum as TotalAmount ),
/orderby( Customer,Time/Month,Currency )
/skip( 30 )/top( 10 )
/concat( 
identity, 
aggregate( Amount with min as MinAmount, Amount with max as MaxAmount ) )

Mike:

would need to define whether filter() preserves order or not
individual transformations for top() and skip() allow e.g. top(10)/skip(20) leading to an empty result
skip() should preserve order to not make top() meaningless or require orderby()/skip()/orderby()/top()
top and skip need to preserve order
top and skip without orderby are kinda meaningless, but allowed.
we don't define whether or not transformations in general preserve ordering

Gerald: some other (i.e., custom) transformation may already define an ordering, in which case the orderby would not be required

Mike: relevant use case for introducing orderby, top, skip as transformations come from concat

Ralf: The topxxx and bottomxxx transformations already are defined not to change the order of instances in the input set, same for concat

Ralf: Gerald to update the proposal

5.1.2 ODATA-1157 - Transformation for sorting entities created by a $apply transformation

Not discussed

7. Next meetings

Skip this one:

Thursday May 10, 2018 during 8-10 am PDT (17:00-19:00 CEST)  Note: public holiday in Germany

Do these:

Thursday May 17, 2018 during 8-10 am PDT (17:00-19:00 CEST)
Thursday May 24, 2018 during 8-10 am PDT (17:00-19:00 CEST)

8. AOB and wrap up

None.

Meeting adjourned by chair.