Skip to content

Commit e9f54a1

Browse files
committed
Merge branch 'main' into carlosdelest/esql-qstr-match-non-snapshot
# Conflicts: # docs/reference/esql/functions/kibana/definition/match.json # x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.g4 # x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.tokens # x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 # x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.tokens # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/FullTextFunction.java # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.interp # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.java # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.interp # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/fulltext/MatchTests.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/fulltext/QueryStringTests.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java
2 parents 6c7e01d + a262eb6 commit e9f54a1

File tree

978 files changed

+27631
-8245
lines changed

Some content is hidden

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

978 files changed

+27631
-8245
lines changed

.buildkite/pipelines/pull-request/packaging-tests-unix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ steps:
55
steps:
66
- label: "{{matrix.image}} / docker / packaging-tests-unix"
77
key: "packaging-tests-unix-docker"
8-
command: ./.ci/scripts/packaging-test.sh destructiveDistroTest.docker
8+
command: ./.ci/scripts/packaging-test.sh destructiveDistroTest.docker-cloud-ess
99
timeout_in_minutes: 300
1010
matrix:
1111
setup:

benchmarks/src/main/java/org/elasticsearch/benchmark/compute/operator/AggregatorBenchmark.java

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@
3030
import org.elasticsearch.compute.data.BooleanBlock;
3131
import org.elasticsearch.compute.data.BooleanVector;
3232
import org.elasticsearch.compute.data.BytesRefBlock;
33+
import org.elasticsearch.compute.data.BytesRefVector;
3334
import org.elasticsearch.compute.data.DoubleBlock;
3435
import org.elasticsearch.compute.data.ElementType;
3536
import org.elasticsearch.compute.data.IntBlock;
37+
import org.elasticsearch.compute.data.IntVector;
3638
import org.elasticsearch.compute.data.LongBlock;
39+
import org.elasticsearch.compute.data.OrdinalBytesRefVector;
3740
import org.elasticsearch.compute.data.Page;
3841
import org.elasticsearch.compute.operator.AggregationOperator;
3942
import org.elasticsearch.compute.operator.DriverContext;
@@ -78,7 +81,10 @@ public class AggregatorBenchmark {
7881
private static final String DOUBLES = "doubles";
7982
private static final String BOOLEANS = "booleans";
8083
private static final String BYTES_REFS = "bytes_refs";
84+
private static final String ORDINALS = "ordinals";
8185
private static final String TWO_LONGS = "two_" + LONGS;
86+
private static final String TWO_BYTES_REFS = "two_" + BYTES_REFS;
87+
private static final String TWO_ORDINALS = "two_" + ORDINALS;
8288
private static final String LONGS_AND_BYTES_REFS = LONGS + "_and_" + BYTES_REFS;
8389
private static final String TWO_LONGS_AND_BYTES_REFS = "two_" + LONGS + "_and_" + BYTES_REFS;
8490

@@ -119,7 +125,21 @@ public class AggregatorBenchmark {
119125
}
120126
}
121127

122-
@Param({ NONE, LONGS, INTS, DOUBLES, BOOLEANS, BYTES_REFS, TWO_LONGS, LONGS_AND_BYTES_REFS, TWO_LONGS_AND_BYTES_REFS })
128+
@Param(
129+
{
130+
NONE,
131+
LONGS,
132+
INTS,
133+
DOUBLES,
134+
BOOLEANS,
135+
BYTES_REFS,
136+
ORDINALS,
137+
TWO_LONGS,
138+
TWO_BYTES_REFS,
139+
TWO_ORDINALS,
140+
LONGS_AND_BYTES_REFS,
141+
TWO_LONGS_AND_BYTES_REFS }
142+
)
123143
public String grouping;
124144

