Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into rcs2_esql
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelandis committed Apr 11, 2024
2 parents 87007c2 + 1d0e3cf commit 78d3e94
Show file tree
Hide file tree
Showing 770 changed files with 3,323 additions and 3,066 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ testfixtures_shared/

# Generated
checkstyle_ide.xml
x-pack/plugin/esql/gen/
x-pack/plugin/esql/src/main/generated-src/generated/
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,17 @@ public void execute(BuildFinishedFlowAction.Parameters parameters) throws FileNo
uploadFile.getParentFile().mkdirs();
createBuildArchiveTar(parameters.getFilteredFiles().get(), parameters.getProjectDir().get(), uploadFile);
if (uploadFile.exists() && "true".equals(System.getenv("BUILDKITE"))) {
String uploadFilePath = "build/" + uploadFile.getName();
String uploadFilePath = uploadFile.getName();
File uploadFileDir = uploadFile.getParentFile();
try {
System.out.println("Uploading buildkite artifact: " + uploadFilePath + "...");
new ProcessBuilder("buildkite-agent", "artifact", "upload", uploadFilePath).start().waitFor();
ProcessBuilder pb = new ProcessBuilder("buildkite-agent", "artifact", "upload", uploadFilePath);
// If we don't switch to the build directory first, the uploaded file will have a `build/` prefix
// Buildkite will flip the `/` to a `\` at upload time on Windows, which will make the search command below fail
// So, if you change this such that the artifact will have a slash/directory in it, you'll need to update the logic
// below as well
pb.directory(uploadFileDir);
pb.start().waitFor();

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

Expand Down
6 changes: 6 additions & 0 deletions docs/changelog/107287.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 107287
summary: Add support for the 'Anonymous IP' database to the geoip processor
area: Ingest Node
type: enhancement
issues:
- 90789
2 changes: 1 addition & 1 deletion docs/reference/esql/functions/description/e.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

*Description*

Eulers number.
Returns {wikipedia}/E_(mathematical_constant)[Euler's number].
4 changes: 4 additions & 0 deletions docs/reference/esql/functions/description/floor.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
*Description*

Round a number down to the nearest integer.

NOTE: This is a noop for `long` (including unsigned) and `integer`.
For `double` this picks the closest `double` value to the integer
similar to {javadoc}/java.base/java/lang/Math.html#floor(double)[Math.floor].
2 changes: 1 addition & 1 deletion docs/reference/esql/functions/description/pi.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

*Description*

The ratio of a circles circumference to its diameter.
Returns the {wikipedia}/Pi[ratio] of a circle's circumference to its diameter.
4 changes: 3 additions & 1 deletion docs/reference/esql/functions/description/pow.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

*Description*

Returns the value of a base raised to the power of an exponent.
Returns the value of `base` raised to the power of `exponent`.

NOTE: It is still possible to overflow a double result here; in that case, null will be returned.
2 changes: 1 addition & 1 deletion docs/reference/esql/functions/description/round.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

*Description*

Rounds a number to the closest number with the specified number of digits.
Rounds a number to the closest number with the specified number of digits. Defaults to 0 digits if no number of digits is provided. If the specified number of digits is negative, rounds to the number of digits left of the decimal point.
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
[discrete]
[[esql-e]]
=== `E`

*Syntax*

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

*Description*

Returns {wikipedia}/E_(mathematical_constant)[Euler's number].
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.

*Example*

Expand All @@ -21,3 +10,4 @@ include::{esql-specs}/math.csv-spec[tag=e]
|===
include::{esql-specs}/math.csv-spec[tag=e-result]
|===

13 changes: 13 additions & 0 deletions docs/reference/esql/functions/examples/floor.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.

*Example*

[source.merge.styled,esql]
----
include::{esql-specs}/math.csv-spec[tag=floor]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/math.csv-spec[tag=floor-result]
|===

13 changes: 13 additions & 0 deletions docs/reference/esql/functions/examples/pi.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.

*Example*

[source.merge.styled,esql]
----
include::{esql-specs}/math.csv-spec[tag=pi]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/math.csv-spec[tag=pi-result]
|===

Original file line number Diff line number Diff line change
@@ -1,27 +1,4 @@
[discrete]
[[esql-pow]]
=== `POW`

*Syntax*

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

*Parameters*

`base`::
Numeric expression. If `null`, the function returns `null`.

`exponent`::
Numeric expression. If `null`, the function returns `null`.

*Description*

Returns the value of `base` raised to the power of `exponent`. Both arguments
must be numeric. The output is always a double. Note that it is still possible
to overflow a double result here; in that case, null will be returned.

include::types/pow.asciidoc[]
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.

*Examples*

Expand All @@ -33,10 +10,8 @@ include::{esql-specs}/math.csv-spec[tag=powDI]
|===
include::{esql-specs}/math.csv-spec[tag=powDI-result]
|===

The exponent can be a fraction, which is similar to performing a root.
For example, the exponent of `0.5` will give the square root of the base:

[source.merge.styled,esql]
----
include::{esql-specs}/math.csv-spec[tag=powID-sqrt]
Expand All @@ -45,3 +20,4 @@ include::{esql-specs}/math.csv-spec[tag=powID-sqrt]
|===
include::{esql-specs}/math.csv-spec[tag=powID-sqrt-result]
|===

13 changes: 13 additions & 0 deletions docs/reference/esql/functions/examples/round.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.

*Example*

[source.merge.styled,esql]
----
include::{esql-specs}/docs.csv-spec[tag=round]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/docs.csv-spec[tag=round-result]
|===

34 changes: 0 additions & 34 deletions docs/reference/esql/functions/floor.asciidoc

This file was deleted.

5 changes: 4 additions & 1 deletion docs/reference/esql/functions/kibana/definition/e.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
"comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
"type" : "eval",
"name" : "e",
"description" : "Eulers number.",
"description" : "Returns Euler's number.",
"signatures" : [
{
"params" : [ ],
"returnType" : "double"
}
],
"examples" : [
"ROW E()"
]
}
12 changes: 8 additions & 4 deletions docs/reference/esql/functions/kibana/definition/floor.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
"type" : "eval",
"name" : "floor",
"description" : "Round a number down to the nearest integer.",
"note" : "This is a noop for `long` (including unsigned) and `integer`.\nFor `double` this picks the closest `double` value to the integer\nsimilar to Math.floor.",
"signatures" : [
{
"params" : [
{
"name" : "number",
"type" : "double",
"optional" : false,
"description" : ""
"description" : "Numeric expression. If `null`, the function returns `null`."
}
],
"variadic" : false,
Expand All @@ -22,7 +23,7 @@
"name" : "number",
"type" : "integer",
"optional" : false,
"description" : ""
"description" : "Numeric expression. If `null`, the function returns `null`."
}
],
"variadic" : false,
Expand All @@ -34,7 +35,7 @@
"name" : "number",
"type" : "long",
"optional" : false,
"description" : ""
"description" : "Numeric expression. If `null`, the function returns `null`."
}
],
"variadic" : false,
Expand All @@ -46,11 +47,14 @@
"name" : "number",
"type" : "unsigned_long",
"optional" : false,
"description" : ""
"description" : "Numeric expression. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "unsigned_long"
}
],
"examples" : [
"ROW a=1.8\n| EVAL a=FLOOR(a)"
]
}
5 changes: 4 additions & 1 deletion docs/reference/esql/functions/kibana/definition/pi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
"comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
"type" : "eval",
"name" : "pi",
"description" : "The ratio of a circles circumference to its diameter.",
"description" : "Returns the ratio of a circle's circumference to its diameter.",
"signatures" : [
{
"params" : [ ],
"returnType" : "double"
}
],
"examples" : [
"ROW PI()"
]
}
Loading

0 comments on commit 78d3e94

Please sign in to comment.