Skip to content

Commit 0e2deb5

Browse files
authored
Merge branch 'main' into catch-invalid-reverse-nested-aggs
2 parents e14576c + 9ad14c5 commit 0e2deb5

File tree

376 files changed

+5607
-1737
lines changed

Some content is hidden

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

376 files changed

+5607
-1737
lines changed

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,

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ private static ListMultimap<Class<?>, String> createLegacyRestTestBasePluginUsag
9292
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:transform:qa:multi-cluster-tests-with-security");
9393
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:transform:qa:multi-node-tests");
9494
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:transform:qa:single-node-tests");
95-
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:watcher:qa:rest");
96-
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:watcher:qa:with-security");
9795
return map;
9896
}
9997

docs/changelog/134223.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 134223
2+
summary: Improve concurrency design of `EnterpriseGeoIpDownloader`
3+
area: Ingest Node
4+
type: bug
5+
issues:
6+
- 126124

docs/changelog/136441.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 136441
2+
summary: Add TRANGE ES|QL function
3+
area: ES|QL
4+
type: enhancement
5+
issues:
6+
- 135599

docs/changelog/136827.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 136827
2+
summary: Fix columns ordering when pruning an INLINE STATS
3+
area: ES|QL
4+
type: bug
5+
issues:
6+
- 136797

docs/reference/aggregations/search-aggregations-bucket-adjacency-matrix-aggregation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ The response contains buckets with document counts for each filter and combinati
8787
}
8888
}
8989
```
90-
% TESTRESPONSE[s/"took": 9/"took": $body.took/]
91-
% TESTRESPONSE[s/"_shards": \.\.\./"_shards": $body._shards/]
92-
% TESTRESPONSE[s/"hits": \.\.\./"hits": $body.hits/]
90+
% TESTRESPONSE[s/"took": 9/"took": $body.took/]
91+
% TESTRESPONSE[s/"_shards": \.\.\./"_shards": $body._shards/]
92+
% TESTRESPONSE[s/"hits": \.\.\./"hits": $body.hits/]
9393

9494
## Parameters [adjacency-matrix-agg-params]
9595

docs/reference/aggregations/search-aggregations-bucket-datehistogram-aggregation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ POST /sales/_search?size=0
8989
}
9090
}
9191
```
92-
% TEST[setup:sales]
93-
% TEST[catch:bad_request]
92+
% TEST[setup:sales]
93+
% TEST[catch:bad_request]
9494

9595
```js
9696
{
@@ -172,8 +172,8 @@ POST /sales/_search?size=0
172172
}
173173
}
174174
```
175-
% TEST[setup:sales]
176-
% TEST[catch:bad_request]
175+
% TEST[setup:sales]
176+
% TEST[catch:bad_request]
177177

178178
```js
179179
{

docs/reference/aggregations/search-aggregations-bucket-diversified-sampler-aggregation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ Response:
8080
}
8181
}
8282
```
83-
% TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/]
84-
% TESTRESPONSE[s/2.213/$body.aggregations.my_unbiased_sample.keywords.buckets.0.score/]
83+
% TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/]
84+
% TESTRESPONSE[s/2.213/$body.aggregations.my_unbiased_sample.keywords.buckets.0.score/]
8585

8686
1. 151 documents were sampled in total.
8787
2. The results of the significant_terms aggregation are not skewed by any single author’s quirks because we asked for a maximum of one post from any one author in our sample.
@@ -158,9 +158,9 @@ Response:
158158
}
159159
}
160160
```
161-
% TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/]
162-
% TESTRESPONSE[s/2.213/$body.aggregations.my_unbiased_sample.keywords.buckets.0.score/]
163-
% TESTRESPONSE[s/1.34/$body.aggregations.my_unbiased_sample.keywords.buckets.1.score/]
161+
% TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/]
162+
% TESTRESPONSE[s/2.213/$body.aggregations.my_unbiased_sample.keywords.buckets.0.score/]
163+
% TESTRESPONSE[s/1.34/$body.aggregations.my_unbiased_sample.keywords.buckets.1.score/]
164164

165165
## shard_size [_shard_size]
166166

docs/reference/aggregations/search-aggregations-bucket-filters-aggregation.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ Response:
6262
}
6363
}
6464
```
65-
% TESTRESPONSE[s/"took": 9/"took": $body.took/]
66-
% TESTRESPONSE[s/"_shards": \.\.\./"_shards": $body._shards/]
67-
% TESTRESPONSE[s/"hits": \.\.\./"hits": $body.hits/]
65+
% TESTRESPONSE[s/"took": 9/"took": $body.took/]
66+
% TESTRESPONSE[s/"_shards": \.\.\./"_shards": $body._shards/]
67+
% TESTRESPONSE[s/"hits": \.\.\./"hits": $body.hits/]
6868

6969
## Anonymous filters [anonymous-filters]
7070

@@ -112,9 +112,9 @@ The filtered buckets are returned in the same order as provided in the request.
112112
}
113113
}
114114
```
115-
% TESTRESPONSE[s/"took": 4/"took": $body.took/]
116-
% TESTRESPONSE[s/"_shards": \.\.\./"_shards": $body._shards/]
117-
% TESTRESPONSE[s/"hits": \.\.\./"hits": $body.hits/]
115+
% TESTRESPONSE[s/"took": 4/"took": $body.took/]
116+
% TESTRESPONSE[s/"_shards": \.\.\./"_shards": $body._shards/]
117+
% TESTRESPONSE[s/"hits": \.\.\./"hits": $body.hits/]
118118

119119
## `Other` Bucket [other-bucket]
120120

@@ -181,9 +181,9 @@ The response would be something like the following:
181181
}
182182
}
183183
```
184-
% TESTRESPONSE[s/"took": 3/"took": $body.took/]
185-
% TESTRESPONSE[s/"_shards": \.\.\./"_shards": $body._shards/]
186-
% TESTRESPONSE[s/"hits": \.\.\./"hits": $body.hits/]
184+
% TESTRESPONSE[s/"took": 3/"took": $body.took/]
185+
% TESTRESPONSE[s/"_shards": \.\.\./"_shards": $body._shards/]
186+
% TESTRESPONSE[s/"hits": \.\.\./"hits": $body.hits/]
187187

188188
## Non-keyed Response [non-keyed-response]
189189

docs/reference/aggregations/search-aggregations-bucket-histogram-aggregation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ The `histogram` aggregation will sum the counts of each interval computed based
375375
}
376376
}
377377
```
378-
% TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/]
378+
% TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/]
379379

380380
::::{important}
381381
Histogram aggregation is a bucket aggregation, which partitions documents into buckets rather than calculating metrics over fields like metrics aggregations do. Each bucket represents a collection of documents which sub-aggregations can run on. On the other hand, a histogram field is a pre-aggregated field representing multiple values inside a single field: buckets of numerical data and a count of items/documents for each bucket. This mismatch between the histogram aggregations expected input (expecting raw documents) and the histogram field (that provides summary information) limits the outcome of the aggregation to only the doc counts for each bucket.

0 commit comments

Comments
 (0)