Skip to content

Commit 0d700de

Browse files
committed
ES|QL SAMPLE aggregation function
1 parent 9ae7759 commit 0d700de

File tree

34 files changed

+4200
-2
lines changed

34 files changed

+4200
-2
lines changed

x-pack/plugin/esql/compute/build.gradle

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,33 @@ tasks.named('stringTemplates').configure {
649649
it.outputFile = "org/elasticsearch/compute/aggregation/StdDevDoubleAggregator.java"
650650
}
651651

652+
File sampleAggregatorInputFile = new File("${projectDir}/src/main/java/org/elasticsearch/compute/aggregation/X-SampleAggregator.java.st")
653+
template {
654+
it.properties = booleanProperties
655+
it.inputFile = sampleAggregatorInputFile
656+
it.outputFile = "org/elasticsearch/compute/aggregation/SampleBooleanAggregator.java"
657+
}
658+
template {
659+
it.properties = bytesRefProperties
660+
it.inputFile = sampleAggregatorInputFile
661+
it.outputFile = "org/elasticsearch/compute/aggregation/SampleBytesRefAggregator.java"
662+
}
663+
template {
664+
it.properties = doubleProperties
665+
it.inputFile = sampleAggregatorInputFile
666+
it.outputFile = "org/elasticsearch/compute/aggregation/SampleDoubleAggregator.java"
667+
}
668+
template {
669+
it.properties = intProperties
670+
it.inputFile = sampleAggregatorInputFile
671+
it.outputFile = "org/elasticsearch/compute/aggregation/SampleIntAggregator.java"
672+
}
673+
template {
674+
it.properties = longProperties
675+
it.inputFile = sampleAggregatorInputFile
676+
it.outputFile = "org/elasticsearch/compute/aggregation/SampleLongAggregator.java"
677+
}
678+
652679
File topAggregatorInputFile = new File("${projectDir}/src/main/java/org/elasticsearch/compute/aggregation/X-TopAggregator.java.st")
653680
template {
654681
it.properties = intProperties

x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleBooleanAggregator.java

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

0 commit comments

Comments
 (0)