generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 132
OData feature matrix #1993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
agoerler
wants to merge
3
commits into
main
Choose a base branch
from
odata_feature_matrix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
OData feature matrix #1993
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -1052,21 +1052,24 @@ If the `groupby` transformation only includes a subset of the entity keys, the r | |||||
|
||||||
### Transformations | ||||||
|
||||||
| Transformation | Description | Node.js | Java | | ||||||
|------------------------------|---------------------------------------------|:------------------:|:-----:| | ||||||
| `filter` | filter by filter expression | <X/> | <X/> | | ||||||
| `search` | filter by search term or expression | <Na/> | <X/> | | ||||||
| `groupby` | group by dimensions and aggregates values | <X/> | <X/> | | ||||||
| `aggregate` | aggregate values | <X/> | <X/> | | ||||||
| `compute` | add computed properties to the result set | <Na/> | <X/> | | ||||||
| `expand` | expand navigation properties | <Na/> | <Na/> | | ||||||
| `concat` | append additional aggregation to the result | <X/> | <X/> | | ||||||
| `skip` / `top` | paginate | <X/> | <X/> | | ||||||
| `orderby` | sort the input set | <X/> | <X/> | | ||||||
| `topcount`/`bottomcount` | retain highest/lowest _n_ values | <Na/> | <Na/> | | ||||||
| `toppercent`/`bottompercent` | retain highest/lowest _p_% values | <Na/> | <Na/> | | ||||||
| `topsum`/`bottomsum` | retain _n_ values limited by sum | <Na/> | <Na/> | | ||||||
|
||||||
| Transformation | Description | Node.js | Java | | ||||||
|------------------------------|----------------------------------------------|:------------------:|:-----:| | ||||||
| `filter` | filter by filter expression | <X/> | <X/> | | ||||||
| `search` | filter by search term or expression | <Na/> | <X/> | | ||||||
| `groupby` | group by dimensions and aggregates values | <X/> | <X/> | | ||||||
| `aggregate` | aggregate values | <X/> | <X/> | | ||||||
| `compute` | add computed properties to the result set | <Na/> | <X/> | | ||||||
| `expand` | expand navigation properties | <Na/> | <Na/> | | ||||||
| `concat` | append additional aggregation to the result | <X/> | <X/> | | ||||||
| `skip` / `top` | paginate | <X/> | <X/> | | ||||||
| `orderby` | sort the input set | <X/> | <X/> | | ||||||
| `topcount`/`bottomcount` | retain highest/lowest _n_ values | <Na/> | <Na/> | | ||||||
| `toppercent`/`bottompercent` | retain highest/lowest _p_% values | <Na/> | <Na/> | | ||||||
| `topsum`/`bottomsum` | retain _n_ values limited by sum | <Na/> | <Na/> | | ||||||
| `TopLevels` | retain only _n_ levels of a hierarchy | <X/> | <X/><sup>1</sup> | | ||||||
| `ancestors/descendants` | retain ancestors/descendants of specific nodes | <X/> | <X/><sup>1</sup> | | ||||||
|
||||||
<sup>1</sup> - supported on SAP HANA, H2 ad PostgreSQL only | ||||||
|
||||||
#### `concat` | ||||||
|
||||||
|
@@ -1098,7 +1101,6 @@ GET /Order(10)/books? | |||||
|
||||||
This query groups the 500 most expensive books by author name and determines the price of the most expensive book per author. | ||||||
|
||||||
|
||||||
### Aggregation Methods | ||||||
|
||||||
| Aggregation Method | Description | Node.js | Java | | ||||||
|
@@ -1109,8 +1111,11 @@ This query groups the 500 most expensive books by author name and determines the | |||||
| `average` | average of values | <X/> | <X/> | | ||||||
| `countdistinct` | count of distinct values | <X/> | <X/> | | ||||||
| custom method | custom aggregation method | <Na/> | <Na/> | | ||||||
| custom aggregate | predefined custom aggregate<sup>1</sup> | <X/> | <X/> | | ||||||
| `$count` | number of instances in input set | <X/> | <X/> | | ||||||
|
||||||
<sup>1</sup> CAP Node.js does not support custom aggregates for currencies or units of measure. | ||||||
|
||||||
### Custom Aggregates | ||||||
|
||||||
Instead of explicitly using an expression with an aggregation method in the `aggregate` transformation, the client can use a _custom aggregate_. A custom aggregate can be considered as a virtual property that aggregates the input set. It's calculated on the server side. The client doesn't know _How_ the custom aggregate is calculated. | ||||||
|
@@ -1145,7 +1150,7 @@ which is equivalent to: | |||||
GET /Books?$apply=aggregate(stock with sum as stock) HTTP/1.1 | ||||||
``` | ||||||
|
||||||
#### Currencies and Units of Measure | ||||||
#### Currencies and Units of Measure {.java} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This guide doesn't use profiling, so this doesn't work. Do we need to be more specific/clear in the text about those differences?
Suggested change
|
||||||
|
||||||
If a property represents a monetary amount, it may have a related property that indicates the amount's *currency code*. Analogously, a property representing a measured quantity can be related to a *unit of measure*. To indicate that a property is a currency code or a unit of measure it can be annotated with the [Semantics Annotations](https://help.sap.com/docs/SAP_NETWEAVER_750/cc0c305d2fab47bd808adcad3ca7ee9d/fbcd3a59a94148f6adad80b9c97304ff.html) `@Semantics.currencyCode` or `@Semantics.unitOfMeasure`. | ||||||
The aggregation method (typically, sum) is specified with the `@Aggregation.default` annotation. | ||||||
|
@@ -1179,7 +1184,7 @@ A custom aggregate for a currency code or unit of measure should also be exposed | |||||
| chain transformations | <X/> | <X/> | | ||||||
| chain transformations within group by | <Na/> | <Na/> | | ||||||
| `groupby` with `rollup`/`$all` | <Na/> | <Na/> | | ||||||
| `$expand` result set of `$apply` | <Na/> | <Na/> | | ||||||
| `$expand` result set of `$apply` | <Na/> | <X/> | | ||||||
| `$filter`/`$search` result set | <X/> | <X/> | | ||||||
| sort result set with `$orderby` | <X/> | <X/> | | ||||||
| paginate result set with `$top`/`$skip` | <X/> | <X/> | | ||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.