Skip to content

Commit fedbf4f

Browse files
committed
Merge branch 'main' into esql-time-zone-tests
# Conflicts: # x-pack/plugin/esql/qa/testFixtures/src/main/java/org/elasticsearch/xpack/esql/EsqlTestUtils.java # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/CsvTests.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateFormatTests.java
2 parents 5dec7c3 + 20a8513 commit fedbf4f

File tree

1,927 files changed

+48359
-15703
lines changed

Some content is hidden

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

1,927 files changed

+48359
-15703
lines changed

.buildkite/pipelines/intake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ steps:
6565
timeout_in_minutes: 300
6666
matrix:
6767
setup:
68-
BWC_VERSION: ["8.19.6", "9.1.6", "9.2.0", "9.3.0"]
68+
BWC_VERSION: ["8.19.7", "9.1.7", "9.2.1", "9.3.0"]
6969
agents:
7070
provider: gcp
7171
image: family/elasticsearch-ubuntu-2404

.buildkite/pipelines/periodic-java-ea.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ steps:
366366
- signal_reason: agent_stop
367367
limit: 3
368368

369-
- label: 8.19.6 / bwc
370-
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v8.19.6#bwcTest
369+
- label: 8.19.7 / bwc
370+
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v8.19.7#bwcTest
371371
timeout_in_minutes: 300
372372
agents:
373373
provider: gcp
@@ -376,7 +376,7 @@ steps:
376376
buildDirectory: /dev/shm/bk
377377
preemptible: true
378378
env:
379-
BWC_VERSION: 8.19.6
379+
BWC_VERSION: 8.19.7
380380
retry:
381381
automatic:
382382
- exit_status: "-1"
@@ -385,8 +385,8 @@ steps:
385385
- signal_reason: agent_stop
386386
limit: 3
387387

388-
- label: 9.0.8 / bwc
389-
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v9.0.8#bwcTest
388+
- label: 9.0.7 / bwc
389+
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v9.0.7#bwcTest
390390
timeout_in_minutes: 300
391391
agents:
392392
provider: gcp
@@ -395,7 +395,7 @@ steps:
395395
buildDirectory: /dev/shm/bk
396396
preemptible: true
397397
env:
398-
BWC_VERSION: 9.0.8
398+
BWC_VERSION: 9.0.7
399399
retry:
400400
automatic:
401401
- exit_status: "-1"
@@ -404,8 +404,8 @@ steps:
404404
- signal_reason: agent_stop
405405
limit: 3
406406

407-
- label: 9.1.6 / bwc
408-
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v9.1.6#bwcTest
407+
- label: 9.1.7 / bwc
408+
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v9.1.7#bwcTest
409409
timeout_in_minutes: 300
410410
agents:
411411
provider: gcp
@@ -414,7 +414,7 @@ steps:
414414
buildDirectory: /dev/shm/bk
415415
preemptible: true
416416
env:
417-
BWC_VERSION: 9.1.6
417+
BWC_VERSION: 9.1.7
418418
retry:
419419
automatic:
420420
- exit_status: "-1"
@@ -423,8 +423,8 @@ steps:
423423
- signal_reason: agent_stop
424424
limit: 3
425425

426-
- label: 9.2.0 / bwc
427-
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v9.2.0#bwcTest
426+
- label: 9.2.1 / bwc
427+
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v9.2.1#bwcTest
428428
timeout_in_minutes: 300
429429
agents:
430430
provider: gcp
@@ -433,7 +433,7 @@ steps:
433433
buildDirectory: /dev/shm/bk
434434
preemptible: true
435435
env:
436-
BWC_VERSION: 9.2.0
436+
BWC_VERSION: 9.2.1
437437
retry:
438438
automatic:
439439
- exit_status: "-1"
@@ -538,7 +538,7 @@ steps:
538538
timeout_in_minutes: 300
539539
matrix:
540540
setup:
541-
BWC_VERSION: ["8.19.6", "9.1.6", "9.2.0", "9.3.0"]
541+
BWC_VERSION: ["8.19.7", "9.1.7", "9.2.1", "9.3.0"]
542542
agents:
543543
provider: gcp
544544
image: family/elasticsearch-ubuntu-2404

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ steps:
334334
env:
335335
BWC_VERSION: 8.18.8
336336

