Skip to content

Commit

Permalink
Update cds-ql.md (#711)
Browse files Browse the repository at this point in the history
* Update cds-ql.md

Add warning:
When using the combination of $apply with groupby and only a subset of keys is included, it can lead to the result not being uniquely sorted anymore.

* move warning to Data Aggregation

* Update advanced/odata.md

Co-authored-by: Johannes Vogel <[email protected]>

---------

Co-authored-by: René Jeglinsky <[email protected]>
Co-authored-by: Johannes Vogel <[email protected]>
  • Loading branch information
3 people authored Apr 2, 2024
1 parent e6b0007 commit 80dafef
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions advanced/odata.md
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,10 @@ GET /Orders(10)/books?

This request operates on the books of the order with ID 10. First it filters out the books from the year 2000 to an intermediate result set. The intermediate result set is then grouped by author name and the price is averaged. Finally, the result set is sorted by title and only the top 3 entries are retained.

::: warning
If the `groupby` transformation only includes a subset of the entity keys, the result order might be unstable.
:::

### Transformations

| Transformation | Description | Node.js | Java |
Expand Down

0 comments on commit 80dafef

Please sign in to comment.