Skip to content

Commit

Permalink
Added Percentile aggregation tests and Kibana docs (elastic#111050)
Browse files Browse the repository at this point in the history
- Added Percentile aggregation tests and autogen docs
- Added a new "appendix" section to FunctionInfo. Existing Percentile docs had a final, long section with info, and we need this to leep it. We have an "detailedDescription" attribute already, but it's right after the description, and it would make it harder to read the important bits of the function (types, examples...). So I'm not reusing it.
  • Loading branch information
ivancea authored and salvatore-campagna committed Jul 23, 2024
1 parent 3031855 commit 6686c54
Show file tree
Hide file tree
Showing 18 changed files with 427 additions and 76 deletions.
4 changes: 2 additions & 2 deletions docs/reference/esql/functions/aggregation-functions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The <<esql-stats-by>> command supports these aggregate functions:
* <<esql-agg-median>>
* <<esql-agg-median-absolute-deviation>>
* <<esql-min>>
* <<esql-agg-percentile>>
* <<esql-percentile>>
* experimental:[] <<esql-agg-st-centroid>>
* <<esql-agg-sum>>
* <<esql-top>>
Expand All @@ -27,12 +27,12 @@ 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/percentile.asciidoc[]
include::layout/top.asciidoc[]
include::values.asciidoc[]
include::weighted-avg.asciidoc[]
14 changes: 14 additions & 0 deletions docs/reference/esql/functions/appendix/percentile.asciidoc

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

5 changes: 5 additions & 0 deletions docs/reference/esql/functions/description/percentile.asciidoc

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/percentile.asciidoc

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

174 changes: 174 additions & 0 deletions docs/reference/esql/functions/kibana/definition/percentile.json

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

13 changes: 13 additions & 0 deletions docs/reference/esql/functions/kibana/docs/percentile.md

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/percentile.asciidoc

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 @@ -25,8 +25,8 @@ 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|)`.

NOTE: Like <<esql-agg-percentile>>, `MEDIAN_ABSOLUTE_DEVIATION` is
<<esql-agg-percentile-approximate,usually approximate>>.
NOTE: Like <<esql-percentile>>, `MEDIAN_ABSOLUTE_DEVIATION` is
<<esql-percentile-approximate,usually approximate>>.

[WARNING]
====
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/esql/functions/median.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Expression from which to return the median value.
*Description*

Returns the value that is greater than half of all values and less than half of
all values, also known as the 50% <<esql-agg-percentile>>.
all values, also known as the 50% <<esql-percentile>>.

NOTE: Like <<esql-agg-percentile>>, `MEDIAN` is <<esql-agg-percentile-approximate,usually approximate>>.
NOTE: Like <<esql-percentile>>, `MEDIAN` is <<esql-percentile-approximate,usually approximate>>.

[WARNING]
====
Expand Down
9 changes: 9 additions & 0 deletions docs/reference/esql/functions/parameters/percentile.asciidoc

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

60 changes: 0 additions & 60 deletions docs/reference/esql/functions/percentile.asciidoc

This file was deleted.

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

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

Loading

0 comments on commit 6686c54

Please sign in to comment.