Skip to content

Commit b8e2fce

Browse files
nik9000leemthompo
andauthored
ESQL: Document VALUES uniques (#128157)
Documents that the VALUES aggregate function returns unique documents and points folks to the TOP aggregate function if they want to keep dupes. Closes #128091 --------- Co-authored-by: Liam Thompson <[email protected]>
1 parent 54af815 commit b8e2fce

File tree

5 files changed

+15
-5
lines changed
  • docs/reference/query-languages/esql
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate

5 files changed

+15
-5
lines changed

docs/reference/query-languages/esql/_snippets/functions/appendix/values.md

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/description/values.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/functions/values.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/docs/functions/values.md

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/Values.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,15 @@ public class Values extends AggregateFunction implements ToAggregator {
7272
"long",
7373
"version" },
7474
preview = true,
75-
description = "Returns all values in a group as a multivalued field. The order of the returned values isn’t guaranteed. "
76-
+ "If you need the values returned in order use <<esql-mv_sort>>.",
75+
description = """
76+
Returns unique values as a multivalued field. The order of the returned values isn’t guaranteed.
77+
If you need the values returned in order use
78+
[`MV_SORT`](/reference/query-languages/esql/functions-operators/mv-functions.md#esql-mv_sort).""",
7779
appendix = """
80+
::::{tip}
81+
Use [`TOP`](/reference/query-languages/esql/functions-operators/aggregation-functions.md#esql-top)
82+
if you need to keep repeated values.
83+
::::
7884
::::{warning}
7985
This can use a significant amount of memory and ES|QL doesn’t yet
8086
grow aggregations beyond memory. So this aggregation will work until

0 commit comments

Comments
 (0)