nickva opened a new pull request, #5498: URL: https://github.com/apache/couchdb/pull/5498
`_first` and `_last` reducers return the first, and respectively, the last value in a view group. They can be useful with complex keys, for example, when there are some timestamped entries that may like key = `[device, timestamp]`, and we would like to get only the latest value by timestamp by grouping by device with `group_level=1`: ``` [dev1, 2025-03-28T00:01:02] : 100.0 [dev1, 2025-03-28T00:03:04] : 91.5 [dev2, 2025-03-29T00:10:15] : 87.6 [dev2, 2025-03-29T00:13:09] : 97.8 ``` We could use the `_last` reducer with to return: ``` [dev1] : 91.5 [dev2] : 97.8 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org