Skip to content

Commit 8e265fd

Browse files
committed
Revert "Revert "[8.19] Backport ES|QL sample processing command (elastic#129617)" (elastic#129797)"
This reverts commit 8e019be.
1 parent 48197b7 commit 8e265fd

File tree

66 files changed

+4718
-2606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+4718
-2606
lines changed

docs/changelog/125570.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 125570
2+
summary: ES|QL random sampling
3+
area: Machine Learning
4+
type: feature
5+
issues: []

docs/changelog/129797.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/reference/esql/esql-commands.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ endif::[]
4646
* experimental:[] <<esql-lookup-join>>
4747
* experimental:[] <<esql-mv_expand>>
4848
* <<esql-rename>>
49+
* experimental:[] <<esql-sample>>
4950
* <<esql-sort>>
5051
* <<esql-stats-by>>
5152
* <<esql-where>>
@@ -70,6 +71,7 @@ include::processing-commands/limit.asciidoc[]
7071
include::processing-commands/lookup.asciidoc[]
7172
include::processing-commands/mv_expand.asciidoc[]
7273
include::processing-commands/rename.asciidoc[]
74+
include::processing-commands/sample.asciidoc[]
7375
include::processing-commands/sort.asciidoc[]
7476
include::processing-commands/stats.asciidoc[]
7577
include::processing-commands/where.asciidoc[]

docs/reference/esql/functions/description/date_trunc.asciidoc

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/esql/functions/kibana/docs/date_trunc.md

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

docs/reference/esql/functions/kibana/docs/sample.md

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

docs/reference/esql/functions/types/to_ip.asciidoc

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[discrete]
2+
[[esql-sample]]
3+
=== `SAMPLE`
4+
5+
preview::[]
6+
7+
The `SAMPLE` command samples a fraction of the table rows.
8+
9+
**Syntax**
10+
11+
[source,esql]
12+
----
13+
SAMPLE probability
14+
----
15+
16+
*Parameters*
17+
18+
`probability`::
19+
The probability that a row is included in the sample. The value must be between 0 and 1, exclusive.
20+
21+
*Example*
22+
23+
[source.merge.styled,esql]
24+
----
25+
include::{esql-specs}/sample.csv-spec[tag=sampleForDocs]
26+
----
27+
[%header.monospaced.styled,format=dsv,separator=|]
28+
|===
29+
include::{esql-specs}/sample.csv-spec[tag=sampleForDocs-result]
30+
|===

docs/reference/rest-api/usage.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ GET /_xpack/usage
249249
"lookup_join" : 0,
250250
"change_point" : 0,
251251
"completion": 0,
252-
"rerank": 0
252+
"rerank": 0,
253+
"sample": 0
253254
},
254255
"queries" : {
255256
"rest" : {

server/src/main/java/org/elasticsearch/TransportVersions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ static TransportVersion def(int id) {
244244
public static final TransportVersion SETTINGS_IN_DATA_STREAMS_8_19 = def(8_841_0_51);
245245
public static final TransportVersion ML_INFERENCE_CUSTOM_SERVICE_REMOVE_ERROR_PARSING_8_19 = def(8_841_0_52);
246246
public static final TransportVersion ML_INFERENCE_CUSTOM_SERVICE_EMBEDDING_BATCH_SIZE_8_19 = def(8_841_0_53);
247+
public static final TransportVersion RANDOM_SAMPLER_QUERY_BUILDER_8_19 = def(8_841_0_54);
247248

248249
/*
249250
* STOP! READ THIS FIRST! No, really,

0 commit comments

Comments
 (0)