Skip to content
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7594d5a
Add a standard deviation function
limotova Oct 17, 2024
fa54d73
lint
limotova Nov 8, 2024
ffdf276
Merge branch 'main' into add-stddev-function
limotova Nov 9, 2024
b4c9c1b
rest test
limotova Nov 9, 2024
0a74c9a
bwc
limotova Nov 9, 2024
5941da8
Merge branch 'main' into add-stddev-function
limotova Nov 12, 2024
55cdef1
move states from template to individual classes
limotova Nov 12, 2024
cb07ebd
Merge branch 'main' into add-stddev-function
limotova Nov 13, 2024
9f8b3be
change State names to SingleState and GroupingState
limotova Nov 14, 2024
5fb5b88
change StdDeviation to StdDev
limotova Nov 14, 2024
3503934
fix parallel algorithm
limotova Nov 14, 2024
2b4f80d
whoops docs
limotova Nov 14, 2024
bb32947
lint
limotova Nov 14, 2024
a8bff93
Merge branch 'main' into add-stddev-function
limotova Nov 14, 2024
f69d640
more renaming
limotova Nov 15, 2024
8a5ac5c
linting continues
limotova Nov 15, 2024
78f2061
Merge branch 'main' into add-stddev-function
limotova Nov 15, 2024
81fbf0a
Merge branch 'main' into add-stddev-function
limotova Nov 18, 2024
6842d40
Merge branch 'main' into add-stddev-function
limotova Nov 20, 2024
93b36db
move evaluate final to states and fix entry
limotova Nov 20, 2024
99411a9
Update docs/changelog/116531.yaml
limotova Nov 20, 2024
bc715f4
change SingleState to WelfordAlgorithm and change tests
limotova Nov 21, 2024
a3477ef
dot
limotova Nov 21, 2024
17f0b6b
Merge branch 'main' into add-stddev-function
limotova Nov 21, 2024
a476e03
tests, resolveType, changelog
limotova Nov 22, 2024
3e2ae59
Merge branch 'main' into add-stddev-function
limotova Nov 22, 2024
c59efab
specify order of filter test
limotova Nov 22, 2024
601cfa5
Merge branch 'main' into add-stddev-function
limotova Nov 22, 2024
03e2a70
fix changelog
limotova Nov 22, 2024
827af56
set intermediate values to 0 when null
limotova Nov 22, 2024
ad4daa7
Merge branch 'main' into add-stddev-function
limotova Nov 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog/116531.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 116531
summary: "[ES|QL] Add a standard deviation function"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the prefix [ES|QL]. The changelog is organized by area, which already says it is ES|QL.

area: ES|QL
type: enhancement
issues: []
2 changes: 2 additions & 0 deletions docs/reference/esql/functions/aggregation-functions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The <<esql-stats-by>> command supports these aggregate functions:
* <<esql-min>>
* <<esql-percentile>>
* experimental:[] <<esql-st_centroid_agg>>
* <<esql-std_dev>>
* <<esql-sum>>
* <<esql-top>>
* <<esql-values>>
Expand All @@ -32,6 +33,7 @@ include::layout/median_absolute_deviation.asciidoc[]
include::layout/min.asciidoc[]
include::layout/percentile.asciidoc[]
include::layout/st_centroid_agg.asciidoc[]
include::layout/std_dev.asciidoc[]
include::layout/sum.asciidoc[]
include::layout/top.asciidoc[]
include::layout/values.asciidoc[]
Expand Down
5 changes: 5 additions & 0 deletions docs/reference/esql/functions/description/std_dev.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/std_dev.asciidoc

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

50 changes: 50 additions & 0 deletions docs/reference/esql/functions/kibana/definition/std_dev.json

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

11 changes: 11 additions & 0 deletions docs/reference/esql/functions/kibana/docs/std_dev.md

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

15 changes: 15 additions & 0 deletions docs/reference/esql/functions/layout/std_dev.asciidoc

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

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

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/std_dev.svg
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/std_dev.asciidoc

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

21 changes: 21 additions & 0 deletions x-pack/plugin/esql/compute/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,27 @@ tasks.named('stringTemplates').configure {
it.outputFile = "org/elasticsearch/compute/aggregation/RateDoubleAggregator.java"
}

File stdDevAggregatorInputFile = file("src/main/java/org/elasticsearch/compute/aggregation/X-StdDevAggregator.java.st")
template {
it.properties = intProperties
it.inputFile = stdDevAggregatorInputFile
it.outputFile = "org/elasticsearch/compute/aggregation/StdDevIntAggregator.java"
}
template {
it.properties = longProperties
it.inputFile = stdDevAggregatorInputFile
it.outputFile = "org/elasticsearch/compute/aggregation/StdDevLongAggregator.java"
}
template {
it.properties = floatProperties
it.inputFile = stdDevAggregatorInputFile
it.outputFile = "org/elasticsearch/compute/aggregation/StdDevFloatAggregator.java"
}
template {
it.properties = doubleProperties
it.inputFile = stdDevAggregatorInputFile
it.outputFile = "org/elasticsearch/compute/aggregation/StdDevDoubleAggregator.java"
}

File topAggregatorInputFile = new File("${projectDir}/src/main/java/org/elasticsearch/compute/aggregation/X-TopAggregator.java.st")
template {
Expand Down

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.

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

Loading