337-
- label: "{{matrix.image}} / 8.19.6 / packaging-tests-upgrade"
338-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.19.6
337+
- label: "{{matrix.image}} / 8.19.7 / packaging-tests-upgrade"
338+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.19.7
339339
timeout_in_minutes: 300
340340
matrix:
341341
setup:
@@ -348,10 +348,10 @@ steps:
348348
machineType: custom-16-32768
349349
buildDirectory: /dev/shm/bk
350350
env:
351-
BWC_VERSION: 8.19.6
351+
BWC_VERSION: 8.19.7
352352

353-
- label: "{{matrix.image}} / 9.0.8 / packaging-tests-upgrade"
354-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.0.8
353+
- label: "{{matrix.image}} / 9.0.7 / packaging-tests-upgrade"
354+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.0.7
355355
timeout_in_minutes: 300
356356
matrix:
357357
setup:
@@ -364,10 +364,10 @@ steps:
364364
machineType: custom-16-32768
365365
buildDirectory: /dev/shm/bk
366366
env:
367-
BWC_VERSION: 9.0.8
367+
BWC_VERSION: 9.0.7
368368

369-
- label: "{{matrix.image}} / 9.1.6 / packaging-tests-upgrade"
370-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.1.6
369+
- label: "{{matrix.image}} / 9.1.7 / packaging-tests-upgrade"
370+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.1.7
371371
timeout_in_minutes: 300
372372
matrix:
373373
setup:
@@ -380,10 +380,10 @@ steps:
380380
machineType: custom-16-32768
381381
buildDirectory: /dev/shm/bk
382382
env:
383-
BWC_VERSION: 9.1.6
383+
BWC_VERSION: 9.1.7
384384

385-
- label: "{{matrix.image}} / 9.2.0 / packaging-tests-upgrade"
386-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.2.0
385+
- label: "{{matrix.image}} / 9.2.1 / packaging-tests-upgrade"
386+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.2.1
387387
timeout_in_minutes: 300
388388
matrix:
389389
setup:
@@ -396,7 +396,7 @@ steps:
396396
machineType: custom-16-32768
397397
buildDirectory: /dev/shm/bk
398398
env:
399-
BWC_VERSION: 9.2.0
399+
BWC_VERSION: 9.2.1
400400

401401
- label: "{{matrix.image}} / 9.3.0 / packaging-tests-upgrade"
402402
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.3.0

.buildkite/pipelines/periodic.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ steps:
363363
- signal_reason: agent_stop
364364
limit: 3
365365

366-
- label: 8.19.6 / bwc
367-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.19.6#bwcTest
366+
- label: 8.19.7 / bwc
367+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.19.7#bwcTest
368368
timeout_in_minutes: 300
369369
agents:
370370
provider: gcp
@@ -373,7 +373,7 @@ steps:
373373
buildDirectory: /dev/shm/bk
374374
preemptible: true
375375
env:
376-
BWC_VERSION: 8.19.6
376+
BWC_VERSION: 8.19.7
377377
retry:
378378
automatic:
379379
- exit_status: "-1"
@@ -382,8 +382,8 @@ steps:
382382
- signal_reason: agent_stop
383383
limit: 3
384384

385-
- label: 9.0.8 / bwc
386-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.0.8#bwcTest
385+
- label: 9.0.7 / bwc
386+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.0.7#bwcTest
387387
timeout_in_minutes: 300
388388
agents:
389389
provider: gcp
@@ -392,7 +392,7 @@ steps:
392392
buildDirectory: /dev/shm/bk
393393
preemptible: true
394394
env:
395-
BWC_VERSION: 9.0.8
395+
BWC_VERSION: 9.0.7
396396
retry:
397397
automatic:
398398
- exit_status: "-1"
@@ -401,8 +401,8 @@ steps:
401401
- signal_reason: agent_stop
402402
limit: 3
403403

404-
- label: 9.1.6 / bwc
405-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.1.6#bwcTest
404+
- label: 9.1.7 / bwc
405+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.1.7#bwcTest
406406
timeout_in_minutes: 300
407407
agents:
408408
provider: gcp
@@ -411,7 +411,7 @@ steps:
411411
buildDirectory: /dev/shm/bk
412412
preemptible: true
413413
env:
414-
BWC_VERSION: 9.1.6
414+
BWC_VERSION: 9.1.7
415415
retry:
416416
automatic:
417417
- exit_status: "-1"
@@ -420,8 +420,8 @@ steps:
420420
- signal_reason: agent_stop
421421
limit: 3
422422

