Skip to content

Commit

Permalink
Merge branch 'main' into chunking_settings
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-rubinstein authored Sep 25, 2024
2 parents 38ae383 + 4f66631 commit 3bbfa71
Show file tree
Hide file tree
Showing 256 changed files with 6,617 additions and 2,765 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
import org.elasticsearch.compute.operator.EvalOperator;
import org.elasticsearch.compute.operator.Operator;
import org.elasticsearch.core.TimeValue;
import org.elasticsearch.xpack.esql.core.expression.Expression;
import org.elasticsearch.xpack.esql.core.expression.FieldAttribute;
import org.elasticsearch.xpack.esql.core.expression.Literal;
import org.elasticsearch.xpack.esql.core.expression.predicate.regex.RLikePattern;
import org.elasticsearch.xpack.esql.core.tree.Source;
import org.elasticsearch.xpack.esql.core.type.DataType;
import org.elasticsearch.xpack.esql.core.type.EsField;
import org.elasticsearch.xpack.esql.evaluator.EvalMapper;
import org.elasticsearch.xpack.esql.expression.function.scalar.conditional.Case;
import org.elasticsearch.xpack.esql.expression.function.scalar.date.DateTrunc;
import org.elasticsearch.xpack.esql.expression.function.scalar.math.Abs;
import org.elasticsearch.xpack.esql.expression.function.scalar.multivalue.MvMin;
Expand All @@ -53,6 +55,7 @@

import java.time.Duration;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

