OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] Commented: (ODATA-239) Allowing expressions to be passed as parameters to (super) functions


    [ http://tools.oasis-open.org/issues/browse/ODATA-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32604#action_32604 ] 

Hubert Heijkers commented on ODATA-239:
---------------------------------------

Correct, we don't think any consumer/client would need to know how/when the expression gets evaluated but the only 'missing' piece for generic consumers/clients would be the 'scope' in which the expression gets evaluated. In the TopN example we have in the description the value for N for exampe could have been "count() div 2" for example meaning I want the top half of the set. The N expression would be expected to execute in the scope of the collection where count would return the number of entities in that collection whereas the value expression is an expression that is executed within the scope of each and every entity in that collection. Generic query tools might/would need to know/understand this presumable. We discussed introducing an annotation for that which would effectively specify the scope, typically a type, in which the expression would be executed. Interesting remaining question though would be how to specify this for super functions that are not specifically bound to a particular type like TopN?

> Allowing expressions to be passed as parameters to (super) functions
> --------------------------------------------------------------------
>
>                 Key: ODATA-239
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-239
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: New Feature
>          Components: OData CSDL
>    Affects Versions: V4.0_WD01
>         Environment: [Proposed]
>            Reporter: Hubert Heijkers
>
> To be able to use/extend the set of functions that can be used in a $apply query option functions need parameters of type expression, which expression can then be applied to each and every instance in the set they are processing. 
> An very simple example of such a function would:
> $apply=GroupBy()/TopN(N=5, Value=Revenue)
> Where 5 is just a number indicating the top N we are interested in but were 'Revenue' is actually an expression referring to the Revenue property of the entity in the set the function is acting upon. A better example in which this becomes more apparent would be:
> $apply=GroupBy()/TopN(N=5, Value=Revenue sub Cost)
> For build in functions we can obviously simply define this but currently there is no way of defining a 'custom' function that could implement the same behavior because we can't pass in expressions.
> We then could annotate these functions to signal to tools that they can be used in $apply.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]