Skip to content

Commit 410e77f

Browse files
committed
Merge remote-tracking branch 'upstream/main' into keyword-high-cardinality-param-2
2 parents c5123a0 + 2af4cb8 commit 410e77f

File tree

808 files changed

+35512
-13670
lines changed

Some content is hidden

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

808 files changed

+35512
-13670
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ steps:
385385
- signal_reason: agent_stop
386386
limit: 3
387387

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
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
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.7
398+
BWC_VERSION: 9.0.8
399399
retry:
400400
automatic:
401401
- exit_status: "-1"

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@ steps:
352352
env:
353353
BWC_VERSION: 8.19.8
354354

355-
- label: "{{matrix.image}} / 9.0.7 / packaging-tests-upgrade"
356-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.0.7
355+
- label: "{{matrix.image}} / 9.0.8 / packaging-tests-upgrade"
356+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.0.8
357357
timeout_in_minutes: 300
358358
matrix:
359359
setup:
@@ -366,7 +366,7 @@ steps:
366366
machineType: custom-16-32768
367367
buildDirectory: /dev/shm/bk
368368
env:
369-
BWC_VERSION: 9.0.7
369+
BWC_VERSION: 9.0.8
370370

371371
- label: "{{matrix.image}} / 9.1.8 / packaging-tests-upgrade"
372372
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.1.8

.buildkite/pipelines/periodic.template.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ steps:
9292
setup:
9393
ES_RUNTIME_JAVA:
9494
- openjdk21
95-
- openjdk23
96-
- openjdk24
95+
- openjdk25
9796
GRADLE_TASK:
9897
- checkPart1
9998
- checkPart2
@@ -118,7 +117,7 @@ steps:
118117
setup:
119118
ES_RUNTIME_JAVA:
120119
- openjdk21
121-
- openjdk23
120+
- openjdk25
122121
BWC_VERSION: $BWC_LIST
123122
agents:
124123
provider: gcp

.buildkite/pipelines/periodic.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,8 @@ steps:
382382
- signal_reason: agent_stop
383383
limit: 3
384384

385-
- label: 9.0.7 / bwc
386-
command: .ci/scripts/run-gradle.sh --continue -Dbwc.checkout.align=true v9.0.7#bwcTest
385+
- label: 9.0.8 / bwc
386+
command: .ci/scripts/run-gradle.sh --continue -Dbwc.checkout.align=true v9.0.8#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.7
395+
BWC_VERSION: 9.0.8
396396
retry:
397397
automatic:
398398
- exit_status: "-1"
@@ -549,8 +549,7 @@ steps:
549549
setup:
550550
ES_RUNTIME_JAVA:
551551
- openjdk21
552-
- openjdk23
553-
- openjdk24
552+
- openjdk25
554553
GRADLE_TASK:
555554
- checkPart1
556555
- checkPart2
@@ -575,7 +574,7 @@ steps:
575574
setup:
576575
ES_RUNTIME_JAVA:
577576
- openjdk21
578-
- openjdk23
577+
- openjdk25
579578
BWC_VERSION: ["8.19.8", "9.1.8", "9.2.2", "9.3.0"]
580579
agents:
581580
provider: gcp

.ci/bwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ BWC_VERSION:
1919
- "8.17.10"
2020
- "8.18.8"
2121
- "8.19.8"
22-
- "9.0.7"
22+
- "9.0.8"
2323
- "9.1.8"
2424
- "9.2.2"
2525
- "9.3.0"