423-
- label: 9.2.0 / bwc
424-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.2.0#bwcTest
423+
- label: 9.2.1 / bwc
424+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.2.1#bwcTest
425425
timeout_in_minutes: 300
426426
agents:
427427
provider: gcp
@@ -430,7 +430,7 @@ steps:
430430
buildDirectory: /dev/shm/bk
431431
preemptible: true
432432
env:
433-
BWC_VERSION: 9.2.0
433+
BWC_VERSION: 9.2.1
434434
retry:
435435
automatic:
436436
- exit_status: "-1"
@@ -525,7 +525,7 @@ steps:
525525
setup:
526526
ES_RUNTIME_JAVA:
527527
- openjdk21
528-
BWC_VERSION: ["8.19.6", "9.1.6", "9.2.0", "9.3.0"]
528+
BWC_VERSION: ["8.19.7", "9.1.7", "9.2.1", "9.3.0"]
529529
agents:
530530
provider: gcp
531531
image: family/elasticsearch-ubuntu-2404
@@ -569,7 +569,7 @@ steps:
569569
ES_RUNTIME_JAVA:
570570
- openjdk21
571571
- openjdk23
572-
BWC_VERSION: ["8.19.6", "9.1.6", "9.2.0", "9.3.0"]
572+
BWC_VERSION: ["8.19.7", "9.1.7", "9.2.1", "9.3.0"]
573573
agents:
574574
provider: gcp
575575
image: family/elasticsearch-ubuntu-2404

.buildkite/scripts/periodic.trigger.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,16 @@ IS_FIRST=true
1111
SKIP_DELAY="${SKIP_DELAY:-false}"
1212

1313
for BRANCH in "${BRANCHES[@]}"; do
14+
# Removing 7.17 periodic branch builds
15+
if [[ $BRANCH == "7.17" ]];
16+
then
17+
continue;
18+
fi
1419
INTAKE_PIPELINE_SLUG="elasticsearch-intake"
1520
BUILD_JSON=$(curl -sH "Authorization: Bearer ${BUILDKITE_API_TOKEN}" "https://api.buildkite.com/v2/organizations/elastic/pipelines/${INTAKE_PIPELINE_SLUG}/builds?branch=${BRANCH}&state=passed&per_page=1" | jq '.[0] | {commit: .commit, url: .web_url}')
1621
LAST_GOOD_COMMIT=$(echo "${BUILD_JSON}" | jq -r '.commit')
1722

23+
1824
# Put a delay between each branch's set of pipelines by prepending each non-first branch with a sleep
1925
# This is to smooth out the spike in agent requests
2026
if [[ "$IS_FIRST" != "true" && "$SKIP_DELAY" != "true" ]]; then

.ci/bwcVersions

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ BWC_VERSION:
1818
- "8.16.6"
1919
- "8.17.10"
2020
- "8.18.8"
21-
- "8.19.6"
22-
- "9.0.8"
23-
- "9.1.6"
24-
- "9.2.0"
21+
- "8.19.7"
22+
- "9.0.7"
23+
- "9.1.7"
24+
- "9.2.1"
2525
- "9.3.0"

.ci/snapshotBwcVersions

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BWC_VERSION:
2-
- "8.19.6"
3-
- "9.1.6"
4-
- "9.2.0"
2+
- "8.19.7"
3+
- "9.1.7"
4+
- "9.2.1"
55
- "9.3.0"

