OData TC meeting #218 Thursday June 21, 2018

Acting chair: Ralf

Chat transcript from room: odatatc
2018-06-21 0800-1000 PDT

1. Roll call

1.1 Members present

    x
    George Ericson (Dell)
    Gerald Krause (SAP SE)
    Hubert Heijkers (IBM)
    Mark Biamonte (Progress Software)
    Matthew Borges (SAP SE)
    Michael Pizzo (Microsoft) a.k.a. Mike
    Ralf Handl (SAP SE)
    Ramesh Reddy (Red Hat)
    Stefan Hagen (Individual)

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

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

2. Approve agenda

Mark: asks why www.odata.org links to V4.01 specifications

Ralf: V4.01 specs point back to V4 under

- Related work:
-- This specification replaces or supersedes:

Mike: next Face-to-Face

Mike: September 2018

Ralf: Please check your calendars and let's find a date next meeting

Mike: Microsoft might host the meeting

Agenda is approved unchanged as published

3. Approve minutes from previous meeting(s)

3.1 Minutes from June 14, 2018 TC meeting #217

URL = https://www.oasis-open.org/committees/download.php/63287/odata-meeting-217_on-20180614-minutes.html

Minutes approved unchanged as published

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

4.1 Action items due

None

5. Issues

5.1 Data Aggregation: NEW or OPEN

5.1.1 ODATA-1068 - 3.12 Transformation expand: require at least two parameters, with innermost expansion requiring a filter()

Ralf:

..../expand(Products)/.... doesn't do anything
.../expand(Products,filter(...)/... actually changes something
GET ~/Categories?$apply=expand(Products,expand(Sales,filter(Amount gt 3)))
$apply=expand(Products,expand(Sales,filter(Amount gt 3)),expand(Suppliers,expand(Products,filter(true))))

Hubert: I move to resolve ODATA-1068 as proposed. Ralf seconds.

Ralf: ODATA-1068 is RESOLVED as proposed

5.1.2 ODATA-1041 - Broaden definitions of transformations topcount and bottomcount

Gerald:

GET ~/Sales?$apply=topcount(2,Amount)
$apply=groupby((Product),topcount(1,Date))

The topcount transformation takes two parameters.

The first parameter specifies the number of instances to return in the transformed set. 
It MUST be an expression that can be evaluated on the set level and MUST result in a positive integer.

The second parameter specifies the value by which the instances are compared for determining the result set. 
It MUST be an expression that can be evaluated on instances of the input set and MUST result in a primitive numeric value.

The transformation retains the number of instances specified by the first parameter that have the highest values specified by the second expression.

In case the value of the second expression is ambiguous, the service MUST impose a stable ordering before 
determining the returned instances.

Gerald: Proposal: Replace current definitions by "[...] and MUST result in values of a primitive type whose values are totally ordered.".

Ralf: ODATA-1041 is OPEN

Gerald: I move to resolve ODATA-1041 as proposed. Hubert seconds.

Ralf: ODATA-1041 is RESOLVED as proposed

5.1.3 ODATA-1040 - Clarification of term "expression"

Gerald:

The keyword with is used to apply an aggregation method to an aggregatable property or expression.
Instead of applying a single aggregation method for calculating the aggregated value of an expression across all properties no

Proposal: At the beginning of section 3 for $apply, define that any reference to an expression, 
if not specified otherwise, refers to "those expressions that could also be used in a $filter 
system query option and result in a value of primitive type". With such a statement in the preamble, 
this phrase could then be deleted from some some sub-sections.

Ralf: http://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/odata-data-aggregation-ext-v4.0.html

Ralf: http://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/cs02/odata-data-aggregation-ext-v4.0-cs02.html#_Toc435016563

Ralf:

This specification defines the following terms:

- Aggregatable Property  a property for which the values can be aggregated using an aggregation method.
- Aggregation Method  a method that can be used to aggregate an aggregatable property or expression
- Standard Aggregation Method  one of the standard aggregation methods: sum, min, max, average, and countdistinct
- Custom Aggregation Method  a custom aggregation method that can be applied to expressions of a specified type
- Custom Aggregate  a dynamic property that can appear in an aggregate clause
- Groupable Property  a property whose values can be used to group entities or complex type instances for aggregation.
- Hierarchy  an arrangement of groupable properties whose values are represented as being above, below, or at the same level as one another.

Ralf: ODATA-1040 is OPEN

Gerald: revise proposal to define "Expression" in section 2.1

Gerald: New proposal: In section 2.1, add a definition of expressions: is a common expression resulting in a value of primitive type

George: if needed define "general expression" and "primitive expression" and use appropriately

Gerald:

In section 2.1, add a definition of expressions: is a common expression; 
and of primitive expression being an expression resulting in a value of primitive type

Check all occurrencies in the text for occurrences of "expression" and update accordingly.

Gerald:

In section 2.1, add a definition of expressions: is a common expression

add a definition of primitive expression being an expression resulting in a value of primitive type or a boolCommonExpression

Check all occurrencies in the text for occurrences of "expression" and update accordingly.

Defered: Gerald and Ralf to come up with a concrete proposal

5.1.4 ODATA-1038 - Clarify term "simple value"

Ralf: Guess: number, string, boolean

Ralf: Not: Geo, Stream

Defered: Gerald and Ralf to come up with a concrete proposal

Ralf: ODATA-1038 is OPEN

5.1.5 ODATA-947 - Transformation for computing ratios with aggregated values

Ralf:

Description

It is interesting to get the ratio between an individual and an aggregated value from the same input set. 

Examples:

1. Customer classification: Revenue per customer in relation to total revenue
2. Revenue trend: Revenue per year in relation to total revenue for any given customer
3. Order size: Order volume relative to average order volume

They cannot be expressed with combining groupby/aggregate, because the individual 
entity values are no longer available after these transformations have produced an aggregated value.

The ratio transformation takes a comma-separated list of one or more parameters 
describing a value, an aggregate expression, and an alias:

ratio(valueExpression to aggregateExpression as alias, )

A valueExpression may be an expression valid in a $filter system query option on the 
input set that results in a simple value. The aggregateExpression is an aggregate expression 
as defined for transformation aggregate (section 3.1). The alias introduces a dynamic property 
for the ratio values in the result set that are of type Edm.Decimal with unspecified precision 
and variable scale.

The transformation first determines the aggregated value for the input set by applying 
the aggregateExpression. Then, it calculates for every entity in the input set the ratio 
between the valueExpression and the aggregated value and adds the result as dynamic property 
to the entity that is put into the result set.

Applied to examples:

Re 1:

GET ~/Sales?$apply=
groupby((Customer),aggregate(Amount with sum as CustomerAmount)) 
/ratio(CustomerAmount to CustomerAmount with sum as RevenueContribution)

Re 2:

GET ~/Sales?$apply=
groupby((Customer,Year) aggregate(Amount with sum as CustomerYearAmount))
/groupby((Customer),ratio(CustomerYearAmount to CustomerYearAmount with sum as RevenueTrend)

Re 3:

GET ~/Sales?$apply=ratio(Amount to Amount with average as RelativeOrderSize)

In all these example, the value expression is identical with the base in the aggregate expression, 
that is, they follow the pattern: ratio(X to X with M as A). If there were no other use cases, 
the syntax could be simplified to: ratio(X with M as A).

Gerald:

GET ~/Sales?$apply=
groupby((Customer),aggregate(Amount with sum as CustomerAmount))
/ratio(CustomerAmount to CustomerAmount with sum as RevenueContribution)
ratio(valueExpression to aggregateExpression as alias, )
Order size: Order volume relative to average order volume
GET ~/Sales?$apply=ratio(Amount to Amount with average as RelativeOrderSize)

Ralf: ODATA-947 is OPEN

Ralf:

ratio combines aggregate and compute in a special way
Maybe there's a more generic way to express that

Hubert:

think about similar use cases
ratio() is very useful
combine this with hierarchies
revenue contribution of offices to countries to continents
ability to refer to the input set

Ralf: Defer until we have more use cases and a clearer understanding

5.1.6 ODATA-946 - Clarify scope for $apply

Ralf:

expandOption =/ apply

Ralf: ODATA-946 is OPEN

Ralf: Adjust section 3, first sentence. Changes are enclosed with : *Aggregation behavior **on a collection of instances* is triggered

Gerald: I move to resolve ODATA-946 as proposed. Mike seconds.

Ralf: ODATA-946 is RESOLVED as proposed

6. Next meetings

Agreed next meetings:

Thursday June 28, 2018 during 8-10 am PDT (17:00-19:00 CEST)
Thursday July 05, 2018 during 8-10 am PDT (17:00-19:00 CEST)

Matt: will be away July 5th

Hubert: cannot attend July 05 and 12

George: expects to attend on July 05

7. AOB and wrap up

None.

Meeting adjourned by chair.