Expand Down Expand Up @@ -91,6 +94,8 @@ public class EvalBenchmark {
"abs",
"add",
"add_double",
"case_1_eager",
"case_1_lazy",
"date_trunc",
"equal_to_const",
"long_equal_to_long",
Expand Down Expand Up @@ -125,6 +130,18 @@ private static EvalOperator.ExpressionEvaluator evaluator(String operation) {
layout(doubleField)
).get(driverContext);
}
case "case_1_eager", "case_1_lazy" -> {
FieldAttribute f1 = longField();
FieldAttribute f2 = longField();
Expression condition = new Equals(Source.EMPTY, f1, new Literal(Source.EMPTY, 1L, DataType.LONG));
Expression lhs = f1;
Expression rhs = f2;
if (operation.endsWith("lazy")) {
lhs = new Add(Source.EMPTY, lhs, new Literal(Source.EMPTY, 1L, DataType.LONG));
rhs = new Add(Source.EMPTY, rhs, new Literal(Source.EMPTY, 1L, DataType.LONG));
}
yield EvalMapper.toEvaluator(new Case(Source.EMPTY, condition, List.of(lhs, rhs)), layout(f1, f2)).get(driverContext);
}
case "date_trunc" -> {
FieldAttribute timestamp = new FieldAttribute(
Source.EMPTY,
Expand Down Expand Up @@ -216,6 +233,28 @@ private static void checkExpected(String operation, Page actual) {
}
}
}
case "case_1_eager" -> {
LongVector f1 = actual.<LongBlock>getBlock(0).asVector();
LongVector f2 = actual.<LongBlock>getBlock(1).asVector();
LongVector result = actual.<LongBlock>getBlock(2).asVector();
for (int i = 0; i < BLOCK_LENGTH; i++) {
long expected = f1.getLong(i) == 1 ? f1.getLong(i) : f2.getLong(i);
if (result.getLong(i) != expected) {
throw new AssertionError("[" + operation + "] expected [" + expected + "] but was [" + result.getLong(i) + "]");
}
}
}
case "case_1_lazy" -> {
LongVector f1 = actual.<LongBlock>getBlock(0).asVector();
LongVector f2 = actual.<LongBlock>getBlock(1).asVector();
LongVector result = actual.<LongBlock>getBlock(2).asVector();
for (int i = 0; i < BLOCK_LENGTH; i++) {
long expected = 1 + (f1.getLong(i) == 1 ? f1.getLong(i) : f2.getLong(i));
if (result.getLong(i) != expected) {
throw new AssertionError("[" + operation + "] expected [" + expected + "] but was [" + result.getLong(i) + "]");
}
}
}
case "date_trunc" -> {
LongVector v = actual.<LongBlock>getBlock(1).asVector();
long oneDay = TimeValue.timeValueHours(24).millis();
Expand Down Expand Up @@ -280,6 +319,15 @@ private static Page page(String operation) {
}
yield new Page(builder.build());
}
case "case_1_eager", "case_1_lazy" -> {
var f1 = blockFactory.newLongBlockBuilder(BLOCK_LENGTH);
var f2 = blockFactory.newLongBlockBuilder(BLOCK_LENGTH);
for (int i = 0; i < BLOCK_LENGTH; i++) {
f1.appendLong(i);
f2.appendLong(-i);
}
yield new Page(f1.build(), f2.build());
}
case "long_equal_to_long" -> {
var lhs = blockFactory.newLongBlockBuilder(BLOCK_LENGTH);
var rhs = blockFactory.newLongBlockBuilder(BLOCK_LENGTH);
Expand Down
17 changes: 2 additions & 15 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ spec:
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: "true"
SLACK_NOTIFICATIONS_CHANNEL: "#lucene"
SLACK_NOTIFICATIONS_ALL_BRANCHES: "true"
branch_configuration: lucene_snapshot lucene_snapshot_10
branch_configuration: lucene_snapshot
default_branch: lucene_snapshot
teams:
elasticsearch-team: {}
Expand All @@ -142,10 +142,6 @@ spec:
branch: lucene_snapshot
cronline: "0 2 * * * America/New_York"
message: "Builds a new lucene snapshot 1x per day"
Periodically on lucene_snapshot_10:
branch: lucene_snapshot_10
cronline: "0 2 * * * America/New_York"
message: "Builds a new lucene snapshot 1x per day"
---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json
apiVersion: backstage.io/v1alpha1
Expand Down Expand Up @@ -173,7 +169,6 @@ spec:
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: "true"
SLACK_NOTIFICATIONS_CHANNEL: "#lucene"
SLACK_NOTIFICATIONS_ALL_BRANCHES: "true"
branch_configuration: lucene_snapshot lucene_snapshot_10
default_branch: lucene_snapshot
teams:
elasticsearch-team: {}
Expand All @@ -190,10 +185,6 @@ spec:
branch: lucene_snapshot
cronline: "0 6 * * * America/New_York"
message: "Merges main into lucene_snapshot branch 1x per day"
Periodically on lucene_snapshot_10:
branch: lucene_snapshot_10
cronline: "0 6 * * * America/New_York"
message: "Merges main into lucene_snapshot_10 branch 1x per day"
---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json
apiVersion: backstage.io/v1alpha1
Expand Down Expand Up @@ -221,7 +212,7 @@ spec:
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: "true"
SLACK_NOTIFICATIONS_CHANNEL: "#lucene"
SLACK_NOTIFICATIONS_ALL_BRANCHES: "true"
branch_configuration: lucene_snapshot lucene_snapshot_10
branch_configuration: lucene_snapshot
default_branch: lucene_snapshot
teams:
elasticsearch-team: {}
Expand All @@ -238,10 +229,6 @@ spec:
branch: lucene_snapshot
cronline: "0 9,12,15,18 * * * America/New_York"
message: "Runs tests against lucene_snapshot branch several times per day"
Periodically on lucene_snapshot_10:
branch: lucene_snapshot_10
cronline: "0 9,12,15,18 * * * America/New_York"
message: "Runs tests against lucene_snapshot_10 branch several times per day"
---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json
apiVersion: backstage.io/v1alpha1
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog/111684.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 111684
summary: Write downloaded model parts async
area: Machine Learning
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/112295.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 112295
summary: "ESQL: Speed up CASE for some parameters"
area: ES|QL
type: enhancement
issues: []
6 changes: 6 additions & 0 deletions docs/changelog/112405.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 112405
summary: Improve date expression/remote handling in index names
area: Search
type: bug
issues:
- 112243
5 changes: 5 additions & 0 deletions docs/changelog/113013.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 113013
summary: Account for `DelayedBucket` before reduction
area: Aggregations
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/113051.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 113051
summary: Add Search Inference ID To Semantic Text Mapping
area: Mapping
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/113158.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 113158
summary: Adds a new Inference API for streaming responses back to the user.
area: Machine Learning
type: enhancement
issues: []
6 changes: 6 additions & 0 deletions docs/changelog/113373.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 113373
summary: Implement `parseBytesRef` for `TimeSeriesRoutingHashFieldType`
area: TSDB
type: bug
issues:
- 112399
5 changes: 5 additions & 0 deletions docs/changelog/113385.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 113385
summary: Small performance improvement in h3 library
area: Geo
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/113425.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 113425
summary: Add `ensureGreen` test method for use with `adminClient`
area: Infra/Metrics
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/113462.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 113462
summary: Suppress merge-on-recovery for older indices
area: CRUD
type: enhancement
issues: []

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/esql/functions/kibana/docs/date_format.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ include::links.asciidoc[]

include::landing-page.asciidoc[]

include::intro.asciidoc[]

include::release-notes/highlights.asciidoc[]

include::intro.asciidoc[]

include::quickstart/index.asciidoc[]

include::setup.asciidoc[]
Expand Down
1 change: 1 addition & 0 deletions docs/reference/indices/index-templates.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ following index patterns:
- `metrics-*-*`
- `synthetics-*-*`
- `profiling-*`
- `security_solution-*-*`
// end::built-in-index-template-patterns[]
{fleet-guide}/fleet-overview.html[{agent}] uses these templates to create
Expand Down
Loading

0 comments on commit 3bbfa71

Please sign in to comment.