Skip to content

Commit

Permalink
ESQL: Added Median and MedianAbsoluteDeviation aggregations tests and…
Browse files Browse the repository at this point in the history
… kibana docs (#111231)
  • Loading branch information
ivancea authored Jul 26, 2024
1 parent 4880205 commit 826d494
Show file tree
Hide file tree
Showing 25 changed files with 495 additions and 68 deletions.
8 changes: 4 additions & 4 deletions docs/reference/esql/functions/aggregation-functions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ The <<esql-stats-by>> command supports these aggregate functions:
* <<esql-agg-count>>
* <<esql-agg-count-distinct>>
* <<esql-max>>
* <<esql-agg-median>>
* <<esql-agg-median-absolute-deviation>>
* <<esql-median>>
* <<esql-median_absolute_deviation>>
* <<esql-min>>
* <<esql-percentile>>
* experimental:[] <<esql-st_centroid_agg>>
Expand All @@ -25,10 +25,10 @@ The <<esql-stats-by>> command supports these aggregate functions:

include::count.asciidoc[]
include::count-distinct.asciidoc[]
include::median.asciidoc[]
include::median-absolute-deviation.asciidoc[]
include::layout/avg.asciidoc[]
include::layout/max.asciidoc[]
include::layout/median.asciidoc[]
include::layout/median_absolute_deviation.asciidoc[]
include::layout/min.asciidoc[]
include::layout/percentile.asciidoc[]
include::layout/st_centroid_agg.asciidoc[]
Expand Down
7 changes: 7 additions & 0 deletions docs/reference/esql/functions/appendix/median.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/description/median.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions docs/reference/esql/functions/examples/median.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions docs/reference/esql/functions/kibana/definition/median.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions docs/reference/esql/functions/kibana/docs/median.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions docs/reference/esql/functions/layout/median.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 0 additions & 52 deletions docs/reference/esql/functions/median.asciidoc

This file was deleted.

6 changes: 6 additions & 0 deletions docs/reference/esql/functions/parameters/median.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/reference/esql/functions/signature/median.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/reference/esql/functions/types/median.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ double e()
"double log10(number:double|integer|long|unsigned_long)"
"keyword|text ltrim(string:keyword|text)"
"boolean|double|integer|long|date|ip max(field:boolean|double|integer|long|date|ip)"
"double|integer|long median(number:double|integer|long)"
"double|integer|long median_absolute_deviation(number:double|integer|long)"
"double median(number:double|integer|long)"
"double median_absolute_deviation(number:double|integer|long)"
"boolean|double|integer|long|date|ip min(field:boolean|double|integer|long|date|ip)"
"boolean|cartesian_point|cartesian_shape|date|double|geo_point|geo_shape|integer|ip|keyword|long|text|version mv_append(field1:boolean|cartesian_point|cartesian_shape|date|double|geo_point|geo_shape|integer|ip|keyword|long|text|version, field2:boolean|cartesian_point|cartesian_shape|date|double|geo_point|geo_shape|integer|ip|keyword|long|text|version)"
"double mv_avg(number:double|integer|long|unsigned_long)"
Expand Down Expand Up @@ -283,8 +283,8 @@ log |Returns the logarithm of a value to a base. The input can be any
log10 |Returns the logarithm of a value to base 10. The input can be any numeric value, the return value is always a double. Logs of 0 and negative numbers return `null` as well as a warning.
ltrim |Removes leading whitespaces from a string.
max |The maximum value of a field.
median |The value that is greater than half of all values and less than half of all values.
median_absolut|The median absolute deviation, a measure of variability.
median |The value that is greater than half of all values and less than half of all values, also known as the 50% <<esql-percentile>>.
median_absolut|"Returns the median absolute deviation, a measure of variability. It is a robust statistic, meaning that it is useful for describing data that may have outliers, or may not be normally distributed. For such data it can be more descriptive than standard deviation. It is calculated as the median of each data point's deviation from the median of the entire sample. That is, for a random variable `X`, the median absolute deviation is `median(|median(X) - X|)`."
min |The minimum value of a field.
mv_append |Concatenates values of two multi-value fields.
mv_avg |Converts a multivalued field into a single valued field containing the average of all of the values.
Expand Down Expand Up @@ -406,8 +406,8 @@ log |double
log10 |double |false |false |false
ltrim |"keyword|text" |false |false |false
max |"boolean|double|integer|long|date|ip" |false |false |true
median |"double|integer|long" |false |false |true
median_absolut|"double|integer|long" |false |false |true
median |double |false |false |true
median_absolut|double |false |false |true
min |"boolean|double|integer|long|date|ip" |false |false |true
mv_append |"boolean|cartesian_point|cartesian_shape|date|double|geo_point|geo_shape|integer|ip|keyword|long|text|version" |[false, false] |false |false
mv_avg |double |false |false |false
Expand Down
Loading

0 comments on commit 826d494

Please sign in to comment.