elasticsearch/docs/reference/esql/functions/aggregation-functions.asciidoc
Iván Cea Fontenla 5d3512fb33
ESQL: Fix Max doubles bug with negatives and add tests for Max and Min (#110586)
`MAX()` currently doesn't work with doubles smaller than
`Double.MIN_VALUE` (Note that `Double.MIN_VALUE` returns the smallest
non-zero positive, not the smallest double).

This PR adds tests for Max and Min, and fixes the bug (Detected by the
tests).

Also, as the tests now generate the docs, replaced the old docs with the
generated ones, and updated the Max&Min examples.
2024-07-09 21:05:00 +10:00

38 lines
957 B
Text

[[esql-agg-functions]]
==== {esql} aggregate functions
++++
<titleabbrev>Aggregate functions</titleabbrev>
++++
The <<esql-stats-by>> command supports these aggregate functions:
// tag::agg_list[]
* <<esql-avg>>
* <<esql-agg-count>>
* <<esql-agg-count-distinct>>
* <<esql-max>>
* <<esql-agg-median>>
* <<esql-agg-median-absolute-deviation>>
* <<esql-min>>
* <<esql-agg-percentile>>
* experimental:[] <<esql-agg-st-centroid>>
* <<esql-agg-sum>>
* <<esql-top>>
* <<esql-agg-values>>
* experimental:[] <<esql-agg-weighted-avg>>
// end::agg_list[]
include::count.asciidoc[]
include::count-distinct.asciidoc[]
include::median.asciidoc[]
include::median-absolute-deviation.asciidoc[]
include::percentile.asciidoc[]
include::st_centroid_agg.asciidoc[]
include::sum.asciidoc[]
include::layout/avg.asciidoc[]
include::layout/max.asciidoc[]
include::layout/min.asciidoc[]
include::layout/top.asciidoc[]
include::values.asciidoc[]
include::weighted-avg.asciidoc[]