125145
@Param({ COUNT, COUNT_DISTINCT, MIN, MAX, SUM })
@@ -144,8 +164,12 @@ private static Operator operator(DriverContext driverContext, String grouping, S
144164
case INTS -> List.of(new BlockHash.GroupSpec(0, ElementType.INT));
145165
case DOUBLES -> List.of(new BlockHash.GroupSpec(0, ElementType.DOUBLE));
146166
case BOOLEANS -> List.of(new BlockHash.GroupSpec(0, ElementType.BOOLEAN));
147-
case BYTES_REFS -> List.of(new BlockHash.GroupSpec(0, ElementType.BYTES_REF));
167+
case BYTES_REFS, ORDINALS -> List.of(new BlockHash.GroupSpec(0, ElementType.BYTES_REF));
148168
case TWO_LONGS -> List.of(new BlockHash.GroupSpec(0, ElementType.LONG), new BlockHash.GroupSpec(1, ElementType.LONG));
169+
case TWO_BYTES_REFS, TWO_ORDINALS -> List.of(
170+
new BlockHash.GroupSpec(0, ElementType.BYTES_REF),
171+
new BlockHash.GroupSpec(1, ElementType.BYTES_REF)
172+
);
149173
case LONGS_AND_BYTES_REFS -> List.of(
150174
new BlockHash.GroupSpec(0, ElementType.LONG),
151175
new BlockHash.GroupSpec(1, ElementType.BYTES_REF)
@@ -218,6 +242,10 @@ private static void checkGrouped(String prefix, String grouping, String op, Stri
218242
checkGroupingBlock(prefix, LONGS, page.getBlock(0));
219243
checkGroupingBlock(prefix, LONGS, page.getBlock(1));
220244
}
245+
case TWO_BYTES_REFS, TWO_ORDINALS -> {
246+
checkGroupingBlock(prefix, BYTES_REFS, page.getBlock(0));
247+
checkGroupingBlock(prefix, BYTES_REFS, page.getBlock(1));
248+
}
221249
case LONGS_AND_BYTES_REFS -> {
222250
checkGroupingBlock(prefix, LONGS, page.getBlock(0));
223251
checkGroupingBlock(prefix, BYTES_REFS, page.getBlock(1));
@@ -379,7 +407,7 @@ private static void checkGroupingBlock(String prefix, String grouping, Block blo
379407
throw new AssertionError(prefix + "bad group expected [true] but was [" + groups.getBoolean(1) + "]");
380408
}
381409
}
382-
case BYTES_REFS -> {
410+
case BYTES_REFS, ORDINALS -> {
383411
BytesRefBlock groups = (BytesRefBlock) block;
384412
for (int g = 0; g < GROUPS; g++) {
385413
if (false == groups.getBytesRef(g, new BytesRef()).equals(bytesGroup(g))) {
@@ -508,6 +536,8 @@ private static Block dataBlock(BlockFactory blockFactory, String blockType) {
508536
private static List<Block> groupingBlocks(String grouping, String blockType) {
509537
return switch (grouping) {
510538
case TWO_LONGS -> List.of(groupingBlock(LONGS, blockType), groupingBlock(LONGS, blockType));
539+
case TWO_BYTES_REFS -> List.of(groupingBlock(BYTES_REFS, blockType), groupingBlock(BYTES_REFS, blockType));
540+
case TWO_ORDINALS -> List.of(groupingBlock(ORDINALS, blockType), groupingBlock(ORDINALS, blockType));
511541
case LONGS_AND_BYTES_REFS -> List.of(groupingBlock(LONGS, blockType), groupingBlock(BYTES_REFS, blockType));
512542
case TWO_LONGS_AND_BYTES_REFS -> List.of(
513543
groupingBlock(LONGS, blockType),
@@ -570,6 +600,19 @@ private static Block groupingBlock(String grouping, String blockType) {
570600
}
571601
yield builder.build();
572602
}
603+
case ORDINALS -> {
604+
IntVector.Builder ordinals = blockFactory.newIntVectorBuilder(BLOCK_LENGTH * valuesPerGroup);
605+
for (int i = 0; i < BLOCK_LENGTH; i++) {
606+
for (int v = 0; v < valuesPerGroup; v++) {
607+
ordinals.appendInt(i % GROUPS);
608+
}
609+
}
610+
BytesRefVector.Builder bytes = blockFactory.newBytesRefVectorBuilder(BLOCK_LENGTH * valuesPerGroup);
611+
for (int i = 0; i < GROUPS; i++) {
612+
bytes.appendBytesRef(bytesGroup(i));
613+
}
614+
yield new OrdinalBytesRefVector(ordinals.build(), bytes.build()).asBlock();
615+
}
573616
default -> throw new UnsupportedOperationException("unsupported grouping [" + grouping + "]");
574617
};
575618
}

build-conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/GitInfoPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void apply(Project project) {
4444
gitInfo.disallowChanges();
4545
gitInfo.finalizeValueOnRead();
4646

47-
revision = gitInfo.map(info -> info.getRevision() == null ? info.getRevision() : "master");
47+
revision = gitInfo.map(info -> info.getRevision() == null ? info.getRevision() : "main");
4848
}
4949

5050
public Property<GitInfo> getGitInfo() {

build-conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/LicensingPlugin.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
public class LicensingPlugin implements Plugin<Project> {
2222
static final String ELASTIC_LICENSE_URL_PREFIX = "https://raw.githubusercontent.com/elastic/elasticsearch/";
2323
static final String ELASTIC_LICENSE_URL_POSTFIX = "/licenses/ELASTIC-LICENSE-2.0.txt";
24+
static final String AGPL_ELASTIC_LICENSE_URL_POSTFIX = "/licenses/AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt";
2425

2526
private ProviderFactory providerFactory;
2627

@@ -36,15 +37,18 @@ public void apply(Project project) {
3637
isSnapshotVersion(project) ? revision.get() : "v" + project.getVersion()
3738
);
3839

39-
Provider<String> projectLicenseURL = licenseCommitProvider.map(licenseCommit -> ELASTIC_LICENSE_URL_PREFIX +
40+
Provider<String> elasticLicenseURL = licenseCommitProvider.map(licenseCommit -> ELASTIC_LICENSE_URL_PREFIX +
4041
licenseCommit + ELASTIC_LICENSE_URL_POSTFIX);
42+
Provider<String> agplLicenseURL = licenseCommitProvider.map(licenseCommit -> ELASTIC_LICENSE_URL_PREFIX +
43+
licenseCommit + AGPL_ELASTIC_LICENSE_URL_POSTFIX);
4144
// But stick the Elastic license url in project.ext so we can get it if we need to switch to it
42-
project.getExtensions().getExtraProperties().set("elasticLicenseUrl", projectLicenseURL);
45+
project.getExtensions().getExtraProperties().set("elasticLicenseUrl", elasticLicenseURL);
4346

4447
MapProperty<String, String> licensesProperty = project.getObjects().mapProperty(String.class, String.class).convention(
4548
providerFactory.provider(() -> Map.of(
4649
"Server Side Public License, v 1", "https://www.mongodb.com/licensing/server-side-public-license",
47-
"Elastic License 2.0", projectLicenseURL.get())
50+
"Elastic License 2.0", elasticLicenseURL.get(),
51+
"GNU Affero General Public License Version 3", agplLicenseURL.get())
4852
)
4953
);
5054

build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/PublishPluginFuncTest.groovy

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ class PublishPluginFuncTest extends AbstractGradleFuncTest {
6969
<url>https://raw.githubusercontent.com/elastic/elasticsearch/v1.0/licenses/ELASTIC-LICENSE-2.0.txt</url>
7070
<distribution>repo</distribution>
7171
</license>
72+
<license>
73+
<name>GNU Affero General Public License Version 3</name>
74+
<url>https://raw.githubusercontent.com/elastic/elasticsearch/v1.0/licenses/AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt</url>
75+
<distribution>repo</distribution>
76+
</license>
7277
<license>
7378
<name>Server Side Public License, v 1</name>
7479
<url>https://www.mongodb.com/licensing/server-side-public-license</url>
@@ -144,6 +149,11 @@ class PublishPluginFuncTest extends AbstractGradleFuncTest {
144149
<url>https://raw.githubusercontent.com/elastic/elasticsearch/v1.0/licenses/ELASTIC-LICENSE-2.0.txt</url>
145150
<distribution>repo</distribution>
146151
</license>
152+
<license>
153+
<name>GNU Affero General Public License Version 3</name>
154+
<url>https://raw.githubusercontent.com/elastic/elasticsearch/v1.0/licenses/AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt</url>
155+
<distribution>repo</distribution>
156+
</license>
147157
<license>
148158
<name>Server Side Public License, v 1</name>
149159
<url>https://www.mongodb.com/licensing/server-side-public-license</url>
@@ -228,6 +238,11 @@ class PublishPluginFuncTest extends AbstractGradleFuncTest {
228238
<url>https://raw.githubusercontent.com/elastic/elasticsearch/v1.0/licenses/ELASTIC-LICENSE-2.0.txt</url>
229239
<distribution>repo</distribution>
230240
</license>
241+
<license>
242+
<name>GNU Affero General Public License Version 3</name>
243+
<url>https://raw.githubusercontent.com/elastic/elasticsearch/v1.0/licenses/AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt</url>
244+
<distribution>repo</distribution>
245+
</license>
231246
<license>
232247
<name>Server Side Public License, v 1</name>
233248
<url>https://www.mongodb.com/licensing/server-side-public-license</url>
@@ -321,6 +336,11 @@ class PublishPluginFuncTest extends AbstractGradleFuncTest {
321336
<url>https://raw.githubusercontent.com/elastic/elasticsearch/v1.0/licenses/ELASTIC-LICENSE-2.0.txt</url>
322337
<distribution>repo</distribution>
323338
</license>
339+
<license>
340+
<name>GNU Affero General Public License Version 3</name>
341+
<url>https://raw.githubusercontent.com/elastic/elasticsearch/v1.0/licenses/AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt</url>
342+
<distribution>repo</distribution>
343+
</license>
324344
<license>
325345
<name>Server Side Public License, v 1</name>
326346
<url>https://www.mongodb.com/licensing/server-side-public-license</url>
@@ -394,6 +414,11 @@ class PublishPluginFuncTest extends AbstractGradleFuncTest {
394414
<url>https://raw.githubusercontent.com/elastic/elasticsearch/v2.0/licenses/ELASTIC-LICENSE-2.0.txt</url>
395415
<distribution>repo</distribution>
396416
</license>
417+
<license>
418+
<name>GNU Affero General Public License Version 3</name>
419+
<url>https://raw.githubusercontent.com/elastic/elasticsearch/v2.0/licenses/AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt</url>
420+
<distribution>repo</distribution>
421+
</license>
397422
<license>
398423
<name>Server Side Public License, v 1</name>
399424
<url>https://www.mongodb.com/licensing/server-side-public-license</url>

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/DockerBase.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,17 @@ public enum DockerBase {
2424
// Base image with extras for Cloud
2525
CLOUD("ubuntu:20.04", "-cloud", "apt-get"),
2626

27-
// Based on CLOUD above, with more extras. We don't set a base image because
28-
// we programmatically extend from the Cloud image.
29-
CLOUD_ESS(null, "-cloud-ess", "apt-get"),
30-
3127
// Chainguard based wolfi image with latest jdk
3228
// This is usually updated via renovatebot
3329
// spotless:off
34-
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:c16d3ad6cebf387e8dd2ad769f54320c4819fbbaa21e729fad087c7ae223b4d0",
30+
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:90888b190da54062f67f3fef1372eb0ae7d81ea55f5a1f56d748b13e4853d984",
3531
"-wolfi",
3632
"apk"
3733
),
3834
// spotless:on
39-
4035
// Based on WOLFI above, with more extras. We don't set a base image because
41-
// we programmatically extend from the Wolfi image.
42-
WOLFI_ESS(null, "-wolfi-ess", "apk");
36+
// we programmatically extend from the wolfi image.
37+
CLOUD_ESS(null, "-cloud-ess", "apk");
4338

4439
private final String image;
4540
private final String suffix;

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchBuildCompletePlugin.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,13 @@ public void execute(BuildFinishedFlowAction.Parameters parameters) throws FileNo
163163
// So, if you change this such that the artifact will have a slash/directory in it, you'll need to update the logic
164164
// below as well
165165
pb.directory(uploadFileDir);
166-
pb.start().waitFor();
166+
try {
167+
// we are very generious here, as the upload can take
168+
// a long time depending on its size
169+
pb.start().waitFor(30, java.util.concurrent.TimeUnit.MINUTES);
170+
} catch (InterruptedException e) {
171+
System.out.println("Failed to upload buildkite artifact " + e.getMessage());
172+
}
167173

168174
System.out.println("Generating buildscan link for artifact...");
169175

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchTestBasePlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ public void execute(Task t) {
185185
});
186186

187187
if (OS.current().equals(OS.WINDOWS) && System.getProperty("tests.timeoutSuite") == null) {
188-
// override the suite timeout to 30 mins for windows, because it has the most inefficient filesystem known to man
189-
test.systemProperty("tests.timeoutSuite", "2400000!");
188+
// override the suite timeout to 60 mins for windows, because it has the most inefficient filesystem known to man
189+
test.systemProperty("tests.timeoutSuite", "3600000!");
190190
}
191191

192192
/*

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalDistributionDownloadPlugin.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,6 @@ private static String distributionProjectName(ElasticsearchDistribution distribu
181181
if (distribution.getType() == InternalElasticsearchDistributionTypes.DOCKER_WOLFI) {
182182
return projectName + "wolfi-docker" + archString + "-export";
183183
}
184-
if (distribution.getType() == InternalElasticsearchDistributionTypes.DOCKER_WOLFI_ESS) {
185-
return projectName + "wolfi-ess-docker" + archString + "-export";
186-
}
187184
return projectName + distribution.getType().getName();
188185
}
189186

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/distribution/InternalElasticsearchDistributionTypes.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public class InternalElasticsearchDistributionTypes {
2222
public static ElasticsearchDistributionType DOCKER_CLOUD = new DockerCloudElasticsearchDistributionType();
2323
public static ElasticsearchDistributionType DOCKER_CLOUD_ESS = new DockerCloudEssElasticsearchDistributionType();
2424
public static ElasticsearchDistributionType DOCKER_WOLFI = new DockerWolfiElasticsearchDistributionType();
25-
public static ElasticsearchDistributionType DOCKER_WOLFI_ESS = new DockerWolfiEssElasticsearchDistributionType();
2625

2726
public static List<ElasticsearchDistributionType> ALL_INTERNAL = List.of(
2827
DEB,
@@ -32,7 +31,6 @@ public class InternalElasticsearchDistributionTypes {
3231
DOCKER_IRONBANK,
3332
DOCKER_CLOUD,
3433
DOCKER_CLOUD_ESS,
35-
DOCKER_WOLFI,
36-
DOCKER_WOLFI_ESS
34+
DOCKER_WOLFI
3735
);
3836
}

0 commit comments

Comments
 (0)