1234567891011121314151617181920212223242526272829303132333435363738 |
- [discrete]
- [[esql-agg-values]]
- === `VALUES`
- preview::["Do not use `VALUES` on production environments. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features."]
- *Syntax*
- [source,esql]
- ----
- VALUES(expression)
- ----
- `expression`::
- Expression of any type except `geo_point`, `cartesian_point`, or `geo_shape`.
- *Description*
- Returns all values in a group as a multivalued field. The order of the returned values isn't guaranteed.
- If you need the values returned in order use <<esql-mv_sort>>.
- WARNING: This can use a significant amount of memory and ES|QL doesn't yet
- grow aggregations beyond memory. So this aggregation will work until
- it is used to collect more values than can fit into memory. Once it
- collects too many values it will fail the query with
- a <<circuit-breaker-errors, Circuit Breaker Error>>.
- *Example*
- [source.merge.styled,esql]
- ----
- include::{esql-specs}/string.csv-spec[tag=values-grouped]
- ----
- [%header.monospaced.styled,format=dsv,separator=|]
- |===
- include::{esql-specs}/string.csv-spec[tag=values-grouped-result]
- |===
|