Skip to content

Commit

Permalink
Merge branch 'main' into esql-binary-operator-finishing-pass
Browse files Browse the repository at this point in the history
 Conflicts:
	x-pack/plugin/ql/src/main/java/org/elasticsearch/xpack/ql/util/NumericUtils.java
  • Loading branch information
not-napoleon committed Dec 12, 2023
2 parents a3f45b7 + 5b42f5c commit 02cd947
Show file tree
Hide file tree
Showing 303 changed files with 4,647 additions and 3,388 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,20 @@ public void beforeStart() {
try {
mockServer.start();
node.setting("telemetry.metrics.enabled", "true");
node.setting("tracing.apm.agent.enabled", "true");
node.setting("tracing.apm.agent.transaction_sample_rate", "0.10");
node.setting("tracing.apm.agent.metrics_interval", "10s");
node.setting("tracing.apm.agent.server_url", "http://127.0.0.1:" + mockServer.getPort());
} catch (IOException e) {
logger.warn("Unable to start APM server", e);
}
} else if (node.getSettingKeys().contains("telemetry.metrics.enabled") == false) {
// in serverless metrics are enabled by default
// if metrics were not enabled explicitly for gradlew run we should disable them
}
// in serverless metrics are enabled by default
// if metrics were not enabled explicitly for gradlew run we should disable them
else if (node.getSettingKeys().contains("telemetry.metrics.enabled") == false) { // metrics
node.setting("telemetry.metrics.enabled", "false");
} else if (node.getSettingKeys().contains("tracing.apm.agent.enabled") == false) { // tracing
node.setting("tracing.apm.agent.enable", "false");
}

}
Expand Down
1 change: 1 addition & 0 deletions docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ testClusters.matching { it.name == "yamlRestTest"}.configureEach {
systemProperty 'es.transport.cname_in_publish_address', 'true'

requiresFeature 'es.index_mode_feature_flag_registered', Version.fromString("8.0.0")
requiresFeature 'es.failure_store_feature_flag_enabled', Version.fromString("8.12.0")

extraConfigFile 'op-jwks.json', project(':x-pack:test:idp-fixture').file("oidc/op-jwks.json")
extraConfigFile 'idp-docs-metadata.xml', project(':x-pack:test:idp-fixture').file("idp/shibboleth-idp/metadata/idp-docs-metadata.xml")
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog/102078.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 102078
summary: Derive expected replica size from primary
area: Allocation
type: enhancement
issues: []
6 changes: 6 additions & 0 deletions docs/changelog/102967.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 102967
summary: "ES|QL: Improve resolution error management in `mv_expand`"
area: ES|QL
type: bug
issues:
- 102964
5 changes: 5 additions & 0 deletions docs/changelog/103035.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 103035
summary: "x-pack/plugin/core: add `match_mapping_type` to `ecs@mappings` dynamic templates"
area: Data streams
type: bug
issues: []
6 changes: 6 additions & 0 deletions docs/changelog/103084.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 103084
summary: Return `matched_queries` in Percolator
area: Percolator
type: enhancement
issues:
- 10163
6 changes: 6 additions & 0 deletions docs/changelog/103209.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 103209
summary: "ESQL: Fix `to_degrees()` returning infinity"
area: ES|QL
type: bug
issues:
- 102987
5 changes: 5 additions & 0 deletions docs/changelog/103251.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 103251
summary: Wait for reroute before acking put-shutdown
area: Infra/Node Lifecycle
type: bug
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/103310.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 103310
summary: Revert "Validate settings in `ReloadSecureSettings` API"
area: Security
type: bug
issues: []
2 changes: 2 additions & 0 deletions docs/reference/esql/esql-functions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,11 @@ include::functions/tan.asciidoc[]
include::functions/tanh.asciidoc[]
include::functions/tau.asciidoc[]
include::functions/to_boolean.asciidoc[]
include::functions/to_cartesianpoint.asciidoc[]
include::functions/to_datetime.asciidoc[]
include::functions/to_degrees.asciidoc[]
include::functions/to_double.asciidoc[]
include::functions/to_geopoint.asciidoc[]
include::functions/to_integer.asciidoc[]
include::functions/to_ip.asciidoc[]
include::functions/to_long.asciidoc[]
Expand Down
11 changes: 6 additions & 5 deletions docs/reference/esql/esql-limitations.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ include::processing-commands/limit.asciidoc[tag=limitation]
* `text`
* `unsigned_long`
* `version`
* Spatial types
** `geo_point`
** `point`

[discrete]
==== Unsupported types
Expand All @@ -44,10 +47,8 @@ include::processing-commands/limit.asciidoc[tag=limitation]
** `counter`
** `position`
** `aggregate_metric_double`
* Geo/spatial
** `geo_point`
* Spatial types
** `geo_shape`
** `point`
** `shape`
* Date/time
** `date_nanos`
Expand Down Expand Up @@ -119,7 +120,7 @@ consequences. An {esql} query on a `text` field is case-sensitive. Furthermore,
a subfield may have been mapped with a <<normalizer,normalizer>>, which can
transform the original string. Or it may have been mapped with <<ignore-above>>,
which can truncate the string. None of these mapping operations are applied to
an {esql} query, which may lead to false positives or negatives.
an {esql} query, which may lead to false positives or negatives.

To avoid these issues, a best practice is to be explicit about the field that
you query, and query `keyword` sub-fields instead of `text` fields.
Expand Down Expand Up @@ -197,4 +198,4 @@ the <<esql-mv-functions,multivalue functions>>.
[[esql-limitations-kibana]]
=== Kibana limitations

include::esql-kibana.asciidoc[tag=limitations]
include::esql-kibana.asciidoc[tag=limitations]
88 changes: 80 additions & 8 deletions docs/reference/esql/functions/binary.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,91 @@
[[esql-binary-operators]]
=== Binary operators

These binary comparison operators are supported:
[[esql-binary-operators-equality]]
==== Equality
[.text-center]
image::esql/functions/signature/equals.svg[Embedded,opts=inline]

Supported types:

include::types/equals.asciidoc[]

==== Inequality `!=`
[.text-center]
image::esql/functions/signature/not_equals.svg[Embedded,opts=inline]

* equality: `==`
* inequality: `!=`
* less than: `<`
* less than or equal: `<=`
* larger than: `>`
* larger than or equal: `>=`
Supported types:

And these mathematical operators are supported:
include::types/not_equals.asciidoc[]

==== Less than `<`
[.text-center]
image::esql/functions/signature/less_than.svg[Embedded,opts=inline]

Supported types:

include::types/less_than.asciidoc[]

==== Less than or equal to `<=`
[.text-center]
image::esql/functions/signature/less_than_or_equal.svg[Embedded,opts=inline]

Supported types:

include::types/less_than_or_equal.asciidoc[]

==== Greater than `>`
[.text-center]
image::esql/functions/signature/greater_than.svg[Embedded,opts=inline]

Supported types:

include::types/greater_than.asciidoc[]

==== Greater than or equal to `>=`
[.text-center]
image::esql/functions/signature/greater_than_or_equal.svg[Embedded,opts=inline]

Supported types:

include::types/greater_than_or_equal.asciidoc[]

==== Add `+`
[.text-center]
image::esql/functions/signature/add.svg[Embedded,opts=inline]

Supported types:

include::types/add.asciidoc[]

==== Subtract `-`
[.text-center]
image::esql/functions/signature/sub.svg[Embedded,opts=inline]

Supported types:

include::types/sub.asciidoc[]

==== Multiply `*`
[.text-center]
image::esql/functions/signature/mul.svg[Embedded,opts=inline]

Supported types:

include::types/mul.asciidoc[]

==== Divide `/`
[.text-center]
image::esql/functions/signature/div.svg[Embedded,opts=inline]

Supported types:

include::types/div.asciidoc[]

==== Modulus `%`
[.text-center]
image::esql/functions/signature/mod.svg[Embedded,opts=inline]

Supported types:

include::types/mod.asciidoc[]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion docs/reference/esql/functions/signature/to_degrees.svg

This file was deleted.

19 changes: 19 additions & 0 deletions docs/reference/esql/functions/to_cartesianpoint.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[discrete]
[[esql-to_cartesianpoint]]
=== `TO_CARTESIANPOINT`
Converts an input value to a `point` value.

The input can be a single- or multi-valued field or an expression.
The input type must be a string or a cartesian `point`.

A string will only be successfully converted if it respects the
https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry[WKT Point] format:

[source.merge.styled,esql]
----
include::{esql-specs}/spatial.csv-spec[tag=to_cartesianpoint-str]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/spatial.csv-spec[tag=to_cartesianpoint-str-result]
|===
19 changes: 19 additions & 0 deletions docs/reference/esql/functions/to_geopoint.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[discrete]
[[esql-to_geopoint]]
=== `TO_GEOPOINT`
Converts an input value to a `geo_point` value.

The input can be a single- or multi-valued field or an expression.
The input type must be a string or a `geo_point`.

A string will only be successfully converted if it respects the
https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry[WKT Point] format:

[source.merge.styled,esql]
----
include::{esql-specs}/spatial.csv-spec[tag=to_geopoint-str]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/spatial.csv-spec[tag=to_geopoint-str-result]
|===
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@

// tag::type_list[]
* <<esql-to_boolean>>
* <<esql-to_cartesianpoint>>
* <<esql-to_datetime>>
* <<esql-to_degrees>>
* <<esql-to_double>>
* <<esql-to_geopoint>>
* <<esql-to_integer>>
* <<esql-to_ip>>
* <<esql-to_long>>
Expand All @@ -22,9 +24,11 @@
// end::type_list[]

include::to_boolean.asciidoc[]
include::to_cartesianpoint.asciidoc[]
include::to_datetime.asciidoc[]
include::to_degrees.asciidoc[]
include::to_double.asciidoc[]
include::to_geopoint.asciidoc[]
include::to_integer.asciidoc[]
include::to_ip.asciidoc[]
include::to_long.asciidoc[]
Expand Down
12 changes: 12 additions & 0 deletions docs/reference/esql/functions/types/add.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
date_period | date_period | date_period
date_period | datetime | datetime
datetime | date_period | datetime
datetime | time_duration | datetime
double | double | double
integer | integer | integer
long | long | long
time_duration | time_duration | time_duration
|===
7 changes: 7 additions & 0 deletions docs/reference/esql/functions/types/div.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
double | double | double
integer | integer | integer
long | long | long
|===
5 changes: 5 additions & 0 deletions docs/reference/esql/functions/types/equals.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
integer | integer | boolean
|===
5 changes: 5 additions & 0 deletions docs/reference/esql/functions/types/greater_than.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
integer | integer | boolean
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
integer | integer | boolean
|===
5 changes: 5 additions & 0 deletions docs/reference/esql/functions/types/less_than.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
integer | integer | boolean
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
integer | integer | boolean
|===
7 changes: 7 additions & 0 deletions docs/reference/esql/functions/types/mod.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
double | double | double
integer | integer | integer
long | long | long
|===
7 changes: 7 additions & 0 deletions docs/reference/esql/functions/types/mul.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
double | double | double
integer | integer | integer
long | long | long
|===
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
v | result
date_period | date_period
double | double
integer | double
long | double
unsigned_long | double
integer | integer
long | long
time_duration | time_duration
|===
5 changes: 5 additions & 0 deletions docs/reference/esql/functions/types/not_equals.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
integer | integer | boolean
|===
11 changes: 11 additions & 0 deletions docs/reference/esql/functions/types/sub.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
date_period | date_period | date_period
datetime | date_period | datetime
datetime | time_duration | datetime
double | double | double
integer | integer | integer
long | long | long
time_duration | time_duration | time_duration
|===
Loading

0 comments on commit 02cd947

Please sign in to comment.