benchmarks/src/main/java/org/elasticsearch/benchmark/_nightly/esql/QueryPlanningBenchmark.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@
1414
import org.elasticsearch.common.settings.Settings;
1515
import org.elasticsearch.index.IndexMode;
1616
import org.elasticsearch.license.XPackLicenseState;
17-
import org.elasticsearch.xpack.esql.analysis.*;
17+
import org.elasticsearch.xpack.esql.analysis.Analyzer;
18+
import org.elasticsearch.xpack.esql.analysis.AnalyzerContext;
19+
import org.elasticsearch.xpack.esql.analysis.AnalyzerSettings;
20+
import org.elasticsearch.xpack.esql.analysis.EnrichResolution;
21+
import org.elasticsearch.xpack.esql.analysis.Verifier;
1822
import org.elasticsearch.xpack.esql.core.expression.FoldContext;
23+
import org.elasticsearch.xpack.esql.core.tree.Source;
1924
import org.elasticsearch.xpack.esql.core.type.EsField;
2025
import org.elasticsearch.xpack.esql.core.util.DateUtils;
2126
import org.elasticsearch.xpack.esql.expression.function.EsqlFunctionRegistry;
@@ -26,6 +31,7 @@
2631
import org.elasticsearch.xpack.esql.optimizer.LogicalPlanOptimizer;
2732
import org.elasticsearch.xpack.esql.parser.EsqlParser;
2833
import org.elasticsearch.xpack.esql.parser.QueryParams;
34+
import org.elasticsearch.xpack.esql.plan.IndexPattern;
2935
import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan;
3036
import org.elasticsearch.xpack.esql.plugin.QueryPragmas;
3137
import org.elasticsearch.xpack.esql.session.Configuration;
@@ -108,7 +114,7 @@ public void setup() {
108114
new AnalyzerContext(
109115
config,
110116
functionRegistry,
111-
IndexResolution.valid(esIndex),
117+
Map.of(new IndexPattern(Source.EMPTY, esIndex.name()), IndexResolution.valid(esIndex)),
112118
Map.of(),
113119
new EnrichResolution(),
114120
InferenceResolution.EMPTY,

benchmarks/src/main/java/org/elasticsearch/benchmark/exponentialhistogram/ExponentialHistogramMergeBench.java

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212
import org.apache.lucene.util.BytesRef;
1313
import org.elasticsearch.common.io.stream.BytesStreamOutput;
1414
import org.elasticsearch.exponentialhistogram.BucketIterator;
15+
import org.elasticsearch.exponentialhistogram.CompressedExponentialHistogram;
1516
import org.elasticsearch.exponentialhistogram.ExponentialHistogram;
1617
import org.elasticsearch.exponentialhistogram.ExponentialHistogramCircuitBreaker;
1718
import org.elasticsearch.exponentialhistogram.ExponentialHistogramGenerator;
1819
import org.elasticsearch.exponentialhistogram.ExponentialHistogramMerger;
19-
import org.elasticsearch.xpack.analytics.mapper.IndexWithCount;
20-
import org.elasticsearch.xpack.exponentialhistogram.CompressedExponentialHistogram;
2120
import org.openjdk.jmh.annotations.Benchmark;
2221
import org.openjdk.jmh.annotations.BenchmarkMode;
2322
import org.openjdk.jmh.annotations.Fork;
@@ -32,7 +31,6 @@
3231
import org.openjdk.jmh.annotations.Warmup;
3332

3433
import java.io.IOException;
35-
import java.util.ArrayList;
3634
import java.util.List;
3735
import java.util.Random;
3836
import java.util.concurrent.ThreadLocalRandom;
@@ -109,28 +107,24 @@ public void setUp() {
109107
}
110108

111109
private ExponentialHistogram asCompressedHistogram(ExponentialHistogram histogram) {
112-
List<IndexWithCount> negativeBuckets = new ArrayList<>();
113-
List<IndexWithCount> positiveBuckets = new ArrayList<>();
114-
115-
BucketIterator it = histogram.negativeBuckets().iterator();
116-
while (it.hasNext()) {
117-
negativeBuckets.add(new IndexWithCount(it.peekIndex(), it.peekCount()));
118-
it.advance();
119-
}
120-
it = histogram.positiveBuckets().iterator();
121-
while (it.hasNext()) {
122-
positiveBuckets.add(new IndexWithCount(it.peekIndex(), it.peekCount()));
123-
it.advance();
124-
}
125-
126-
long totalCount = histogram.zeroBucket().count() + histogram.negativeBuckets().valueCount() + histogram.positiveBuckets()
127-
.valueCount();
128110
BytesStreamOutput histoBytes = new BytesStreamOutput();
129111
try {
130-
CompressedExponentialHistogram.writeHistogramBytes(histoBytes, histogram.scale(), negativeBuckets, positiveBuckets);
112+
CompressedExponentialHistogram.writeHistogramBytes(
113+
histoBytes,
114+
histogram.scale(),
115+
histogram.negativeBuckets().iterator(),
116+
histogram.positiveBuckets().iterator()
117+
);
131118
CompressedExponentialHistogram result = new CompressedExponentialHistogram();
132119
BytesRef data = histoBytes.bytes().toBytesRef();
133-
result.reset(histogram.zeroBucket().zeroThreshold(), totalCount, histogram.sum(), histogram.min(), histogram.max(), data);
120+
result.reset(
121+
histogram.zeroBucket().zeroThreshold(),
122+
histogram.valueCount(),
123+
histogram.sum(),
124+
histogram.min(),
125+
histogram.max(),
126+
data
127+
);
134128
return result;
135129
} catch (IOException e) {
136130
throw new RuntimeException(e);

0 commit comments

Comments
 (0)