elasticsearch/docs/reference/esql/functions/values.asciidoc
Nik Everett c74490c137
ESQL: Enable VALUES agg for datetime (#107016)
When I wrote the `VALUES` agg I didn't plug it in for `datetime` fields.
Ooops. We just have to plug it in.
2024-04-03 07:42:40 -04:00

38 lines
1.2 KiB
Text

[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`, `geo_shape`, or `cartesian_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]
|===