.gitattributes

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ CHANGELOG.asciidoc merge=union
44
# Windows
55
build-tools-internal/src/test/resources/org/elasticsearch/gradle/internal/release/*.asciidoc text eol=lf
66

7+
# ESQL parsing and source generated related assets
78
x-pack/plugin/esql/compute/src/main/generated/** linguist-generated=true
89
x-pack/plugin/esql/compute/src/main/generated-src/** linguist-generated=true
910
x-pack/plugin/esql/src/main/antlr/*.tokens linguist-generated=true
1011
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/*.interp linguist-generated=true
11-
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer*.java linguist-generated=true
12-
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser*.java linguist-generated=true
12+
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/*BaseLexer*.java linguist-generated=true
13+
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/*BaseParser*.java linguist-generated=true
1314
x-pack/plugin/esql/src/main/generated/** linguist-generated=true
1415
x-pack/plugin/esql/src/main/generated-src/** linguist-generated=true
1516

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ We add the `help wanted` label to existing GitHub issues for which community
4949
contributions are particularly welcome, and we use the `good first issue` label
5050
to mark issues that we think will be suitable for new contributors.
5151

52+
We generally do not assign issues to contributors outside of Elastic, but
53+
please check the discussion on the issue to see if anyone else is working on
54+
the same topic. If there are other active contributors in the same area then it
55+
is a good idea to reach out to them so you can work together on the issue. If
56+
there hasn't been any discussion for a while then go ahead and start working on
57+
the issue yourself.
58+
5259
The process for contributing to any of the [Elastic repositories](https://github.com/elastic/) is similar. Details for individual projects can be found below.
5360

5461
### Fork and clone the repository

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public void setup() {
102102
mapping.put("field" + i, new EsField("field-" + i, TEXT, emptyMap(), true, EsField.TimeSeriesFieldType.NONE));
103103
}
104104

105-
var esIndex = new EsIndex("test", mapping, Map.of("test", IndexMode.STANDARD), Set.of());
105+
var esIndex = new EsIndex("test", mapping, Map.of("test", IndexMode.STANDARD), Map.of(), Map.of(), Set.of());
106106

107107
var functionRegistry = new EsqlFunctionRegistry();
108108

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
10+
package org.elasticsearch.benchmark.vector.scorer;
11+
12+
import org.apache.lucene.codecs.lucene99.Lucene99ScalarQuantizedVectorScorer;
13+
import org.apache.lucene.codecs.lucene99.OffHeapQuantizedByteVectorValues;
14+
import org.apache.lucene.index.VectorSimilarityFunction;
15+
import org.apache.lucene.store.Directory;
16+
import org.apache.lucene.store.IOContext;
17+
import org.apache.lucene.store.IndexInput;
18+
import org.apache.lucene.store.IndexOutput;
19+
import org.apache.lucene.store.MemorySegmentAccessInput;
20+
import org.apache.lucene.util.hnsw.RandomVectorScorer;
21+
import org.apache.lucene.util.hnsw.RandomVectorScorerSupplier;
22+
import org.apache.lucene.util.quantization.QuantizedByteVectorValues;
23+
import org.apache.lucene.util.quantization.ScalarQuantizer;
24+
import org.elasticsearch.simdvec.VectorScorerFactory;
25+
26+
import java.io.IOException;
27+
import java.util.concurrent.ThreadLocalRandom;
28+
29+
class BenchmarkUtils {
30+
// Unsigned int7 byte vectors have values in the range of 0 to 127 (inclusive).
31+
static final byte MIN_INT7_VALUE = 0;
32+
static final byte MAX_INT7_VALUE = 127;
33+
34+
static void randomInt7BytesBetween(byte[] bytes) {
35+
var random = ThreadLocalRandom.current();
36+
for (int i = 0, len = bytes.length; i < len;) {
37+
bytes[i++] = (byte) random.nextInt(MIN_INT7_VALUE, MAX_INT7_VALUE + 1);
38+
}
39+
}
40+
41+
static void createRandomInt7VectorData(ThreadLocalRandom random, Directory dir, int dims, int numVectors) throws IOException {
42+
try (IndexOutput out = dir.createOutput("vector.data", IOContext.DEFAULT)) {
43+
var vec = new byte[dims];
44+
for (int v = 0; v < numVectors; v++) {
45+
randomInt7BytesBetween(vec);
46+
var vecOffset = random.nextFloat();
47+
out.writeBytes(vec, 0, vec.length);
48+
out.writeInt(Float.floatToIntBits(vecOffset));
49+
}
50+
}
51+
}
52+
53+
static VectorScorerFactory getScorerFactoryOrDie() {
54+
var optionalVectorScorerFactory = VectorScorerFactory.instance();
55+
if (optionalVectorScorerFactory.isEmpty()) {
56+
String msg = "JDK=["
57+
+ Runtime.version()
58+
+ "], os.name=["
59+
+ System.getProperty("os.name")
60+
+ "], os.arch=["
61+
+ System.getProperty("os.arch")
62+
+ "]";
63+
throw new AssertionError("Vector scorer factory not present. Cannot run the benchmark. " + msg);
64+
}
65+
return optionalVectorScorerFactory.get();
66+
}
67+
68+
static boolean supportsHeapSegments() {
69+
return Runtime.version().feature() >= 22;
70+
}
71+
72+
static QuantizedByteVectorValues vectorValues(int dims, int size, IndexInput in, VectorSimilarityFunction sim) throws IOException {
73+
var sq = new ScalarQuantizer(0.1f, 0.9f, (byte) 7);
74+
var slice = in.slice("values", 0, in.length());
75+
return new OffHeapQuantizedByteVectorValues.DenseOffHeapVectorValues(dims, size, sq, false, sim, null, slice);
76+
}
77+
78+
static RandomVectorScorerSupplier luceneScoreSupplier(QuantizedByteVectorValues values, VectorSimilarityFunction sim)
79+
throws IOException {
80+
return new Lucene99ScalarQuantizedVectorScorer(null).getRandomVectorScorerSupplier(sim, values);
81+
}
82+
83+
static RandomVectorScorer luceneScorer(QuantizedByteVectorValues values, VectorSimilarityFunction sim, float[] queryVec)
84+
throws IOException {
85+
return new Lucene99ScalarQuantizedVectorScorer(null).getRandomVectorScorer(sim, values, queryVec);
86+
}
87+
88+
static float readNodeCorrectionConstant(QuantizedByteVectorValues values, int targetOrd) throws IOException {
89+
var vectorByteSize = values.getVectorByteLength();
90+
var input = (MemorySegmentAccessInput) values.getSlice();
91+
long byteOffset = (long) targetOrd * (vectorByteSize + Float.BYTES);
92+
return Float.intBitsToFloat(input.readInt(byteOffset + vectorByteSize));
93+
}
94+
}

0 commit comments

Comments
 (0)