Skip to content

Commit 8ef9b0d

Browse files
committed
ES|QL SAMPLE aggregation function
1 parent 5f256cc commit 8ef9b0d

File tree

34 files changed

+4202
-2
lines changed

34 files changed

+4202
-2
lines changed

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

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

643+
File sampleAggregatorInputFile = new File("${projectDir}/src/main/java/org/elasticsearch/compute/aggregation/X-SampleAggregator.java.st")
644+
template {
645+
it.properties = booleanProperties
646+
it.inputFile = sampleAggregatorInputFile
647+
it.outputFile = "org/elasticsearch/compute/aggregation/SampleBooleanAggregator.java"
648+
}
649+
template {
650+
it.properties = bytesRefProperties
651+
it.inputFile = sampleAggregatorInputFile
652+
it.outputFile = "org/elasticsearch/compute/aggregation/SampleBytesRefAggregator.java"
653+
}
654+
template {
655+
it.properties = doubleProperties
656+
it.inputFile = sampleAggregatorInputFile
657+
it.outputFile = "org/elasticsearch/compute/aggregation/SampleDoubleAggregator.java"
658+
}
659+
template {
660+
it.properties = intProperties
661+
it.inputFile = sampleAggregatorInputFile
662+
it.outputFile = "org/elasticsearch/compute/aggregation/SampleIntAggregator.java"
663+
}
664+
template {
665+
it.properties = longProperties
666+
it.inputFile = sampleAggregatorInputFile
667+
it.outputFile = "org/elasticsearch/compute/aggregation/SampleLongAggregator.java"
668+
}
669+
643670
File topAggregatorInputFile = new File("${projectDir}/src/main/java/org/elasticsearch/compute/aggregation/X-TopAggregator.java.st")
644671
template {
645672
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)