From 5a2fbe2dedc96ef2976c0426dce300b95e312f4e Mon Sep 17 00:00:00 2001 From: Fang Xing Date: Wed, 15 May 2024 22:42:04 -0400 Subject: [PATCH 1/7] render docs for unregistered functions --- docs/reference/esql/esql-get-started.asciidoc | 2 +- docs/reference/esql/functions/binary.asciidoc | 61 +-- docs/reference/esql/functions/case.asciidoc | 70 --- .../esql/functions/description/add.asciidoc | 5 + .../esql/functions/description/div.asciidoc | 5 + .../functions/description/equals.asciidoc | 5 + .../description/greater_than.asciidoc | 5 + .../greater_than_or_equal.asciidoc | 5 + .../functions/description/less_than.asciidoc | 5 + .../description/less_than_or_equal.asciidoc | 5 + .../esql/functions/description/like.asciidoc | 5 + .../esql/functions/description/mod.asciidoc | 5 + .../esql/functions/description/mul.asciidoc | 5 + .../esql/functions/description/neg.asciidoc | 5 + .../functions/description/not_equals.asciidoc | 5 + .../esql/functions/description/rlike.asciidoc | 5 + .../esql/functions/description/sub.asciidoc | 5 + .../esql/functions/examples/like.asciidoc | 13 + .../esql/functions/examples/rlike.asciidoc | 13 + .../esql/functions/kibana/definition/add.json | 296 +++++++++++++ .../esql/functions/kibana/definition/div.json | 188 ++++++++ .../functions/kibana/definition/equals.json | 404 ++++++++++++++++++ .../kibana/definition/greater_than.json | 314 ++++++++++++++ .../definition/greater_than_or_equal.json | 314 ++++++++++++++ .../kibana/definition/less_than.json | 314 ++++++++++++++ .../kibana/definition/less_than_or_equal.json | 314 ++++++++++++++ .../functions/kibana/definition/like.json | 47 ++ .../esql/functions/kibana/definition/mod.json | 188 ++++++++ .../esql/functions/kibana/definition/mul.json | 188 ++++++++ .../esql/functions/kibana/definition/neg.json | 68 +++ .../kibana/definition/not_equals.json | 404 ++++++++++++++++++ .../functions/kibana/definition/rlike.json | 59 +++ .../esql/functions/kibana/definition/sub.json | 260 +++++++++++ .../esql/functions/kibana/docs/add.md | 7 + .../esql/functions/kibana/docs/div.md | 7 + .../esql/functions/kibana/docs/equals.md | 7 + .../functions/kibana/docs/greater_than.md | 7 + .../kibana/docs/greater_than_or_equal.md | 7 + .../esql/functions/kibana/docs/less_than.md | 7 + .../kibana/docs/less_than_or_equal.md | 7 + .../{like.asciidoc => kibana/docs/like.md} | 24 +- .../esql/functions/kibana/docs/mod.md | 7 + .../esql/functions/kibana/docs/mul.md | 7 + .../esql/functions/kibana/docs/neg.md | 7 + .../esql/functions/kibana/docs/not_equals.md | 7 + .../esql/functions/kibana/docs/rlike.md | 15 + .../esql/functions/kibana/docs/sub.md | 7 + .../esql/functions/layout/abs.asciidoc | 2 + .../esql/functions/layout/acos.asciidoc | 2 + .../esql/functions/layout/add.asciidoc | 16 + .../esql/functions/layout/asin.asciidoc | 2 + .../esql/functions/layout/atan.asciidoc | 2 + .../esql/functions/layout/atan2.asciidoc | 2 + .../esql/functions/layout/bucket.asciidoc | 2 + .../esql/functions/layout/case.asciidoc | 2 + .../esql/functions/layout/ceil.asciidoc | 2 + .../esql/functions/layout/cidr_match.asciidoc | 2 + .../esql/functions/layout/coalesce.asciidoc | 2 + .../esql/functions/layout/concat.asciidoc | 2 + .../esql/functions/layout/cos.asciidoc | 2 + .../esql/functions/layout/cosh.asciidoc | 2 + .../esql/functions/layout/date_diff.asciidoc | 2 + .../functions/layout/date_extract.asciidoc | 2 + .../functions/layout/date_format.asciidoc | 2 + .../esql/functions/layout/date_parse.asciidoc | 2 + .../esql/functions/layout/date_trunc.asciidoc | 2 + .../esql/functions/layout/div.asciidoc | 16 + .../esql/functions/layout/e.asciidoc | 2 + .../esql/functions/layout/ends_with.asciidoc | 2 + .../esql/functions/layout/equals.asciidoc | 16 + .../esql/functions/layout/floor.asciidoc | 2 + .../functions/layout/from_base64.asciidoc | 2 + .../functions/layout/greater_than.asciidoc | 16 + .../layout/greater_than_or_equal.asciidoc | 16 + .../esql/functions/layout/greatest.asciidoc | 2 + .../esql/functions/layout/least.asciidoc | 2 + .../esql/functions/layout/left.asciidoc | 2 + .../esql/functions/layout/length.asciidoc | 2 + .../esql/functions/layout/less_than.asciidoc | 16 + .../layout/less_than_or_equal.asciidoc | 16 + .../esql/functions/layout/like.asciidoc | 17 + .../esql/functions/layout/locate.asciidoc | 2 + .../esql/functions/layout/log.asciidoc | 2 + .../esql/functions/layout/log10.asciidoc | 2 + .../esql/functions/layout/ltrim.asciidoc | 2 + .../esql/functions/layout/mod.asciidoc | 16 + .../esql/functions/layout/mul.asciidoc | 16 + .../esql/functions/layout/mv_avg.asciidoc | 2 + .../esql/functions/layout/mv_concat.asciidoc | 2 + .../esql/functions/layout/mv_count.asciidoc | 2 + .../esql/functions/layout/mv_dedupe.asciidoc | 2 + .../esql/functions/layout/mv_first.asciidoc | 2 + .../esql/functions/layout/mv_last.asciidoc | 2 + .../esql/functions/layout/mv_max.asciidoc | 2 + .../esql/functions/layout/mv_median.asciidoc | 2 + .../esql/functions/layout/mv_min.asciidoc | 2 + .../esql/functions/layout/mv_slice.asciidoc | 2 + .../esql/functions/layout/mv_sort.asciidoc | 2 + .../esql/functions/layout/mv_sum.asciidoc | 2 + .../esql/functions/layout/mv_zip.asciidoc | 2 + .../esql/functions/layout/neg.asciidoc | 16 + .../esql/functions/layout/not_equals.asciidoc | 16 + .../esql/functions/layout/now.asciidoc | 2 + .../esql/functions/layout/pi.asciidoc | 2 + .../esql/functions/layout/pow.asciidoc | 2 + .../esql/functions/layout/replace.asciidoc | 2 + .../esql/functions/layout/right.asciidoc | 2 + .../esql/functions/layout/rlike.asciidoc | 17 + .../esql/functions/layout/round.asciidoc | 2 + .../esql/functions/layout/rtrim.asciidoc | 2 + .../esql/functions/layout/signum.asciidoc | 2 + .../esql/functions/layout/sin.asciidoc | 2 + .../esql/functions/layout/sinh.asciidoc | 2 + .../esql/functions/layout/split.asciidoc | 2 + .../esql/functions/layout/sqrt.asciidoc | 2 + .../functions/layout/st_contains.asciidoc | 2 + .../functions/layout/st_disjoint.asciidoc | 2 + .../functions/layout/st_intersects.asciidoc | 2 + .../esql/functions/layout/st_within.asciidoc | 2 + .../esql/functions/layout/st_x.asciidoc | 2 + .../esql/functions/layout/st_y.asciidoc | 2 + .../functions/layout/starts_with.asciidoc | 2 + .../esql/functions/layout/sub.asciidoc | 16 + .../esql/functions/layout/substring.asciidoc | 2 + .../esql/functions/layout/tan.asciidoc | 2 + .../esql/functions/layout/tanh.asciidoc | 2 + .../esql/functions/layout/tau.asciidoc | 2 + .../esql/functions/layout/to_base64.asciidoc | 2 + .../esql/functions/layout/to_boolean.asciidoc | 2 + .../layout/to_cartesianpoint.asciidoc | 2 + .../layout/to_cartesianshape.asciidoc | 2 + .../functions/layout/to_datetime.asciidoc | 2 + .../esql/functions/layout/to_degrees.asciidoc | 2 + .../esql/functions/layout/to_double.asciidoc | 2 + .../functions/layout/to_geopoint.asciidoc | 2 + .../functions/layout/to_geoshape.asciidoc | 2 + .../esql/functions/layout/to_integer.asciidoc | 2 + .../esql/functions/layout/to_ip.asciidoc | 2 + .../esql/functions/layout/to_long.asciidoc | 2 + .../esql/functions/layout/to_lower.asciidoc | 2 + .../esql/functions/layout/to_radians.asciidoc | 2 + .../esql/functions/layout/to_string.asciidoc | 2 + .../layout/to_unsigned_long.asciidoc | 2 + .../esql/functions/layout/to_upper.asciidoc | 2 + .../esql/functions/layout/to_version.asciidoc | 2 + .../esql/functions/layout/trim.asciidoc | 2 + .../esql/functions/operators.asciidoc | 8 +- .../esql/functions/parameters/add.asciidoc | 9 + .../esql/functions/parameters/div.asciidoc | 9 + .../esql/functions/parameters/equals.asciidoc | 9 + .../parameters/greater_than.asciidoc | 9 + .../parameters/greater_than_or_equal.asciidoc | 9 + .../functions/parameters/is_not_null.asciidoc | 6 + .../functions/parameters/is_null.asciidoc | 6 + .../functions/parameters/less_than.asciidoc | 9 + .../parameters/less_than_or_equal.asciidoc | 9 + .../esql/functions/parameters/like.asciidoc | 9 + .../esql/functions/parameters/mod.asciidoc | 9 + .../esql/functions/parameters/mul.asciidoc | 9 + .../esql/functions/parameters/neg.asciidoc | 6 + .../functions/parameters/not_equals.asciidoc | 9 + .../esql/functions/parameters/rlike.asciidoc | 12 + .../esql/functions/parameters/sub.asciidoc | 9 + .../esql/functions/predicates.asciidoc | 12 +- docs/reference/esql/functions/rlike.asciidoc | 21 - docs/reference/esql/functions/round.asciidoc | 34 -- .../esql/functions/signature/is_not_null.svg | 1 + .../esql/functions/signature/is_null.svg | 1 + .../esql/functions/signature/like.svg | 1 + .../esql/functions/signature/rlike.svg | 1 + .../esql/functions/types/is_not_null.asciidoc | 22 + .../esql/functions/types/is_null.asciidoc | 22 + .../esql/functions/types/neg.asciidoc | 2 +- docs/reference/esql/functions/unary.asciidoc | 7 +- .../esql/processing-commands/where.asciidoc | 8 +- .../function/scalar/string/RLike.java | 26 +- .../function/scalar/string/WildcardLike.java | 4 +- .../predicate/operator/arithmetic/Add.java | 20 +- .../predicate/operator/arithmetic/Div.java | 12 +- .../predicate/operator/arithmetic/Mod.java | 12 +- .../predicate/operator/arithmetic/Mul.java | 9 +- .../predicate/operator/arithmetic/Neg.java | 15 +- .../predicate/operator/arithmetic/Sub.java | 20 +- .../predicate/operator/comparison/Equals.java | 45 +- .../operator/comparison/GreaterThan.java | 17 +- .../comparison/GreaterThanOrEqual.java | 20 +- .../predicate/operator/comparison/In.java | 41 +- .../operator/comparison/LessThan.java | 17 +- .../operator/comparison/LessThanOrEqual.java | 20 +- .../operator/comparison/NotEquals.java | 45 +- .../function/AbstractFunctionTestCase.java | 191 +++++++-- .../expression/function/RailRoadDiagram.java | 25 ++ 192 files changed, 4655 insertions(+), 268 deletions(-) delete mode 100644 docs/reference/esql/functions/case.asciidoc create mode 100644 docs/reference/esql/functions/description/add.asciidoc create mode 100644 docs/reference/esql/functions/description/div.asciidoc create mode 100644 docs/reference/esql/functions/description/equals.asciidoc create mode 100644 docs/reference/esql/functions/description/greater_than.asciidoc create mode 100644 docs/reference/esql/functions/description/greater_than_or_equal.asciidoc create mode 100644 docs/reference/esql/functions/description/less_than.asciidoc create mode 100644 docs/reference/esql/functions/description/less_than_or_equal.asciidoc create mode 100644 docs/reference/esql/functions/description/like.asciidoc create mode 100644 docs/reference/esql/functions/description/mod.asciidoc create mode 100644 docs/reference/esql/functions/description/mul.asciidoc create mode 100644 docs/reference/esql/functions/description/neg.asciidoc create mode 100644 docs/reference/esql/functions/description/not_equals.asciidoc create mode 100644 docs/reference/esql/functions/description/rlike.asciidoc create mode 100644 docs/reference/esql/functions/description/sub.asciidoc create mode 100644 docs/reference/esql/functions/examples/like.asciidoc create mode 100644 docs/reference/esql/functions/examples/rlike.asciidoc create mode 100644 docs/reference/esql/functions/kibana/definition/add.json create mode 100644 docs/reference/esql/functions/kibana/definition/div.json create mode 100644 docs/reference/esql/functions/kibana/definition/equals.json create mode 100644 docs/reference/esql/functions/kibana/definition/greater_than.json create mode 100644 docs/reference/esql/functions/kibana/definition/greater_than_or_equal.json create mode 100644 docs/reference/esql/functions/kibana/definition/less_than.json create mode 100644 docs/reference/esql/functions/kibana/definition/less_than_or_equal.json create mode 100644 docs/reference/esql/functions/kibana/definition/like.json create mode 100644 docs/reference/esql/functions/kibana/definition/mod.json create mode 100644 docs/reference/esql/functions/kibana/definition/mul.json create mode 100644 docs/reference/esql/functions/kibana/definition/neg.json create mode 100644 docs/reference/esql/functions/kibana/definition/not_equals.json create mode 100644 docs/reference/esql/functions/kibana/definition/rlike.json create mode 100644 docs/reference/esql/functions/kibana/definition/sub.json create mode 100644 docs/reference/esql/functions/kibana/docs/add.md create mode 100644 docs/reference/esql/functions/kibana/docs/div.md create mode 100644 docs/reference/esql/functions/kibana/docs/equals.md create mode 100644 docs/reference/esql/functions/kibana/docs/greater_than.md create mode 100644 docs/reference/esql/functions/kibana/docs/greater_than_or_equal.md create mode 100644 docs/reference/esql/functions/kibana/docs/less_than.md create mode 100644 docs/reference/esql/functions/kibana/docs/less_than_or_equal.md rename docs/reference/esql/functions/{like.asciidoc => kibana/docs/like.md} (55%) create mode 100644 docs/reference/esql/functions/kibana/docs/mod.md create mode 100644 docs/reference/esql/functions/kibana/docs/mul.md create mode 100644 docs/reference/esql/functions/kibana/docs/neg.md create mode 100644 docs/reference/esql/functions/kibana/docs/not_equals.md create mode 100644 docs/reference/esql/functions/kibana/docs/rlike.md create mode 100644 docs/reference/esql/functions/kibana/docs/sub.md create mode 100644 docs/reference/esql/functions/layout/add.asciidoc create mode 100644 docs/reference/esql/functions/layout/div.asciidoc create mode 100644 docs/reference/esql/functions/layout/equals.asciidoc create mode 100644 docs/reference/esql/functions/layout/greater_than.asciidoc create mode 100644 docs/reference/esql/functions/layout/greater_than_or_equal.asciidoc create mode 100644 docs/reference/esql/functions/layout/less_than.asciidoc create mode 100644 docs/reference/esql/functions/layout/less_than_or_equal.asciidoc create mode 100644 docs/reference/esql/functions/layout/like.asciidoc create mode 100644 docs/reference/esql/functions/layout/mod.asciidoc create mode 100644 docs/reference/esql/functions/layout/mul.asciidoc create mode 100644 docs/reference/esql/functions/layout/neg.asciidoc create mode 100644 docs/reference/esql/functions/layout/not_equals.asciidoc create mode 100644 docs/reference/esql/functions/layout/rlike.asciidoc create mode 100644 docs/reference/esql/functions/layout/sub.asciidoc create mode 100644 docs/reference/esql/functions/parameters/add.asciidoc create mode 100644 docs/reference/esql/functions/parameters/div.asciidoc create mode 100644 docs/reference/esql/functions/parameters/equals.asciidoc create mode 100644 docs/reference/esql/functions/parameters/greater_than.asciidoc create mode 100644 docs/reference/esql/functions/parameters/greater_than_or_equal.asciidoc create mode 100644 docs/reference/esql/functions/parameters/is_not_null.asciidoc create mode 100644 docs/reference/esql/functions/parameters/is_null.asciidoc create mode 100644 docs/reference/esql/functions/parameters/less_than.asciidoc create mode 100644 docs/reference/esql/functions/parameters/less_than_or_equal.asciidoc create mode 100644 docs/reference/esql/functions/parameters/like.asciidoc create mode 100644 docs/reference/esql/functions/parameters/mod.asciidoc create mode 100644 docs/reference/esql/functions/parameters/mul.asciidoc create mode 100644 docs/reference/esql/functions/parameters/neg.asciidoc create mode 100644 docs/reference/esql/functions/parameters/not_equals.asciidoc create mode 100644 docs/reference/esql/functions/parameters/rlike.asciidoc create mode 100644 docs/reference/esql/functions/parameters/sub.asciidoc delete mode 100644 docs/reference/esql/functions/rlike.asciidoc delete mode 100644 docs/reference/esql/functions/round.asciidoc create mode 100644 docs/reference/esql/functions/signature/is_not_null.svg create mode 100644 docs/reference/esql/functions/signature/is_null.svg create mode 100644 docs/reference/esql/functions/signature/like.svg create mode 100644 docs/reference/esql/functions/signature/rlike.svg create mode 100644 docs/reference/esql/functions/types/is_not_null.asciidoc create mode 100644 docs/reference/esql/functions/types/is_null.asciidoc diff --git a/docs/reference/esql/esql-get-started.asciidoc b/docs/reference/esql/esql-get-started.asciidoc index b7928898a3bbb..74f482ec9adf5 100644 --- a/docs/reference/esql/esql-get-started.asciidoc +++ b/docs/reference/esql/esql-get-started.asciidoc @@ -118,7 +118,7 @@ events with a duration longer than 5ms: include::{esql-specs}/where.csv-spec[tag=gs-where] ---- -`WHERE` supports several <>. For example, you can use <> to run a wildcard query against the `message` column: +`WHERE` supports several <>. For example, you can use <> to run a wildcard query against the `message` column: [source,esql] ---- diff --git a/docs/reference/esql/functions/binary.asciidoc b/docs/reference/esql/functions/binary.asciidoc index 431efab1c924a..32a6a76768083 100644 --- a/docs/reference/esql/functions/binary.asciidoc +++ b/docs/reference/esql/functions/binary.asciidoc @@ -3,72 +3,35 @@ === Binary operators [[esql-binary-operators-equality]] -==== Equality -[.text-center] -image::esql/functions/signature/equals.svg[Embedded,opts=inline] - -Supported types: - -include::types/equals.asciidoc[] +==== Equality `==` +include::layout/equals.asciidoc[] ==== Inequality `!=` -[.text-center] -image::esql/functions/signature/not_equals.svg[Embedded,opts=inline] - -Supported types: - -include::types/not_equals.asciidoc[] +include::layout/not_equals.asciidoc[] ==== Less than `<` -[.text-center] -image::esql/functions/signature/less_than.svg[Embedded,opts=inline] - -include::types/less_than.asciidoc[] +include::layout/less_than.asciidoc[] ==== Less than or equal to `<=` -[.text-center] -image::esql/functions/signature/less_than_or_equal.svg[Embedded,opts=inline] - -include::types/less_than_or_equal.asciidoc[] +include::layout/less_than_or_equal.asciidoc[] ==== Greater than `>` -[.text-center] -image::esql/functions/signature/greater_than.svg[Embedded,opts=inline] - -include::types/greater_than.asciidoc[] +include::layout/greater_than.asciidoc[] ==== Greater than or equal to `>=` -[.text-center] -image::esql/functions/signature/greater_than_or_equal.svg[Embedded,opts=inline] - -include::types/greater_than_or_equal.asciidoc[] +include::layout/greater_than_or_equal.asciidoc[] ==== Add `+` -[.text-center] -image::esql/functions/signature/add.svg[Embedded,opts=inline] - -include::types/add.asciidoc[] +include::layout/add.asciidoc[] ==== Subtract `-` -[.text-center] -image::esql/functions/signature/sub.svg[Embedded,opts=inline] - -include::types/sub.asciidoc[] +include::layout/sub.asciidoc[] ==== Multiply `*` -[.text-center] -image::esql/functions/signature/mul.svg[Embedded,opts=inline] - -include::types/mul.asciidoc[] +include::layout/mul.asciidoc[] ==== Divide `/` -[.text-center] -image::esql/functions/signature/div.svg[Embedded,opts=inline] - -include::types/div.asciidoc[] +include::layout/div.asciidoc[] ==== Modulus `%` -[.text-center] -image::esql/functions/signature/mod.svg[Embedded,opts=inline] - -include::types/mod.asciidoc[] +include::layout/mod.asciidoc[] diff --git a/docs/reference/esql/functions/case.asciidoc b/docs/reference/esql/functions/case.asciidoc deleted file mode 100644 index b5fda636135b2..0000000000000 --- a/docs/reference/esql/functions/case.asciidoc +++ /dev/null @@ -1,70 +0,0 @@ -[discrete] -[[esql-case]] -=== `CASE` - -*Syntax* - -[source,esql] ----- -CASE(condition1, value1[, ..., conditionN, valueN][, default_value]) ----- - -*Parameters* - -`conditionX`:: -A condition. - -`valueX`:: -The value that's returned when the corresponding condition is the first to -evaluate to `true`. - -`default_value`:: -The default value that's is returned when no condition matches. - -*Description* - -Accepts pairs of conditions and values. The function returns the value that -belongs to the first condition that evaluates to `true`. - -If the number of arguments is odd, the last argument is the default value which -is returned when no condition matches. If the number of arguments is even, and -no condition matches, the function returns `null`. - -*Example* - -Determine whether employees are monolingual, bilingual, or polyglot: - -[source,esql] -[source.merge.styled,esql] ----- -include::{esql-specs}/docs.csv-spec[tag=case] ----- -[%header.monospaced.styled,format=dsv,separator=|] -|=== -include::{esql-specs}/docs.csv-spec[tag=case-result] -|=== - -Calculate the total connection success rate based on log messages: - -[source,esql] -[source.merge.styled,esql] ----- -include::{esql-specs}/conditional.csv-spec[tag=docsCaseSuccessRate] ----- -[%header.monospaced.styled,format=dsv,separator=|] -|=== -include::{esql-specs}/conditional.csv-spec[tag=docsCaseSuccessRate-result] -|=== - -Calculate an hourly error rate as a percentage of the total number of log -messages: - -[source,esql] -[source.merge.styled,esql] ----- -include::{esql-specs}/conditional.csv-spec[tag=docsCaseHourlyErrorRate] ----- -[%header.monospaced.styled,format=dsv,separator=|] -|=== -include::{esql-specs}/conditional.csv-spec[tag=docsCaseHourlyErrorRate-result] -|=== diff --git a/docs/reference/esql/functions/description/add.asciidoc b/docs/reference/esql/functions/description/add.asciidoc new file mode 100644 index 0000000000000..5052c2ed59125 --- /dev/null +++ b/docs/reference/esql/functions/description/add.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +Returns the sum of two values. diff --git a/docs/reference/esql/functions/description/div.asciidoc b/docs/reference/esql/functions/description/div.asciidoc new file mode 100644 index 0000000000000..258bfb0c11bad --- /dev/null +++ b/docs/reference/esql/functions/description/div.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +Returns the quotient of two numeric values. diff --git a/docs/reference/esql/functions/description/equals.asciidoc b/docs/reference/esql/functions/description/equals.asciidoc new file mode 100644 index 0000000000000..236d52592eb32 --- /dev/null +++ b/docs/reference/esql/functions/description/equals.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +Returns true if two values are equal. diff --git a/docs/reference/esql/functions/description/greater_than.asciidoc b/docs/reference/esql/functions/description/greater_than.asciidoc new file mode 100644 index 0000000000000..d11a8fcd53e4d --- /dev/null +++ b/docs/reference/esql/functions/description/greater_than.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +Returns true if the value on the left is greater than the value on the right. diff --git a/docs/reference/esql/functions/description/greater_than_or_equal.asciidoc b/docs/reference/esql/functions/description/greater_than_or_equal.asciidoc new file mode 100644 index 0000000000000..21c672f153ab3 --- /dev/null +++ b/docs/reference/esql/functions/description/greater_than_or_equal.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +Returns true if the value on the left is greater than or equals to the value on the right. diff --git a/docs/reference/esql/functions/description/less_than.asciidoc b/docs/reference/esql/functions/description/less_than.asciidoc new file mode 100644 index 0000000000000..9190ab9e33a69 --- /dev/null +++ b/docs/reference/esql/functions/description/less_than.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +Returns true if the value on the left is less than the value on the right. diff --git a/docs/reference/esql/functions/description/less_than_or_equal.asciidoc b/docs/reference/esql/functions/description/less_than_or_equal.asciidoc new file mode 100644 index 0000000000000..dc999a4df4e2b --- /dev/null +++ b/docs/reference/esql/functions/description/less_than_or_equal.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +Returns true if the value on the left is less than or equals to the value on the right. diff --git a/docs/reference/esql/functions/description/like.asciidoc b/docs/reference/esql/functions/description/like.asciidoc new file mode 100644 index 0000000000000..b4ec514c9fec3 --- /dev/null +++ b/docs/reference/esql/functions/description/like.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +Use `LIKE` to filter data based on string patterns using wildcards. `LIKE` usually acts on a field placed on the left-hand side of the operator, but it can also act on a constant (literal) expression. The right-hand side of the operator represents the pattern. The following wildcard characters are supported: * `*` matches zero or more characters. * `?` matches one character. diff --git a/docs/reference/esql/functions/description/mod.asciidoc b/docs/reference/esql/functions/description/mod.asciidoc new file mode 100644 index 0000000000000..edbdb193776d7 --- /dev/null +++ b/docs/reference/esql/functions/description/mod.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +Returns the remainder of the division of two numeric values. diff --git a/docs/reference/esql/functions/description/mul.asciidoc b/docs/reference/esql/functions/description/mul.asciidoc new file mode 100644 index 0000000000000..0331663d82515 --- /dev/null +++ b/docs/reference/esql/functions/description/mul.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +Returns the product of two numeric values. diff --git a/docs/reference/esql/functions/description/neg.asciidoc b/docs/reference/esql/functions/description/neg.asciidoc new file mode 100644 index 0000000000000..2d490ee88d12c --- /dev/null +++ b/docs/reference/esql/functions/description/neg.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +Returns the negation of the argument. diff --git a/docs/reference/esql/functions/description/not_equals.asciidoc b/docs/reference/esql/functions/description/not_equals.asciidoc new file mode 100644 index 0000000000000..4ef95a724bc03 --- /dev/null +++ b/docs/reference/esql/functions/description/not_equals.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +Returns true if two values are not equal. diff --git a/docs/reference/esql/functions/description/rlike.asciidoc b/docs/reference/esql/functions/description/rlike.asciidoc new file mode 100644 index 0000000000000..5b74354eff4c3 --- /dev/null +++ b/docs/reference/esql/functions/description/rlike.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +Use `RLIKE` to filter data based on string patterns using using <>. `RLIKE` usually acts on a field placed on the left-hand side of the operator, but it can also act on a constant (literal) expression. The right-hand side of the operator represents the pattern. diff --git a/docs/reference/esql/functions/description/sub.asciidoc b/docs/reference/esql/functions/description/sub.asciidoc new file mode 100644 index 0000000000000..a0dc95fdba7c5 --- /dev/null +++ b/docs/reference/esql/functions/description/sub.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +Returns the difference of two values. diff --git a/docs/reference/esql/functions/examples/like.asciidoc b/docs/reference/esql/functions/examples/like.asciidoc new file mode 100644 index 0000000000000..7b9997a61e20a --- /dev/null +++ b/docs/reference/esql/functions/examples/like.asciidoc @@ -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=like] +---- +[%header.monospaced.styled,format=dsv,separator=|] +|=== +include::{esql-specs}/docs.csv-spec[tag=like-result] +|=== + diff --git a/docs/reference/esql/functions/examples/rlike.asciidoc b/docs/reference/esql/functions/examples/rlike.asciidoc new file mode 100644 index 0000000000000..5b94fe354e6f5 --- /dev/null +++ b/docs/reference/esql/functions/examples/rlike.asciidoc @@ -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=rlike] +---- +[%header.monospaced.styled,format=dsv,separator=|] +|=== +include::{esql-specs}/docs.csv-spec[tag=rlike-result] +|=== + diff --git a/docs/reference/esql/functions/kibana/definition/add.json b/docs/reference/esql/functions/kibana/definition/add.json new file mode 100644 index 0000000000000..e25182b9df139 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/add.json @@ -0,0 +1,296 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "add", + "description" : "Returns the sum of two values.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "date_period" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "datetime" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "datetime" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "datetime" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "integer" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "datetime" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "time_duration" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "unsigned_long" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/div.json b/docs/reference/esql/functions/kibana/definition/div.json new file mode 100644 index 0000000000000..015c175aa4808 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/div.json @@ -0,0 +1,188 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "div", + "description" : "Returns the quotient of two numeric values.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "integer" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "unsigned_long" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/equals.json b/docs/reference/esql/functions/kibana/definition/equals.json new file mode 100644 index 0000000000000..d4fbf5a85211d --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/equals.json @@ -0,0 +1,404 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "equals", + "description" : "Returns true if two values are equal.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "boolean", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "boolean", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "cartesian_point", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "cartesian_point", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "cartesian_shape", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "cartesian_shape", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "geo_point", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "geo_point", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "geo_shape", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "geo_shape", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/greater_than.json b/docs/reference/esql/functions/kibana/definition/greater_than.json new file mode 100644 index 0000000000000..716f55e97838c --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/greater_than.json @@ -0,0 +1,314 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "greater_than", + "description" : "Returns true if the value on the left is greater than the value on the right.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/greater_than_or_equal.json b/docs/reference/esql/functions/kibana/definition/greater_than_or_equal.json new file mode 100644 index 0000000000000..a306e9c6c59c6 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/greater_than_or_equal.json @@ -0,0 +1,314 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "greater_than_or_equal", + "description" : "Returns true if the value on the left is greater than or equals to the value on the right.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/less_than.json b/docs/reference/esql/functions/kibana/definition/less_than.json new file mode 100644 index 0000000000000..74be3ca8196c3 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/less_than.json @@ -0,0 +1,314 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "less_than", + "description" : "Returns true if the value on the left is less than the value on the right.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/less_than_or_equal.json b/docs/reference/esql/functions/kibana/definition/less_than_or_equal.json new file mode 100644 index 0000000000000..7be0a94a6db18 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/less_than_or_equal.json @@ -0,0 +1,314 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "less_than_or_equal", + "description" : "Returns true if the value on the left is less than or equals to the value on the right.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/like.json b/docs/reference/esql/functions/kibana/definition/like.json new file mode 100644 index 0000000000000..a852b4271bb70 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/like.json @@ -0,0 +1,47 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "like", + "description" : "Use `LIKE` to filter data based on string patterns using wildcards. `LIKE`\nusually acts on a field placed on the left-hand side of the operator, but it can\nalso act on a constant (literal) expression. The right-hand side of the operator\nrepresents the pattern.\n\nThe following wildcard characters are supported:\n\n* `*` matches zero or more characters.\n* `?` matches one character.", + "signatures" : [ + { + "params" : [ + { + "name" : "str", + "type" : "keyword", + "optional" : false, + "description" : "A literal expression." + }, + { + "name" : "pattern", + "type" : "keyword", + "optional" : false, + "description" : "Pattern." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "str", + "type" : "text", + "optional" : false, + "description" : "A literal expression." + }, + { + "name" : "pattern", + "type" : "text", + "optional" : false, + "description" : "Pattern." + } + ], + "variadic" : true, + "returnType" : "boolean" + } + ], + "examples" : [ + "FROM employees\n| WHERE first_name LIKE \"?b*\"\n| KEEP first_name, last_name" + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/mod.json b/docs/reference/esql/functions/kibana/definition/mod.json new file mode 100644 index 0000000000000..bb36639678b3d --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/mod.json @@ -0,0 +1,188 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "mod", + "description" : "Returns the remainder of the division of two numeric values.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "integer" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "unsigned_long" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/mul.json b/docs/reference/esql/functions/kibana/definition/mul.json new file mode 100644 index 0000000000000..d47727db4ca81 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/mul.json @@ -0,0 +1,188 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "mul", + "description" : "Returns the product of two numeric values.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "integer" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "unsigned_long" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/neg.json b/docs/reference/esql/functions/kibana/definition/neg.json new file mode 100644 index 0000000000000..bf203d8c7c226 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/neg.json @@ -0,0 +1,68 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "neg", + "description" : "Returns the negation of the argument.", + "signatures" : [ + { + "params" : [ + { + "name" : "field", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time interval." + } + ], + "variadic" : false, + "returnType" : "date_period" + }, + { + "params" : [ + { + "name" : "field", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time interval." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "field", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time interval." + } + ], + "variadic" : false, + "returnType" : "integer" + }, + { + "params" : [ + { + "name" : "field", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time interval." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "field", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time interval." + } + ], + "variadic" : false, + "returnType" : "time_duration" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/not_equals.json b/docs/reference/esql/functions/kibana/definition/not_equals.json new file mode 100644 index 0000000000000..1eaf9372671f1 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/not_equals.json @@ -0,0 +1,404 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "not_equals", + "description" : "Returns true if two values are not equal.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "boolean", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "boolean", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "cartesian_point", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "cartesian_point", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "cartesian_shape", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "cartesian_shape", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "geo_point", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "geo_point", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "geo_shape", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "geo_shape", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/rlike.json b/docs/reference/esql/functions/kibana/definition/rlike.json new file mode 100644 index 0000000000000..c6bec0d1bb217 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/rlike.json @@ -0,0 +1,59 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "rlike", + "description" : "Use `RLIKE` to filter data based on string patterns using using\n<>. `RLIKE` usually acts on a field placed on\nthe left-hand side of the operator, but it can also act on a constant (literal)\nexpression. The right-hand side of the operator represents the pattern.", + "signatures" : [ + { + "params" : [ + { + "name" : "str", + "type" : "keyword", + "optional" : false, + "description" : "A literal value." + }, + { + "name" : "pattern", + "type" : "keyword", + "optional" : false, + "description" : "A regular expression." + }, + { + "name" : "caseInsensitive", + "type" : "boolean", + "optional" : false, + "description" : "Indicate whether it is case insensitive." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "str", + "type" : "text", + "optional" : false, + "description" : "A literal value." + }, + { + "name" : "pattern", + "type" : "text", + "optional" : false, + "description" : "A regular expression." + }, + { + "name" : "caseInsensitive", + "type" : "boolean", + "optional" : false, + "description" : "Indicate whether it is case insensitive." + } + ], + "variadic" : false, + "returnType" : "boolean" + } + ], + "examples" : [ + "FROM employees\n| WHERE first_name RLIKE \".leja.*\"\n| KEEP first_name, last_name" + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/sub.json b/docs/reference/esql/functions/kibana/definition/sub.json new file mode 100644 index 0000000000000..763c240e4d9ab --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/sub.json @@ -0,0 +1,260 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "sub", + "description" : "Returns the difference of two values.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "date_period" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "datetime" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "datetime" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "integer" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "time_duration" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "unsigned_long" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/docs/add.md b/docs/reference/esql/functions/kibana/docs/add.md new file mode 100644 index 0000000000000..e80715839b155 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/add.md @@ -0,0 +1,7 @@ + + +### ADD +Returns the sum of two values. + diff --git a/docs/reference/esql/functions/kibana/docs/div.md b/docs/reference/esql/functions/kibana/docs/div.md new file mode 100644 index 0000000000000..4318e741865a0 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/div.md @@ -0,0 +1,7 @@ + + +### DIV +Returns the quotient of two numeric values. + diff --git a/docs/reference/esql/functions/kibana/docs/equals.md b/docs/reference/esql/functions/kibana/docs/equals.md new file mode 100644 index 0000000000000..094c518635186 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/equals.md @@ -0,0 +1,7 @@ + + +### EQUALS +Returns true if two values are equal. + diff --git a/docs/reference/esql/functions/kibana/docs/greater_than.md b/docs/reference/esql/functions/kibana/docs/greater_than.md new file mode 100644 index 0000000000000..ee3dc7cbf4461 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/greater_than.md @@ -0,0 +1,7 @@ + + +### GREATER_THAN +Returns true if the value on the left is greater than the value on the right. + diff --git a/docs/reference/esql/functions/kibana/docs/greater_than_or_equal.md b/docs/reference/esql/functions/kibana/docs/greater_than_or_equal.md new file mode 100644 index 0000000000000..ed1396fcf0c82 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/greater_than_or_equal.md @@ -0,0 +1,7 @@ + + +### GREATER_THAN_OR_EQUAL +Returns true if the value on the left is greater than or equals to the value on the right. + diff --git a/docs/reference/esql/functions/kibana/docs/less_than.md b/docs/reference/esql/functions/kibana/docs/less_than.md new file mode 100644 index 0000000000000..4aac0eba1b352 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/less_than.md @@ -0,0 +1,7 @@ + + +### LESS_THAN +Returns true if the value on the left is less than the value on the right. + diff --git a/docs/reference/esql/functions/kibana/docs/less_than_or_equal.md b/docs/reference/esql/functions/kibana/docs/less_than_or_equal.md new file mode 100644 index 0000000000000..f3c4dae2d50fb --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/less_than_or_equal.md @@ -0,0 +1,7 @@ + + +### LESS_THAN_OR_EQUAL +Returns true if the value on the left is less than or equals to the value on the right. + diff --git a/docs/reference/esql/functions/like.asciidoc b/docs/reference/esql/functions/kibana/docs/like.md similarity index 55% rename from docs/reference/esql/functions/like.asciidoc rename to docs/reference/esql/functions/kibana/docs/like.md index 2298617be5699..4c400bdc65479 100644 --- a/docs/reference/esql/functions/like.asciidoc +++ b/docs/reference/esql/functions/kibana/docs/like.md @@ -1,8 +1,8 @@ -[discrete] -[[esql-like-operator]] -=== `LIKE` + -// tag::body[] +### LIKE Use `LIKE` to filter data based on string patterns using wildcards. `LIKE` usually acts on a field placed on the left-hand side of the operator, but it can also act on a constant (literal) expression. The right-hand side of the operator @@ -13,14 +13,8 @@ The following wildcard characters are supported: * `*` matches zero or more characters. * `?` matches one character. -include::./types/like.asciidoc[] - -[source.merge.styled,esql] ----- -include::{esql-specs}/docs.csv-spec[tag=like] ----- -[%header.monospaced.styled,format=dsv,separator=|] -|=== -include::{esql-specs}/docs.csv-spec[tag=like-result] -|=== -// end::body[] +``` +FROM employees +| WHERE first_name LIKE "?b*" +| KEEP first_name, last_name +``` diff --git a/docs/reference/esql/functions/kibana/docs/mod.md b/docs/reference/esql/functions/kibana/docs/mod.md new file mode 100644 index 0000000000000..36ae603778ca5 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/mod.md @@ -0,0 +1,7 @@ + + +### MOD +Returns the remainder of the division of two numeric values. + diff --git a/docs/reference/esql/functions/kibana/docs/mul.md b/docs/reference/esql/functions/kibana/docs/mul.md new file mode 100644 index 0000000000000..6dcb55e0baf63 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/mul.md @@ -0,0 +1,7 @@ + + +### MUL +Returns the product of two numeric values. + diff --git a/docs/reference/esql/functions/kibana/docs/neg.md b/docs/reference/esql/functions/kibana/docs/neg.md new file mode 100644 index 0000000000000..2d1c65487343f --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/neg.md @@ -0,0 +1,7 @@ + + +### NEG +Returns the negation of the argument. + diff --git a/docs/reference/esql/functions/kibana/docs/not_equals.md b/docs/reference/esql/functions/kibana/docs/not_equals.md new file mode 100644 index 0000000000000..20d9a3a2ba47a --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/not_equals.md @@ -0,0 +1,7 @@ + + +### NOT_EQUALS +Returns true if two values are not equal. + diff --git a/docs/reference/esql/functions/kibana/docs/rlike.md b/docs/reference/esql/functions/kibana/docs/rlike.md new file mode 100644 index 0000000000000..ed94553e7e44f --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/rlike.md @@ -0,0 +1,15 @@ + + +### RLIKE +Use `RLIKE` to filter data based on string patterns using using +<>. `RLIKE` usually acts on a field placed on +the left-hand side of the operator, but it can also act on a constant (literal) +expression. The right-hand side of the operator represents the pattern. + +``` +FROM employees +| WHERE first_name RLIKE ".leja.*" +| KEEP first_name, last_name +``` diff --git a/docs/reference/esql/functions/kibana/docs/sub.md b/docs/reference/esql/functions/kibana/docs/sub.md new file mode 100644 index 0000000000000..a5b000e5d7505 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/sub.md @@ -0,0 +1,7 @@ + + +### SUB +Returns the difference of two values. + diff --git a/docs/reference/esql/functions/layout/abs.asciidoc b/docs/reference/esql/functions/layout/abs.asciidoc index cc3c1d5634c7e..38f53ba300aea 100644 --- a/docs/reference/esql/functions/layout/abs.asciidoc +++ b/docs/reference/esql/functions/layout/abs.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-abs]] === `ABS` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/abs.asciidoc[] include::../description/abs.asciidoc[] include::../types/abs.asciidoc[] include::../examples/abs.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/acos.asciidoc b/docs/reference/esql/functions/layout/acos.asciidoc index 8bc834460f01a..fbecd8262bec1 100644 --- a/docs/reference/esql/functions/layout/acos.asciidoc +++ b/docs/reference/esql/functions/layout/acos.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-acos]] === `ACOS` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/acos.asciidoc[] include::../description/acos.asciidoc[] include::../types/acos.asciidoc[] include::../examples/acos.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/add.asciidoc b/docs/reference/esql/functions/layout/add.asciidoc new file mode 100644 index 0000000000000..7205021b73f25 --- /dev/null +++ b/docs/reference/esql/functions/layout/add.asciidoc @@ -0,0 +1,16 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-add]] +=== `ADD` +//tag::body[] + +*Syntax* + +[.text-center] +image::esql/functions/signature/add.svg[Embedded,opts=inline] + +include::../parameters/add.asciidoc[] +include::../description/add.asciidoc[] +include::../types/add.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/asin.asciidoc b/docs/reference/esql/functions/layout/asin.asciidoc index a092f3c13d72c..ec10dad3132fd 100644 --- a/docs/reference/esql/functions/layout/asin.asciidoc +++ b/docs/reference/esql/functions/layout/asin.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-asin]] === `ASIN` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/asin.asciidoc[] include::../description/asin.asciidoc[] include::../types/asin.asciidoc[] include::../examples/asin.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/atan.asciidoc b/docs/reference/esql/functions/layout/atan.asciidoc index c92523ef39fae..b7d8806016f11 100644 --- a/docs/reference/esql/functions/layout/atan.asciidoc +++ b/docs/reference/esql/functions/layout/atan.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-atan]] === `ATAN` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/atan.asciidoc[] include::../description/atan.asciidoc[] include::../types/atan.asciidoc[] include::../examples/atan.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/atan2.asciidoc b/docs/reference/esql/functions/layout/atan2.asciidoc index b23aa95aa56b8..97bd780d6d0f2 100644 --- a/docs/reference/esql/functions/layout/atan2.asciidoc +++ b/docs/reference/esql/functions/layout/atan2.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-atan2]] === `ATAN2` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/atan2.asciidoc[] include::../description/atan2.asciidoc[] include::../types/atan2.asciidoc[] include::../examples/atan2.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/bucket.asciidoc b/docs/reference/esql/functions/layout/bucket.asciidoc index ec378c7ed2e87..006c76e27e553 100644 --- a/docs/reference/esql/functions/layout/bucket.asciidoc +++ b/docs/reference/esql/functions/layout/bucket.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-bucket]] === `BUCKET` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/bucket.asciidoc[] include::../description/bucket.asciidoc[] include::../types/bucket.asciidoc[] include::../examples/bucket.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/case.asciidoc b/docs/reference/esql/functions/layout/case.asciidoc index edfc768dc7055..9da8205fc7c52 100644 --- a/docs/reference/esql/functions/layout/case.asciidoc +++ b/docs/reference/esql/functions/layout/case.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-case]] === `CASE` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/case.asciidoc[] include::../description/case.asciidoc[] include::../types/case.asciidoc[] include::../examples/case.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/ceil.asciidoc b/docs/reference/esql/functions/layout/ceil.asciidoc index 2e49dc848ae59..900d5c162139c 100644 --- a/docs/reference/esql/functions/layout/ceil.asciidoc +++ b/docs/reference/esql/functions/layout/ceil.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-ceil]] === `CEIL` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/ceil.asciidoc[] include::../description/ceil.asciidoc[] include::../types/ceil.asciidoc[] include::../examples/ceil.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/cidr_match.asciidoc b/docs/reference/esql/functions/layout/cidr_match.asciidoc index 486185570d029..e546e9adc7195 100644 --- a/docs/reference/esql/functions/layout/cidr_match.asciidoc +++ b/docs/reference/esql/functions/layout/cidr_match.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-cidr_match]] === `CIDR_MATCH` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/cidr_match.asciidoc[] include::../description/cidr_match.asciidoc[] include::../types/cidr_match.asciidoc[] include::../examples/cidr_match.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/coalesce.asciidoc b/docs/reference/esql/functions/layout/coalesce.asciidoc index 47cae18197402..4393dfe8a654d 100644 --- a/docs/reference/esql/functions/layout/coalesce.asciidoc +++ b/docs/reference/esql/functions/layout/coalesce.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-coalesce]] === `COALESCE` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/coalesce.asciidoc[] include::../description/coalesce.asciidoc[] include::../types/coalesce.asciidoc[] include::../examples/coalesce.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/concat.asciidoc b/docs/reference/esql/functions/layout/concat.asciidoc index 433a6742f08bc..af5339bc6c18e 100644 --- a/docs/reference/esql/functions/layout/concat.asciidoc +++ b/docs/reference/esql/functions/layout/concat.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-concat]] === `CONCAT` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/concat.asciidoc[] include::../description/concat.asciidoc[] include::../types/concat.asciidoc[] include::../examples/concat.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/cos.asciidoc b/docs/reference/esql/functions/layout/cos.asciidoc index 1bb3e2544bc6f..0ac8391a8d226 100644 --- a/docs/reference/esql/functions/layout/cos.asciidoc +++ b/docs/reference/esql/functions/layout/cos.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-cos]] === `COS` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/cos.asciidoc[] include::../description/cos.asciidoc[] include::../types/cos.asciidoc[] include::../examples/cos.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/cosh.asciidoc b/docs/reference/esql/functions/layout/cosh.asciidoc index 175b7b23324ce..7ccb1d6aa0ad1 100644 --- a/docs/reference/esql/functions/layout/cosh.asciidoc +++ b/docs/reference/esql/functions/layout/cosh.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-cosh]] === `COSH` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/cosh.asciidoc[] include::../description/cosh.asciidoc[] include::../types/cosh.asciidoc[] include::../examples/cosh.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/date_diff.asciidoc b/docs/reference/esql/functions/layout/date_diff.asciidoc index 8b2c6397578c3..47810cc124124 100644 --- a/docs/reference/esql/functions/layout/date_diff.asciidoc +++ b/docs/reference/esql/functions/layout/date_diff.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-date_diff]] === `DATE_DIFF` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/date_diff.asciidoc[] include::../description/date_diff.asciidoc[] include::../types/date_diff.asciidoc[] include::../examples/date_diff.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/date_extract.asciidoc b/docs/reference/esql/functions/layout/date_extract.asciidoc index 45e1bed3c78ee..c0f9cc64b57cd 100644 --- a/docs/reference/esql/functions/layout/date_extract.asciidoc +++ b/docs/reference/esql/functions/layout/date_extract.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-date_extract]] === `DATE_EXTRACT` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/date_extract.asciidoc[] include::../description/date_extract.asciidoc[] include::../types/date_extract.asciidoc[] include::../examples/date_extract.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/date_format.asciidoc b/docs/reference/esql/functions/layout/date_format.asciidoc index a79e4cae63e9b..95f979aab9b25 100644 --- a/docs/reference/esql/functions/layout/date_format.asciidoc +++ b/docs/reference/esql/functions/layout/date_format.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-date_format]] === `DATE_FORMAT` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/date_format.asciidoc[] include::../description/date_format.asciidoc[] include::../types/date_format.asciidoc[] include::../examples/date_format.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/date_parse.asciidoc b/docs/reference/esql/functions/layout/date_parse.asciidoc index 965c750c99e37..681ebca16acd5 100644 --- a/docs/reference/esql/functions/layout/date_parse.asciidoc +++ b/docs/reference/esql/functions/layout/date_parse.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-date_parse]] === `DATE_PARSE` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/date_parse.asciidoc[] include::../description/date_parse.asciidoc[] include::../types/date_parse.asciidoc[] include::../examples/date_parse.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/date_trunc.asciidoc b/docs/reference/esql/functions/layout/date_trunc.asciidoc index 0bd9ce4b4dbe4..50d4ec3149084 100644 --- a/docs/reference/esql/functions/layout/date_trunc.asciidoc +++ b/docs/reference/esql/functions/layout/date_trunc.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-date_trunc]] === `DATE_TRUNC` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/date_trunc.asciidoc[] include::../description/date_trunc.asciidoc[] include::../types/date_trunc.asciidoc[] include::../examples/date_trunc.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/div.asciidoc b/docs/reference/esql/functions/layout/div.asciidoc new file mode 100644 index 0000000000000..4af9ea05689e7 --- /dev/null +++ b/docs/reference/esql/functions/layout/div.asciidoc @@ -0,0 +1,16 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-div]] +=== `DIV` +//tag::body[] + +*Syntax* + +[.text-center] +image::esql/functions/signature/div.svg[Embedded,opts=inline] + +include::../parameters/div.asciidoc[] +include::../description/div.asciidoc[] +include::../types/div.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/e.asciidoc b/docs/reference/esql/functions/layout/e.asciidoc index 2c353f4e4ae4f..c831c554be6cc 100644 --- a/docs/reference/esql/functions/layout/e.asciidoc +++ b/docs/reference/esql/functions/layout/e.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-e]] === `E` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/e.asciidoc[] include::../description/e.asciidoc[] include::../types/e.asciidoc[] include::../examples/e.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/ends_with.asciidoc b/docs/reference/esql/functions/layout/ends_with.asciidoc index cae847bfa805e..80c95eb23e5c4 100644 --- a/docs/reference/esql/functions/layout/ends_with.asciidoc +++ b/docs/reference/esql/functions/layout/ends_with.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-ends_with]] === `ENDS_WITH` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/ends_with.asciidoc[] include::../description/ends_with.asciidoc[] include::../types/ends_with.asciidoc[] include::../examples/ends_with.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/equals.asciidoc b/docs/reference/esql/functions/layout/equals.asciidoc new file mode 100644 index 0000000000000..e2d0db9975ba8 --- /dev/null +++ b/docs/reference/esql/functions/layout/equals.asciidoc @@ -0,0 +1,16 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-equals]] +=== `EQUALS` +//tag::body[] + +*Syntax* + +[.text-center] +image::esql/functions/signature/equals.svg[Embedded,opts=inline] + +include::../parameters/equals.asciidoc[] +include::../description/equals.asciidoc[] +include::../types/equals.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/floor.asciidoc b/docs/reference/esql/functions/layout/floor.asciidoc index 0c26c4fda36c2..03038ea8dbb23 100644 --- a/docs/reference/esql/functions/layout/floor.asciidoc +++ b/docs/reference/esql/functions/layout/floor.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-floor]] === `FLOOR` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/floor.asciidoc[] include::../description/floor.asciidoc[] include::../types/floor.asciidoc[] include::../examples/floor.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/from_base64.asciidoc b/docs/reference/esql/functions/layout/from_base64.asciidoc index 72711866c8b02..a8c9e3f646f12 100644 --- a/docs/reference/esql/functions/layout/from_base64.asciidoc +++ b/docs/reference/esql/functions/layout/from_base64.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-from_base64]] === `FROM_BASE64` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/from_base64.asciidoc[] include::../description/from_base64.asciidoc[] include::../types/from_base64.asciidoc[] include::../examples/from_base64.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/greater_than.asciidoc b/docs/reference/esql/functions/layout/greater_than.asciidoc new file mode 100644 index 0000000000000..de9d7c9109c8d --- /dev/null +++ b/docs/reference/esql/functions/layout/greater_than.asciidoc @@ -0,0 +1,16 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-greater_than]] +=== `GREATER_THAN` +//tag::body[] + +*Syntax* + +[.text-center] +image::esql/functions/signature/greater_than.svg[Embedded,opts=inline] + +include::../parameters/greater_than.asciidoc[] +include::../description/greater_than.asciidoc[] +include::../types/greater_than.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/greater_than_or_equal.asciidoc b/docs/reference/esql/functions/layout/greater_than_or_equal.asciidoc new file mode 100644 index 0000000000000..1339ac92dcbc7 --- /dev/null +++ b/docs/reference/esql/functions/layout/greater_than_or_equal.asciidoc @@ -0,0 +1,16 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-greater_than_or_equal]] +=== `GREATER_THAN_OR_EQUAL` +//tag::body[] + +*Syntax* + +[.text-center] +image::esql/functions/signature/greater_than_or_equal.svg[Embedded,opts=inline] + +include::../parameters/greater_than_or_equal.asciidoc[] +include::../description/greater_than_or_equal.asciidoc[] +include::../types/greater_than_or_equal.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/greatest.asciidoc b/docs/reference/esql/functions/layout/greatest.asciidoc index fff9a32412947..c297dba0f381e 100644 --- a/docs/reference/esql/functions/layout/greatest.asciidoc +++ b/docs/reference/esql/functions/layout/greatest.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-greatest]] === `GREATEST` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/greatest.asciidoc[] include::../description/greatest.asciidoc[] include::../types/greatest.asciidoc[] include::../examples/greatest.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/least.asciidoc b/docs/reference/esql/functions/layout/least.asciidoc index 0daee9c181a65..7088d21c176e8 100644 --- a/docs/reference/esql/functions/layout/least.asciidoc +++ b/docs/reference/esql/functions/layout/least.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-least]] === `LEAST` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/least.asciidoc[] include::../description/least.asciidoc[] include::../types/least.asciidoc[] include::../examples/least.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/left.asciidoc b/docs/reference/esql/functions/layout/left.asciidoc index 3a995a2f9a247..21afac7a98a81 100644 --- a/docs/reference/esql/functions/layout/left.asciidoc +++ b/docs/reference/esql/functions/layout/left.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-left]] === `LEFT` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/left.asciidoc[] include::../description/left.asciidoc[] include::../types/left.asciidoc[] include::../examples/left.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/length.asciidoc b/docs/reference/esql/functions/layout/length.asciidoc index f8521f8223b1f..d0c21520c337f 100644 --- a/docs/reference/esql/functions/layout/length.asciidoc +++ b/docs/reference/esql/functions/layout/length.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-length]] === `LENGTH` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/length.asciidoc[] include::../description/length.asciidoc[] include::../types/length.asciidoc[] include::../examples/length.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/less_than.asciidoc b/docs/reference/esql/functions/layout/less_than.asciidoc new file mode 100644 index 0000000000000..7e352d9626dd3 --- /dev/null +++ b/docs/reference/esql/functions/layout/less_than.asciidoc @@ -0,0 +1,16 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-less_than]] +=== `LESS_THAN` +//tag::body[] + +*Syntax* + +[.text-center] +image::esql/functions/signature/less_than.svg[Embedded,opts=inline] + +include::../parameters/less_than.asciidoc[] +include::../description/less_than.asciidoc[] +include::../types/less_than.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/less_than_or_equal.asciidoc b/docs/reference/esql/functions/layout/less_than_or_equal.asciidoc new file mode 100644 index 0000000000000..e4f6599c733f6 --- /dev/null +++ b/docs/reference/esql/functions/layout/less_than_or_equal.asciidoc @@ -0,0 +1,16 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-less_than_or_equal]] +=== `LESS_THAN_OR_EQUAL` +//tag::body[] + +*Syntax* + +[.text-center] +image::esql/functions/signature/less_than_or_equal.svg[Embedded,opts=inline] + +include::../parameters/less_than_or_equal.asciidoc[] +include::../description/less_than_or_equal.asciidoc[] +include::../types/less_than_or_equal.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/like.asciidoc b/docs/reference/esql/functions/layout/like.asciidoc new file mode 100644 index 0000000000000..6434a4923b862 --- /dev/null +++ b/docs/reference/esql/functions/layout/like.asciidoc @@ -0,0 +1,17 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-like]] +=== `LIKE` +//tag::body[] + +*Syntax* + +[.text-center] +image::esql/functions/signature/like.svg[Embedded,opts=inline] + +include::../parameters/like.asciidoc[] +include::../description/like.asciidoc[] +include::../types/like.asciidoc[] +include::../examples/like.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/locate.asciidoc b/docs/reference/esql/functions/layout/locate.asciidoc index cbd67a9aba495..c130dd7a6e927 100644 --- a/docs/reference/esql/functions/layout/locate.asciidoc +++ b/docs/reference/esql/functions/layout/locate.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-locate]] === `LOCATE` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/locate.asciidoc[] include::../description/locate.asciidoc[] include::../types/locate.asciidoc[] include::../examples/locate.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/log.asciidoc b/docs/reference/esql/functions/layout/log.asciidoc index 2cefb5ffa551e..7e4c10ef882ca 100644 --- a/docs/reference/esql/functions/layout/log.asciidoc +++ b/docs/reference/esql/functions/layout/log.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-log]] === `LOG` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/log.asciidoc[] include::../description/log.asciidoc[] include::../types/log.asciidoc[] include::../examples/log.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/log10.asciidoc b/docs/reference/esql/functions/layout/log10.asciidoc index e1f3e9f330ed6..28e9d0184b64e 100644 --- a/docs/reference/esql/functions/layout/log10.asciidoc +++ b/docs/reference/esql/functions/layout/log10.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-log10]] === `LOG10` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/log10.asciidoc[] include::../description/log10.asciidoc[] include::../types/log10.asciidoc[] include::../examples/log10.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/ltrim.asciidoc b/docs/reference/esql/functions/layout/ltrim.asciidoc index 7a325897292c9..1afb0a05f3816 100644 --- a/docs/reference/esql/functions/layout/ltrim.asciidoc +++ b/docs/reference/esql/functions/layout/ltrim.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-ltrim]] === `LTRIM` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/ltrim.asciidoc[] include::../description/ltrim.asciidoc[] include::../types/ltrim.asciidoc[] include::../examples/ltrim.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/mod.asciidoc b/docs/reference/esql/functions/layout/mod.asciidoc new file mode 100644 index 0000000000000..616bb3b22b142 --- /dev/null +++ b/docs/reference/esql/functions/layout/mod.asciidoc @@ -0,0 +1,16 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-mod]] +=== `MOD` +//tag::body[] + +*Syntax* + +[.text-center] +image::esql/functions/signature/mod.svg[Embedded,opts=inline] + +include::../parameters/mod.asciidoc[] +include::../description/mod.asciidoc[] +include::../types/mod.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/mul.asciidoc b/docs/reference/esql/functions/layout/mul.asciidoc new file mode 100644 index 0000000000000..689a2e9798b46 --- /dev/null +++ b/docs/reference/esql/functions/layout/mul.asciidoc @@ -0,0 +1,16 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-mul]] +=== `MUL` +//tag::body[] + +*Syntax* + +[.text-center] +image::esql/functions/signature/mul.svg[Embedded,opts=inline] + +include::../parameters/mul.asciidoc[] +include::../description/mul.asciidoc[] +include::../types/mul.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_avg.asciidoc b/docs/reference/esql/functions/layout/mv_avg.asciidoc index 3fb0cb6c1b3aa..c1fce1be45028 100644 --- a/docs/reference/esql/functions/layout/mv_avg.asciidoc +++ b/docs/reference/esql/functions/layout/mv_avg.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-mv_avg]] === `MV_AVG` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/mv_avg.asciidoc[] include::../description/mv_avg.asciidoc[] include::../types/mv_avg.asciidoc[] include::../examples/mv_avg.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_concat.asciidoc b/docs/reference/esql/functions/layout/mv_concat.asciidoc index b53acec31fefa..9ed5182c58fd3 100644 --- a/docs/reference/esql/functions/layout/mv_concat.asciidoc +++ b/docs/reference/esql/functions/layout/mv_concat.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-mv_concat]] === `MV_CONCAT` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/mv_concat.asciidoc[] include::../description/mv_concat.asciidoc[] include::../types/mv_concat.asciidoc[] include::../examples/mv_concat.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_count.asciidoc b/docs/reference/esql/functions/layout/mv_count.asciidoc index c1df3a2f97508..fd1cf15e49588 100644 --- a/docs/reference/esql/functions/layout/mv_count.asciidoc +++ b/docs/reference/esql/functions/layout/mv_count.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-mv_count]] === `MV_COUNT` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/mv_count.asciidoc[] include::../description/mv_count.asciidoc[] include::../types/mv_count.asciidoc[] include::../examples/mv_count.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_dedupe.asciidoc b/docs/reference/esql/functions/layout/mv_dedupe.asciidoc index f5d602a0f27bc..cf2b982f860ca 100644 --- a/docs/reference/esql/functions/layout/mv_dedupe.asciidoc +++ b/docs/reference/esql/functions/layout/mv_dedupe.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-mv_dedupe]] === `MV_DEDUPE` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/mv_dedupe.asciidoc[] include::../description/mv_dedupe.asciidoc[] include::../types/mv_dedupe.asciidoc[] include::../examples/mv_dedupe.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_first.asciidoc b/docs/reference/esql/functions/layout/mv_first.asciidoc index 42f0d36b879a0..250a553da97f1 100644 --- a/docs/reference/esql/functions/layout/mv_first.asciidoc +++ b/docs/reference/esql/functions/layout/mv_first.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-mv_first]] === `MV_FIRST` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/mv_first.asciidoc[] include::../description/mv_first.asciidoc[] include::../types/mv_first.asciidoc[] include::../examples/mv_first.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_last.asciidoc b/docs/reference/esql/functions/layout/mv_last.asciidoc index 94ffddafeb749..f6327c9115164 100644 --- a/docs/reference/esql/functions/layout/mv_last.asciidoc +++ b/docs/reference/esql/functions/layout/mv_last.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-mv_last]] === `MV_LAST` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/mv_last.asciidoc[] include::../description/mv_last.asciidoc[] include::../types/mv_last.asciidoc[] include::../examples/mv_last.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_max.asciidoc b/docs/reference/esql/functions/layout/mv_max.asciidoc index 39c3f6864ecb6..d649ea0885fa2 100644 --- a/docs/reference/esql/functions/layout/mv_max.asciidoc +++ b/docs/reference/esql/functions/layout/mv_max.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-mv_max]] === `MV_MAX` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/mv_max.asciidoc[] include::../description/mv_max.asciidoc[] include::../types/mv_max.asciidoc[] include::../examples/mv_max.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_median.asciidoc b/docs/reference/esql/functions/layout/mv_median.asciidoc index 4f99e92a19318..6c6faf5b3dfc8 100644 --- a/docs/reference/esql/functions/layout/mv_median.asciidoc +++ b/docs/reference/esql/functions/layout/mv_median.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-mv_median]] === `MV_MEDIAN` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/mv_median.asciidoc[] include::../description/mv_median.asciidoc[] include::../types/mv_median.asciidoc[] include::../examples/mv_median.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_min.asciidoc b/docs/reference/esql/functions/layout/mv_min.asciidoc index dbb9931a27b93..06e8b445fdc37 100644 --- a/docs/reference/esql/functions/layout/mv_min.asciidoc +++ b/docs/reference/esql/functions/layout/mv_min.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-mv_min]] === `MV_MIN` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/mv_min.asciidoc[] include::../description/mv_min.asciidoc[] include::../types/mv_min.asciidoc[] include::../examples/mv_min.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_slice.asciidoc b/docs/reference/esql/functions/layout/mv_slice.asciidoc index 4d395137756e3..6a69287033800 100644 --- a/docs/reference/esql/functions/layout/mv_slice.asciidoc +++ b/docs/reference/esql/functions/layout/mv_slice.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-mv_slice]] === `MV_SLICE` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/mv_slice.asciidoc[] include::../description/mv_slice.asciidoc[] include::../types/mv_slice.asciidoc[] include::../examples/mv_slice.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_sort.asciidoc b/docs/reference/esql/functions/layout/mv_sort.asciidoc index 05371a61dfc00..ff8033afdbab3 100644 --- a/docs/reference/esql/functions/layout/mv_sort.asciidoc +++ b/docs/reference/esql/functions/layout/mv_sort.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-mv_sort]] === `MV_SORT` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/mv_sort.asciidoc[] include::../description/mv_sort.asciidoc[] include::../types/mv_sort.asciidoc[] include::../examples/mv_sort.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_sum.asciidoc b/docs/reference/esql/functions/layout/mv_sum.asciidoc index 0047362962781..e2eca72b22740 100644 --- a/docs/reference/esql/functions/layout/mv_sum.asciidoc +++ b/docs/reference/esql/functions/layout/mv_sum.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-mv_sum]] === `MV_SUM` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/mv_sum.asciidoc[] include::../description/mv_sum.asciidoc[] include::../types/mv_sum.asciidoc[] include::../examples/mv_sum.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_zip.asciidoc b/docs/reference/esql/functions/layout/mv_zip.asciidoc index 1ed432c44d27d..f4b6f85e59109 100644 --- a/docs/reference/esql/functions/layout/mv_zip.asciidoc +++ b/docs/reference/esql/functions/layout/mv_zip.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-mv_zip]] === `MV_ZIP` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/mv_zip.asciidoc[] include::../description/mv_zip.asciidoc[] include::../types/mv_zip.asciidoc[] include::../examples/mv_zip.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/neg.asciidoc b/docs/reference/esql/functions/layout/neg.asciidoc new file mode 100644 index 0000000000000..6aff125d0d99e --- /dev/null +++ b/docs/reference/esql/functions/layout/neg.asciidoc @@ -0,0 +1,16 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-neg]] +=== `NEG` +//tag::body[] + +*Syntax* + +[.text-center] +image::esql/functions/signature/neg.svg[Embedded,opts=inline] + +include::../parameters/neg.asciidoc[] +include::../description/neg.asciidoc[] +include::../types/neg.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/not_equals.asciidoc b/docs/reference/esql/functions/layout/not_equals.asciidoc new file mode 100644 index 0000000000000..073f0e4d10443 --- /dev/null +++ b/docs/reference/esql/functions/layout/not_equals.asciidoc @@ -0,0 +1,16 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-not_equals]] +=== `NOT_EQUALS` +//tag::body[] + +*Syntax* + +[.text-center] +image::esql/functions/signature/not_equals.svg[Embedded,opts=inline] + +include::../parameters/not_equals.asciidoc[] +include::../description/not_equals.asciidoc[] +include::../types/not_equals.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/now.asciidoc b/docs/reference/esql/functions/layout/now.asciidoc index 52341c1665619..875b250876b14 100644 --- a/docs/reference/esql/functions/layout/now.asciidoc +++ b/docs/reference/esql/functions/layout/now.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-now]] === `NOW` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/now.asciidoc[] include::../description/now.asciidoc[] include::../types/now.asciidoc[] include::../examples/now.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/pi.asciidoc b/docs/reference/esql/functions/layout/pi.asciidoc index 37fd1b80bac41..9ee960a76eee1 100644 --- a/docs/reference/esql/functions/layout/pi.asciidoc +++ b/docs/reference/esql/functions/layout/pi.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-pi]] === `PI` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/pi.asciidoc[] include::../description/pi.asciidoc[] include::../types/pi.asciidoc[] include::../examples/pi.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/pow.asciidoc b/docs/reference/esql/functions/layout/pow.asciidoc index 3adaff72d26be..45071f9842cff 100644 --- a/docs/reference/esql/functions/layout/pow.asciidoc +++ b/docs/reference/esql/functions/layout/pow.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-pow]] === `POW` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/pow.asciidoc[] include::../description/pow.asciidoc[] include::../types/pow.asciidoc[] include::../examples/pow.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/replace.asciidoc b/docs/reference/esql/functions/layout/replace.asciidoc index 475556228472e..0b907bd090243 100644 --- a/docs/reference/esql/functions/layout/replace.asciidoc +++ b/docs/reference/esql/functions/layout/replace.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-replace]] === `REPLACE` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/replace.asciidoc[] include::../description/replace.asciidoc[] include::../types/replace.asciidoc[] include::../examples/replace.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/right.asciidoc b/docs/reference/esql/functions/layout/right.asciidoc index 3b6d427bf4b3a..825e246458ca1 100644 --- a/docs/reference/esql/functions/layout/right.asciidoc +++ b/docs/reference/esql/functions/layout/right.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-right]] === `RIGHT` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/right.asciidoc[] include::../description/right.asciidoc[] include::../types/right.asciidoc[] include::../examples/right.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/rlike.asciidoc b/docs/reference/esql/functions/layout/rlike.asciidoc new file mode 100644 index 0000000000000..e25e5dc806ff2 --- /dev/null +++ b/docs/reference/esql/functions/layout/rlike.asciidoc @@ -0,0 +1,17 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-rlike]] +=== `RLIKE` +//tag::body[] + +*Syntax* + +[.text-center] +image::esql/functions/signature/rlike.svg[Embedded,opts=inline] + +include::../parameters/rlike.asciidoc[] +include::../description/rlike.asciidoc[] +include::../types/rlike.asciidoc[] +include::../examples/rlike.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/round.asciidoc b/docs/reference/esql/functions/layout/round.asciidoc index 2fbcffd814747..63b5ec2856a07 100644 --- a/docs/reference/esql/functions/layout/round.asciidoc +++ b/docs/reference/esql/functions/layout/round.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-round]] === `ROUND` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/round.asciidoc[] include::../description/round.asciidoc[] include::../types/round.asciidoc[] include::../examples/round.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/rtrim.asciidoc b/docs/reference/esql/functions/layout/rtrim.asciidoc index d12168d6d7954..f331710eb6489 100644 --- a/docs/reference/esql/functions/layout/rtrim.asciidoc +++ b/docs/reference/esql/functions/layout/rtrim.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-rtrim]] === `RTRIM` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/rtrim.asciidoc[] include::../description/rtrim.asciidoc[] include::../types/rtrim.asciidoc[] include::../examples/rtrim.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/signum.asciidoc b/docs/reference/esql/functions/layout/signum.asciidoc index f5b565993f392..9a23c53ec5bb5 100644 --- a/docs/reference/esql/functions/layout/signum.asciidoc +++ b/docs/reference/esql/functions/layout/signum.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-signum]] === `SIGNUM` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/signum.asciidoc[] include::../description/signum.asciidoc[] include::../types/signum.asciidoc[] include::../examples/signum.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/sin.asciidoc b/docs/reference/esql/functions/layout/sin.asciidoc index 465bbd441f689..6c991ed2bb09f 100644 --- a/docs/reference/esql/functions/layout/sin.asciidoc +++ b/docs/reference/esql/functions/layout/sin.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-sin]] === `SIN` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/sin.asciidoc[] include::../description/sin.asciidoc[] include::../types/sin.asciidoc[] include::../examples/sin.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/sinh.asciidoc b/docs/reference/esql/functions/layout/sinh.asciidoc index 11ae1a8b0403f..be8ef51a6e888 100644 --- a/docs/reference/esql/functions/layout/sinh.asciidoc +++ b/docs/reference/esql/functions/layout/sinh.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-sinh]] === `SINH` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/sinh.asciidoc[] include::../description/sinh.asciidoc[] include::../types/sinh.asciidoc[] include::../examples/sinh.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/split.asciidoc b/docs/reference/esql/functions/layout/split.asciidoc index 5a588fa519bdb..306e8b44290e6 100644 --- a/docs/reference/esql/functions/layout/split.asciidoc +++ b/docs/reference/esql/functions/layout/split.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-split]] === `SPLIT` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/split.asciidoc[] include::../description/split.asciidoc[] include::../types/split.asciidoc[] include::../examples/split.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/sqrt.asciidoc b/docs/reference/esql/functions/layout/sqrt.asciidoc index 424c737da7009..55c89e18bd795 100644 --- a/docs/reference/esql/functions/layout/sqrt.asciidoc +++ b/docs/reference/esql/functions/layout/sqrt.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-sqrt]] === `SQRT` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/sqrt.asciidoc[] include::../description/sqrt.asciidoc[] include::../types/sqrt.asciidoc[] include::../examples/sqrt.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/st_contains.asciidoc b/docs/reference/esql/functions/layout/st_contains.asciidoc index d2b115b5bd727..79a3b67291447 100644 --- a/docs/reference/esql/functions/layout/st_contains.asciidoc +++ b/docs/reference/esql/functions/layout/st_contains.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-st_contains]] === `ST_CONTAINS` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/st_contains.asciidoc[] include::../description/st_contains.asciidoc[] include::../types/st_contains.asciidoc[] include::../examples/st_contains.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/st_disjoint.asciidoc b/docs/reference/esql/functions/layout/st_disjoint.asciidoc index a1eef41006f3e..c585882ea956d 100644 --- a/docs/reference/esql/functions/layout/st_disjoint.asciidoc +++ b/docs/reference/esql/functions/layout/st_disjoint.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-st_disjoint]] === `ST_DISJOINT` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/st_disjoint.asciidoc[] include::../description/st_disjoint.asciidoc[] include::../types/st_disjoint.asciidoc[] include::../examples/st_disjoint.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/st_intersects.asciidoc b/docs/reference/esql/functions/layout/st_intersects.asciidoc index 820bfd2c1fee6..846adbfe54d7b 100644 --- a/docs/reference/esql/functions/layout/st_intersects.asciidoc +++ b/docs/reference/esql/functions/layout/st_intersects.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-st_intersects]] === `ST_INTERSECTS` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/st_intersects.asciidoc[] include::../description/st_intersects.asciidoc[] include::../types/st_intersects.asciidoc[] include::../examples/st_intersects.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/st_within.asciidoc b/docs/reference/esql/functions/layout/st_within.asciidoc index 38e367abc3c31..7c1c00f5fee8e 100644 --- a/docs/reference/esql/functions/layout/st_within.asciidoc +++ b/docs/reference/esql/functions/layout/st_within.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-st_within]] === `ST_WITHIN` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/st_within.asciidoc[] include::../description/st_within.asciidoc[] include::../types/st_within.asciidoc[] include::../examples/st_within.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/st_x.asciidoc b/docs/reference/esql/functions/layout/st_x.asciidoc index 2c2dc191a31a4..64ef491290e13 100644 --- a/docs/reference/esql/functions/layout/st_x.asciidoc +++ b/docs/reference/esql/functions/layout/st_x.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-st_x]] === `ST_X` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/st_x.asciidoc[] include::../description/st_x.asciidoc[] include::../types/st_x.asciidoc[] include::../examples/st_x.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/st_y.asciidoc b/docs/reference/esql/functions/layout/st_y.asciidoc index 0708465760bb3..c5709ac5ae270 100644 --- a/docs/reference/esql/functions/layout/st_y.asciidoc +++ b/docs/reference/esql/functions/layout/st_y.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-st_y]] === `ST_Y` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/st_y.asciidoc[] include::../description/st_y.asciidoc[] include::../types/st_y.asciidoc[] include::../examples/st_y.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/starts_with.asciidoc b/docs/reference/esql/functions/layout/starts_with.asciidoc index 748270b50e300..3feeccec988e5 100644 --- a/docs/reference/esql/functions/layout/starts_with.asciidoc +++ b/docs/reference/esql/functions/layout/starts_with.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-starts_with]] === `STARTS_WITH` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/starts_with.asciidoc[] include::../description/starts_with.asciidoc[] include::../types/starts_with.asciidoc[] include::../examples/starts_with.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/sub.asciidoc b/docs/reference/esql/functions/layout/sub.asciidoc new file mode 100644 index 0000000000000..d9dd7225792fa --- /dev/null +++ b/docs/reference/esql/functions/layout/sub.asciidoc @@ -0,0 +1,16 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-sub]] +=== `SUB` +//tag::body[] + +*Syntax* + +[.text-center] +image::esql/functions/signature/sub.svg[Embedded,opts=inline] + +include::../parameters/sub.asciidoc[] +include::../description/sub.asciidoc[] +include::../types/sub.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/substring.asciidoc b/docs/reference/esql/functions/layout/substring.asciidoc index bb5b68543fd78..df7dd0fa93388 100644 --- a/docs/reference/esql/functions/layout/substring.asciidoc +++ b/docs/reference/esql/functions/layout/substring.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-substring]] === `SUBSTRING` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/substring.asciidoc[] include::../description/substring.asciidoc[] include::../types/substring.asciidoc[] include::../examples/substring.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/tan.asciidoc b/docs/reference/esql/functions/layout/tan.asciidoc index 2723076238228..3cbae887eb601 100644 --- a/docs/reference/esql/functions/layout/tan.asciidoc +++ b/docs/reference/esql/functions/layout/tan.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-tan]] === `TAN` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/tan.asciidoc[] include::../description/tan.asciidoc[] include::../types/tan.asciidoc[] include::../examples/tan.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/tanh.asciidoc b/docs/reference/esql/functions/layout/tanh.asciidoc index 338d8574d4949..8a7dd8bb78bc4 100644 --- a/docs/reference/esql/functions/layout/tanh.asciidoc +++ b/docs/reference/esql/functions/layout/tanh.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-tanh]] === `TANH` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/tanh.asciidoc[] include::../description/tanh.asciidoc[] include::../types/tanh.asciidoc[] include::../examples/tanh.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/tau.asciidoc b/docs/reference/esql/functions/layout/tau.asciidoc index 80397a814f9f5..40f12d36a873e 100644 --- a/docs/reference/esql/functions/layout/tau.asciidoc +++ b/docs/reference/esql/functions/layout/tau.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-tau]] === `TAU` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/tau.asciidoc[] include::../description/tau.asciidoc[] include::../types/tau.asciidoc[] include::../examples/tau.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_base64.asciidoc b/docs/reference/esql/functions/layout/to_base64.asciidoc index 8b8a552c0cd7b..d7435347b2e34 100644 --- a/docs/reference/esql/functions/layout/to_base64.asciidoc +++ b/docs/reference/esql/functions/layout/to_base64.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_base64]] === `TO_BASE64` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_base64.asciidoc[] include::../description/to_base64.asciidoc[] include::../types/to_base64.asciidoc[] include::../examples/to_base64.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_boolean.asciidoc b/docs/reference/esql/functions/layout/to_boolean.asciidoc index eb1f00feeba07..4f6f5109e71f9 100644 --- a/docs/reference/esql/functions/layout/to_boolean.asciidoc +++ b/docs/reference/esql/functions/layout/to_boolean.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_boolean]] === `TO_BOOLEAN` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_boolean.asciidoc[] include::../description/to_boolean.asciidoc[] include::../types/to_boolean.asciidoc[] include::../examples/to_boolean.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_cartesianpoint.asciidoc b/docs/reference/esql/functions/layout/to_cartesianpoint.asciidoc index ab086f6c96ff0..5164351d00012 100644 --- a/docs/reference/esql/functions/layout/to_cartesianpoint.asciidoc +++ b/docs/reference/esql/functions/layout/to_cartesianpoint.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_cartesianpoint]] === `TO_CARTESIANPOINT` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_cartesianpoint.asciidoc[] include::../description/to_cartesianpoint.asciidoc[] include::../types/to_cartesianpoint.asciidoc[] include::../examples/to_cartesianpoint.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_cartesianshape.asciidoc b/docs/reference/esql/functions/layout/to_cartesianshape.asciidoc index 53612d5b715d1..2abd7c84fcf46 100644 --- a/docs/reference/esql/functions/layout/to_cartesianshape.asciidoc +++ b/docs/reference/esql/functions/layout/to_cartesianshape.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_cartesianshape]] === `TO_CARTESIANSHAPE` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_cartesianshape.asciidoc[] include::../description/to_cartesianshape.asciidoc[] include::../types/to_cartesianshape.asciidoc[] include::../examples/to_cartesianshape.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_datetime.asciidoc b/docs/reference/esql/functions/layout/to_datetime.asciidoc index ef01108fb6d20..4cc19ae0d9df3 100644 --- a/docs/reference/esql/functions/layout/to_datetime.asciidoc +++ b/docs/reference/esql/functions/layout/to_datetime.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_datetime]] === `TO_DATETIME` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_datetime.asciidoc[] include::../description/to_datetime.asciidoc[] include::../types/to_datetime.asciidoc[] include::../examples/to_datetime.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_degrees.asciidoc b/docs/reference/esql/functions/layout/to_degrees.asciidoc index f0c322e285329..259d18d824679 100644 --- a/docs/reference/esql/functions/layout/to_degrees.asciidoc +++ b/docs/reference/esql/functions/layout/to_degrees.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_degrees]] === `TO_DEGREES` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_degrees.asciidoc[] include::../description/to_degrees.asciidoc[] include::../types/to_degrees.asciidoc[] include::../examples/to_degrees.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_double.asciidoc b/docs/reference/esql/functions/layout/to_double.asciidoc index fa5075c4267b0..9f79d48962710 100644 --- a/docs/reference/esql/functions/layout/to_double.asciidoc +++ b/docs/reference/esql/functions/layout/to_double.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_double]] === `TO_DOUBLE` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_double.asciidoc[] include::../description/to_double.asciidoc[] include::../types/to_double.asciidoc[] include::../examples/to_double.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_geopoint.asciidoc b/docs/reference/esql/functions/layout/to_geopoint.asciidoc index ff2379bc0791a..e3162d91b4201 100644 --- a/docs/reference/esql/functions/layout/to_geopoint.asciidoc +++ b/docs/reference/esql/functions/layout/to_geopoint.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_geopoint]] === `TO_GEOPOINT` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_geopoint.asciidoc[] include::../description/to_geopoint.asciidoc[] include::../types/to_geopoint.asciidoc[] include::../examples/to_geopoint.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_geoshape.asciidoc b/docs/reference/esql/functions/layout/to_geoshape.asciidoc index 2bc8afa094d3f..f31fe8260202c 100644 --- a/docs/reference/esql/functions/layout/to_geoshape.asciidoc +++ b/docs/reference/esql/functions/layout/to_geoshape.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_geoshape]] === `TO_GEOSHAPE` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_geoshape.asciidoc[] include::../description/to_geoshape.asciidoc[] include::../types/to_geoshape.asciidoc[] include::../examples/to_geoshape.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_integer.asciidoc b/docs/reference/esql/functions/layout/to_integer.asciidoc index 0667b8b3b19e5..e76ed34b948e9 100644 --- a/docs/reference/esql/functions/layout/to_integer.asciidoc +++ b/docs/reference/esql/functions/layout/to_integer.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_integer]] === `TO_INTEGER` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_integer.asciidoc[] include::../description/to_integer.asciidoc[] include::../types/to_integer.asciidoc[] include::../examples/to_integer.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_ip.asciidoc b/docs/reference/esql/functions/layout/to_ip.asciidoc index 2ef96ac751287..15724b51169d3 100644 --- a/docs/reference/esql/functions/layout/to_ip.asciidoc +++ b/docs/reference/esql/functions/layout/to_ip.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_ip]] === `TO_IP` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_ip.asciidoc[] include::../description/to_ip.asciidoc[] include::../types/to_ip.asciidoc[] include::../examples/to_ip.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_long.asciidoc b/docs/reference/esql/functions/layout/to_long.asciidoc index a054c30cedae2..4cb3815696485 100644 --- a/docs/reference/esql/functions/layout/to_long.asciidoc +++ b/docs/reference/esql/functions/layout/to_long.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_long]] === `TO_LONG` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_long.asciidoc[] include::../description/to_long.asciidoc[] include::../types/to_long.asciidoc[] include::../examples/to_long.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_lower.asciidoc b/docs/reference/esql/functions/layout/to_lower.asciidoc index 76c93e05de813..8f9f4c887e0e9 100644 --- a/docs/reference/esql/functions/layout/to_lower.asciidoc +++ b/docs/reference/esql/functions/layout/to_lower.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_lower]] === `TO_LOWER` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_lower.asciidoc[] include::../description/to_lower.asciidoc[] include::../types/to_lower.asciidoc[] include::../examples/to_lower.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_radians.asciidoc b/docs/reference/esql/functions/layout/to_radians.asciidoc index 8fcd16b9f4eaa..d1c4091372e45 100644 --- a/docs/reference/esql/functions/layout/to_radians.asciidoc +++ b/docs/reference/esql/functions/layout/to_radians.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_radians]] === `TO_RADIANS` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_radians.asciidoc[] include::../description/to_radians.asciidoc[] include::../types/to_radians.asciidoc[] include::../examples/to_radians.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_string.asciidoc b/docs/reference/esql/functions/layout/to_string.asciidoc index b8baac61cb34d..7a09855a8de1d 100644 --- a/docs/reference/esql/functions/layout/to_string.asciidoc +++ b/docs/reference/esql/functions/layout/to_string.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_string]] === `TO_STRING` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_string.asciidoc[] include::../description/to_string.asciidoc[] include::../types/to_string.asciidoc[] include::../examples/to_string.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_unsigned_long.asciidoc b/docs/reference/esql/functions/layout/to_unsigned_long.asciidoc index 61ffe05f75b6a..e3ef8ff945c88 100644 --- a/docs/reference/esql/functions/layout/to_unsigned_long.asciidoc +++ b/docs/reference/esql/functions/layout/to_unsigned_long.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_unsigned_long]] === `TO_UNSIGNED_LONG` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_unsigned_long.asciidoc[] include::../description/to_unsigned_long.asciidoc[] include::../types/to_unsigned_long.asciidoc[] include::../examples/to_unsigned_long.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_upper.asciidoc b/docs/reference/esql/functions/layout/to_upper.asciidoc index 78d2ff80aa78d..644d61d19bbec 100644 --- a/docs/reference/esql/functions/layout/to_upper.asciidoc +++ b/docs/reference/esql/functions/layout/to_upper.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_upper]] === `TO_UPPER` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_upper.asciidoc[] include::../description/to_upper.asciidoc[] include::../types/to_upper.asciidoc[] include::../examples/to_upper.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/to_version.asciidoc b/docs/reference/esql/functions/layout/to_version.asciidoc index 5bacebc30a187..38089f1e278bb 100644 --- a/docs/reference/esql/functions/layout/to_version.asciidoc +++ b/docs/reference/esql/functions/layout/to_version.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-to_version]] === `TO_VERSION` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/to_version.asciidoc[] include::../description/to_version.asciidoc[] include::../types/to_version.asciidoc[] include::../examples/to_version.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/layout/trim.asciidoc b/docs/reference/esql/functions/layout/trim.asciidoc index 3214e528bd40c..46aea723a5444 100644 --- a/docs/reference/esql/functions/layout/trim.asciidoc +++ b/docs/reference/esql/functions/layout/trim.asciidoc @@ -3,6 +3,7 @@ [discrete] [[esql-trim]] === `TRIM` +//tag::body[] *Syntax* @@ -13,3 +14,4 @@ include::../parameters/trim.asciidoc[] include::../description/trim.asciidoc[] include::../types/trim.asciidoc[] include::../examples/trim.asciidoc[] +//end::body[] diff --git a/docs/reference/esql/functions/operators.asciidoc b/docs/reference/esql/functions/operators.asciidoc index ee344a52687c2..22f889dca8862 100644 --- a/docs/reference/esql/functions/operators.asciidoc +++ b/docs/reference/esql/functions/operators.asciidoc @@ -14,8 +14,8 @@ Boolean operators for comparing against one or multiple expressions. * <> * <> * <> -* <> -* <> +* <> +* <> // end::op_list[] include::binary.asciidoc[] @@ -24,5 +24,5 @@ include::logical.asciidoc[] include::predicates.asciidoc[] include::cast.asciidoc[] include::in.asciidoc[] -include::like.asciidoc[] -include::rlike.asciidoc[] +include::layout/like.asciidoc[] +include::layout/rlike.asciidoc[] diff --git a/docs/reference/esql/functions/parameters/add.asciidoc b/docs/reference/esql/functions/parameters/add.asciidoc new file mode 100644 index 0000000000000..ccc418eba0b75 --- /dev/null +++ b/docs/reference/esql/functions/parameters/add.asciidoc @@ -0,0 +1,9 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`lhs`:: +A numeric value or a date time value. + +`rhs`:: +A numeric value or a date time value. diff --git a/docs/reference/esql/functions/parameters/div.asciidoc b/docs/reference/esql/functions/parameters/div.asciidoc new file mode 100644 index 0000000000000..38be1905c9593 --- /dev/null +++ b/docs/reference/esql/functions/parameters/div.asciidoc @@ -0,0 +1,9 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`lhs`:: +A numeric value. + +`rhs`:: +A numeric value. diff --git a/docs/reference/esql/functions/parameters/equals.asciidoc b/docs/reference/esql/functions/parameters/equals.asciidoc new file mode 100644 index 0000000000000..34a7e43e23ddf --- /dev/null +++ b/docs/reference/esql/functions/parameters/equals.asciidoc @@ -0,0 +1,9 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`lhs`:: +An expression. + +`rhs`:: +An expression. diff --git a/docs/reference/esql/functions/parameters/greater_than.asciidoc b/docs/reference/esql/functions/parameters/greater_than.asciidoc new file mode 100644 index 0000000000000..34a7e43e23ddf --- /dev/null +++ b/docs/reference/esql/functions/parameters/greater_than.asciidoc @@ -0,0 +1,9 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`lhs`:: +An expression. + +`rhs`:: +An expression. diff --git a/docs/reference/esql/functions/parameters/greater_than_or_equal.asciidoc b/docs/reference/esql/functions/parameters/greater_than_or_equal.asciidoc new file mode 100644 index 0000000000000..34a7e43e23ddf --- /dev/null +++ b/docs/reference/esql/functions/parameters/greater_than_or_equal.asciidoc @@ -0,0 +1,9 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`lhs`:: +An expression. + +`rhs`:: +An expression. diff --git a/docs/reference/esql/functions/parameters/is_not_null.asciidoc b/docs/reference/esql/functions/parameters/is_not_null.asciidoc new file mode 100644 index 0000000000000..e0a0566763ad9 --- /dev/null +++ b/docs/reference/esql/functions/parameters/is_not_null.asciidoc @@ -0,0 +1,6 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`arg1`:: + diff --git a/docs/reference/esql/functions/parameters/is_null.asciidoc b/docs/reference/esql/functions/parameters/is_null.asciidoc new file mode 100644 index 0000000000000..e0a0566763ad9 --- /dev/null +++ b/docs/reference/esql/functions/parameters/is_null.asciidoc @@ -0,0 +1,6 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`arg1`:: + diff --git a/docs/reference/esql/functions/parameters/less_than.asciidoc b/docs/reference/esql/functions/parameters/less_than.asciidoc new file mode 100644 index 0000000000000..34a7e43e23ddf --- /dev/null +++ b/docs/reference/esql/functions/parameters/less_than.asciidoc @@ -0,0 +1,9 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`lhs`:: +An expression. + +`rhs`:: +An expression. diff --git a/docs/reference/esql/functions/parameters/less_than_or_equal.asciidoc b/docs/reference/esql/functions/parameters/less_than_or_equal.asciidoc new file mode 100644 index 0000000000000..34a7e43e23ddf --- /dev/null +++ b/docs/reference/esql/functions/parameters/less_than_or_equal.asciidoc @@ -0,0 +1,9 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`lhs`:: +An expression. + +`rhs`:: +An expression. diff --git a/docs/reference/esql/functions/parameters/like.asciidoc b/docs/reference/esql/functions/parameters/like.asciidoc new file mode 100644 index 0000000000000..095efa060a999 --- /dev/null +++ b/docs/reference/esql/functions/parameters/like.asciidoc @@ -0,0 +1,9 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`str`:: +A literal expression. + +`pattern`:: +Pattern. diff --git a/docs/reference/esql/functions/parameters/mod.asciidoc b/docs/reference/esql/functions/parameters/mod.asciidoc new file mode 100644 index 0000000000000..38be1905c9593 --- /dev/null +++ b/docs/reference/esql/functions/parameters/mod.asciidoc @@ -0,0 +1,9 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`lhs`:: +A numeric value. + +`rhs`:: +A numeric value. diff --git a/docs/reference/esql/functions/parameters/mul.asciidoc b/docs/reference/esql/functions/parameters/mul.asciidoc new file mode 100644 index 0000000000000..38be1905c9593 --- /dev/null +++ b/docs/reference/esql/functions/parameters/mul.asciidoc @@ -0,0 +1,9 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`lhs`:: +A numeric value. + +`rhs`:: +A numeric value. diff --git a/docs/reference/esql/functions/parameters/neg.asciidoc b/docs/reference/esql/functions/parameters/neg.asciidoc new file mode 100644 index 0000000000000..61f0cae353914 --- /dev/null +++ b/docs/reference/esql/functions/parameters/neg.asciidoc @@ -0,0 +1,6 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`field`:: +A numeric value or a date time interval. diff --git a/docs/reference/esql/functions/parameters/not_equals.asciidoc b/docs/reference/esql/functions/parameters/not_equals.asciidoc new file mode 100644 index 0000000000000..34a7e43e23ddf --- /dev/null +++ b/docs/reference/esql/functions/parameters/not_equals.asciidoc @@ -0,0 +1,9 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`lhs`:: +An expression. + +`rhs`:: +An expression. diff --git a/docs/reference/esql/functions/parameters/rlike.asciidoc b/docs/reference/esql/functions/parameters/rlike.asciidoc new file mode 100644 index 0000000000000..b0518237c7406 --- /dev/null +++ b/docs/reference/esql/functions/parameters/rlike.asciidoc @@ -0,0 +1,12 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`str`:: +A literal value. + +`pattern`:: +A regular expression. + +`caseInsensitive`:: +Indicate whether it is case insensitive. diff --git a/docs/reference/esql/functions/parameters/sub.asciidoc b/docs/reference/esql/functions/parameters/sub.asciidoc new file mode 100644 index 0000000000000..ccc418eba0b75 --- /dev/null +++ b/docs/reference/esql/functions/parameters/sub.asciidoc @@ -0,0 +1,9 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`lhs`:: +A numeric value or a date time value. + +`rhs`:: +A numeric value or a date time value. diff --git a/docs/reference/esql/functions/predicates.asciidoc b/docs/reference/esql/functions/predicates.asciidoc index 16b461b40ebf7..8fccc0066c510 100644 --- a/docs/reference/esql/functions/predicates.asciidoc +++ b/docs/reference/esql/functions/predicates.asciidoc @@ -5,6 +5,11 @@ //tag::body[] For NULL comparison, use the `IS NULL` and `IS NOT NULL` predicates: +[.text-center] +image::esql/functions/signature/is_null.svg[Embedded,opts=inline] + +include::types/is_null.asciidoc[] + [source.merge.styled,esql] ---- include::{esql-specs}/null.csv-spec[tag=is-null] @@ -14,6 +19,11 @@ include::{esql-specs}/null.csv-spec[tag=is-null] include::{esql-specs}/null.csv-spec[tag=is-null-result] |=== +[.text-center] +image::esql/functions/signature/is_not_null.svg[Embedded,opts=inline] + +include::types/is_not_null.asciidoc[] + [source.merge.styled,esql] ---- include::{esql-specs}/null.csv-spec[tag=is-not-null] @@ -22,4 +32,4 @@ include::{esql-specs}/null.csv-spec[tag=is-not-null] |=== include::{esql-specs}/null.csv-spec[tag=is-not-null-result] |=== -//end::body[] \ No newline at end of file +//end::body[] diff --git a/docs/reference/esql/functions/rlike.asciidoc b/docs/reference/esql/functions/rlike.asciidoc deleted file mode 100644 index 031594ae403da..0000000000000 --- a/docs/reference/esql/functions/rlike.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[discete] -[[esql-rlike-operator]] -==== `RLIKE` - -// tag::body[] -Use `RLIKE` to filter data based on string patterns using using -<>. `RLIKE` usually acts on a field placed on -the left-hand side of the operator, but it can also act on a constant (literal) -expression. The right-hand side of the operator represents the pattern. - -include::./types/like.asciidoc[] - -[source.merge.styled,esql] ----- -include::{esql-specs}/docs.csv-spec[tag=rlike] ----- -[%header.monospaced.styled,format=dsv,separator=|] -|=== -include::{esql-specs}/docs.csv-spec[tag=rlike-result] -|=== -// end::body[] diff --git a/docs/reference/esql/functions/round.asciidoc b/docs/reference/esql/functions/round.asciidoc deleted file mode 100644 index e792db6c1ed69..0000000000000 --- a/docs/reference/esql/functions/round.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[discrete] -[[esql-round]] -=== `ROUND` -*Syntax* - -[.text-center] -image::esql/functions/signature/round.svg[Embedded,opts=inline] - -*Parameters* - -`value`:: -Numeric expression. If `null`, the function returns `null`. - -`decimals`:: -Numeric expression. If `null`, the function returns `null`. - -*Description* - -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. - -include::types/round.asciidoc[] - -*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] -|=== diff --git a/docs/reference/esql/functions/signature/is_not_null.svg b/docs/reference/esql/functions/signature/is_not_null.svg new file mode 100644 index 0000000000000..627ee27afa27f --- /dev/null +++ b/docs/reference/esql/functions/signature/is_not_null.svg @@ -0,0 +1 @@ +IS_NOT_NULL(arg1) \ No newline at end of file diff --git a/docs/reference/esql/functions/signature/is_null.svg b/docs/reference/esql/functions/signature/is_null.svg new file mode 100644 index 0000000000000..4d50937d64d49 --- /dev/null +++ b/docs/reference/esql/functions/signature/is_null.svg @@ -0,0 +1 @@ +IS_NULL(arg1) \ No newline at end of file diff --git a/docs/reference/esql/functions/signature/like.svg b/docs/reference/esql/functions/signature/like.svg new file mode 100644 index 0000000000000..5c64a198ba252 --- /dev/null +++ b/docs/reference/esql/functions/signature/like.svg @@ -0,0 +1 @@ +LIKE(str,pattern) \ No newline at end of file diff --git a/docs/reference/esql/functions/signature/rlike.svg b/docs/reference/esql/functions/signature/rlike.svg new file mode 100644 index 0000000000000..de228f0b320c8 --- /dev/null +++ b/docs/reference/esql/functions/signature/rlike.svg @@ -0,0 +1 @@ +RLIKE(str,pattern,caseInsensitive) \ No newline at end of file diff --git a/docs/reference/esql/functions/types/is_not_null.asciidoc b/docs/reference/esql/functions/types/is_not_null.asciidoc new file mode 100644 index 0000000000000..7bd5c2fab583f --- /dev/null +++ b/docs/reference/esql/functions/types/is_not_null.asciidoc @@ -0,0 +1,22 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Supported types* + +[%header.monospaced.styled,format=dsv,separator=|] +|=== +arg1 | result +boolean | boolean +cartesian_point | boolean +cartesian_shape | boolean +datetime | boolean +double | boolean +geo_point | boolean +geo_shape | boolean +integer | boolean +ip | boolean +keyword | boolean +long | boolean +text | boolean +unsigned_long | boolean +version | boolean +|=== diff --git a/docs/reference/esql/functions/types/is_null.asciidoc b/docs/reference/esql/functions/types/is_null.asciidoc new file mode 100644 index 0000000000000..7bd5c2fab583f --- /dev/null +++ b/docs/reference/esql/functions/types/is_null.asciidoc @@ -0,0 +1,22 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Supported types* + +[%header.monospaced.styled,format=dsv,separator=|] +|=== +arg1 | result +boolean | boolean +cartesian_point | boolean +cartesian_shape | boolean +datetime | boolean +double | boolean +geo_point | boolean +geo_shape | boolean +integer | boolean +ip | boolean +keyword | boolean +long | boolean +text | boolean +unsigned_long | boolean +version | boolean +|=== diff --git a/docs/reference/esql/functions/types/neg.asciidoc b/docs/reference/esql/functions/types/neg.asciidoc index 28d3b2a512dec..c0d0a21711552 100644 --- a/docs/reference/esql/functions/types/neg.asciidoc +++ b/docs/reference/esql/functions/types/neg.asciidoc @@ -4,7 +4,7 @@ [%header.monospaced.styled,format=dsv,separator=|] |=== -v | result +field | result date_period | date_period double | double integer | integer diff --git a/docs/reference/esql/functions/unary.asciidoc b/docs/reference/esql/functions/unary.asciidoc index 69ce754c1b4a0..8a5d7ab5912ef 100644 --- a/docs/reference/esql/functions/unary.asciidoc +++ b/docs/reference/esql/functions/unary.asciidoc @@ -4,9 +4,4 @@ The only unary operators is negation (`-`): -[.text-center] -image::esql/functions/signature/neg.svg[Embedded,opts=inline] - -Supported types: - -include::types/neg.asciidoc[] +include::layout/neg.asciidoc[] diff --git a/docs/reference/esql/processing-commands/where.asciidoc b/docs/reference/esql/processing-commands/where.asciidoc index 3076f92c40fc0..96a20ceaabc81 100644 --- a/docs/reference/esql/processing-commands/where.asciidoc +++ b/docs/reference/esql/processing-commands/where.asciidoc @@ -33,7 +33,7 @@ Which, if `still_hired` is a boolean field, can be simplified to: include::{esql-specs}/docs.csv-spec[tag=whereBoolean] ---- -Use date math to retrieve data from a specific time range. For example, to +Use date math to retrieve data from a specific time range. For example, to retrieve the last hour of logs: [source,esql] @@ -53,10 +53,10 @@ For a complete list of all functions, refer to <>. include::../functions/predicates.asciidoc[tag=body] -include::../functions/like.asciidoc[tag=body] +include::../functions/layout/like.asciidoc[tag=body] -include::../functions/rlike.asciidoc[tag=body] +include::../functions/layout/rlike.asciidoc[tag=body] include::../functions/in.asciidoc[tag=body] -For a complete list of all operators, refer to <>. \ No newline at end of file +For a complete list of all operators, refer to <>. diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLike.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLike.java index 3fe4b92ca8f25..1ee8f0f7b2a90 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLike.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLike.java @@ -9,6 +9,9 @@ import org.elasticsearch.compute.operator.EvalOperator; import org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper; +import org.elasticsearch.xpack.esql.expression.function.Example; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.ql.expression.Expression; import org.elasticsearch.xpack.ql.expression.predicate.regex.RLikePattern; import org.elasticsearch.xpack.ql.tree.NodeInfo; @@ -20,14 +23,29 @@ import static org.elasticsearch.xpack.ql.expression.TypeResolutions.isString; public class RLike extends org.elasticsearch.xpack.ql.expression.predicate.regex.RLike implements EvaluatorMapper { - public RLike(Source source, Expression value, RLikePattern pattern) { - super(source, value, pattern); - } - public RLike(Source source, Expression field, RLikePattern rLikePattern, boolean caseInsensitive) { + @FunctionInfo(returnType = "boolean", description = """ + Use `RLIKE` to filter data based on string patterns using using + <>. `RLIKE` usually acts on a field placed on + the left-hand side of the operator, but it can also act on a constant (literal) + expression. The right-hand side of the operator represents the pattern.""", examples = @Example(file = "docs", tag = "rlike")) + public RLike( + Source source, + @Param(name = "str", type = { "keyword", "text" }, description = "A literal value.") Expression field, + @Param(name = "pattern", type = { "keyword", "text" }, description = "A regular expression.") RLikePattern rLikePattern, + @Param( + name = "caseInsensitive", + type = { "boolean" }, + description = "Indicate whether it is case insensitive." + ) boolean caseInsensitive + ) { super(source, field, rLikePattern, caseInsensitive); } + public RLike(Source source, Expression value, RLikePattern pattern) { + super(source, value, pattern); + } + @Override protected NodeInfo info() { return NodeInfo.create(this, RLike::new, field(), pattern(), caseInsensitive()); diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/WildcardLike.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/WildcardLike.java index bf709b0222797..19f002b6502f1 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/WildcardLike.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/WildcardLike.java @@ -36,8 +36,8 @@ also act on a constant (literal) expression. The right-hand side of the operator * `?` matches one character.""", examples = @Example(file = "docs", tag = "like")) public WildcardLike( Source source, - @Param(name = "str", type = { "keyword", "text" }) Expression left, - @Param(name = "pattern", type = { "keyword", "text" }) WildcardPattern pattern + @Param(name = "str", type = { "keyword", "text" }, description = "A literal expression.") Expression left, + @Param(name = "pattern", type = { "keyword", "text" }, description = "Pattern.") WildcardPattern pattern ) { super(source, left, pattern, false); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Add.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Add.java index 4439c4ebc754e..63bb8e66783d3 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Add.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Add.java @@ -9,6 +9,8 @@ import org.elasticsearch.compute.ann.Evaluator; import org.elasticsearch.compute.ann.Fixed; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.ql.expression.Expression; import org.elasticsearch.xpack.ql.expression.predicate.operator.arithmetic.BinaryComparisonInversible; import org.elasticsearch.xpack.ql.tree.NodeInfo; @@ -26,7 +28,23 @@ public class Add extends DateTimeArithmeticOperation implements BinaryComparisonInversible { - public Add(Source source, Expression left, Expression right) { + @FunctionInfo( + returnType = { "double", "integer", "long", "date_period", "datetime", "time_duration", "unsigned_long" }, + description = "Returns the sum of two values." + ) + public Add( + Source source, + @Param( + name = "lhs", + description = "A numeric value or a date time value.", + type = { "double", "integer", "long", "date_period", "datetime", "time_duration", "unsigned_long" } + ) Expression left, + @Param( + name = "rhs", + description = "A numeric value or a date time value.", + type = { "double", "integer", "long", "date_period", "datetime", "time_duration", "unsigned_long" } + ) Expression right + ) { super( source, left, diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Div.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Div.java index 73863d308f6e4..7a5f9712b4cb5 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Div.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Div.java @@ -8,6 +8,8 @@ package org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic; import org.elasticsearch.compute.ann.Evaluator; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.ql.expression.Expression; import org.elasticsearch.xpack.ql.expression.predicate.operator.arithmetic.BinaryComparisonInversible; import org.elasticsearch.xpack.ql.tree.NodeInfo; @@ -22,7 +24,15 @@ public class Div extends EsqlArithmeticOperation implements BinaryComparisonInve private DataType type; - public Div(Source source, Expression left, Expression right) { + @FunctionInfo( + returnType = { "double", "integer", "long", "unsigned_long" }, + description = "Returns the quotient of two numeric values." + ) + public Div( + Source source, + @Param(name = "lhs", description = "A numeric value.", type = { "double", "integer", "long", "unsigned_long" }) Expression left, + @Param(name = "rhs", description = "A numeric value.", type = { "double", "integer", "long", "unsigned_long" }) Expression right + ) { this(source, left, right, null); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mod.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mod.java index df3b8f27c4880..c80c20535a892 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mod.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mod.java @@ -8,6 +8,8 @@ package org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic; import org.elasticsearch.compute.ann.Evaluator; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.ql.expression.Expression; import org.elasticsearch.xpack.ql.tree.NodeInfo; import org.elasticsearch.xpack.ql.tree.Source; @@ -18,7 +20,15 @@ public class Mod extends EsqlArithmeticOperation { - public Mod(Source source, Expression left, Expression right) { + @FunctionInfo( + returnType = { "double", "integer", "long", "unsigned_long" }, + description = "Returns the remainder of the division of two numeric values." + ) + public Mod( + Source source, + @Param(name = "lhs", description = "A numeric value.", type = { "double", "integer", "long", "unsigned_long" }) Expression left, + @Param(name = "rhs", description = "A numeric value.", type = { "double", "integer", "long", "unsigned_long" }) Expression right + ) { super( source, left, diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mul.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mul.java index 5210fcb10ad8f..3316cbe7f7bfa 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mul.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mul.java @@ -8,6 +8,8 @@ package org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic; import org.elasticsearch.compute.ann.Evaluator; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.ql.expression.Expression; import org.elasticsearch.xpack.ql.expression.predicate.operator.arithmetic.BinaryComparisonInversible; import org.elasticsearch.xpack.ql.tree.NodeInfo; @@ -18,7 +20,12 @@ public class Mul extends EsqlArithmeticOperation implements BinaryComparisonInversible { - public Mul(Source source, Expression left, Expression right) { + @FunctionInfo(returnType = { "double", "integer", "long", "unsigned_long" }, description = "Returns the product of two numeric values.") + public Mul( + Source source, + @Param(name = "lhs", description = "A numeric value.", type = { "double", "integer", "long", "unsigned_long" }) Expression left, + @Param(name = "rhs", description = "A numeric value.", type = { "double", "integer", "long", "unsigned_long" }) Expression right + ) { super( source, left, diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Neg.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Neg.java index 1adfc05b813e7..ba53407d4e092 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Neg.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Neg.java @@ -11,6 +11,8 @@ import org.elasticsearch.compute.operator.EvalOperator.ExpressionEvaluator; import org.elasticsearch.xpack.esql.EsqlIllegalArgumentException; import org.elasticsearch.xpack.esql.ExceptionUtils; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.esql.expression.function.Warnings; import org.elasticsearch.xpack.esql.expression.function.scalar.UnaryScalarFunction; import org.elasticsearch.xpack.ql.expression.Expression; @@ -34,7 +36,18 @@ public class Neg extends UnaryScalarFunction { private final Warnings warnings; - public Neg(Source source, Expression field) { + @FunctionInfo( + returnType = { "double", "integer", "long", "date_period", "time_duration" }, + description = "Returns the negation of the argument." + ) + public Neg( + Source source, + @Param( + name = "field", + description = "A numeric value or a date time interval.", + type = { "double", "integer", "long", "date_period", "time_duration" } + ) Expression field + ) { super(source, field); warnings = new Warnings(source); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Sub.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Sub.java index dd05faa401fe8..583774f3f2285 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Sub.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Sub.java @@ -9,6 +9,8 @@ import org.elasticsearch.compute.ann.Evaluator; import org.elasticsearch.compute.ann.Fixed; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.esql.type.EsqlDataTypes; import org.elasticsearch.xpack.ql.expression.Expression; import org.elasticsearch.xpack.ql.expression.predicate.operator.arithmetic.BinaryComparisonInversible; @@ -29,7 +31,23 @@ public class Sub extends DateTimeArithmeticOperation implements BinaryComparisonInversible { - public Sub(Source source, Expression left, Expression right) { + @FunctionInfo( + returnType = { "double", "integer", "long", "date_period", "datetime", "time_duration", "unsigned_long" }, + description = "Returns the difference of two values." + ) + public Sub( + Source source, + @Param( + name = "lhs", + description = "A numeric value or a date time value.", + type = { "double", "integer", "long", "date_period", "datetime", "time_duration", "unsigned_long" } + ) Expression left, + @Param( + name = "rhs", + description = "A numeric value or a date time value.", + type = { "double", "integer", "long", "date_period", "datetime", "time_duration", "unsigned_long" } + ) Expression right + ) { super( source, left, diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/Equals.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/Equals.java index c3eb0c064c5f2..0270332d70598 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/Equals.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/Equals.java @@ -8,6 +8,8 @@ import org.apache.lucene.util.BytesRef; import org.elasticsearch.compute.ann.Evaluator; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.EsqlArithmeticOperation; import org.elasticsearch.xpack.esql.type.EsqlDataTypes; import org.elasticsearch.xpack.ql.expression.Expression; @@ -38,7 +40,48 @@ public class Equals extends EsqlBinaryComparison implements Negatable list) { + public In( + Source source, + @Param( + name = "field", + type = { + "boolean", + "cartesian_point", + "cartesian_shape", + "date", + "double", + "geo_point", + "geo_shape", + "integer", + "ip", + "keyword", + "long", + "text", + "version" }, + description = "An expression." + ) Expression value, + @Param( + name = "inlist", + type = { + "boolean", + "cartesian_point", + "cartesian_shape", + "date", + "double", + "geo_point", + "geo_shape", + "integer", + "ip", + "keyword", + "long", + "text", + "version" }, + description = "A list of items." + ) List list + ) { super(source, value, list); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/LessThan.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/LessThan.java index 88cef9acff6c4..f0330421425b3 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/LessThan.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/LessThan.java @@ -8,6 +8,8 @@ import org.apache.lucene.util.BytesRef; import org.elasticsearch.compute.ann.Evaluator; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.EsqlArithmeticOperation; import org.elasticsearch.xpack.ql.expression.Expression; import org.elasticsearch.xpack.ql.expression.predicate.Negatable; @@ -33,7 +35,20 @@ public class LessThan extends EsqlBinaryComparison implements Negatable> UNREGISTERED_FUNCTIONS = Map.ofEntries( + entry("like", WildcardLike.class), + entry("rlike", RLike.class), + entry("in", In.class), + entry("equals", Equals.class), + entry("not_equals", NotEquals.class), + entry("greater_than", GreaterThan.class), + entry("greater_than_or_equal", GreaterThanOrEqual.class), + entry("less_than", LessThan.class), + entry("less_than_or_equal", LessThanOrEqual.class), + entry("add", Add.class), + entry("sub", Sub.class), + entry("mul", Mul.class), + entry("div", Div.class), + entry("mod", Mod.class), + entry("neg", Neg.class), + entry("is_null", IsNull.class), + entry("is_not_null", IsNotNull.class) + ); + /** * Generate a random value of the appropriate type to fit into blocks of {@code e}. */ @@ -907,7 +947,7 @@ protected static String typeErrorMessage(boolean includeOrdinal, List, String> NAMED_EXPECTED_TYPES = Map.ofEntries( - Map.entry( + entry( Set.of( EsqlDataTypes.DATE_PERIOD, DataTypes.DOUBLE, @@ -918,18 +958,18 @@ protected static String typeErrorMessage(boolean includeOrdinal, List clazz = UNREGISTERED_FUNCTIONS.get(name); + if (clazz != null) { + EsqlFunctionRegistry.FunctionDescription functionDescription = mockFunctionDescription(name, clazz); + return RailRoadDiagram.functionSignature(name, functionDescription.argNames()); + } return null; } @@ -1206,20 +1251,14 @@ public static void renderDocs() throws IOException { return; } String name = functionName(); - if (binaryOperator(name) != null) { - renderTypes(List.of("lhs", "rhs")); - return; - } - if (unaryOperator(name) != null) { - renderTypes(List.of("v")); - return; - } - if (name.equalsIgnoreCase("rlike")) { - renderTypes(List.of("str", "pattern", "caseInsensitive")); - return; - } - if (name.equalsIgnoreCase("like")) { - renderTypes(List.of("str", "pattern")); + if (binaryOperator(name) != null + || unaryOperator(name) != null + || name.equalsIgnoreCase("rlike") + || name.equalsIgnoreCase("like") + || name.equalsIgnoreCase("is_null") + || name.equalsIgnoreCase("is_not_null") + || name.equalsIgnoreCase("in")) { + renderDocsForUnregisteredFunctions(name); return; } FunctionDefinition definition = definition(name); @@ -1253,6 +1292,66 @@ public static void renderDocs() throws IOException { LogManager.getLogger(getTestClass()).info("Skipping rendering types because the function '" + name + "' isn't registered"); } + private static FunctionInfo mockFunctionInfo(Class clazz) { + var constructors = clazz.getConstructors(); + if (constructors.length == 0) { + return null; + } + Constructor constructor = constructors[0]; + return constructor.getAnnotation(FunctionInfo.class); + } + + private static EsqlFunctionRegistry.FunctionDescription mockFunctionDescription(String functionName, Class clazz) { + var constructors = clazz.getConstructors(); + if (constructors.length == 0) { + return new EsqlFunctionRegistry.FunctionDescription(functionName, List.of(), null, null, false, false); + } + Constructor constructor = constructors[0]; + FunctionInfo functionInfo = mockFunctionInfo(clazz); + String functionDescription = functionInfo == null ? "" : functionInfo.description().replace('\n', ' '); + String[] returnType = functionInfo == null ? new String[] { "?" } : functionInfo.returnType(); + var params = constructor.getParameters(); // no multiple c'tors supported + + List args = new ArrayList<>(params.length); + boolean variadic = false; + boolean isAggregation = functionInfo == null ? false : functionInfo.isAggregation(); + for (int i = 1; i < params.length; i++) { // skipping 1st argument, the source + if (Configuration.class.isAssignableFrom(params[i].getType()) == false) { + Param paramInfo = params[i].getAnnotation(Param.class); + String name = paramInfo == null ? params[i].getName() : paramInfo.name(); + variadic |= List.class.isAssignableFrom(params[i].getType()); + String[] type = paramInfo == null ? new String[] { "?" } : paramInfo.type(); + String desc = paramInfo == null ? "" : paramInfo.description().replace('\n', ' '); + boolean optional = paramInfo == null ? false : paramInfo.optional(); + DataType targetDataType = EsqlFunctionRegistry.getTargetType(type); + args.add(new EsqlFunctionRegistry.ArgSignature(name, type, desc, optional, targetDataType)); + } + } + return new EsqlFunctionRegistry.FunctionDescription(functionName, args, returnType, functionDescription, variadic, isAggregation); + } + + private static void renderDocsForUnregisteredFunctions(String functioName) throws IOException { + Class clazz = UNREGISTERED_FUNCTIONS.get(functioName); + FunctionInfo functionInfo = mockFunctionInfo(clazz); + EsqlFunctionRegistry.FunctionDescription functionDescription = mockFunctionDescription(functioName, clazz); + renderTypes(functionDescription.argNames()); + renderParametersList(functionDescription.argNames(), functionDescription.argDescriptions()); + if (functionInfo == null) { + return; + } + renderDescription(functionInfo.description().replace('\n', ' '), functionInfo.detailedDescription(), functionInfo.note()); + boolean hasExamples = renderExamples(functionInfo); + renderFullLayout(functioName, hasExamples); + renderKibanaInlineDocs(functioName, functionInfo); + renderKibanaFunctionDefinition( + functioName, + functionInfo, + functionDescription.args(), + functioName.equalsIgnoreCase("like") ? true : functionDescription.variadic() + ); + + } + private static final String DOCS_WARNING = "// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.\n\n"; @@ -1359,11 +1458,16 @@ private static boolean renderExamples(FunctionInfo info) throws IOException { return true; } + private static final String BODY_BEGIN = "\n//tag::body[]\n"; + private static final String BODY_END = "//end::body[]\n"; + private static void renderFullLayout(String name, boolean hasExamples) throws IOException { String rendered = DOCS_WARNING + """ [discrete] [[esql-$NAME$]] - === `$UPPER_NAME$` + === `$UPPER_NAME$`""".replace("$NAME$", name).replace("$UPPER_NAME$", name.toUpperCase(Locale.ROOT)); + rendered += BODY_BEGIN; + rendered += """ *Syntax* @@ -1377,6 +1481,7 @@ private static void renderFullLayout(String name, boolean hasExamples) throws IO if (hasExamples) { rendered += "include::../examples/" + name + ".asciidoc[]\n"; } + rendered += BODY_END; LogManager.getLogger(getTestClass()).info("Writing layout for [{}]:\n{}", functionName(), rendered); writeToTempDir("layout", rendered, "asciidoc"); } diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/RailRoadDiagram.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/RailRoadDiagram.java index d6501568a85ec..62f60551bfcc5 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/RailRoadDiagram.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/RailRoadDiagram.java @@ -91,6 +91,31 @@ static String unaryOperator(String operator) throws IOException { return toSvg(new Sequence(expressions.toArray(Expression[]::new))); } + /** + * Generate a railroad diagram for a function. The output would look like + * {@code FOO(a, b, c)}. + */ + static String functionSignature(String functionName, List args) throws IOException { + List expressions = new ArrayList<>(); + expressions.add(new SpecialSequence(functionName.toUpperCase(Locale.ROOT))); + expressions.add(new Syntax("(")); + boolean first = true; + for (String arg : args) { + if (arg.endsWith("...")) { + expressions.add(new Repetition(new Sequence(new Syntax(","), new Literal(arg.substring(0, arg.length() - 3))), 0, null)); + } else { + if (first) { + first = false; + } else { + expressions.add(new Syntax(",")); + } + expressions.add(new Literal(arg)); + } + } + expressions.add(new Syntax(")")); + return toSvg(new Sequence(expressions.toArray(Expression[]::new))); + } + private static String toSvg(Expression exp) throws IOException { RRDiagram rrDiagram = new GrammarToRRDiagram().convert(new Rule("", exp)); From 63fa7c9f53c304ee271cb4bffe3951da20521cce Mon Sep 17 00:00:00 2001 From: Fang Xing Date: Thu, 16 May 2024 19:58:31 -0400 Subject: [PATCH 2/7] add tests for in --- .../esql/functions/description/in.asciidoc | 5 + .../esql/functions/examples/in.asciidoc | 13 + .../esql/functions/kibana/definition/in.json | 263 ++++++++++++++++ .../esql/functions/kibana/docs/in.md | 11 + .../esql/functions/layout/abs.asciidoc | 2 - .../esql/functions/layout/acos.asciidoc | 2 - .../esql/functions/layout/add.asciidoc | 2 - .../esql/functions/layout/asin.asciidoc | 2 - .../esql/functions/layout/atan.asciidoc | 2 - .../esql/functions/layout/atan2.asciidoc | 2 - .../esql/functions/layout/bucket.asciidoc | 2 - .../esql/functions/layout/case.asciidoc | 2 - .../esql/functions/layout/ceil.asciidoc | 2 - .../esql/functions/layout/cidr_match.asciidoc | 2 - .../esql/functions/layout/coalesce.asciidoc | 2 - .../esql/functions/layout/concat.asciidoc | 2 - .../esql/functions/layout/cos.asciidoc | 2 - .../esql/functions/layout/cosh.asciidoc | 2 - .../esql/functions/layout/date_diff.asciidoc | 2 - .../functions/layout/date_extract.asciidoc | 2 - .../functions/layout/date_format.asciidoc | 2 - .../esql/functions/layout/date_parse.asciidoc | 2 - .../esql/functions/layout/date_trunc.asciidoc | 2 - .../esql/functions/layout/div.asciidoc | 2 - .../esql/functions/layout/e.asciidoc | 2 - .../esql/functions/layout/ends_with.asciidoc | 2 - .../esql/functions/layout/equals.asciidoc | 2 - .../esql/functions/layout/floor.asciidoc | 2 - .../functions/layout/from_base64.asciidoc | 2 - .../functions/layout/greater_than.asciidoc | 2 - .../layout/greater_than_or_equal.asciidoc | 2 - .../esql/functions/layout/greatest.asciidoc | 2 - .../esql/functions/layout/in.asciidoc | 15 + .../esql/functions/layout/least.asciidoc | 2 - .../esql/functions/layout/left.asciidoc | 2 - .../esql/functions/layout/length.asciidoc | 2 - .../esql/functions/layout/less_than.asciidoc | 2 - .../layout/less_than_or_equal.asciidoc | 2 - .../esql/functions/layout/like.asciidoc | 2 - .../esql/functions/layout/locate.asciidoc | 2 - .../esql/functions/layout/log.asciidoc | 2 - .../esql/functions/layout/log10.asciidoc | 2 - .../esql/functions/layout/ltrim.asciidoc | 2 - .../esql/functions/layout/mod.asciidoc | 2 - .../esql/functions/layout/mul.asciidoc | 2 - .../esql/functions/layout/mv_avg.asciidoc | 2 - .../esql/functions/layout/mv_concat.asciidoc | 2 - .../esql/functions/layout/mv_count.asciidoc | 2 - .../esql/functions/layout/mv_dedupe.asciidoc | 2 - .../esql/functions/layout/mv_first.asciidoc | 2 - .../esql/functions/layout/mv_last.asciidoc | 2 - .../esql/functions/layout/mv_max.asciidoc | 2 - .../esql/functions/layout/mv_median.asciidoc | 2 - .../esql/functions/layout/mv_min.asciidoc | 2 - .../esql/functions/layout/mv_slice.asciidoc | 2 - .../esql/functions/layout/mv_sort.asciidoc | 2 - .../esql/functions/layout/mv_sum.asciidoc | 2 - .../esql/functions/layout/mv_zip.asciidoc | 2 - .../esql/functions/layout/neg.asciidoc | 2 - .../esql/functions/layout/not_equals.asciidoc | 2 - .../esql/functions/layout/now.asciidoc | 2 - .../esql/functions/layout/pi.asciidoc | 2 - .../esql/functions/layout/pow.asciidoc | 2 - .../esql/functions/layout/replace.asciidoc | 2 - .../esql/functions/layout/right.asciidoc | 2 - .../esql/functions/layout/rlike.asciidoc | 2 - .../esql/functions/layout/round.asciidoc | 2 - .../esql/functions/layout/rtrim.asciidoc | 2 - .../esql/functions/layout/signum.asciidoc | 2 - .../esql/functions/layout/sin.asciidoc | 2 - .../esql/functions/layout/sinh.asciidoc | 2 - .../esql/functions/layout/split.asciidoc | 2 - .../esql/functions/layout/sqrt.asciidoc | 2 - .../functions/layout/st_contains.asciidoc | 2 - .../functions/layout/st_disjoint.asciidoc | 2 - .../functions/layout/st_intersects.asciidoc | 2 - .../esql/functions/layout/st_within.asciidoc | 2 - .../esql/functions/layout/st_x.asciidoc | 2 - .../esql/functions/layout/st_y.asciidoc | 2 - .../functions/layout/starts_with.asciidoc | 2 - .../esql/functions/layout/sub.asciidoc | 2 - .../esql/functions/layout/substring.asciidoc | 2 - .../esql/functions/layout/tan.asciidoc | 2 - .../esql/functions/layout/tanh.asciidoc | 2 - .../esql/functions/layout/tau.asciidoc | 2 - .../esql/functions/layout/to_base64.asciidoc | 2 - .../esql/functions/layout/to_boolean.asciidoc | 2 - .../layout/to_cartesianpoint.asciidoc | 2 - .../layout/to_cartesianshape.asciidoc | 2 - .../functions/layout/to_datetime.asciidoc | 2 - .../esql/functions/layout/to_degrees.asciidoc | 2 - .../esql/functions/layout/to_double.asciidoc | 2 - .../functions/layout/to_geopoint.asciidoc | 2 - .../functions/layout/to_geoshape.asciidoc | 2 - .../esql/functions/layout/to_integer.asciidoc | 2 - .../esql/functions/layout/to_ip.asciidoc | 2 - .../esql/functions/layout/to_long.asciidoc | 2 - .../esql/functions/layout/to_lower.asciidoc | 2 - .../esql/functions/layout/to_radians.asciidoc | 2 - .../esql/functions/layout/to_string.asciidoc | 2 - .../layout/to_unsigned_long.asciidoc | 2 - .../esql/functions/layout/to_upper.asciidoc | 2 - .../esql/functions/layout/to_version.asciidoc | 2 - .../esql/functions/layout/trim.asciidoc | 2 - .../esql/functions/operators.asciidoc | 4 +- .../esql/functions/parameters/in.asciidoc | 9 + .../reference/esql/functions/signature/in.svg | 1 + .../esql/functions/types/in.asciidoc | 22 ++ .../esql/processing-commands/where.asciidoc | 6 +- .../operator/comparison/InMapper.java | 15 + .../predicate/operator/comparison/In.java | 2 - .../function/AbstractFunctionTestCase.java | 10 +- .../operator/comparison/InTests.java | 289 ++++++++++++++++++ 113 files changed, 650 insertions(+), 213 deletions(-) create mode 100644 docs/reference/esql/functions/description/in.asciidoc create mode 100644 docs/reference/esql/functions/examples/in.asciidoc create mode 100644 docs/reference/esql/functions/kibana/definition/in.json create mode 100644 docs/reference/esql/functions/kibana/docs/in.md create mode 100644 docs/reference/esql/functions/layout/in.asciidoc create mode 100644 docs/reference/esql/functions/parameters/in.asciidoc create mode 100644 docs/reference/esql/functions/signature/in.svg create mode 100644 docs/reference/esql/functions/types/in.asciidoc create mode 100644 x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/InTests.java diff --git a/docs/reference/esql/functions/description/in.asciidoc b/docs/reference/esql/functions/description/in.asciidoc new file mode 100644 index 0000000000000..7a9a35892753b --- /dev/null +++ b/docs/reference/esql/functions/description/in.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +The `IN` operator allows testing whether a field or expression equals an element in a list of literals, fields or expressions: diff --git a/docs/reference/esql/functions/examples/in.asciidoc b/docs/reference/esql/functions/examples/in.asciidoc new file mode 100644 index 0000000000000..7bd53b49a36f8 --- /dev/null +++ b/docs/reference/esql/functions/examples/in.asciidoc @@ -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}/row.csv-spec[tag=in-with-expressions] +---- +[%header.monospaced.styled,format=dsv,separator=|] +|=== +include::{esql-specs}/row.csv-spec[tag=in-with-expressions-result] +|=== + diff --git a/docs/reference/esql/functions/kibana/definition/in.json b/docs/reference/esql/functions/kibana/definition/in.json new file mode 100644 index 0000000000000..8055c75453d71 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/in.json @@ -0,0 +1,263 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "in", + "description" : "The `IN` operator allows testing whether a field or expression equals an element in a list of literals, fields or expressions:", + "signatures" : [ + { + "params" : [ + { + "name" : "field", + "type" : "boolean", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "boolean", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "cartesian_point", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "cartesian_point", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "cartesian_shape", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "cartesian_shape", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "double", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "geo_point", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "geo_point", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "geo_shape", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "geo_shape", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "integer", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "ip", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "ip", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "keyword", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "text", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "long", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "keyword", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "text", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "version", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "version", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + } + ], + "examples" : [ + "ROW a = 1, b = 4, c = 3\n| WHERE c-a IN (3, b / 2, a)" + ] +} diff --git a/docs/reference/esql/functions/kibana/docs/in.md b/docs/reference/esql/functions/kibana/docs/in.md new file mode 100644 index 0000000000000..a7dd5655c2966 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/in.md @@ -0,0 +1,11 @@ + + +### IN +The `IN` operator allows testing whether a field or expression equals an element in a list of literals, fields or expressions: + +``` +ROW a = 1, b = 4, c = 3 +| WHERE c-a IN (3, b / 2, a) +``` diff --git a/docs/reference/esql/functions/layout/abs.asciidoc b/docs/reference/esql/functions/layout/abs.asciidoc index 38f53ba300aea..cc3c1d5634c7e 100644 --- a/docs/reference/esql/functions/layout/abs.asciidoc +++ b/docs/reference/esql/functions/layout/abs.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-abs]] === `ABS` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/abs.asciidoc[] include::../description/abs.asciidoc[] include::../types/abs.asciidoc[] include::../examples/abs.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/acos.asciidoc b/docs/reference/esql/functions/layout/acos.asciidoc index fbecd8262bec1..8bc834460f01a 100644 --- a/docs/reference/esql/functions/layout/acos.asciidoc +++ b/docs/reference/esql/functions/layout/acos.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-acos]] === `ACOS` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/acos.asciidoc[] include::../description/acos.asciidoc[] include::../types/acos.asciidoc[] include::../examples/acos.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/add.asciidoc b/docs/reference/esql/functions/layout/add.asciidoc index 7205021b73f25..1dde1049239ac 100644 --- a/docs/reference/esql/functions/layout/add.asciidoc +++ b/docs/reference/esql/functions/layout/add.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-add]] === `ADD` -//tag::body[] *Syntax* @@ -13,4 +12,3 @@ image::esql/functions/signature/add.svg[Embedded,opts=inline] include::../parameters/add.asciidoc[] include::../description/add.asciidoc[] include::../types/add.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/asin.asciidoc b/docs/reference/esql/functions/layout/asin.asciidoc index ec10dad3132fd..a092f3c13d72c 100644 --- a/docs/reference/esql/functions/layout/asin.asciidoc +++ b/docs/reference/esql/functions/layout/asin.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-asin]] === `ASIN` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/asin.asciidoc[] include::../description/asin.asciidoc[] include::../types/asin.asciidoc[] include::../examples/asin.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/atan.asciidoc b/docs/reference/esql/functions/layout/atan.asciidoc index b7d8806016f11..c92523ef39fae 100644 --- a/docs/reference/esql/functions/layout/atan.asciidoc +++ b/docs/reference/esql/functions/layout/atan.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-atan]] === `ATAN` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/atan.asciidoc[] include::../description/atan.asciidoc[] include::../types/atan.asciidoc[] include::../examples/atan.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/atan2.asciidoc b/docs/reference/esql/functions/layout/atan2.asciidoc index 97bd780d6d0f2..b23aa95aa56b8 100644 --- a/docs/reference/esql/functions/layout/atan2.asciidoc +++ b/docs/reference/esql/functions/layout/atan2.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-atan2]] === `ATAN2` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/atan2.asciidoc[] include::../description/atan2.asciidoc[] include::../types/atan2.asciidoc[] include::../examples/atan2.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/bucket.asciidoc b/docs/reference/esql/functions/layout/bucket.asciidoc index 006c76e27e553..ec378c7ed2e87 100644 --- a/docs/reference/esql/functions/layout/bucket.asciidoc +++ b/docs/reference/esql/functions/layout/bucket.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-bucket]] === `BUCKET` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/bucket.asciidoc[] include::../description/bucket.asciidoc[] include::../types/bucket.asciidoc[] include::../examples/bucket.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/case.asciidoc b/docs/reference/esql/functions/layout/case.asciidoc index 9da8205fc7c52..edfc768dc7055 100644 --- a/docs/reference/esql/functions/layout/case.asciidoc +++ b/docs/reference/esql/functions/layout/case.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-case]] === `CASE` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/case.asciidoc[] include::../description/case.asciidoc[] include::../types/case.asciidoc[] include::../examples/case.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/ceil.asciidoc b/docs/reference/esql/functions/layout/ceil.asciidoc index 900d5c162139c..2e49dc848ae59 100644 --- a/docs/reference/esql/functions/layout/ceil.asciidoc +++ b/docs/reference/esql/functions/layout/ceil.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-ceil]] === `CEIL` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/ceil.asciidoc[] include::../description/ceil.asciidoc[] include::../types/ceil.asciidoc[] include::../examples/ceil.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/cidr_match.asciidoc b/docs/reference/esql/functions/layout/cidr_match.asciidoc index e546e9adc7195..486185570d029 100644 --- a/docs/reference/esql/functions/layout/cidr_match.asciidoc +++ b/docs/reference/esql/functions/layout/cidr_match.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-cidr_match]] === `CIDR_MATCH` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/cidr_match.asciidoc[] include::../description/cidr_match.asciidoc[] include::../types/cidr_match.asciidoc[] include::../examples/cidr_match.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/coalesce.asciidoc b/docs/reference/esql/functions/layout/coalesce.asciidoc index 4393dfe8a654d..47cae18197402 100644 --- a/docs/reference/esql/functions/layout/coalesce.asciidoc +++ b/docs/reference/esql/functions/layout/coalesce.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-coalesce]] === `COALESCE` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/coalesce.asciidoc[] include::../description/coalesce.asciidoc[] include::../types/coalesce.asciidoc[] include::../examples/coalesce.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/concat.asciidoc b/docs/reference/esql/functions/layout/concat.asciidoc index af5339bc6c18e..433a6742f08bc 100644 --- a/docs/reference/esql/functions/layout/concat.asciidoc +++ b/docs/reference/esql/functions/layout/concat.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-concat]] === `CONCAT` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/concat.asciidoc[] include::../description/concat.asciidoc[] include::../types/concat.asciidoc[] include::../examples/concat.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/cos.asciidoc b/docs/reference/esql/functions/layout/cos.asciidoc index 0ac8391a8d226..1bb3e2544bc6f 100644 --- a/docs/reference/esql/functions/layout/cos.asciidoc +++ b/docs/reference/esql/functions/layout/cos.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-cos]] === `COS` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/cos.asciidoc[] include::../description/cos.asciidoc[] include::../types/cos.asciidoc[] include::../examples/cos.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/cosh.asciidoc b/docs/reference/esql/functions/layout/cosh.asciidoc index 7ccb1d6aa0ad1..175b7b23324ce 100644 --- a/docs/reference/esql/functions/layout/cosh.asciidoc +++ b/docs/reference/esql/functions/layout/cosh.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-cosh]] === `COSH` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/cosh.asciidoc[] include::../description/cosh.asciidoc[] include::../types/cosh.asciidoc[] include::../examples/cosh.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/date_diff.asciidoc b/docs/reference/esql/functions/layout/date_diff.asciidoc index 47810cc124124..8b2c6397578c3 100644 --- a/docs/reference/esql/functions/layout/date_diff.asciidoc +++ b/docs/reference/esql/functions/layout/date_diff.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-date_diff]] === `DATE_DIFF` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/date_diff.asciidoc[] include::../description/date_diff.asciidoc[] include::../types/date_diff.asciidoc[] include::../examples/date_diff.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/date_extract.asciidoc b/docs/reference/esql/functions/layout/date_extract.asciidoc index c0f9cc64b57cd..45e1bed3c78ee 100644 --- a/docs/reference/esql/functions/layout/date_extract.asciidoc +++ b/docs/reference/esql/functions/layout/date_extract.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-date_extract]] === `DATE_EXTRACT` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/date_extract.asciidoc[] include::../description/date_extract.asciidoc[] include::../types/date_extract.asciidoc[] include::../examples/date_extract.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/date_format.asciidoc b/docs/reference/esql/functions/layout/date_format.asciidoc index 95f979aab9b25..a79e4cae63e9b 100644 --- a/docs/reference/esql/functions/layout/date_format.asciidoc +++ b/docs/reference/esql/functions/layout/date_format.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-date_format]] === `DATE_FORMAT` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/date_format.asciidoc[] include::../description/date_format.asciidoc[] include::../types/date_format.asciidoc[] include::../examples/date_format.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/date_parse.asciidoc b/docs/reference/esql/functions/layout/date_parse.asciidoc index 681ebca16acd5..965c750c99e37 100644 --- a/docs/reference/esql/functions/layout/date_parse.asciidoc +++ b/docs/reference/esql/functions/layout/date_parse.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-date_parse]] === `DATE_PARSE` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/date_parse.asciidoc[] include::../description/date_parse.asciidoc[] include::../types/date_parse.asciidoc[] include::../examples/date_parse.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/date_trunc.asciidoc b/docs/reference/esql/functions/layout/date_trunc.asciidoc index 50d4ec3149084..0bd9ce4b4dbe4 100644 --- a/docs/reference/esql/functions/layout/date_trunc.asciidoc +++ b/docs/reference/esql/functions/layout/date_trunc.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-date_trunc]] === `DATE_TRUNC` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/date_trunc.asciidoc[] include::../description/date_trunc.asciidoc[] include::../types/date_trunc.asciidoc[] include::../examples/date_trunc.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/div.asciidoc b/docs/reference/esql/functions/layout/div.asciidoc index 4af9ea05689e7..7bc50b2ca3130 100644 --- a/docs/reference/esql/functions/layout/div.asciidoc +++ b/docs/reference/esql/functions/layout/div.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-div]] === `DIV` -//tag::body[] *Syntax* @@ -13,4 +12,3 @@ image::esql/functions/signature/div.svg[Embedded,opts=inline] include::../parameters/div.asciidoc[] include::../description/div.asciidoc[] include::../types/div.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/e.asciidoc b/docs/reference/esql/functions/layout/e.asciidoc index c831c554be6cc..2c353f4e4ae4f 100644 --- a/docs/reference/esql/functions/layout/e.asciidoc +++ b/docs/reference/esql/functions/layout/e.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-e]] === `E` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/e.asciidoc[] include::../description/e.asciidoc[] include::../types/e.asciidoc[] include::../examples/e.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/ends_with.asciidoc b/docs/reference/esql/functions/layout/ends_with.asciidoc index 80c95eb23e5c4..cae847bfa805e 100644 --- a/docs/reference/esql/functions/layout/ends_with.asciidoc +++ b/docs/reference/esql/functions/layout/ends_with.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-ends_with]] === `ENDS_WITH` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/ends_with.asciidoc[] include::../description/ends_with.asciidoc[] include::../types/ends_with.asciidoc[] include::../examples/ends_with.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/equals.asciidoc b/docs/reference/esql/functions/layout/equals.asciidoc index e2d0db9975ba8..6a8099838b3a6 100644 --- a/docs/reference/esql/functions/layout/equals.asciidoc +++ b/docs/reference/esql/functions/layout/equals.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-equals]] === `EQUALS` -//tag::body[] *Syntax* @@ -13,4 +12,3 @@ image::esql/functions/signature/equals.svg[Embedded,opts=inline] include::../parameters/equals.asciidoc[] include::../description/equals.asciidoc[] include::../types/equals.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/floor.asciidoc b/docs/reference/esql/functions/layout/floor.asciidoc index 03038ea8dbb23..0c26c4fda36c2 100644 --- a/docs/reference/esql/functions/layout/floor.asciidoc +++ b/docs/reference/esql/functions/layout/floor.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-floor]] === `FLOOR` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/floor.asciidoc[] include::../description/floor.asciidoc[] include::../types/floor.asciidoc[] include::../examples/floor.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/from_base64.asciidoc b/docs/reference/esql/functions/layout/from_base64.asciidoc index a8c9e3f646f12..72711866c8b02 100644 --- a/docs/reference/esql/functions/layout/from_base64.asciidoc +++ b/docs/reference/esql/functions/layout/from_base64.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-from_base64]] === `FROM_BASE64` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/from_base64.asciidoc[] include::../description/from_base64.asciidoc[] include::../types/from_base64.asciidoc[] include::../examples/from_base64.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/greater_than.asciidoc b/docs/reference/esql/functions/layout/greater_than.asciidoc index de9d7c9109c8d..d2c52993a5224 100644 --- a/docs/reference/esql/functions/layout/greater_than.asciidoc +++ b/docs/reference/esql/functions/layout/greater_than.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-greater_than]] === `GREATER_THAN` -//tag::body[] *Syntax* @@ -13,4 +12,3 @@ image::esql/functions/signature/greater_than.svg[Embedded,opts=inline] include::../parameters/greater_than.asciidoc[] include::../description/greater_than.asciidoc[] include::../types/greater_than.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/greater_than_or_equal.asciidoc b/docs/reference/esql/functions/layout/greater_than_or_equal.asciidoc index 1339ac92dcbc7..b3b3a88664ffd 100644 --- a/docs/reference/esql/functions/layout/greater_than_or_equal.asciidoc +++ b/docs/reference/esql/functions/layout/greater_than_or_equal.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-greater_than_or_equal]] === `GREATER_THAN_OR_EQUAL` -//tag::body[] *Syntax* @@ -13,4 +12,3 @@ image::esql/functions/signature/greater_than_or_equal.svg[Embedded,opts=inline] include::../parameters/greater_than_or_equal.asciidoc[] include::../description/greater_than_or_equal.asciidoc[] include::../types/greater_than_or_equal.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/greatest.asciidoc b/docs/reference/esql/functions/layout/greatest.asciidoc index c297dba0f381e..fff9a32412947 100644 --- a/docs/reference/esql/functions/layout/greatest.asciidoc +++ b/docs/reference/esql/functions/layout/greatest.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-greatest]] === `GREATEST` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/greatest.asciidoc[] include::../description/greatest.asciidoc[] include::../types/greatest.asciidoc[] include::../examples/greatest.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/in.asciidoc b/docs/reference/esql/functions/layout/in.asciidoc new file mode 100644 index 0000000000000..b5a421cfd370e --- /dev/null +++ b/docs/reference/esql/functions/layout/in.asciidoc @@ -0,0 +1,15 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-in]] +=== `IN` + +*Syntax* + +[.text-center] +image::esql/functions/signature/in.svg[Embedded,opts=inline] + +include::../parameters/in.asciidoc[] +include::../description/in.asciidoc[] +include::../types/in.asciidoc[] +include::../examples/in.asciidoc[] diff --git a/docs/reference/esql/functions/layout/least.asciidoc b/docs/reference/esql/functions/layout/least.asciidoc index 7088d21c176e8..0daee9c181a65 100644 --- a/docs/reference/esql/functions/layout/least.asciidoc +++ b/docs/reference/esql/functions/layout/least.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-least]] === `LEAST` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/least.asciidoc[] include::../description/least.asciidoc[] include::../types/least.asciidoc[] include::../examples/least.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/left.asciidoc b/docs/reference/esql/functions/layout/left.asciidoc index 21afac7a98a81..3a995a2f9a247 100644 --- a/docs/reference/esql/functions/layout/left.asciidoc +++ b/docs/reference/esql/functions/layout/left.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-left]] === `LEFT` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/left.asciidoc[] include::../description/left.asciidoc[] include::../types/left.asciidoc[] include::../examples/left.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/length.asciidoc b/docs/reference/esql/functions/layout/length.asciidoc index d0c21520c337f..f8521f8223b1f 100644 --- a/docs/reference/esql/functions/layout/length.asciidoc +++ b/docs/reference/esql/functions/layout/length.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-length]] === `LENGTH` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/length.asciidoc[] include::../description/length.asciidoc[] include::../types/length.asciidoc[] include::../examples/length.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/less_than.asciidoc b/docs/reference/esql/functions/layout/less_than.asciidoc index 7e352d9626dd3..e0c9a77ded356 100644 --- a/docs/reference/esql/functions/layout/less_than.asciidoc +++ b/docs/reference/esql/functions/layout/less_than.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-less_than]] === `LESS_THAN` -//tag::body[] *Syntax* @@ -13,4 +12,3 @@ image::esql/functions/signature/less_than.svg[Embedded,opts=inline] include::../parameters/less_than.asciidoc[] include::../description/less_than.asciidoc[] include::../types/less_than.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/less_than_or_equal.asciidoc b/docs/reference/esql/functions/layout/less_than_or_equal.asciidoc index e4f6599c733f6..cab825344db8c 100644 --- a/docs/reference/esql/functions/layout/less_than_or_equal.asciidoc +++ b/docs/reference/esql/functions/layout/less_than_or_equal.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-less_than_or_equal]] === `LESS_THAN_OR_EQUAL` -//tag::body[] *Syntax* @@ -13,4 +12,3 @@ image::esql/functions/signature/less_than_or_equal.svg[Embedded,opts=inline] include::../parameters/less_than_or_equal.asciidoc[] include::../description/less_than_or_equal.asciidoc[] include::../types/less_than_or_equal.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/like.asciidoc b/docs/reference/esql/functions/layout/like.asciidoc index 6434a4923b862..7ef057a93fdfe 100644 --- a/docs/reference/esql/functions/layout/like.asciidoc +++ b/docs/reference/esql/functions/layout/like.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-like]] === `LIKE` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/like.asciidoc[] include::../description/like.asciidoc[] include::../types/like.asciidoc[] include::../examples/like.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/locate.asciidoc b/docs/reference/esql/functions/layout/locate.asciidoc index c130dd7a6e927..cbd67a9aba495 100644 --- a/docs/reference/esql/functions/layout/locate.asciidoc +++ b/docs/reference/esql/functions/layout/locate.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-locate]] === `LOCATE` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/locate.asciidoc[] include::../description/locate.asciidoc[] include::../types/locate.asciidoc[] include::../examples/locate.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/log.asciidoc b/docs/reference/esql/functions/layout/log.asciidoc index 7e4c10ef882ca..2cefb5ffa551e 100644 --- a/docs/reference/esql/functions/layout/log.asciidoc +++ b/docs/reference/esql/functions/layout/log.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-log]] === `LOG` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/log.asciidoc[] include::../description/log.asciidoc[] include::../types/log.asciidoc[] include::../examples/log.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/log10.asciidoc b/docs/reference/esql/functions/layout/log10.asciidoc index 28e9d0184b64e..e1f3e9f330ed6 100644 --- a/docs/reference/esql/functions/layout/log10.asciidoc +++ b/docs/reference/esql/functions/layout/log10.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-log10]] === `LOG10` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/log10.asciidoc[] include::../description/log10.asciidoc[] include::../types/log10.asciidoc[] include::../examples/log10.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/ltrim.asciidoc b/docs/reference/esql/functions/layout/ltrim.asciidoc index 1afb0a05f3816..7a325897292c9 100644 --- a/docs/reference/esql/functions/layout/ltrim.asciidoc +++ b/docs/reference/esql/functions/layout/ltrim.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-ltrim]] === `LTRIM` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/ltrim.asciidoc[] include::../description/ltrim.asciidoc[] include::../types/ltrim.asciidoc[] include::../examples/ltrim.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/mod.asciidoc b/docs/reference/esql/functions/layout/mod.asciidoc index 616bb3b22b142..dd30ae9f4a70f 100644 --- a/docs/reference/esql/functions/layout/mod.asciidoc +++ b/docs/reference/esql/functions/layout/mod.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-mod]] === `MOD` -//tag::body[] *Syntax* @@ -13,4 +12,3 @@ image::esql/functions/signature/mod.svg[Embedded,opts=inline] include::../parameters/mod.asciidoc[] include::../description/mod.asciidoc[] include::../types/mod.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/mul.asciidoc b/docs/reference/esql/functions/layout/mul.asciidoc index 689a2e9798b46..7425b5cf3436f 100644 --- a/docs/reference/esql/functions/layout/mul.asciidoc +++ b/docs/reference/esql/functions/layout/mul.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-mul]] === `MUL` -//tag::body[] *Syntax* @@ -13,4 +12,3 @@ image::esql/functions/signature/mul.svg[Embedded,opts=inline] include::../parameters/mul.asciidoc[] include::../description/mul.asciidoc[] include::../types/mul.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_avg.asciidoc b/docs/reference/esql/functions/layout/mv_avg.asciidoc index c1fce1be45028..3fb0cb6c1b3aa 100644 --- a/docs/reference/esql/functions/layout/mv_avg.asciidoc +++ b/docs/reference/esql/functions/layout/mv_avg.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-mv_avg]] === `MV_AVG` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/mv_avg.asciidoc[] include::../description/mv_avg.asciidoc[] include::../types/mv_avg.asciidoc[] include::../examples/mv_avg.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_concat.asciidoc b/docs/reference/esql/functions/layout/mv_concat.asciidoc index 9ed5182c58fd3..b53acec31fefa 100644 --- a/docs/reference/esql/functions/layout/mv_concat.asciidoc +++ b/docs/reference/esql/functions/layout/mv_concat.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-mv_concat]] === `MV_CONCAT` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/mv_concat.asciidoc[] include::../description/mv_concat.asciidoc[] include::../types/mv_concat.asciidoc[] include::../examples/mv_concat.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_count.asciidoc b/docs/reference/esql/functions/layout/mv_count.asciidoc index fd1cf15e49588..c1df3a2f97508 100644 --- a/docs/reference/esql/functions/layout/mv_count.asciidoc +++ b/docs/reference/esql/functions/layout/mv_count.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-mv_count]] === `MV_COUNT` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/mv_count.asciidoc[] include::../description/mv_count.asciidoc[] include::../types/mv_count.asciidoc[] include::../examples/mv_count.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_dedupe.asciidoc b/docs/reference/esql/functions/layout/mv_dedupe.asciidoc index cf2b982f860ca..f5d602a0f27bc 100644 --- a/docs/reference/esql/functions/layout/mv_dedupe.asciidoc +++ b/docs/reference/esql/functions/layout/mv_dedupe.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-mv_dedupe]] === `MV_DEDUPE` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/mv_dedupe.asciidoc[] include::../description/mv_dedupe.asciidoc[] include::../types/mv_dedupe.asciidoc[] include::../examples/mv_dedupe.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_first.asciidoc b/docs/reference/esql/functions/layout/mv_first.asciidoc index 250a553da97f1..42f0d36b879a0 100644 --- a/docs/reference/esql/functions/layout/mv_first.asciidoc +++ b/docs/reference/esql/functions/layout/mv_first.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-mv_first]] === `MV_FIRST` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/mv_first.asciidoc[] include::../description/mv_first.asciidoc[] include::../types/mv_first.asciidoc[] include::../examples/mv_first.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_last.asciidoc b/docs/reference/esql/functions/layout/mv_last.asciidoc index f6327c9115164..94ffddafeb749 100644 --- a/docs/reference/esql/functions/layout/mv_last.asciidoc +++ b/docs/reference/esql/functions/layout/mv_last.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-mv_last]] === `MV_LAST` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/mv_last.asciidoc[] include::../description/mv_last.asciidoc[] include::../types/mv_last.asciidoc[] include::../examples/mv_last.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_max.asciidoc b/docs/reference/esql/functions/layout/mv_max.asciidoc index d649ea0885fa2..39c3f6864ecb6 100644 --- a/docs/reference/esql/functions/layout/mv_max.asciidoc +++ b/docs/reference/esql/functions/layout/mv_max.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-mv_max]] === `MV_MAX` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/mv_max.asciidoc[] include::../description/mv_max.asciidoc[] include::../types/mv_max.asciidoc[] include::../examples/mv_max.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_median.asciidoc b/docs/reference/esql/functions/layout/mv_median.asciidoc index 6c6faf5b3dfc8..4f99e92a19318 100644 --- a/docs/reference/esql/functions/layout/mv_median.asciidoc +++ b/docs/reference/esql/functions/layout/mv_median.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-mv_median]] === `MV_MEDIAN` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/mv_median.asciidoc[] include::../description/mv_median.asciidoc[] include::../types/mv_median.asciidoc[] include::../examples/mv_median.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_min.asciidoc b/docs/reference/esql/functions/layout/mv_min.asciidoc index 06e8b445fdc37..dbb9931a27b93 100644 --- a/docs/reference/esql/functions/layout/mv_min.asciidoc +++ b/docs/reference/esql/functions/layout/mv_min.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-mv_min]] === `MV_MIN` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/mv_min.asciidoc[] include::../description/mv_min.asciidoc[] include::../types/mv_min.asciidoc[] include::../examples/mv_min.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_slice.asciidoc b/docs/reference/esql/functions/layout/mv_slice.asciidoc index 6a69287033800..4d395137756e3 100644 --- a/docs/reference/esql/functions/layout/mv_slice.asciidoc +++ b/docs/reference/esql/functions/layout/mv_slice.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-mv_slice]] === `MV_SLICE` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/mv_slice.asciidoc[] include::../description/mv_slice.asciidoc[] include::../types/mv_slice.asciidoc[] include::../examples/mv_slice.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_sort.asciidoc b/docs/reference/esql/functions/layout/mv_sort.asciidoc index ff8033afdbab3..05371a61dfc00 100644 --- a/docs/reference/esql/functions/layout/mv_sort.asciidoc +++ b/docs/reference/esql/functions/layout/mv_sort.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-mv_sort]] === `MV_SORT` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/mv_sort.asciidoc[] include::../description/mv_sort.asciidoc[] include::../types/mv_sort.asciidoc[] include::../examples/mv_sort.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_sum.asciidoc b/docs/reference/esql/functions/layout/mv_sum.asciidoc index e2eca72b22740..0047362962781 100644 --- a/docs/reference/esql/functions/layout/mv_sum.asciidoc +++ b/docs/reference/esql/functions/layout/mv_sum.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-mv_sum]] === `MV_SUM` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/mv_sum.asciidoc[] include::../description/mv_sum.asciidoc[] include::../types/mv_sum.asciidoc[] include::../examples/mv_sum.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/mv_zip.asciidoc b/docs/reference/esql/functions/layout/mv_zip.asciidoc index f4b6f85e59109..1ed432c44d27d 100644 --- a/docs/reference/esql/functions/layout/mv_zip.asciidoc +++ b/docs/reference/esql/functions/layout/mv_zip.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-mv_zip]] === `MV_ZIP` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/mv_zip.asciidoc[] include::../description/mv_zip.asciidoc[] include::../types/mv_zip.asciidoc[] include::../examples/mv_zip.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/neg.asciidoc b/docs/reference/esql/functions/layout/neg.asciidoc index 6aff125d0d99e..98b97f8714a9b 100644 --- a/docs/reference/esql/functions/layout/neg.asciidoc +++ b/docs/reference/esql/functions/layout/neg.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-neg]] === `NEG` -//tag::body[] *Syntax* @@ -13,4 +12,3 @@ image::esql/functions/signature/neg.svg[Embedded,opts=inline] include::../parameters/neg.asciidoc[] include::../description/neg.asciidoc[] include::../types/neg.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/not_equals.asciidoc b/docs/reference/esql/functions/layout/not_equals.asciidoc index 073f0e4d10443..718ae22375c9b 100644 --- a/docs/reference/esql/functions/layout/not_equals.asciidoc +++ b/docs/reference/esql/functions/layout/not_equals.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-not_equals]] === `NOT_EQUALS` -//tag::body[] *Syntax* @@ -13,4 +12,3 @@ image::esql/functions/signature/not_equals.svg[Embedded,opts=inline] include::../parameters/not_equals.asciidoc[] include::../description/not_equals.asciidoc[] include::../types/not_equals.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/now.asciidoc b/docs/reference/esql/functions/layout/now.asciidoc index 875b250876b14..52341c1665619 100644 --- a/docs/reference/esql/functions/layout/now.asciidoc +++ b/docs/reference/esql/functions/layout/now.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-now]] === `NOW` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/now.asciidoc[] include::../description/now.asciidoc[] include::../types/now.asciidoc[] include::../examples/now.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/pi.asciidoc b/docs/reference/esql/functions/layout/pi.asciidoc index 9ee960a76eee1..37fd1b80bac41 100644 --- a/docs/reference/esql/functions/layout/pi.asciidoc +++ b/docs/reference/esql/functions/layout/pi.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-pi]] === `PI` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/pi.asciidoc[] include::../description/pi.asciidoc[] include::../types/pi.asciidoc[] include::../examples/pi.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/pow.asciidoc b/docs/reference/esql/functions/layout/pow.asciidoc index 45071f9842cff..3adaff72d26be 100644 --- a/docs/reference/esql/functions/layout/pow.asciidoc +++ b/docs/reference/esql/functions/layout/pow.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-pow]] === `POW` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/pow.asciidoc[] include::../description/pow.asciidoc[] include::../types/pow.asciidoc[] include::../examples/pow.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/replace.asciidoc b/docs/reference/esql/functions/layout/replace.asciidoc index 0b907bd090243..475556228472e 100644 --- a/docs/reference/esql/functions/layout/replace.asciidoc +++ b/docs/reference/esql/functions/layout/replace.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-replace]] === `REPLACE` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/replace.asciidoc[] include::../description/replace.asciidoc[] include::../types/replace.asciidoc[] include::../examples/replace.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/right.asciidoc b/docs/reference/esql/functions/layout/right.asciidoc index 825e246458ca1..3b6d427bf4b3a 100644 --- a/docs/reference/esql/functions/layout/right.asciidoc +++ b/docs/reference/esql/functions/layout/right.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-right]] === `RIGHT` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/right.asciidoc[] include::../description/right.asciidoc[] include::../types/right.asciidoc[] include::../examples/right.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/rlike.asciidoc b/docs/reference/esql/functions/layout/rlike.asciidoc index e25e5dc806ff2..0e86f6768e6df 100644 --- a/docs/reference/esql/functions/layout/rlike.asciidoc +++ b/docs/reference/esql/functions/layout/rlike.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-rlike]] === `RLIKE` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/rlike.asciidoc[] include::../description/rlike.asciidoc[] include::../types/rlike.asciidoc[] include::../examples/rlike.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/round.asciidoc b/docs/reference/esql/functions/layout/round.asciidoc index 63b5ec2856a07..2fbcffd814747 100644 --- a/docs/reference/esql/functions/layout/round.asciidoc +++ b/docs/reference/esql/functions/layout/round.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-round]] === `ROUND` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/round.asciidoc[] include::../description/round.asciidoc[] include::../types/round.asciidoc[] include::../examples/round.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/rtrim.asciidoc b/docs/reference/esql/functions/layout/rtrim.asciidoc index f331710eb6489..d12168d6d7954 100644 --- a/docs/reference/esql/functions/layout/rtrim.asciidoc +++ b/docs/reference/esql/functions/layout/rtrim.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-rtrim]] === `RTRIM` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/rtrim.asciidoc[] include::../description/rtrim.asciidoc[] include::../types/rtrim.asciidoc[] include::../examples/rtrim.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/signum.asciidoc b/docs/reference/esql/functions/layout/signum.asciidoc index 9a23c53ec5bb5..f5b565993f392 100644 --- a/docs/reference/esql/functions/layout/signum.asciidoc +++ b/docs/reference/esql/functions/layout/signum.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-signum]] === `SIGNUM` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/signum.asciidoc[] include::../description/signum.asciidoc[] include::../types/signum.asciidoc[] include::../examples/signum.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/sin.asciidoc b/docs/reference/esql/functions/layout/sin.asciidoc index 6c991ed2bb09f..465bbd441f689 100644 --- a/docs/reference/esql/functions/layout/sin.asciidoc +++ b/docs/reference/esql/functions/layout/sin.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-sin]] === `SIN` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/sin.asciidoc[] include::../description/sin.asciidoc[] include::../types/sin.asciidoc[] include::../examples/sin.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/sinh.asciidoc b/docs/reference/esql/functions/layout/sinh.asciidoc index be8ef51a6e888..11ae1a8b0403f 100644 --- a/docs/reference/esql/functions/layout/sinh.asciidoc +++ b/docs/reference/esql/functions/layout/sinh.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-sinh]] === `SINH` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/sinh.asciidoc[] include::../description/sinh.asciidoc[] include::../types/sinh.asciidoc[] include::../examples/sinh.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/split.asciidoc b/docs/reference/esql/functions/layout/split.asciidoc index 306e8b44290e6..5a588fa519bdb 100644 --- a/docs/reference/esql/functions/layout/split.asciidoc +++ b/docs/reference/esql/functions/layout/split.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-split]] === `SPLIT` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/split.asciidoc[] include::../description/split.asciidoc[] include::../types/split.asciidoc[] include::../examples/split.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/sqrt.asciidoc b/docs/reference/esql/functions/layout/sqrt.asciidoc index 55c89e18bd795..424c737da7009 100644 --- a/docs/reference/esql/functions/layout/sqrt.asciidoc +++ b/docs/reference/esql/functions/layout/sqrt.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-sqrt]] === `SQRT` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/sqrt.asciidoc[] include::../description/sqrt.asciidoc[] include::../types/sqrt.asciidoc[] include::../examples/sqrt.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/st_contains.asciidoc b/docs/reference/esql/functions/layout/st_contains.asciidoc index 79a3b67291447..d2b115b5bd727 100644 --- a/docs/reference/esql/functions/layout/st_contains.asciidoc +++ b/docs/reference/esql/functions/layout/st_contains.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-st_contains]] === `ST_CONTAINS` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/st_contains.asciidoc[] include::../description/st_contains.asciidoc[] include::../types/st_contains.asciidoc[] include::../examples/st_contains.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/st_disjoint.asciidoc b/docs/reference/esql/functions/layout/st_disjoint.asciidoc index c585882ea956d..a1eef41006f3e 100644 --- a/docs/reference/esql/functions/layout/st_disjoint.asciidoc +++ b/docs/reference/esql/functions/layout/st_disjoint.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-st_disjoint]] === `ST_DISJOINT` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/st_disjoint.asciidoc[] include::../description/st_disjoint.asciidoc[] include::../types/st_disjoint.asciidoc[] include::../examples/st_disjoint.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/st_intersects.asciidoc b/docs/reference/esql/functions/layout/st_intersects.asciidoc index 846adbfe54d7b..820bfd2c1fee6 100644 --- a/docs/reference/esql/functions/layout/st_intersects.asciidoc +++ b/docs/reference/esql/functions/layout/st_intersects.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-st_intersects]] === `ST_INTERSECTS` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/st_intersects.asciidoc[] include::../description/st_intersects.asciidoc[] include::../types/st_intersects.asciidoc[] include::../examples/st_intersects.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/st_within.asciidoc b/docs/reference/esql/functions/layout/st_within.asciidoc index 7c1c00f5fee8e..38e367abc3c31 100644 --- a/docs/reference/esql/functions/layout/st_within.asciidoc +++ b/docs/reference/esql/functions/layout/st_within.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-st_within]] === `ST_WITHIN` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/st_within.asciidoc[] include::../description/st_within.asciidoc[] include::../types/st_within.asciidoc[] include::../examples/st_within.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/st_x.asciidoc b/docs/reference/esql/functions/layout/st_x.asciidoc index 64ef491290e13..2c2dc191a31a4 100644 --- a/docs/reference/esql/functions/layout/st_x.asciidoc +++ b/docs/reference/esql/functions/layout/st_x.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-st_x]] === `ST_X` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/st_x.asciidoc[] include::../description/st_x.asciidoc[] include::../types/st_x.asciidoc[] include::../examples/st_x.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/st_y.asciidoc b/docs/reference/esql/functions/layout/st_y.asciidoc index c5709ac5ae270..0708465760bb3 100644 --- a/docs/reference/esql/functions/layout/st_y.asciidoc +++ b/docs/reference/esql/functions/layout/st_y.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-st_y]] === `ST_Y` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/st_y.asciidoc[] include::../description/st_y.asciidoc[] include::../types/st_y.asciidoc[] include::../examples/st_y.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/starts_with.asciidoc b/docs/reference/esql/functions/layout/starts_with.asciidoc index 3feeccec988e5..748270b50e300 100644 --- a/docs/reference/esql/functions/layout/starts_with.asciidoc +++ b/docs/reference/esql/functions/layout/starts_with.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-starts_with]] === `STARTS_WITH` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/starts_with.asciidoc[] include::../description/starts_with.asciidoc[] include::../types/starts_with.asciidoc[] include::../examples/starts_with.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/sub.asciidoc b/docs/reference/esql/functions/layout/sub.asciidoc index d9dd7225792fa..7406859a80873 100644 --- a/docs/reference/esql/functions/layout/sub.asciidoc +++ b/docs/reference/esql/functions/layout/sub.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-sub]] === `SUB` -//tag::body[] *Syntax* @@ -13,4 +12,3 @@ image::esql/functions/signature/sub.svg[Embedded,opts=inline] include::../parameters/sub.asciidoc[] include::../description/sub.asciidoc[] include::../types/sub.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/substring.asciidoc b/docs/reference/esql/functions/layout/substring.asciidoc index df7dd0fa93388..bb5b68543fd78 100644 --- a/docs/reference/esql/functions/layout/substring.asciidoc +++ b/docs/reference/esql/functions/layout/substring.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-substring]] === `SUBSTRING` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/substring.asciidoc[] include::../description/substring.asciidoc[] include::../types/substring.asciidoc[] include::../examples/substring.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/tan.asciidoc b/docs/reference/esql/functions/layout/tan.asciidoc index 3cbae887eb601..2723076238228 100644 --- a/docs/reference/esql/functions/layout/tan.asciidoc +++ b/docs/reference/esql/functions/layout/tan.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-tan]] === `TAN` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/tan.asciidoc[] include::../description/tan.asciidoc[] include::../types/tan.asciidoc[] include::../examples/tan.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/tanh.asciidoc b/docs/reference/esql/functions/layout/tanh.asciidoc index 8a7dd8bb78bc4..338d8574d4949 100644 --- a/docs/reference/esql/functions/layout/tanh.asciidoc +++ b/docs/reference/esql/functions/layout/tanh.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-tanh]] === `TANH` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/tanh.asciidoc[] include::../description/tanh.asciidoc[] include::../types/tanh.asciidoc[] include::../examples/tanh.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/tau.asciidoc b/docs/reference/esql/functions/layout/tau.asciidoc index 40f12d36a873e..80397a814f9f5 100644 --- a/docs/reference/esql/functions/layout/tau.asciidoc +++ b/docs/reference/esql/functions/layout/tau.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-tau]] === `TAU` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/tau.asciidoc[] include::../description/tau.asciidoc[] include::../types/tau.asciidoc[] include::../examples/tau.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_base64.asciidoc b/docs/reference/esql/functions/layout/to_base64.asciidoc index d7435347b2e34..8b8a552c0cd7b 100644 --- a/docs/reference/esql/functions/layout/to_base64.asciidoc +++ b/docs/reference/esql/functions/layout/to_base64.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_base64]] === `TO_BASE64` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_base64.asciidoc[] include::../description/to_base64.asciidoc[] include::../types/to_base64.asciidoc[] include::../examples/to_base64.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_boolean.asciidoc b/docs/reference/esql/functions/layout/to_boolean.asciidoc index 4f6f5109e71f9..eb1f00feeba07 100644 --- a/docs/reference/esql/functions/layout/to_boolean.asciidoc +++ b/docs/reference/esql/functions/layout/to_boolean.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_boolean]] === `TO_BOOLEAN` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_boolean.asciidoc[] include::../description/to_boolean.asciidoc[] include::../types/to_boolean.asciidoc[] include::../examples/to_boolean.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_cartesianpoint.asciidoc b/docs/reference/esql/functions/layout/to_cartesianpoint.asciidoc index 5164351d00012..ab086f6c96ff0 100644 --- a/docs/reference/esql/functions/layout/to_cartesianpoint.asciidoc +++ b/docs/reference/esql/functions/layout/to_cartesianpoint.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_cartesianpoint]] === `TO_CARTESIANPOINT` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_cartesianpoint.asciidoc[] include::../description/to_cartesianpoint.asciidoc[] include::../types/to_cartesianpoint.asciidoc[] include::../examples/to_cartesianpoint.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_cartesianshape.asciidoc b/docs/reference/esql/functions/layout/to_cartesianshape.asciidoc index 2abd7c84fcf46..53612d5b715d1 100644 --- a/docs/reference/esql/functions/layout/to_cartesianshape.asciidoc +++ b/docs/reference/esql/functions/layout/to_cartesianshape.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_cartesianshape]] === `TO_CARTESIANSHAPE` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_cartesianshape.asciidoc[] include::../description/to_cartesianshape.asciidoc[] include::../types/to_cartesianshape.asciidoc[] include::../examples/to_cartesianshape.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_datetime.asciidoc b/docs/reference/esql/functions/layout/to_datetime.asciidoc index 4cc19ae0d9df3..ef01108fb6d20 100644 --- a/docs/reference/esql/functions/layout/to_datetime.asciidoc +++ b/docs/reference/esql/functions/layout/to_datetime.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_datetime]] === `TO_DATETIME` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_datetime.asciidoc[] include::../description/to_datetime.asciidoc[] include::../types/to_datetime.asciidoc[] include::../examples/to_datetime.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_degrees.asciidoc b/docs/reference/esql/functions/layout/to_degrees.asciidoc index 259d18d824679..f0c322e285329 100644 --- a/docs/reference/esql/functions/layout/to_degrees.asciidoc +++ b/docs/reference/esql/functions/layout/to_degrees.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_degrees]] === `TO_DEGREES` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_degrees.asciidoc[] include::../description/to_degrees.asciidoc[] include::../types/to_degrees.asciidoc[] include::../examples/to_degrees.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_double.asciidoc b/docs/reference/esql/functions/layout/to_double.asciidoc index 9f79d48962710..fa5075c4267b0 100644 --- a/docs/reference/esql/functions/layout/to_double.asciidoc +++ b/docs/reference/esql/functions/layout/to_double.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_double]] === `TO_DOUBLE` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_double.asciidoc[] include::../description/to_double.asciidoc[] include::../types/to_double.asciidoc[] include::../examples/to_double.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_geopoint.asciidoc b/docs/reference/esql/functions/layout/to_geopoint.asciidoc index e3162d91b4201..ff2379bc0791a 100644 --- a/docs/reference/esql/functions/layout/to_geopoint.asciidoc +++ b/docs/reference/esql/functions/layout/to_geopoint.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_geopoint]] === `TO_GEOPOINT` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_geopoint.asciidoc[] include::../description/to_geopoint.asciidoc[] include::../types/to_geopoint.asciidoc[] include::../examples/to_geopoint.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_geoshape.asciidoc b/docs/reference/esql/functions/layout/to_geoshape.asciidoc index f31fe8260202c..2bc8afa094d3f 100644 --- a/docs/reference/esql/functions/layout/to_geoshape.asciidoc +++ b/docs/reference/esql/functions/layout/to_geoshape.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_geoshape]] === `TO_GEOSHAPE` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_geoshape.asciidoc[] include::../description/to_geoshape.asciidoc[] include::../types/to_geoshape.asciidoc[] include::../examples/to_geoshape.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_integer.asciidoc b/docs/reference/esql/functions/layout/to_integer.asciidoc index e76ed34b948e9..0667b8b3b19e5 100644 --- a/docs/reference/esql/functions/layout/to_integer.asciidoc +++ b/docs/reference/esql/functions/layout/to_integer.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_integer]] === `TO_INTEGER` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_integer.asciidoc[] include::../description/to_integer.asciidoc[] include::../types/to_integer.asciidoc[] include::../examples/to_integer.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_ip.asciidoc b/docs/reference/esql/functions/layout/to_ip.asciidoc index 15724b51169d3..2ef96ac751287 100644 --- a/docs/reference/esql/functions/layout/to_ip.asciidoc +++ b/docs/reference/esql/functions/layout/to_ip.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_ip]] === `TO_IP` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_ip.asciidoc[] include::../description/to_ip.asciidoc[] include::../types/to_ip.asciidoc[] include::../examples/to_ip.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_long.asciidoc b/docs/reference/esql/functions/layout/to_long.asciidoc index 4cb3815696485..a054c30cedae2 100644 --- a/docs/reference/esql/functions/layout/to_long.asciidoc +++ b/docs/reference/esql/functions/layout/to_long.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_long]] === `TO_LONG` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_long.asciidoc[] include::../description/to_long.asciidoc[] include::../types/to_long.asciidoc[] include::../examples/to_long.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_lower.asciidoc b/docs/reference/esql/functions/layout/to_lower.asciidoc index 8f9f4c887e0e9..76c93e05de813 100644 --- a/docs/reference/esql/functions/layout/to_lower.asciidoc +++ b/docs/reference/esql/functions/layout/to_lower.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_lower]] === `TO_LOWER` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_lower.asciidoc[] include::../description/to_lower.asciidoc[] include::../types/to_lower.asciidoc[] include::../examples/to_lower.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_radians.asciidoc b/docs/reference/esql/functions/layout/to_radians.asciidoc index d1c4091372e45..8fcd16b9f4eaa 100644 --- a/docs/reference/esql/functions/layout/to_radians.asciidoc +++ b/docs/reference/esql/functions/layout/to_radians.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_radians]] === `TO_RADIANS` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_radians.asciidoc[] include::../description/to_radians.asciidoc[] include::../types/to_radians.asciidoc[] include::../examples/to_radians.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_string.asciidoc b/docs/reference/esql/functions/layout/to_string.asciidoc index 7a09855a8de1d..b8baac61cb34d 100644 --- a/docs/reference/esql/functions/layout/to_string.asciidoc +++ b/docs/reference/esql/functions/layout/to_string.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_string]] === `TO_STRING` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_string.asciidoc[] include::../description/to_string.asciidoc[] include::../types/to_string.asciidoc[] include::../examples/to_string.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_unsigned_long.asciidoc b/docs/reference/esql/functions/layout/to_unsigned_long.asciidoc index e3ef8ff945c88..61ffe05f75b6a 100644 --- a/docs/reference/esql/functions/layout/to_unsigned_long.asciidoc +++ b/docs/reference/esql/functions/layout/to_unsigned_long.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_unsigned_long]] === `TO_UNSIGNED_LONG` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_unsigned_long.asciidoc[] include::../description/to_unsigned_long.asciidoc[] include::../types/to_unsigned_long.asciidoc[] include::../examples/to_unsigned_long.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_upper.asciidoc b/docs/reference/esql/functions/layout/to_upper.asciidoc index 644d61d19bbec..78d2ff80aa78d 100644 --- a/docs/reference/esql/functions/layout/to_upper.asciidoc +++ b/docs/reference/esql/functions/layout/to_upper.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_upper]] === `TO_UPPER` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_upper.asciidoc[] include::../description/to_upper.asciidoc[] include::../types/to_upper.asciidoc[] include::../examples/to_upper.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/to_version.asciidoc b/docs/reference/esql/functions/layout/to_version.asciidoc index 38089f1e278bb..5bacebc30a187 100644 --- a/docs/reference/esql/functions/layout/to_version.asciidoc +++ b/docs/reference/esql/functions/layout/to_version.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-to_version]] === `TO_VERSION` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/to_version.asciidoc[] include::../description/to_version.asciidoc[] include::../types/to_version.asciidoc[] include::../examples/to_version.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/layout/trim.asciidoc b/docs/reference/esql/functions/layout/trim.asciidoc index 46aea723a5444..3214e528bd40c 100644 --- a/docs/reference/esql/functions/layout/trim.asciidoc +++ b/docs/reference/esql/functions/layout/trim.asciidoc @@ -3,7 +3,6 @@ [discrete] [[esql-trim]] === `TRIM` -//tag::body[] *Syntax* @@ -14,4 +13,3 @@ include::../parameters/trim.asciidoc[] include::../description/trim.asciidoc[] include::../types/trim.asciidoc[] include::../examples/trim.asciidoc[] -//end::body[] diff --git a/docs/reference/esql/functions/operators.asciidoc b/docs/reference/esql/functions/operators.asciidoc index 22f889dca8862..4bb410500449b 100644 --- a/docs/reference/esql/functions/operators.asciidoc +++ b/docs/reference/esql/functions/operators.asciidoc @@ -13,7 +13,7 @@ Boolean operators for comparing against one or multiple expressions. * <> * <> * <> -* <> +* <> * <> * <> // end::op_list[] @@ -23,6 +23,6 @@ include::unary.asciidoc[] include::logical.asciidoc[] include::predicates.asciidoc[] include::cast.asciidoc[] -include::in.asciidoc[] +include::layout/in.asciidoc[] include::layout/like.asciidoc[] include::layout/rlike.asciidoc[] diff --git a/docs/reference/esql/functions/parameters/in.asciidoc b/docs/reference/esql/functions/parameters/in.asciidoc new file mode 100644 index 0000000000000..08c34183e5e52 --- /dev/null +++ b/docs/reference/esql/functions/parameters/in.asciidoc @@ -0,0 +1,9 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`field`:: +An expression. + +`inlist`:: +A list of items. diff --git a/docs/reference/esql/functions/signature/in.svg b/docs/reference/esql/functions/signature/in.svg new file mode 100644 index 0000000000000..f31ce1b5e2b32 --- /dev/null +++ b/docs/reference/esql/functions/signature/in.svg @@ -0,0 +1 @@ +IN(field,inlist) \ No newline at end of file diff --git a/docs/reference/esql/functions/types/in.asciidoc b/docs/reference/esql/functions/types/in.asciidoc new file mode 100644 index 0000000000000..6ed2c250ef0ac --- /dev/null +++ b/docs/reference/esql/functions/types/in.asciidoc @@ -0,0 +1,22 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Supported types* + +[%header.monospaced.styled,format=dsv,separator=|] +|=== +field | inlist | result +boolean | boolean | boolean +cartesian_point | cartesian_point | boolean +cartesian_shape | cartesian_shape | boolean +double | double | boolean +geo_point | geo_point | boolean +geo_shape | geo_shape | boolean +integer | integer | boolean +ip | ip | boolean +keyword | keyword | boolean +keyword | text | boolean +long | long | boolean +text | keyword | boolean +text | text | boolean +version | version | boolean +|=== diff --git a/docs/reference/esql/processing-commands/where.asciidoc b/docs/reference/esql/processing-commands/where.asciidoc index 96a20ceaabc81..58a96756d2b25 100644 --- a/docs/reference/esql/processing-commands/where.asciidoc +++ b/docs/reference/esql/processing-commands/where.asciidoc @@ -53,10 +53,10 @@ For a complete list of all functions, refer to <>. include::../functions/predicates.asciidoc[tag=body] -include::../functions/layout/like.asciidoc[tag=body] +include::../functions/examples/like.asciidoc[tag=example] -include::../functions/layout/rlike.asciidoc[tag=body] +include::../functions/examples/rlike.asciidoc[tag=example] -include::../functions/in.asciidoc[tag=body] +include::../functions/examples/in.asciidoc[tag=example] For a complete list of all operators, refer to <>. diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/InMapper.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/InMapper.java index 430590e1cb240..3e0bd16d0dedd 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/InMapper.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/InMapper.java @@ -121,5 +121,20 @@ private static Block evalWithNulls(BlockFactory blockFactory, boolean[] values, public void close() { Releasables.closeExpectNoException(() -> Releasables.close(listEvaluators)); } + + @Override + public String toString() { + StringBuffer builder = new StringBuffer(); + builder.append("InExpressionEvaluator["); + builder.append(listEvaluators.get(0).toString()); + for (int i = 1; i < listEvaluators().size(); i++) { + builder.append(", "); + var evaluator = listEvaluators.get(i); + builder.append(evaluator.toString()); + } + builder.append("]"); + return builder.toString(); + } + } } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/In.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/In.java index f1cce8f3c5ed8..e6db25ddc4c4c 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/In.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/In.java @@ -41,7 +41,6 @@ public In( "boolean", "cartesian_point", "cartesian_shape", - "date", "double", "geo_point", "geo_shape", @@ -59,7 +58,6 @@ public In( "boolean", "cartesian_point", "cartesian_shape", - "date", "double", "geo_point", "geo_shape", diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java index 561ec2b538eee..297bf3e07428f 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java @@ -563,7 +563,7 @@ public final void testEvaluatorToString() { } } - public final void testFactoryToString() { + public void testFactoryToString() { Expression expression = buildFieldExpression(testCase); if (testCase.getExpectedTypeError() != null) { assertTypeResolutionFailure(expression); @@ -1458,16 +1458,11 @@ private static boolean renderExamples(FunctionInfo info) throws IOException { return true; } - private static final String BODY_BEGIN = "\n//tag::body[]\n"; - private static final String BODY_END = "//end::body[]\n"; - private static void renderFullLayout(String name, boolean hasExamples) throws IOException { String rendered = DOCS_WARNING + """ [discrete] [[esql-$NAME$]] - === `$UPPER_NAME$`""".replace("$NAME$", name).replace("$UPPER_NAME$", name.toUpperCase(Locale.ROOT)); - rendered += BODY_BEGIN; - rendered += """ + === `$UPPER_NAME$` *Syntax* @@ -1481,7 +1476,6 @@ private static void renderFullLayout(String name, boolean hasExamples) throws IO if (hasExamples) { rendered += "include::../examples/" + name + ".asciidoc[]\n"; } - rendered += BODY_END; LogManager.getLogger(getTestClass()).info("Writing layout for [{}]:\n{}", functionName(), rendered); writeToTempDir("layout", rendered, "asciidoc"); } diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/InTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/InTests.java new file mode 100644 index 0000000000000..9d8542086a6ab --- /dev/null +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/InTests.java @@ -0,0 +1,289 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +package org.elasticsearch.xpack.esql.expression.predicate.operator.comparison; + +import com.carrotsearch.randomizedtesting.annotations.Name; +import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; + +import org.apache.lucene.util.BytesRef; +import org.elasticsearch.geo.GeometryTestUtils; +import org.elasticsearch.geo.ShapeTestUtils; +import org.elasticsearch.xpack.esql.expression.function.AbstractFunctionTestCase; +import org.elasticsearch.xpack.esql.expression.function.TestCaseSupplier; +import org.elasticsearch.xpack.esql.type.EsqlDataTypes; +import org.elasticsearch.xpack.ql.expression.Expression; +import org.elasticsearch.xpack.ql.tree.Source; +import org.elasticsearch.xpack.ql.type.DataType; +import org.elasticsearch.xpack.ql.type.DataTypes; + +import java.util.ArrayList; +import java.util.List; +import java.util.function.Supplier; + +import static org.elasticsearch.xpack.ql.util.SpatialCoordinateTypes.CARTESIAN; +import static org.elasticsearch.xpack.ql.util.SpatialCoordinateTypes.GEO; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.matchesPattern; + +public class InTests extends AbstractFunctionTestCase { + public InTests(@Name("TestCase") Supplier testCaseSupplier) { + this.testCase = testCaseSupplier.get(); + } + + @ParametersFactory + public static Iterable parameters() { + List suppliers = new ArrayList<>(); + for (int i : new int[] { 1, 3 }) { + booleans(suppliers, i); + numerics(suppliers, i); + bytesRefs(suppliers, i); + } + return parameterSuppliersFromTypedData(suppliers); + } + + private static void booleans(List suppliers, int items) { + suppliers.add(new TestCaseSupplier("boolean", List.of(DataTypes.BOOLEAN, DataTypes.BOOLEAN), () -> { + List inlist = randomList(items, items, () -> randomBoolean()); + boolean field = randomBoolean(); + List args = new ArrayList<>(inlist.size() + 1); + for (Boolean i : inlist) { + args.add(new TestCaseSupplier.TypedData(i, DataTypes.BOOLEAN, "inlist" + i)); + } + args.add(new TestCaseSupplier.TypedData(field, DataTypes.BOOLEAN, "field")); + return new TestCaseSupplier.TestCase( + args, + matchesPattern("InExpressionEvaluator\\[EqualsBoolsEvaluator.*\\]"), + DataTypes.BOOLEAN, + equalTo(inlist.contains(field)) + ); + })); + } + + private static void numerics(List suppliers, int items) { + suppliers.add(new TestCaseSupplier("integer", List.of(DataTypes.INTEGER, DataTypes.INTEGER), () -> { + List inlist = randomList(items, items, () -> randomInt()); + int field = inlist.get(inlist.size() - 1); + List args = new ArrayList<>(inlist.size() + 1); + for (Integer i : inlist) { + args.add(new TestCaseSupplier.TypedData(i, DataTypes.INTEGER, "inlist" + i)); + } + args.add(new TestCaseSupplier.TypedData(field, DataTypes.INTEGER, "field")); + return new TestCaseSupplier.TestCase( + args, + matchesPattern("InExpressionEvaluator\\[EqualsIntsEvaluator.*\\]"), + DataTypes.BOOLEAN, + equalTo(inlist.contains(field)) + ); + })); + + suppliers.add(new TestCaseSupplier("long", List.of(DataTypes.LONG, DataTypes.LONG), () -> { + List inlist = randomList(items, items, () -> randomLong()); + long field = randomLong(); + List args = new ArrayList<>(inlist.size() + 1); + for (Long i : inlist) { + args.add(new TestCaseSupplier.TypedData(i, DataTypes.LONG, "inlist" + i)); + } + args.add(new TestCaseSupplier.TypedData(field, DataTypes.LONG, "field")); + return new TestCaseSupplier.TestCase( + args, + matchesPattern("InExpressionEvaluator\\[EqualsLongsEvaluator.*\\]"), + DataTypes.BOOLEAN, + equalTo(inlist.contains(field)) + ); + })); + + suppliers.add(new TestCaseSupplier("double", List.of(DataTypes.DOUBLE, DataTypes.DOUBLE), () -> { + List inlist = randomList(items, items, () -> randomDouble()); + double field = inlist.get(0); + List args = new ArrayList<>(inlist.size() + 1); + for (Double i : inlist) { + args.add(new TestCaseSupplier.TypedData(i, DataTypes.DOUBLE, "inlist" + i)); + } + args.add(new TestCaseSupplier.TypedData(field, DataTypes.DOUBLE, "field")); + return new TestCaseSupplier.TestCase( + args, + matchesPattern("InExpressionEvaluator\\[EqualsDoublesEvaluator.*\\]"), + DataTypes.BOOLEAN, + equalTo(inlist.contains(field)) + ); + })); + } + + private static void bytesRefs(List suppliers, int items) { + suppliers.add(new TestCaseSupplier("keyword", List.of(DataTypes.KEYWORD, DataTypes.KEYWORD), () -> { + List inlist = randomList(items, items, () -> randomLiteral(DataTypes.KEYWORD).value()); + Object field = inlist.get(inlist.size() - 1); + List args = new ArrayList<>(inlist.size() + 1); + for (Object i : inlist) { + args.add(new TestCaseSupplier.TypedData(i, DataTypes.KEYWORD, "inlist" + i)); + } + args.add(new TestCaseSupplier.TypedData(field, DataTypes.KEYWORD, "field")); + return new TestCaseSupplier.TestCase( + args, + matchesPattern("InExpressionEvaluator\\[EqualsKeywordsEvaluator.*\\]"), + DataTypes.BOOLEAN, + equalTo(inlist.contains(field)) + ); + })); + + suppliers.add(new TestCaseSupplier("text", List.of(DataTypes.TEXT, DataTypes.TEXT), () -> { + List inlist = randomList(items, items, () -> randomLiteral(DataTypes.TEXT).value()); + Object field = inlist.get(0); + List args = new ArrayList<>(inlist.size() + 1); + for (Object i : inlist) { + args.add(new TestCaseSupplier.TypedData(i, DataTypes.TEXT, "inlist" + i)); + } + args.add(new TestCaseSupplier.TypedData(field, DataTypes.TEXT, "field")); + return new TestCaseSupplier.TestCase( + args, + matchesPattern("InExpressionEvaluator\\[EqualsKeywordsEvaluator.*\\]"), + DataTypes.BOOLEAN, + equalTo(inlist.contains(field)) + ); + })); + + for (DataType type1 : new DataType[] { DataTypes.KEYWORD, DataTypes.TEXT }) { + for (DataType type2 : new DataType[] { DataTypes.KEYWORD, DataTypes.TEXT }) { + if (type1 == type2 || items > 1) continue; + suppliers.add(new TestCaseSupplier(type1 + " " + type2, List.of(type1, type2), () -> { + List inlist = randomList(items, items, () -> randomLiteral(type1).value()); + Object field = randomLiteral(type2).value(); + List args = new ArrayList<>(inlist.size() + 1); + for (Object i : inlist) { + args.add(new TestCaseSupplier.TypedData(i, type1, "inlist" + i)); + } + args.add(new TestCaseSupplier.TypedData(field, type2, "field")); + return new TestCaseSupplier.TestCase( + args, + matchesPattern("InExpressionEvaluator\\[EqualsKeywordsEvaluator.*\\]"), + DataTypes.BOOLEAN, + equalTo(inlist.contains(field)) + ); + })); + } + } + suppliers.add(new TestCaseSupplier("ip", List.of(DataTypes.IP, DataTypes.IP), () -> { + List inlist = randomList(items, items, () -> randomLiteral(DataTypes.IP).value()); + Object field = randomLiteral(DataTypes.IP).value(); + List args = new ArrayList<>(inlist.size() + 1); + for (Object i : inlist) { + args.add(new TestCaseSupplier.TypedData(i, DataTypes.IP, "inlist" + i)); + } + args.add(new TestCaseSupplier.TypedData(field, DataTypes.IP, "field")); + return new TestCaseSupplier.TestCase( + args, + matchesPattern("InExpressionEvaluator\\[EqualsKeywordsEvaluator.*\\]"), + DataTypes.BOOLEAN, + equalTo(inlist.contains(field)) + ); + })); + + suppliers.add(new TestCaseSupplier("version", List.of(DataTypes.VERSION, DataTypes.VERSION), () -> { + List inlist = randomList(items, items, () -> randomLiteral(DataTypes.VERSION).value()); + Object field = randomLiteral(DataTypes.VERSION).value(); + List args = new ArrayList<>(inlist.size() + 1); + for (Object i : inlist) { + args.add(new TestCaseSupplier.TypedData(i, DataTypes.VERSION, "inlist" + i)); + } + args.add(new TestCaseSupplier.TypedData(field, DataTypes.VERSION, "field")); + return new TestCaseSupplier.TestCase( + args, + matchesPattern("InExpressionEvaluator\\[EqualsKeywordsEvaluator.*\\]"), + DataTypes.BOOLEAN, + equalTo(inlist.contains(field)) + ); + })); + + suppliers.add(new TestCaseSupplier("geo_point", List.of(EsqlDataTypes.GEO_POINT, EsqlDataTypes.GEO_POINT), () -> { + List inlist = randomList(items, items, () -> new BytesRef(GEO.asWkt(GeometryTestUtils.randomPoint()))); + Object field = inlist.get(0); + List args = new ArrayList<>(inlist.size() + 1); + for (Object i : inlist) { + args.add(new TestCaseSupplier.TypedData(i, EsqlDataTypes.GEO_POINT, "inlist" + i)); + } + args.add(new TestCaseSupplier.TypedData(field, EsqlDataTypes.GEO_POINT, "field")); + return new TestCaseSupplier.TestCase( + args, + matchesPattern("InExpressionEvaluator\\[EqualsGeometriesEvaluator.*\\]"), + DataTypes.BOOLEAN, + equalTo(inlist.contains(field)) + ); + })); + + suppliers.add(new TestCaseSupplier("geo_shape", List.of(EsqlDataTypes.GEO_SHAPE, EsqlDataTypes.GEO_SHAPE), () -> { + List inlist = randomList( + items, + items, + () -> new BytesRef(GEO.asWkt(GeometryTestUtils.randomGeometry(randomBoolean()))) + ); + Object field = inlist.get(inlist.size() - 1); + List args = new ArrayList<>(inlist.size() + 1); + for (Object i : inlist) { + args.add(new TestCaseSupplier.TypedData(i, EsqlDataTypes.GEO_SHAPE, "inlist" + i)); + } + args.add(new TestCaseSupplier.TypedData(field, EsqlDataTypes.GEO_SHAPE, "field")); + return new TestCaseSupplier.TestCase( + args, + matchesPattern("InExpressionEvaluator\\[EqualsGeometriesEvaluator.*\\]"), + DataTypes.BOOLEAN, + equalTo(inlist.contains(field)) + ); + })); + + suppliers.add(new TestCaseSupplier("cartesian_point", List.of(EsqlDataTypes.CARTESIAN_POINT, EsqlDataTypes.CARTESIAN_POINT), () -> { + List inlist = randomList(items, items, () -> new BytesRef(CARTESIAN.asWkt(ShapeTestUtils.randomPoint()))); + Object field = new BytesRef(CARTESIAN.asWkt(ShapeTestUtils.randomPoint())); + List args = new ArrayList<>(inlist.size() + 1); + for (Object i : inlist) { + args.add(new TestCaseSupplier.TypedData(i, EsqlDataTypes.CARTESIAN_POINT, "inlist" + i)); + } + args.add(new TestCaseSupplier.TypedData(field, EsqlDataTypes.CARTESIAN_POINT, "field")); + return new TestCaseSupplier.TestCase( + args, + matchesPattern("InExpressionEvaluator\\[EqualsGeometriesEvaluator.*\\]"), + DataTypes.BOOLEAN, + equalTo(inlist.contains(field)) + ); + })); + + suppliers.add(new TestCaseSupplier("cartesian_shape", List.of(EsqlDataTypes.CARTESIAN_SHAPE, EsqlDataTypes.CARTESIAN_SHAPE), () -> { + List inlist = randomList( + items, + items, + () -> new BytesRef(CARTESIAN.asWkt(ShapeTestUtils.randomGeometry(randomBoolean()))) + ); + Object field = new BytesRef(CARTESIAN.asWkt(ShapeTestUtils.randomGeometry(randomBoolean()))); + List args = new ArrayList<>(inlist.size() + 1); + for (Object i : inlist) { + args.add(new TestCaseSupplier.TypedData(i, EsqlDataTypes.CARTESIAN_SHAPE, "inlist" + i)); + } + args.add(new TestCaseSupplier.TypedData(field, EsqlDataTypes.CARTESIAN_SHAPE, "field")); + return new TestCaseSupplier.TestCase( + args, + matchesPattern("InExpressionEvaluator\\[EqualsGeometriesEvaluator.*\\]"), + DataTypes.BOOLEAN, + equalTo(inlist.contains(field)) + ); + })); + } + + @Override + protected Expression build(Source source, List args) { + return new In(source, args.get(args.size() - 1), args.subList(0, args.size() - 1)); + } + + @Override + public void testSimpleWithNulls() { + assumeFalse("test case is invalid", false); + } + + @Override + public void testFactoryToString() { + assumeFalse("test case is invalid", false); + } +} From 50b7066ba1095dbaefb0a128a78df459b6d644fe Mon Sep 17 00:00:00 2001 From: Fang Xing Date: Fri, 17 May 2024 01:04:36 -0400 Subject: [PATCH 3/7] fix docs --- .../esql/functions/predicates.asciidoc | 12 +--------- .../esql/processing-commands/where.asciidoc | 22 ++++++++++++++++--- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/docs/reference/esql/functions/predicates.asciidoc b/docs/reference/esql/functions/predicates.asciidoc index 8fccc0066c510..16b461b40ebf7 100644 --- a/docs/reference/esql/functions/predicates.asciidoc +++ b/docs/reference/esql/functions/predicates.asciidoc @@ -5,11 +5,6 @@ //tag::body[] For NULL comparison, use the `IS NULL` and `IS NOT NULL` predicates: -[.text-center] -image::esql/functions/signature/is_null.svg[Embedded,opts=inline] - -include::types/is_null.asciidoc[] - [source.merge.styled,esql] ---- include::{esql-specs}/null.csv-spec[tag=is-null] @@ -19,11 +14,6 @@ include::{esql-specs}/null.csv-spec[tag=is-null] include::{esql-specs}/null.csv-spec[tag=is-null-result] |=== -[.text-center] -image::esql/functions/signature/is_not_null.svg[Embedded,opts=inline] - -include::types/is_not_null.asciidoc[] - [source.merge.styled,esql] ---- include::{esql-specs}/null.csv-spec[tag=is-not-null] @@ -32,4 +22,4 @@ include::{esql-specs}/null.csv-spec[tag=is-not-null] |=== include::{esql-specs}/null.csv-spec[tag=is-not-null-result] |=== -//end::body[] +//end::body[] \ No newline at end of file diff --git a/docs/reference/esql/processing-commands/where.asciidoc b/docs/reference/esql/processing-commands/where.asciidoc index 58a96756d2b25..a9db1d51f1382 100644 --- a/docs/reference/esql/processing-commands/where.asciidoc +++ b/docs/reference/esql/processing-commands/where.asciidoc @@ -53,10 +53,26 @@ For a complete list of all functions, refer to <>. include::../functions/predicates.asciidoc[tag=body] -include::../functions/examples/like.asciidoc[tag=example] +Use `LIKE` to filter data based on string patterns using wildcards. -include::../functions/examples/rlike.asciidoc[tag=example] +[source,esql] +---- +include::{esql-specs}/docs.csv-spec[tag=like] +---- + +Use `RLIKE` to filter data based on string patterns using using <>. + +[source,esql] +---- +include::{esql-specs}/docs.csv-spec[tag=rlike] +---- + +The `IN` operator allows testing whether a field or expression equals +an element in a list of literals, fields or expressions: -include::../functions/examples/in.asciidoc[tag=example] +[source,esql] +---- +include::{esql-specs}/row.csv-spec[tag=in-with-expressions] +---- For a complete list of all operators, refer to <>. From 4272ac3a9926b888d22185ff84455362ef5bcc93 Mon Sep 17 00:00:00 2001 From: Fang Xing Date: Fri, 19 Jul 2024 23:51:19 -0400 Subject: [PATCH 4/7] restore main --- .../esql/functions/description/add.asciidoc | 5 - .../esql/functions/description/div.asciidoc | 5 - .../functions/description/equals.asciidoc | 5 - .../description/greater_than.asciidoc | 5 - .../greater_than_or_equal.asciidoc | 5 - .../esql/functions/description/in.asciidoc | 5 - .../functions/description/less_than.asciidoc | 5 - .../description/less_than_or_equal.asciidoc | 5 - .../esql/functions/description/like.asciidoc | 5 - .../esql/functions/description/mod.asciidoc | 5 - .../esql/functions/description/mul.asciidoc | 5 - .../esql/functions/description/neg.asciidoc | 5 - .../functions/description/not_equals.asciidoc | 5 - .../esql/functions/description/rlike.asciidoc | 5 - .../esql/functions/description/sub.asciidoc | 5 - .../esql/functions/examples/in.asciidoc | 13 - .../esql/functions/examples/like.asciidoc | 13 - .../esql/functions/examples/rlike.asciidoc | 13 - .../esql/functions/kibana/definition/add.json | 296 ------------- .../esql/functions/kibana/definition/div.json | 188 -------- .../functions/kibana/definition/equals.json | 404 ------------------ .../kibana/definition/greater_than.json | 314 -------------- .../definition/greater_than_or_equal.json | 314 -------------- .../esql/functions/kibana/definition/in.json | 263 ------------ .../kibana/definition/less_than.json | 314 -------------- .../kibana/definition/less_than_or_equal.json | 314 -------------- .../functions/kibana/definition/like.json | 47 -- .../esql/functions/kibana/definition/mod.json | 188 -------- .../esql/functions/kibana/definition/mul.json | 188 -------- .../esql/functions/kibana/definition/neg.json | 68 --- .../kibana/definition/not_equals.json | 404 ------------------ .../functions/kibana/definition/rlike.json | 59 --- .../esql/functions/kibana/definition/sub.json | 260 ----------- .../esql/functions/kibana/docs/add.md | 7 - .../esql/functions/kibana/docs/div.md | 7 - .../esql/functions/kibana/docs/equals.md | 7 - .../functions/kibana/docs/greater_than.md | 7 - .../kibana/docs/greater_than_or_equal.md | 7 - .../esql/functions/kibana/docs/in.md | 11 - .../esql/functions/kibana/docs/less_than.md | 7 - .../kibana/docs/less_than_or_equal.md | 7 - .../esql/functions/kibana/docs/mod.md | 7 - .../esql/functions/kibana/docs/mul.md | 7 - .../esql/functions/kibana/docs/neg.md | 7 - .../esql/functions/kibana/docs/not_equals.md | 7 - .../esql/functions/kibana/docs/rlike.md | 15 - .../esql/functions/kibana/docs/sub.md | 7 - .../esql/functions/layout/add.asciidoc | 14 - .../esql/functions/layout/div.asciidoc | 14 - .../esql/functions/layout/equals.asciidoc | 14 - .../functions/layout/greater_than.asciidoc | 14 - .../layout/greater_than_or_equal.asciidoc | 14 - .../esql/functions/layout/in.asciidoc | 15 - .../esql/functions/layout/less_than.asciidoc | 14 - .../layout/less_than_or_equal.asciidoc | 14 - .../esql/functions/layout/like.asciidoc | 15 - .../esql/functions/layout/mod.asciidoc | 14 - .../esql/functions/layout/mul.asciidoc | 14 - .../esql/functions/layout/neg.asciidoc | 14 - .../esql/functions/layout/not_equals.asciidoc | 14 - .../esql/functions/layout/rlike.asciidoc | 15 - .../esql/functions/layout/sub.asciidoc | 14 - .../{kibana/docs/like.md => like.asciidoc} | 24 +- .../esql/functions/parameters/add.asciidoc | 9 - .../esql/functions/parameters/div.asciidoc | 9 - .../esql/functions/parameters/equals.asciidoc | 9 - .../parameters/greater_than.asciidoc | 9 - .../parameters/greater_than_or_equal.asciidoc | 9 - .../esql/functions/parameters/in.asciidoc | 9 - .../functions/parameters/is_not_null.asciidoc | 6 - .../functions/parameters/is_null.asciidoc | 6 - .../functions/parameters/less_than.asciidoc | 9 - .../parameters/less_than_or_equal.asciidoc | 9 - .../esql/functions/parameters/like.asciidoc | 9 - .../esql/functions/parameters/mod.asciidoc | 9 - .../esql/functions/parameters/mul.asciidoc | 9 - .../esql/functions/parameters/neg.asciidoc | 6 - .../functions/parameters/not_equals.asciidoc | 9 - .../esql/functions/parameters/rlike.asciidoc | 12 - .../esql/functions/parameters/sub.asciidoc | 9 - docs/reference/esql/functions/rlike.asciidoc | 21 + .../reference/esql/functions/signature/in.svg | 1 - .../esql/functions/signature/is_not_null.svg | 1 - .../esql/functions/signature/is_null.svg | 1 - .../esql/functions/signature/like.svg | 1 - .../esql/functions/signature/rlike.svg | 1 - .../esql/functions/types/in.asciidoc | 22 - .../esql/functions/types/is_not_null.asciidoc | 22 - .../esql/functions/types/is_null.asciidoc | 22 - 89 files changed, 36 insertions(+), 4285 deletions(-) delete mode 100644 docs/reference/esql/functions/description/add.asciidoc delete mode 100644 docs/reference/esql/functions/description/div.asciidoc delete mode 100644 docs/reference/esql/functions/description/equals.asciidoc delete mode 100644 docs/reference/esql/functions/description/greater_than.asciidoc delete mode 100644 docs/reference/esql/functions/description/greater_than_or_equal.asciidoc delete mode 100644 docs/reference/esql/functions/description/in.asciidoc delete mode 100644 docs/reference/esql/functions/description/less_than.asciidoc delete mode 100644 docs/reference/esql/functions/description/less_than_or_equal.asciidoc delete mode 100644 docs/reference/esql/functions/description/like.asciidoc delete mode 100644 docs/reference/esql/functions/description/mod.asciidoc delete mode 100644 docs/reference/esql/functions/description/mul.asciidoc delete mode 100644 docs/reference/esql/functions/description/neg.asciidoc delete mode 100644 docs/reference/esql/functions/description/not_equals.asciidoc delete mode 100644 docs/reference/esql/functions/description/rlike.asciidoc delete mode 100644 docs/reference/esql/functions/description/sub.asciidoc delete mode 100644 docs/reference/esql/functions/examples/in.asciidoc delete mode 100644 docs/reference/esql/functions/examples/like.asciidoc delete mode 100644 docs/reference/esql/functions/examples/rlike.asciidoc delete mode 100644 docs/reference/esql/functions/kibana/definition/add.json delete mode 100644 docs/reference/esql/functions/kibana/definition/div.json delete mode 100644 docs/reference/esql/functions/kibana/definition/equals.json delete mode 100644 docs/reference/esql/functions/kibana/definition/greater_than.json delete mode 100644 docs/reference/esql/functions/kibana/definition/greater_than_or_equal.json delete mode 100644 docs/reference/esql/functions/kibana/definition/in.json delete mode 100644 docs/reference/esql/functions/kibana/definition/less_than.json delete mode 100644 docs/reference/esql/functions/kibana/definition/less_than_or_equal.json delete mode 100644 docs/reference/esql/functions/kibana/definition/like.json delete mode 100644 docs/reference/esql/functions/kibana/definition/mod.json delete mode 100644 docs/reference/esql/functions/kibana/definition/mul.json delete mode 100644 docs/reference/esql/functions/kibana/definition/neg.json delete mode 100644 docs/reference/esql/functions/kibana/definition/not_equals.json delete mode 100644 docs/reference/esql/functions/kibana/definition/rlike.json delete mode 100644 docs/reference/esql/functions/kibana/definition/sub.json delete mode 100644 docs/reference/esql/functions/kibana/docs/add.md delete mode 100644 docs/reference/esql/functions/kibana/docs/div.md delete mode 100644 docs/reference/esql/functions/kibana/docs/equals.md delete mode 100644 docs/reference/esql/functions/kibana/docs/greater_than.md delete mode 100644 docs/reference/esql/functions/kibana/docs/greater_than_or_equal.md delete mode 100644 docs/reference/esql/functions/kibana/docs/in.md delete mode 100644 docs/reference/esql/functions/kibana/docs/less_than.md delete mode 100644 docs/reference/esql/functions/kibana/docs/less_than_or_equal.md delete mode 100644 docs/reference/esql/functions/kibana/docs/mod.md delete mode 100644 docs/reference/esql/functions/kibana/docs/mul.md delete mode 100644 docs/reference/esql/functions/kibana/docs/neg.md delete mode 100644 docs/reference/esql/functions/kibana/docs/not_equals.md delete mode 100644 docs/reference/esql/functions/kibana/docs/rlike.md delete mode 100644 docs/reference/esql/functions/kibana/docs/sub.md delete mode 100644 docs/reference/esql/functions/layout/add.asciidoc delete mode 100644 docs/reference/esql/functions/layout/div.asciidoc delete mode 100644 docs/reference/esql/functions/layout/equals.asciidoc delete mode 100644 docs/reference/esql/functions/layout/greater_than.asciidoc delete mode 100644 docs/reference/esql/functions/layout/greater_than_or_equal.asciidoc delete mode 100644 docs/reference/esql/functions/layout/in.asciidoc delete mode 100644 docs/reference/esql/functions/layout/less_than.asciidoc delete mode 100644 docs/reference/esql/functions/layout/less_than_or_equal.asciidoc delete mode 100644 docs/reference/esql/functions/layout/like.asciidoc delete mode 100644 docs/reference/esql/functions/layout/mod.asciidoc delete mode 100644 docs/reference/esql/functions/layout/mul.asciidoc delete mode 100644 docs/reference/esql/functions/layout/neg.asciidoc delete mode 100644 docs/reference/esql/functions/layout/not_equals.asciidoc delete mode 100644 docs/reference/esql/functions/layout/rlike.asciidoc delete mode 100644 docs/reference/esql/functions/layout/sub.asciidoc rename docs/reference/esql/functions/{kibana/docs/like.md => like.asciidoc} (55%) delete mode 100644 docs/reference/esql/functions/parameters/add.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/div.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/equals.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/greater_than.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/greater_than_or_equal.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/in.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/is_not_null.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/is_null.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/less_than.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/less_than_or_equal.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/like.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/mod.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/mul.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/neg.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/not_equals.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/rlike.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/sub.asciidoc create mode 100644 docs/reference/esql/functions/rlike.asciidoc delete mode 100644 docs/reference/esql/functions/signature/in.svg delete mode 100644 docs/reference/esql/functions/signature/is_not_null.svg delete mode 100644 docs/reference/esql/functions/signature/is_null.svg delete mode 100644 docs/reference/esql/functions/signature/like.svg delete mode 100644 docs/reference/esql/functions/signature/rlike.svg delete mode 100644 docs/reference/esql/functions/types/in.asciidoc delete mode 100644 docs/reference/esql/functions/types/is_not_null.asciidoc delete mode 100644 docs/reference/esql/functions/types/is_null.asciidoc diff --git a/docs/reference/esql/functions/description/add.asciidoc b/docs/reference/esql/functions/description/add.asciidoc deleted file mode 100644 index 5052c2ed59125..0000000000000 --- a/docs/reference/esql/functions/description/add.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -Returns the sum of two values. diff --git a/docs/reference/esql/functions/description/div.asciidoc b/docs/reference/esql/functions/description/div.asciidoc deleted file mode 100644 index 258bfb0c11bad..0000000000000 --- a/docs/reference/esql/functions/description/div.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -Returns the quotient of two numeric values. diff --git a/docs/reference/esql/functions/description/equals.asciidoc b/docs/reference/esql/functions/description/equals.asciidoc deleted file mode 100644 index 236d52592eb32..0000000000000 --- a/docs/reference/esql/functions/description/equals.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -Returns true if two values are equal. diff --git a/docs/reference/esql/functions/description/greater_than.asciidoc b/docs/reference/esql/functions/description/greater_than.asciidoc deleted file mode 100644 index d11a8fcd53e4d..0000000000000 --- a/docs/reference/esql/functions/description/greater_than.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -Returns true if the value on the left is greater than the value on the right. diff --git a/docs/reference/esql/functions/description/greater_than_or_equal.asciidoc b/docs/reference/esql/functions/description/greater_than_or_equal.asciidoc deleted file mode 100644 index 21c672f153ab3..0000000000000 --- a/docs/reference/esql/functions/description/greater_than_or_equal.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -Returns true if the value on the left is greater than or equals to the value on the right. diff --git a/docs/reference/esql/functions/description/in.asciidoc b/docs/reference/esql/functions/description/in.asciidoc deleted file mode 100644 index 7a9a35892753b..0000000000000 --- a/docs/reference/esql/functions/description/in.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -The `IN` operator allows testing whether a field or expression equals an element in a list of literals, fields or expressions: diff --git a/docs/reference/esql/functions/description/less_than.asciidoc b/docs/reference/esql/functions/description/less_than.asciidoc deleted file mode 100644 index 9190ab9e33a69..0000000000000 --- a/docs/reference/esql/functions/description/less_than.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -Returns true if the value on the left is less than the value on the right. diff --git a/docs/reference/esql/functions/description/less_than_or_equal.asciidoc b/docs/reference/esql/functions/description/less_than_or_equal.asciidoc deleted file mode 100644 index dc999a4df4e2b..0000000000000 --- a/docs/reference/esql/functions/description/less_than_or_equal.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -Returns true if the value on the left is less than or equals to the value on the right. diff --git a/docs/reference/esql/functions/description/like.asciidoc b/docs/reference/esql/functions/description/like.asciidoc deleted file mode 100644 index b4ec514c9fec3..0000000000000 --- a/docs/reference/esql/functions/description/like.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -Use `LIKE` to filter data based on string patterns using wildcards. `LIKE` usually acts on a field placed on the left-hand side of the operator, but it can also act on a constant (literal) expression. The right-hand side of the operator represents the pattern. The following wildcard characters are supported: * `*` matches zero or more characters. * `?` matches one character. diff --git a/docs/reference/esql/functions/description/mod.asciidoc b/docs/reference/esql/functions/description/mod.asciidoc deleted file mode 100644 index edbdb193776d7..0000000000000 --- a/docs/reference/esql/functions/description/mod.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -Returns the remainder of the division of two numeric values. diff --git a/docs/reference/esql/functions/description/mul.asciidoc b/docs/reference/esql/functions/description/mul.asciidoc deleted file mode 100644 index 0331663d82515..0000000000000 --- a/docs/reference/esql/functions/description/mul.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -Returns the product of two numeric values. diff --git a/docs/reference/esql/functions/description/neg.asciidoc b/docs/reference/esql/functions/description/neg.asciidoc deleted file mode 100644 index 2d490ee88d12c..0000000000000 --- a/docs/reference/esql/functions/description/neg.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -Returns the negation of the argument. diff --git a/docs/reference/esql/functions/description/not_equals.asciidoc b/docs/reference/esql/functions/description/not_equals.asciidoc deleted file mode 100644 index 4ef95a724bc03..0000000000000 --- a/docs/reference/esql/functions/description/not_equals.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -Returns true if two values are not equal. diff --git a/docs/reference/esql/functions/description/rlike.asciidoc b/docs/reference/esql/functions/description/rlike.asciidoc deleted file mode 100644 index 5b74354eff4c3..0000000000000 --- a/docs/reference/esql/functions/description/rlike.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -Use `RLIKE` to filter data based on string patterns using using <>. `RLIKE` usually acts on a field placed on the left-hand side of the operator, but it can also act on a constant (literal) expression. The right-hand side of the operator represents the pattern. diff --git a/docs/reference/esql/functions/description/sub.asciidoc b/docs/reference/esql/functions/description/sub.asciidoc deleted file mode 100644 index a0dc95fdba7c5..0000000000000 --- a/docs/reference/esql/functions/description/sub.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -Returns the difference of two values. diff --git a/docs/reference/esql/functions/examples/in.asciidoc b/docs/reference/esql/functions/examples/in.asciidoc deleted file mode 100644 index 7bd53b49a36f8..0000000000000 --- a/docs/reference/esql/functions/examples/in.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -// 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}/row.csv-spec[tag=in-with-expressions] ----- -[%header.monospaced.styled,format=dsv,separator=|] -|=== -include::{esql-specs}/row.csv-spec[tag=in-with-expressions-result] -|=== - diff --git a/docs/reference/esql/functions/examples/like.asciidoc b/docs/reference/esql/functions/examples/like.asciidoc deleted file mode 100644 index 7b9997a61e20a..0000000000000 --- a/docs/reference/esql/functions/examples/like.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -// 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=like] ----- -[%header.monospaced.styled,format=dsv,separator=|] -|=== -include::{esql-specs}/docs.csv-spec[tag=like-result] -|=== - diff --git a/docs/reference/esql/functions/examples/rlike.asciidoc b/docs/reference/esql/functions/examples/rlike.asciidoc deleted file mode 100644 index 5b94fe354e6f5..0000000000000 --- a/docs/reference/esql/functions/examples/rlike.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -// 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=rlike] ----- -[%header.monospaced.styled,format=dsv,separator=|] -|=== -include::{esql-specs}/docs.csv-spec[tag=rlike-result] -|=== - diff --git a/docs/reference/esql/functions/kibana/definition/add.json b/docs/reference/esql/functions/kibana/definition/add.json deleted file mode 100644 index e25182b9df139..0000000000000 --- a/docs/reference/esql/functions/kibana/definition/add.json +++ /dev/null @@ -1,296 +0,0 @@ -{ - "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", - "type" : "eval", - "name" : "add", - "description" : "Returns the sum of two values.", - "signatures" : [ - { - "params" : [ - { - "name" : "lhs", - "type" : "date_period", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "date_period", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "date_period" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "date_period", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "datetime", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "datetime" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "datetime", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "date_period", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "datetime" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "datetime", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "time_duration", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "datetime" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "integer" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "time_duration", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "datetime", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "datetime" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "time_duration", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "time_duration", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "time_duration" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "unsigned_long" - } - ] -} diff --git a/docs/reference/esql/functions/kibana/definition/div.json b/docs/reference/esql/functions/kibana/definition/div.json deleted file mode 100644 index 015c175aa4808..0000000000000 --- a/docs/reference/esql/functions/kibana/definition/div.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", - "type" : "eval", - "name" : "div", - "description" : "Returns the quotient of two numeric values.", - "signatures" : [ - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "integer" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "unsigned_long" - } - ] -} diff --git a/docs/reference/esql/functions/kibana/definition/equals.json b/docs/reference/esql/functions/kibana/definition/equals.json deleted file mode 100644 index d4fbf5a85211d..0000000000000 --- a/docs/reference/esql/functions/kibana/definition/equals.json +++ /dev/null @@ -1,404 +0,0 @@ -{ - "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", - "type" : "eval", - "name" : "equals", - "description" : "Returns true if two values are equal.", - "signatures" : [ - { - "params" : [ - { - "name" : "lhs", - "type" : "boolean", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "boolean", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "cartesian_point", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "cartesian_point", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "cartesian_shape", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "cartesian_shape", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "datetime", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "datetime", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "geo_point", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "geo_point", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "geo_shape", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "geo_shape", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "ip", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "ip", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "version", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "version", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - } - ] -} diff --git a/docs/reference/esql/functions/kibana/definition/greater_than.json b/docs/reference/esql/functions/kibana/definition/greater_than.json deleted file mode 100644 index 716f55e97838c..0000000000000 --- a/docs/reference/esql/functions/kibana/definition/greater_than.json +++ /dev/null @@ -1,314 +0,0 @@ -{ - "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", - "type" : "eval", - "name" : "greater_than", - "description" : "Returns true if the value on the left is greater than the value on the right.", - "signatures" : [ - { - "params" : [ - { - "name" : "lhs", - "type" : "datetime", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "datetime", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "ip", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "ip", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "version", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "version", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - } - ] -} diff --git a/docs/reference/esql/functions/kibana/definition/greater_than_or_equal.json b/docs/reference/esql/functions/kibana/definition/greater_than_or_equal.json deleted file mode 100644 index a306e9c6c59c6..0000000000000 --- a/docs/reference/esql/functions/kibana/definition/greater_than_or_equal.json +++ /dev/null @@ -1,314 +0,0 @@ -{ - "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", - "type" : "eval", - "name" : "greater_than_or_equal", - "description" : "Returns true if the value on the left is greater than or equals to the value on the right.", - "signatures" : [ - { - "params" : [ - { - "name" : "lhs", - "type" : "datetime", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "datetime", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "ip", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "ip", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "version", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "version", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - } - ] -} diff --git a/docs/reference/esql/functions/kibana/definition/in.json b/docs/reference/esql/functions/kibana/definition/in.json deleted file mode 100644 index 8055c75453d71..0000000000000 --- a/docs/reference/esql/functions/kibana/definition/in.json +++ /dev/null @@ -1,263 +0,0 @@ -{ - "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", - "type" : "eval", - "name" : "in", - "description" : "The `IN` operator allows testing whether a field or expression equals an element in a list of literals, fields or expressions:", - "signatures" : [ - { - "params" : [ - { - "name" : "field", - "type" : "boolean", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "inlist", - "type" : "boolean", - "optional" : false, - "description" : "A list of items." - } - ], - "variadic" : true, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "field", - "type" : "cartesian_point", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "inlist", - "type" : "cartesian_point", - "optional" : false, - "description" : "A list of items." - } - ], - "variadic" : true, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "field", - "type" : "cartesian_shape", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "inlist", - "type" : "cartesian_shape", - "optional" : false, - "description" : "A list of items." - } - ], - "variadic" : true, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "field", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "inlist", - "type" : "double", - "optional" : false, - "description" : "A list of items." - } - ], - "variadic" : true, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "field", - "type" : "geo_point", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "inlist", - "type" : "geo_point", - "optional" : false, - "description" : "A list of items." - } - ], - "variadic" : true, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "field", - "type" : "geo_shape", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "inlist", - "type" : "geo_shape", - "optional" : false, - "description" : "A list of items." - } - ], - "variadic" : true, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "field", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "inlist", - "type" : "integer", - "optional" : false, - "description" : "A list of items." - } - ], - "variadic" : true, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "field", - "type" : "ip", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "inlist", - "type" : "ip", - "optional" : false, - "description" : "A list of items." - } - ], - "variadic" : true, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "field", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "inlist", - "type" : "keyword", - "optional" : false, - "description" : "A list of items." - } - ], - "variadic" : true, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "field", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "inlist", - "type" : "text", - "optional" : false, - "description" : "A list of items." - } - ], - "variadic" : true, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "field", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "inlist", - "type" : "long", - "optional" : false, - "description" : "A list of items." - } - ], - "variadic" : true, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "field", - "type" : "text", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "inlist", - "type" : "keyword", - "optional" : false, - "description" : "A list of items." - } - ], - "variadic" : true, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "field", - "type" : "text", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "inlist", - "type" : "text", - "optional" : false, - "description" : "A list of items." - } - ], - "variadic" : true, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "field", - "type" : "version", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "inlist", - "type" : "version", - "optional" : false, - "description" : "A list of items." - } - ], - "variadic" : true, - "returnType" : "boolean" - } - ], - "examples" : [ - "ROW a = 1, b = 4, c = 3\n| WHERE c-a IN (3, b / 2, a)" - ] -} diff --git a/docs/reference/esql/functions/kibana/definition/less_than.json b/docs/reference/esql/functions/kibana/definition/less_than.json deleted file mode 100644 index 74be3ca8196c3..0000000000000 --- a/docs/reference/esql/functions/kibana/definition/less_than.json +++ /dev/null @@ -1,314 +0,0 @@ -{ - "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", - "type" : "eval", - "name" : "less_than", - "description" : "Returns true if the value on the left is less than the value on the right.", - "signatures" : [ - { - "params" : [ - { - "name" : "lhs", - "type" : "datetime", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "datetime", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "ip", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "ip", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "version", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "version", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - } - ] -} diff --git a/docs/reference/esql/functions/kibana/definition/less_than_or_equal.json b/docs/reference/esql/functions/kibana/definition/less_than_or_equal.json deleted file mode 100644 index 7be0a94a6db18..0000000000000 --- a/docs/reference/esql/functions/kibana/definition/less_than_or_equal.json +++ /dev/null @@ -1,314 +0,0 @@ -{ - "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", - "type" : "eval", - "name" : "less_than_or_equal", - "description" : "Returns true if the value on the left is less than or equals to the value on the right.", - "signatures" : [ - { - "params" : [ - { - "name" : "lhs", - "type" : "datetime", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "datetime", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "ip", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "ip", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "version", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "version", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - } - ] -} diff --git a/docs/reference/esql/functions/kibana/definition/like.json b/docs/reference/esql/functions/kibana/definition/like.json deleted file mode 100644 index a852b4271bb70..0000000000000 --- a/docs/reference/esql/functions/kibana/definition/like.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", - "type" : "eval", - "name" : "like", - "description" : "Use `LIKE` to filter data based on string patterns using wildcards. `LIKE`\nusually acts on a field placed on the left-hand side of the operator, but it can\nalso act on a constant (literal) expression. The right-hand side of the operator\nrepresents the pattern.\n\nThe following wildcard characters are supported:\n\n* `*` matches zero or more characters.\n* `?` matches one character.", - "signatures" : [ - { - "params" : [ - { - "name" : "str", - "type" : "keyword", - "optional" : false, - "description" : "A literal expression." - }, - { - "name" : "pattern", - "type" : "keyword", - "optional" : false, - "description" : "Pattern." - } - ], - "variadic" : true, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "str", - "type" : "text", - "optional" : false, - "description" : "A literal expression." - }, - { - "name" : "pattern", - "type" : "text", - "optional" : false, - "description" : "Pattern." - } - ], - "variadic" : true, - "returnType" : "boolean" - } - ], - "examples" : [ - "FROM employees\n| WHERE first_name LIKE \"?b*\"\n| KEEP first_name, last_name" - ] -} diff --git a/docs/reference/esql/functions/kibana/definition/mod.json b/docs/reference/esql/functions/kibana/definition/mod.json deleted file mode 100644 index bb36639678b3d..0000000000000 --- a/docs/reference/esql/functions/kibana/definition/mod.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", - "type" : "eval", - "name" : "mod", - "description" : "Returns the remainder of the division of two numeric values.", - "signatures" : [ - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "integer" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "unsigned_long" - } - ] -} diff --git a/docs/reference/esql/functions/kibana/definition/mul.json b/docs/reference/esql/functions/kibana/definition/mul.json deleted file mode 100644 index d47727db4ca81..0000000000000 --- a/docs/reference/esql/functions/kibana/definition/mul.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", - "type" : "eval", - "name" : "mul", - "description" : "Returns the product of two numeric values.", - "signatures" : [ - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "integer" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "A numeric value." - }, - { - "name" : "rhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "A numeric value." - } - ], - "variadic" : false, - "returnType" : "unsigned_long" - } - ] -} diff --git a/docs/reference/esql/functions/kibana/definition/neg.json b/docs/reference/esql/functions/kibana/definition/neg.json deleted file mode 100644 index bf203d8c7c226..0000000000000 --- a/docs/reference/esql/functions/kibana/definition/neg.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", - "type" : "eval", - "name" : "neg", - "description" : "Returns the negation of the argument.", - "signatures" : [ - { - "params" : [ - { - "name" : "field", - "type" : "date_period", - "optional" : false, - "description" : "A numeric value or a date time interval." - } - ], - "variadic" : false, - "returnType" : "date_period" - }, - { - "params" : [ - { - "name" : "field", - "type" : "double", - "optional" : false, - "description" : "A numeric value or a date time interval." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "field", - "type" : "integer", - "optional" : false, - "description" : "A numeric value or a date time interval." - } - ], - "variadic" : false, - "returnType" : "integer" - }, - { - "params" : [ - { - "name" : "field", - "type" : "long", - "optional" : false, - "description" : "A numeric value or a date time interval." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "field", - "type" : "time_duration", - "optional" : false, - "description" : "A numeric value or a date time interval." - } - ], - "variadic" : false, - "returnType" : "time_duration" - } - ] -} diff --git a/docs/reference/esql/functions/kibana/definition/not_equals.json b/docs/reference/esql/functions/kibana/definition/not_equals.json deleted file mode 100644 index 1eaf9372671f1..0000000000000 --- a/docs/reference/esql/functions/kibana/definition/not_equals.json +++ /dev/null @@ -1,404 +0,0 @@ -{ - "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", - "type" : "eval", - "name" : "not_equals", - "description" : "Returns true if two values are not equal.", - "signatures" : [ - { - "params" : [ - { - "name" : "lhs", - "type" : "boolean", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "boolean", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "cartesian_point", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "cartesian_point", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "cartesian_shape", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "cartesian_shape", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "datetime", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "datetime", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "geo_point", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "geo_point", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "geo_shape", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "geo_shape", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "ip", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "ip", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "keyword", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "text", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "version", - "optional" : false, - "description" : "An expression." - }, - { - "name" : "rhs", - "type" : "version", - "optional" : false, - "description" : "An expression." - } - ], - "variadic" : false, - "returnType" : "boolean" - } - ] -} diff --git a/docs/reference/esql/functions/kibana/definition/rlike.json b/docs/reference/esql/functions/kibana/definition/rlike.json deleted file mode 100644 index c6bec0d1bb217..0000000000000 --- a/docs/reference/esql/functions/kibana/definition/rlike.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", - "type" : "eval", - "name" : "rlike", - "description" : "Use `RLIKE` to filter data based on string patterns using using\n<>. `RLIKE` usually acts on a field placed on\nthe left-hand side of the operator, but it can also act on a constant (literal)\nexpression. The right-hand side of the operator represents the pattern.", - "signatures" : [ - { - "params" : [ - { - "name" : "str", - "type" : "keyword", - "optional" : false, - "description" : "A literal value." - }, - { - "name" : "pattern", - "type" : "keyword", - "optional" : false, - "description" : "A regular expression." - }, - { - "name" : "caseInsensitive", - "type" : "boolean", - "optional" : false, - "description" : "Indicate whether it is case insensitive." - } - ], - "variadic" : false, - "returnType" : "boolean" - }, - { - "params" : [ - { - "name" : "str", - "type" : "text", - "optional" : false, - "description" : "A literal value." - }, - { - "name" : "pattern", - "type" : "text", - "optional" : false, - "description" : "A regular expression." - }, - { - "name" : "caseInsensitive", - "type" : "boolean", - "optional" : false, - "description" : "Indicate whether it is case insensitive." - } - ], - "variadic" : false, - "returnType" : "boolean" - } - ], - "examples" : [ - "FROM employees\n| WHERE first_name RLIKE \".leja.*\"\n| KEEP first_name, last_name" - ] -} diff --git a/docs/reference/esql/functions/kibana/definition/sub.json b/docs/reference/esql/functions/kibana/definition/sub.json deleted file mode 100644 index 763c240e4d9ab..0000000000000 --- a/docs/reference/esql/functions/kibana/definition/sub.json +++ /dev/null @@ -1,260 +0,0 @@ -{ - "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", - "type" : "eval", - "name" : "sub", - "description" : "Returns the difference of two values.", - "signatures" : [ - { - "params" : [ - { - "name" : "lhs", - "type" : "date_period", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "date_period", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "date_period" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "datetime", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "date_period", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "datetime" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "datetime", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "time_duration", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "datetime" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "integer" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "double", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "double" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "integer", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "long", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "long" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "time_duration", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "time_duration", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "time_duration" - }, - { - "params" : [ - { - "name" : "lhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "A numeric value or a date time value." - }, - { - "name" : "rhs", - "type" : "unsigned_long", - "optional" : false, - "description" : "A numeric value or a date time value." - } - ], - "variadic" : false, - "returnType" : "unsigned_long" - } - ] -} diff --git a/docs/reference/esql/functions/kibana/docs/add.md b/docs/reference/esql/functions/kibana/docs/add.md deleted file mode 100644 index e80715839b155..0000000000000 --- a/docs/reference/esql/functions/kibana/docs/add.md +++ /dev/null @@ -1,7 +0,0 @@ - - -### ADD -Returns the sum of two values. - diff --git a/docs/reference/esql/functions/kibana/docs/div.md b/docs/reference/esql/functions/kibana/docs/div.md deleted file mode 100644 index 4318e741865a0..0000000000000 --- a/docs/reference/esql/functions/kibana/docs/div.md +++ /dev/null @@ -1,7 +0,0 @@ - - -### DIV -Returns the quotient of two numeric values. - diff --git a/docs/reference/esql/functions/kibana/docs/equals.md b/docs/reference/esql/functions/kibana/docs/equals.md deleted file mode 100644 index 094c518635186..0000000000000 --- a/docs/reference/esql/functions/kibana/docs/equals.md +++ /dev/null @@ -1,7 +0,0 @@ - - -### EQUALS -Returns true if two values are equal. - diff --git a/docs/reference/esql/functions/kibana/docs/greater_than.md b/docs/reference/esql/functions/kibana/docs/greater_than.md deleted file mode 100644 index ee3dc7cbf4461..0000000000000 --- a/docs/reference/esql/functions/kibana/docs/greater_than.md +++ /dev/null @@ -1,7 +0,0 @@ - - -### GREATER_THAN -Returns true if the value on the left is greater than the value on the right. - diff --git a/docs/reference/esql/functions/kibana/docs/greater_than_or_equal.md b/docs/reference/esql/functions/kibana/docs/greater_than_or_equal.md deleted file mode 100644 index ed1396fcf0c82..0000000000000 --- a/docs/reference/esql/functions/kibana/docs/greater_than_or_equal.md +++ /dev/null @@ -1,7 +0,0 @@ - - -### GREATER_THAN_OR_EQUAL -Returns true if the value on the left is greater than or equals to the value on the right. - diff --git a/docs/reference/esql/functions/kibana/docs/in.md b/docs/reference/esql/functions/kibana/docs/in.md deleted file mode 100644 index a7dd5655c2966..0000000000000 --- a/docs/reference/esql/functions/kibana/docs/in.md +++ /dev/null @@ -1,11 +0,0 @@ - - -### IN -The `IN` operator allows testing whether a field or expression equals an element in a list of literals, fields or expressions: - -``` -ROW a = 1, b = 4, c = 3 -| WHERE c-a IN (3, b / 2, a) -``` diff --git a/docs/reference/esql/functions/kibana/docs/less_than.md b/docs/reference/esql/functions/kibana/docs/less_than.md deleted file mode 100644 index 4aac0eba1b352..0000000000000 --- a/docs/reference/esql/functions/kibana/docs/less_than.md +++ /dev/null @@ -1,7 +0,0 @@ - - -### LESS_THAN -Returns true if the value on the left is less than the value on the right. - diff --git a/docs/reference/esql/functions/kibana/docs/less_than_or_equal.md b/docs/reference/esql/functions/kibana/docs/less_than_or_equal.md deleted file mode 100644 index f3c4dae2d50fb..0000000000000 --- a/docs/reference/esql/functions/kibana/docs/less_than_or_equal.md +++ /dev/null @@ -1,7 +0,0 @@ - - -### LESS_THAN_OR_EQUAL -Returns true if the value on the left is less than or equals to the value on the right. - diff --git a/docs/reference/esql/functions/kibana/docs/mod.md b/docs/reference/esql/functions/kibana/docs/mod.md deleted file mode 100644 index 36ae603778ca5..0000000000000 --- a/docs/reference/esql/functions/kibana/docs/mod.md +++ /dev/null @@ -1,7 +0,0 @@ - - -### MOD -Returns the remainder of the division of two numeric values. - diff --git a/docs/reference/esql/functions/kibana/docs/mul.md b/docs/reference/esql/functions/kibana/docs/mul.md deleted file mode 100644 index 6dcb55e0baf63..0000000000000 --- a/docs/reference/esql/functions/kibana/docs/mul.md +++ /dev/null @@ -1,7 +0,0 @@ - - -### MUL -Returns the product of two numeric values. - diff --git a/docs/reference/esql/functions/kibana/docs/neg.md b/docs/reference/esql/functions/kibana/docs/neg.md deleted file mode 100644 index 2d1c65487343f..0000000000000 --- a/docs/reference/esql/functions/kibana/docs/neg.md +++ /dev/null @@ -1,7 +0,0 @@ - - -### NEG -Returns the negation of the argument. - diff --git a/docs/reference/esql/functions/kibana/docs/not_equals.md b/docs/reference/esql/functions/kibana/docs/not_equals.md deleted file mode 100644 index 20d9a3a2ba47a..0000000000000 --- a/docs/reference/esql/functions/kibana/docs/not_equals.md +++ /dev/null @@ -1,7 +0,0 @@ - - -### NOT_EQUALS -Returns true if two values are not equal. - diff --git a/docs/reference/esql/functions/kibana/docs/rlike.md b/docs/reference/esql/functions/kibana/docs/rlike.md deleted file mode 100644 index ed94553e7e44f..0000000000000 --- a/docs/reference/esql/functions/kibana/docs/rlike.md +++ /dev/null @@ -1,15 +0,0 @@ - - -### RLIKE -Use `RLIKE` to filter data based on string patterns using using -<>. `RLIKE` usually acts on a field placed on -the left-hand side of the operator, but it can also act on a constant (literal) -expression. The right-hand side of the operator represents the pattern. - -``` -FROM employees -| WHERE first_name RLIKE ".leja.*" -| KEEP first_name, last_name -``` diff --git a/docs/reference/esql/functions/kibana/docs/sub.md b/docs/reference/esql/functions/kibana/docs/sub.md deleted file mode 100644 index a5b000e5d7505..0000000000000 --- a/docs/reference/esql/functions/kibana/docs/sub.md +++ /dev/null @@ -1,7 +0,0 @@ - - -### SUB -Returns the difference of two values. - diff --git a/docs/reference/esql/functions/layout/add.asciidoc b/docs/reference/esql/functions/layout/add.asciidoc deleted file mode 100644 index 1dde1049239ac..0000000000000 --- a/docs/reference/esql/functions/layout/add.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-add]] -=== `ADD` - -*Syntax* - -[.text-center] -image::esql/functions/signature/add.svg[Embedded,opts=inline] - -include::../parameters/add.asciidoc[] -include::../description/add.asciidoc[] -include::../types/add.asciidoc[] diff --git a/docs/reference/esql/functions/layout/div.asciidoc b/docs/reference/esql/functions/layout/div.asciidoc deleted file mode 100644 index 7bc50b2ca3130..0000000000000 --- a/docs/reference/esql/functions/layout/div.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-div]] -=== `DIV` - -*Syntax* - -[.text-center] -image::esql/functions/signature/div.svg[Embedded,opts=inline] - -include::../parameters/div.asciidoc[] -include::../description/div.asciidoc[] -include::../types/div.asciidoc[] diff --git a/docs/reference/esql/functions/layout/equals.asciidoc b/docs/reference/esql/functions/layout/equals.asciidoc deleted file mode 100644 index 6a8099838b3a6..0000000000000 --- a/docs/reference/esql/functions/layout/equals.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-equals]] -=== `EQUALS` - -*Syntax* - -[.text-center] -image::esql/functions/signature/equals.svg[Embedded,opts=inline] - -include::../parameters/equals.asciidoc[] -include::../description/equals.asciidoc[] -include::../types/equals.asciidoc[] diff --git a/docs/reference/esql/functions/layout/greater_than.asciidoc b/docs/reference/esql/functions/layout/greater_than.asciidoc deleted file mode 100644 index d2c52993a5224..0000000000000 --- a/docs/reference/esql/functions/layout/greater_than.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-greater_than]] -=== `GREATER_THAN` - -*Syntax* - -[.text-center] -image::esql/functions/signature/greater_than.svg[Embedded,opts=inline] - -include::../parameters/greater_than.asciidoc[] -include::../description/greater_than.asciidoc[] -include::../types/greater_than.asciidoc[] diff --git a/docs/reference/esql/functions/layout/greater_than_or_equal.asciidoc b/docs/reference/esql/functions/layout/greater_than_or_equal.asciidoc deleted file mode 100644 index b3b3a88664ffd..0000000000000 --- a/docs/reference/esql/functions/layout/greater_than_or_equal.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-greater_than_or_equal]] -=== `GREATER_THAN_OR_EQUAL` - -*Syntax* - -[.text-center] -image::esql/functions/signature/greater_than_or_equal.svg[Embedded,opts=inline] - -include::../parameters/greater_than_or_equal.asciidoc[] -include::../description/greater_than_or_equal.asciidoc[] -include::../types/greater_than_or_equal.asciidoc[] diff --git a/docs/reference/esql/functions/layout/in.asciidoc b/docs/reference/esql/functions/layout/in.asciidoc deleted file mode 100644 index b5a421cfd370e..0000000000000 --- a/docs/reference/esql/functions/layout/in.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-in]] -=== `IN` - -*Syntax* - -[.text-center] -image::esql/functions/signature/in.svg[Embedded,opts=inline] - -include::../parameters/in.asciidoc[] -include::../description/in.asciidoc[] -include::../types/in.asciidoc[] -include::../examples/in.asciidoc[] diff --git a/docs/reference/esql/functions/layout/less_than.asciidoc b/docs/reference/esql/functions/layout/less_than.asciidoc deleted file mode 100644 index e0c9a77ded356..0000000000000 --- a/docs/reference/esql/functions/layout/less_than.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-less_than]] -=== `LESS_THAN` - -*Syntax* - -[.text-center] -image::esql/functions/signature/less_than.svg[Embedded,opts=inline] - -include::../parameters/less_than.asciidoc[] -include::../description/less_than.asciidoc[] -include::../types/less_than.asciidoc[] diff --git a/docs/reference/esql/functions/layout/less_than_or_equal.asciidoc b/docs/reference/esql/functions/layout/less_than_or_equal.asciidoc deleted file mode 100644 index cab825344db8c..0000000000000 --- a/docs/reference/esql/functions/layout/less_than_or_equal.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-less_than_or_equal]] -=== `LESS_THAN_OR_EQUAL` - -*Syntax* - -[.text-center] -image::esql/functions/signature/less_than_or_equal.svg[Embedded,opts=inline] - -include::../parameters/less_than_or_equal.asciidoc[] -include::../description/less_than_or_equal.asciidoc[] -include::../types/less_than_or_equal.asciidoc[] diff --git a/docs/reference/esql/functions/layout/like.asciidoc b/docs/reference/esql/functions/layout/like.asciidoc deleted file mode 100644 index 7ef057a93fdfe..0000000000000 --- a/docs/reference/esql/functions/layout/like.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-like]] -=== `LIKE` - -*Syntax* - -[.text-center] -image::esql/functions/signature/like.svg[Embedded,opts=inline] - -include::../parameters/like.asciidoc[] -include::../description/like.asciidoc[] -include::../types/like.asciidoc[] -include::../examples/like.asciidoc[] diff --git a/docs/reference/esql/functions/layout/mod.asciidoc b/docs/reference/esql/functions/layout/mod.asciidoc deleted file mode 100644 index dd30ae9f4a70f..0000000000000 --- a/docs/reference/esql/functions/layout/mod.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-mod]] -=== `MOD` - -*Syntax* - -[.text-center] -image::esql/functions/signature/mod.svg[Embedded,opts=inline] - -include::../parameters/mod.asciidoc[] -include::../description/mod.asciidoc[] -include::../types/mod.asciidoc[] diff --git a/docs/reference/esql/functions/layout/mul.asciidoc b/docs/reference/esql/functions/layout/mul.asciidoc deleted file mode 100644 index 7425b5cf3436f..0000000000000 --- a/docs/reference/esql/functions/layout/mul.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-mul]] -=== `MUL` - -*Syntax* - -[.text-center] -image::esql/functions/signature/mul.svg[Embedded,opts=inline] - -include::../parameters/mul.asciidoc[] -include::../description/mul.asciidoc[] -include::../types/mul.asciidoc[] diff --git a/docs/reference/esql/functions/layout/neg.asciidoc b/docs/reference/esql/functions/layout/neg.asciidoc deleted file mode 100644 index 98b97f8714a9b..0000000000000 --- a/docs/reference/esql/functions/layout/neg.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-neg]] -=== `NEG` - -*Syntax* - -[.text-center] -image::esql/functions/signature/neg.svg[Embedded,opts=inline] - -include::../parameters/neg.asciidoc[] -include::../description/neg.asciidoc[] -include::../types/neg.asciidoc[] diff --git a/docs/reference/esql/functions/layout/not_equals.asciidoc b/docs/reference/esql/functions/layout/not_equals.asciidoc deleted file mode 100644 index 718ae22375c9b..0000000000000 --- a/docs/reference/esql/functions/layout/not_equals.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-not_equals]] -=== `NOT_EQUALS` - -*Syntax* - -[.text-center] -image::esql/functions/signature/not_equals.svg[Embedded,opts=inline] - -include::../parameters/not_equals.asciidoc[] -include::../description/not_equals.asciidoc[] -include::../types/not_equals.asciidoc[] diff --git a/docs/reference/esql/functions/layout/rlike.asciidoc b/docs/reference/esql/functions/layout/rlike.asciidoc deleted file mode 100644 index 0e86f6768e6df..0000000000000 --- a/docs/reference/esql/functions/layout/rlike.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-rlike]] -=== `RLIKE` - -*Syntax* - -[.text-center] -image::esql/functions/signature/rlike.svg[Embedded,opts=inline] - -include::../parameters/rlike.asciidoc[] -include::../description/rlike.asciidoc[] -include::../types/rlike.asciidoc[] -include::../examples/rlike.asciidoc[] diff --git a/docs/reference/esql/functions/layout/sub.asciidoc b/docs/reference/esql/functions/layout/sub.asciidoc deleted file mode 100644 index 7406859a80873..0000000000000 --- a/docs/reference/esql/functions/layout/sub.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-sub]] -=== `SUB` - -*Syntax* - -[.text-center] -image::esql/functions/signature/sub.svg[Embedded,opts=inline] - -include::../parameters/sub.asciidoc[] -include::../description/sub.asciidoc[] -include::../types/sub.asciidoc[] diff --git a/docs/reference/esql/functions/kibana/docs/like.md b/docs/reference/esql/functions/like.asciidoc similarity index 55% rename from docs/reference/esql/functions/kibana/docs/like.md rename to docs/reference/esql/functions/like.asciidoc index 4c400bdc65479..2298617be5699 100644 --- a/docs/reference/esql/functions/kibana/docs/like.md +++ b/docs/reference/esql/functions/like.asciidoc @@ -1,8 +1,8 @@ - +[discrete] +[[esql-like-operator]] +=== `LIKE` -### LIKE +// tag::body[] Use `LIKE` to filter data based on string patterns using wildcards. `LIKE` usually acts on a field placed on the left-hand side of the operator, but it can also act on a constant (literal) expression. The right-hand side of the operator @@ -13,8 +13,14 @@ The following wildcard characters are supported: * `*` matches zero or more characters. * `?` matches one character. -``` -FROM employees -| WHERE first_name LIKE "?b*" -| KEEP first_name, last_name -``` +include::./types/like.asciidoc[] + +[source.merge.styled,esql] +---- +include::{esql-specs}/docs.csv-spec[tag=like] +---- +[%header.monospaced.styled,format=dsv,separator=|] +|=== +include::{esql-specs}/docs.csv-spec[tag=like-result] +|=== +// end::body[] diff --git a/docs/reference/esql/functions/parameters/add.asciidoc b/docs/reference/esql/functions/parameters/add.asciidoc deleted file mode 100644 index ccc418eba0b75..0000000000000 --- a/docs/reference/esql/functions/parameters/add.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`lhs`:: -A numeric value or a date time value. - -`rhs`:: -A numeric value or a date time value. diff --git a/docs/reference/esql/functions/parameters/div.asciidoc b/docs/reference/esql/functions/parameters/div.asciidoc deleted file mode 100644 index 38be1905c9593..0000000000000 --- a/docs/reference/esql/functions/parameters/div.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`lhs`:: -A numeric value. - -`rhs`:: -A numeric value. diff --git a/docs/reference/esql/functions/parameters/equals.asciidoc b/docs/reference/esql/functions/parameters/equals.asciidoc deleted file mode 100644 index 34a7e43e23ddf..0000000000000 --- a/docs/reference/esql/functions/parameters/equals.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`lhs`:: -An expression. - -`rhs`:: -An expression. diff --git a/docs/reference/esql/functions/parameters/greater_than.asciidoc b/docs/reference/esql/functions/parameters/greater_than.asciidoc deleted file mode 100644 index 34a7e43e23ddf..0000000000000 --- a/docs/reference/esql/functions/parameters/greater_than.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`lhs`:: -An expression. - -`rhs`:: -An expression. diff --git a/docs/reference/esql/functions/parameters/greater_than_or_equal.asciidoc b/docs/reference/esql/functions/parameters/greater_than_or_equal.asciidoc deleted file mode 100644 index 34a7e43e23ddf..0000000000000 --- a/docs/reference/esql/functions/parameters/greater_than_or_equal.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`lhs`:: -An expression. - -`rhs`:: -An expression. diff --git a/docs/reference/esql/functions/parameters/in.asciidoc b/docs/reference/esql/functions/parameters/in.asciidoc deleted file mode 100644 index 08c34183e5e52..0000000000000 --- a/docs/reference/esql/functions/parameters/in.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`field`:: -An expression. - -`inlist`:: -A list of items. diff --git a/docs/reference/esql/functions/parameters/is_not_null.asciidoc b/docs/reference/esql/functions/parameters/is_not_null.asciidoc deleted file mode 100644 index e0a0566763ad9..0000000000000 --- a/docs/reference/esql/functions/parameters/is_not_null.asciidoc +++ /dev/null @@ -1,6 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`arg1`:: - diff --git a/docs/reference/esql/functions/parameters/is_null.asciidoc b/docs/reference/esql/functions/parameters/is_null.asciidoc deleted file mode 100644 index e0a0566763ad9..0000000000000 --- a/docs/reference/esql/functions/parameters/is_null.asciidoc +++ /dev/null @@ -1,6 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`arg1`:: - diff --git a/docs/reference/esql/functions/parameters/less_than.asciidoc b/docs/reference/esql/functions/parameters/less_than.asciidoc deleted file mode 100644 index 34a7e43e23ddf..0000000000000 --- a/docs/reference/esql/functions/parameters/less_than.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`lhs`:: -An expression. - -`rhs`:: -An expression. diff --git a/docs/reference/esql/functions/parameters/less_than_or_equal.asciidoc b/docs/reference/esql/functions/parameters/less_than_or_equal.asciidoc deleted file mode 100644 index 34a7e43e23ddf..0000000000000 --- a/docs/reference/esql/functions/parameters/less_than_or_equal.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`lhs`:: -An expression. - -`rhs`:: -An expression. diff --git a/docs/reference/esql/functions/parameters/like.asciidoc b/docs/reference/esql/functions/parameters/like.asciidoc deleted file mode 100644 index 095efa060a999..0000000000000 --- a/docs/reference/esql/functions/parameters/like.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`str`:: -A literal expression. - -`pattern`:: -Pattern. diff --git a/docs/reference/esql/functions/parameters/mod.asciidoc b/docs/reference/esql/functions/parameters/mod.asciidoc deleted file mode 100644 index 38be1905c9593..0000000000000 --- a/docs/reference/esql/functions/parameters/mod.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`lhs`:: -A numeric value. - -`rhs`:: -A numeric value. diff --git a/docs/reference/esql/functions/parameters/mul.asciidoc b/docs/reference/esql/functions/parameters/mul.asciidoc deleted file mode 100644 index 38be1905c9593..0000000000000 --- a/docs/reference/esql/functions/parameters/mul.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`lhs`:: -A numeric value. - -`rhs`:: -A numeric value. diff --git a/docs/reference/esql/functions/parameters/neg.asciidoc b/docs/reference/esql/functions/parameters/neg.asciidoc deleted file mode 100644 index 61f0cae353914..0000000000000 --- a/docs/reference/esql/functions/parameters/neg.asciidoc +++ /dev/null @@ -1,6 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`field`:: -A numeric value or a date time interval. diff --git a/docs/reference/esql/functions/parameters/not_equals.asciidoc b/docs/reference/esql/functions/parameters/not_equals.asciidoc deleted file mode 100644 index 34a7e43e23ddf..0000000000000 --- a/docs/reference/esql/functions/parameters/not_equals.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`lhs`:: -An expression. - -`rhs`:: -An expression. diff --git a/docs/reference/esql/functions/parameters/rlike.asciidoc b/docs/reference/esql/functions/parameters/rlike.asciidoc deleted file mode 100644 index b0518237c7406..0000000000000 --- a/docs/reference/esql/functions/parameters/rlike.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`str`:: -A literal value. - -`pattern`:: -A regular expression. - -`caseInsensitive`:: -Indicate whether it is case insensitive. diff --git a/docs/reference/esql/functions/parameters/sub.asciidoc b/docs/reference/esql/functions/parameters/sub.asciidoc deleted file mode 100644 index ccc418eba0b75..0000000000000 --- a/docs/reference/esql/functions/parameters/sub.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`lhs`:: -A numeric value or a date time value. - -`rhs`:: -A numeric value or a date time value. diff --git a/docs/reference/esql/functions/rlike.asciidoc b/docs/reference/esql/functions/rlike.asciidoc new file mode 100644 index 0000000000000..031594ae403da --- /dev/null +++ b/docs/reference/esql/functions/rlike.asciidoc @@ -0,0 +1,21 @@ +[discete] +[[esql-rlike-operator]] +==== `RLIKE` + +// tag::body[] +Use `RLIKE` to filter data based on string patterns using using +<>. `RLIKE` usually acts on a field placed on +the left-hand side of the operator, but it can also act on a constant (literal) +expression. The right-hand side of the operator represents the pattern. + +include::./types/like.asciidoc[] + +[source.merge.styled,esql] +---- +include::{esql-specs}/docs.csv-spec[tag=rlike] +---- +[%header.monospaced.styled,format=dsv,separator=|] +|=== +include::{esql-specs}/docs.csv-spec[tag=rlike-result] +|=== +// end::body[] diff --git a/docs/reference/esql/functions/signature/in.svg b/docs/reference/esql/functions/signature/in.svg deleted file mode 100644 index f31ce1b5e2b32..0000000000000 --- a/docs/reference/esql/functions/signature/in.svg +++ /dev/null @@ -1 +0,0 @@ -IN(field,inlist) \ No newline at end of file diff --git a/docs/reference/esql/functions/signature/is_not_null.svg b/docs/reference/esql/functions/signature/is_not_null.svg deleted file mode 100644 index 627ee27afa27f..0000000000000 --- a/docs/reference/esql/functions/signature/is_not_null.svg +++ /dev/null @@ -1 +0,0 @@ -IS_NOT_NULL(arg1) \ No newline at end of file diff --git a/docs/reference/esql/functions/signature/is_null.svg b/docs/reference/esql/functions/signature/is_null.svg deleted file mode 100644 index 4d50937d64d49..0000000000000 --- a/docs/reference/esql/functions/signature/is_null.svg +++ /dev/null @@ -1 +0,0 @@ -IS_NULL(arg1) \ No newline at end of file diff --git a/docs/reference/esql/functions/signature/like.svg b/docs/reference/esql/functions/signature/like.svg deleted file mode 100644 index 5c64a198ba252..0000000000000 --- a/docs/reference/esql/functions/signature/like.svg +++ /dev/null @@ -1 +0,0 @@ -LIKE(str,pattern) \ No newline at end of file diff --git a/docs/reference/esql/functions/signature/rlike.svg b/docs/reference/esql/functions/signature/rlike.svg deleted file mode 100644 index de228f0b320c8..0000000000000 --- a/docs/reference/esql/functions/signature/rlike.svg +++ /dev/null @@ -1 +0,0 @@ -RLIKE(str,pattern,caseInsensitive) \ No newline at end of file diff --git a/docs/reference/esql/functions/types/in.asciidoc b/docs/reference/esql/functions/types/in.asciidoc deleted file mode 100644 index 6ed2c250ef0ac..0000000000000 --- a/docs/reference/esql/functions/types/in.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Supported types* - -[%header.monospaced.styled,format=dsv,separator=|] -|=== -field | inlist | result -boolean | boolean | boolean -cartesian_point | cartesian_point | boolean -cartesian_shape | cartesian_shape | boolean -double | double | boolean -geo_point | geo_point | boolean -geo_shape | geo_shape | boolean -integer | integer | boolean -ip | ip | boolean -keyword | keyword | boolean -keyword | text | boolean -long | long | boolean -text | keyword | boolean -text | text | boolean -version | version | boolean -|=== diff --git a/docs/reference/esql/functions/types/is_not_null.asciidoc b/docs/reference/esql/functions/types/is_not_null.asciidoc deleted file mode 100644 index 7bd5c2fab583f..0000000000000 --- a/docs/reference/esql/functions/types/is_not_null.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Supported types* - -[%header.monospaced.styled,format=dsv,separator=|] -|=== -arg1 | result -boolean | boolean -cartesian_point | boolean -cartesian_shape | boolean -datetime | boolean -double | boolean -geo_point | boolean -geo_shape | boolean -integer | boolean -ip | boolean -keyword | boolean -long | boolean -text | boolean -unsigned_long | boolean -version | boolean -|=== diff --git a/docs/reference/esql/functions/types/is_null.asciidoc b/docs/reference/esql/functions/types/is_null.asciidoc deleted file mode 100644 index 7bd5c2fab583f..0000000000000 --- a/docs/reference/esql/functions/types/is_null.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Supported types* - -[%header.monospaced.styled,format=dsv,separator=|] -|=== -arg1 | result -boolean | boolean -cartesian_point | boolean -cartesian_shape | boolean -datetime | boolean -double | boolean -geo_point | boolean -geo_shape | boolean -integer | boolean -ip | boolean -keyword | boolean -long | boolean -text | boolean -unsigned_long | boolean -version | boolean -|=== From e85cf819213f8e4bd1519007c685aa08c859b6ee Mon Sep 17 00:00:00 2001 From: Fang Xing Date: Mon, 22 Jul 2024 00:16:36 -0400 Subject: [PATCH 5/7] docs --- docs/reference/esql/functions/case.asciidoc | 70 --- .../esql/functions/description/in.asciidoc | 5 + .../esql/functions/examples/in.asciidoc | 13 + .../esql/functions/kibana/definition/add.json | 296 +++++++++++++ .../esql/functions/kibana/definition/div.json | 189 ++++++++ .../functions/kibana/definition/equals.json | 405 ++++++++++++++++++ .../kibana/definition/greater_than.json | 315 ++++++++++++++ .../definition/greater_than_or_equal.json | 315 ++++++++++++++ .../esql/functions/kibana/definition/in.json | 263 ++++++++++++ .../kibana/definition/less_than.json | 315 ++++++++++++++ .../kibana/definition/less_than_or_equal.json | 315 ++++++++++++++ .../functions/kibana/definition/like.json | 47 ++ .../esql/functions/kibana/definition/mod.json | 188 ++++++++ .../esql/functions/kibana/definition/mul.json | 188 ++++++++ .../esql/functions/kibana/definition/neg.json | 68 +++ .../kibana/definition/not_equals.json | 405 ++++++++++++++++++ .../functions/kibana/definition/rlike.json | 47 ++ .../esql/functions/kibana/definition/sub.json | 260 +++++++++++ .../esql/functions/kibana/docs/add.md | 7 + .../esql/functions/kibana/docs/div.md | 8 + .../esql/functions/kibana/docs/equals.md | 8 + .../functions/kibana/docs/greater_than.md | 8 + .../kibana/docs/greater_than_or_equal.md | 8 + .../esql/functions/kibana/docs/in.md | 11 + .../esql/functions/kibana/docs/less_than.md | 8 + .../kibana/docs/less_than_or_equal.md | 8 + .../esql/functions/kibana/docs/like.md | 20 + .../esql/functions/kibana/docs/mod.md | 7 + .../esql/functions/kibana/docs/mul.md | 7 + .../esql/functions/kibana/docs/neg.md | 7 + .../esql/functions/kibana/docs/not_equals.md | 8 + .../esql/functions/kibana/docs/rlike.md | 15 + .../esql/functions/kibana/docs/sub.md | 7 + .../esql/functions/layout/in.asciidoc | 15 + .../esql/functions/operators.asciidoc | 4 +- .../esql/functions/parameters/in.asciidoc | 9 + .../reference/esql/functions/signature/in.svg | 1 + .../esql/functions/types/in.asciidoc | 22 + .../esql/functions/types/neg.asciidoc | 2 +- .../esql/functions/types/rlike.asciidoc | 6 +- .../src/main/resources/meta.csv-spec | 6 +- .../function/EsqlFunctionRegistry.java | 5 +- .../function/scalar/string/RLike.java | 14 +- .../function/scalar/string/WildcardLike.java | 4 +- .../predicate/operator/arithmetic/Add.java | 20 +- .../predicate/operator/arithmetic/Div.java | 15 +- .../predicate/operator/arithmetic/Mod.java | 13 +- .../predicate/operator/arithmetic/Mul.java | 13 +- .../predicate/operator/arithmetic/Neg.java | 15 +- .../predicate/operator/arithmetic/Sub.java | 21 +- .../predicate/operator/comparison/Equals.java | 51 ++- .../operator/comparison/GreaterThan.java | 23 +- .../comparison/GreaterThanOrEqual.java | 23 +- .../predicate/operator/comparison/In.java | 41 +- .../operator/comparison/LessThan.java | 23 +- .../operator/comparison/LessThanOrEqual.java | 23 +- .../operator/comparison/NotEquals.java | 51 ++- .../function/AbstractFunctionTestCase.java | 103 ++++- .../function/scalar/string/RLikeTests.java | 21 +- 59 files changed, 4273 insertions(+), 112 deletions(-) delete mode 100644 docs/reference/esql/functions/case.asciidoc create mode 100644 docs/reference/esql/functions/description/in.asciidoc create mode 100644 docs/reference/esql/functions/examples/in.asciidoc create mode 100644 docs/reference/esql/functions/kibana/definition/add.json create mode 100644 docs/reference/esql/functions/kibana/definition/div.json create mode 100644 docs/reference/esql/functions/kibana/definition/equals.json create mode 100644 docs/reference/esql/functions/kibana/definition/greater_than.json create mode 100644 docs/reference/esql/functions/kibana/definition/greater_than_or_equal.json create mode 100644 docs/reference/esql/functions/kibana/definition/in.json create mode 100644 docs/reference/esql/functions/kibana/definition/less_than.json create mode 100644 docs/reference/esql/functions/kibana/definition/less_than_or_equal.json create mode 100644 docs/reference/esql/functions/kibana/definition/like.json create mode 100644 docs/reference/esql/functions/kibana/definition/mod.json create mode 100644 docs/reference/esql/functions/kibana/definition/mul.json create mode 100644 docs/reference/esql/functions/kibana/definition/neg.json create mode 100644 docs/reference/esql/functions/kibana/definition/not_equals.json create mode 100644 docs/reference/esql/functions/kibana/definition/rlike.json create mode 100644 docs/reference/esql/functions/kibana/definition/sub.json create mode 100644 docs/reference/esql/functions/kibana/docs/add.md create mode 100644 docs/reference/esql/functions/kibana/docs/div.md create mode 100644 docs/reference/esql/functions/kibana/docs/equals.md create mode 100644 docs/reference/esql/functions/kibana/docs/greater_than.md create mode 100644 docs/reference/esql/functions/kibana/docs/greater_than_or_equal.md create mode 100644 docs/reference/esql/functions/kibana/docs/in.md create mode 100644 docs/reference/esql/functions/kibana/docs/less_than.md create mode 100644 docs/reference/esql/functions/kibana/docs/less_than_or_equal.md create mode 100644 docs/reference/esql/functions/kibana/docs/like.md create mode 100644 docs/reference/esql/functions/kibana/docs/mod.md create mode 100644 docs/reference/esql/functions/kibana/docs/mul.md create mode 100644 docs/reference/esql/functions/kibana/docs/neg.md create mode 100644 docs/reference/esql/functions/kibana/docs/not_equals.md create mode 100644 docs/reference/esql/functions/kibana/docs/rlike.md create mode 100644 docs/reference/esql/functions/kibana/docs/sub.md create mode 100644 docs/reference/esql/functions/layout/in.asciidoc create mode 100644 docs/reference/esql/functions/parameters/in.asciidoc create mode 100644 docs/reference/esql/functions/signature/in.svg create mode 100644 docs/reference/esql/functions/types/in.asciidoc diff --git a/docs/reference/esql/functions/case.asciidoc b/docs/reference/esql/functions/case.asciidoc deleted file mode 100644 index b5fda636135b2..0000000000000 --- a/docs/reference/esql/functions/case.asciidoc +++ /dev/null @@ -1,70 +0,0 @@ -[discrete] -[[esql-case]] -=== `CASE` - -*Syntax* - -[source,esql] ----- -CASE(condition1, value1[, ..., conditionN, valueN][, default_value]) ----- - -*Parameters* - -`conditionX`:: -A condition. - -`valueX`:: -The value that's returned when the corresponding condition is the first to -evaluate to `true`. - -`default_value`:: -The default value that's is returned when no condition matches. - -*Description* - -Accepts pairs of conditions and values. The function returns the value that -belongs to the first condition that evaluates to `true`. - -If the number of arguments is odd, the last argument is the default value which -is returned when no condition matches. If the number of arguments is even, and -no condition matches, the function returns `null`. - -*Example* - -Determine whether employees are monolingual, bilingual, or polyglot: - -[source,esql] -[source.merge.styled,esql] ----- -include::{esql-specs}/docs.csv-spec[tag=case] ----- -[%header.monospaced.styled,format=dsv,separator=|] -|=== -include::{esql-specs}/docs.csv-spec[tag=case-result] -|=== - -Calculate the total connection success rate based on log messages: - -[source,esql] -[source.merge.styled,esql] ----- -include::{esql-specs}/conditional.csv-spec[tag=docsCaseSuccessRate] ----- -[%header.monospaced.styled,format=dsv,separator=|] -|=== -include::{esql-specs}/conditional.csv-spec[tag=docsCaseSuccessRate-result] -|=== - -Calculate an hourly error rate as a percentage of the total number of log -messages: - -[source,esql] -[source.merge.styled,esql] ----- -include::{esql-specs}/conditional.csv-spec[tag=docsCaseHourlyErrorRate] ----- -[%header.monospaced.styled,format=dsv,separator=|] -|=== -include::{esql-specs}/conditional.csv-spec[tag=docsCaseHourlyErrorRate-result] -|=== diff --git a/docs/reference/esql/functions/description/in.asciidoc b/docs/reference/esql/functions/description/in.asciidoc new file mode 100644 index 0000000000000..a380fd8e72009 --- /dev/null +++ b/docs/reference/esql/functions/description/in.asciidoc @@ -0,0 +1,5 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Description* + +The `IN` operator allows testing whether a field or expression equals an element in a list of literals, fields or expressions. diff --git a/docs/reference/esql/functions/examples/in.asciidoc b/docs/reference/esql/functions/examples/in.asciidoc new file mode 100644 index 0000000000000..7bd53b49a36f8 --- /dev/null +++ b/docs/reference/esql/functions/examples/in.asciidoc @@ -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}/row.csv-spec[tag=in-with-expressions] +---- +[%header.monospaced.styled,format=dsv,separator=|] +|=== +include::{esql-specs}/row.csv-spec[tag=in-with-expressions-result] +|=== + diff --git a/docs/reference/esql/functions/kibana/definition/add.json b/docs/reference/esql/functions/kibana/definition/add.json new file mode 100644 index 0000000000000..e8f971fdf0671 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/add.json @@ -0,0 +1,296 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "add", + "description" : "Add two numbers together. If either field is <> then the result is `null`.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "date_period" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "datetime" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "datetime" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "datetime" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "integer" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "datetime" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "time_duration" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "unsigned_long" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/div.json b/docs/reference/esql/functions/kibana/definition/div.json new file mode 100644 index 0000000000000..0e49da7bdac61 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/div.json @@ -0,0 +1,189 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "div", + "description" : "Divide one number by another. If either field is <> then the result is `null`.", + "note" : "Division of two integer types will yield an integer result, rounding towards 0. If you need floating point division, <> one of the arguments to a `DOUBLE`.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "integer" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "unsigned_long" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/equals.json b/docs/reference/esql/functions/kibana/definition/equals.json new file mode 100644 index 0000000000000..8c6d6d530302e --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/equals.json @@ -0,0 +1,405 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "equals", + "description" : "Check if two fields are equal. If either field is <> then the result is `null`.", + "note" : "This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "boolean", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "boolean", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "cartesian_point", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "cartesian_point", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "cartesian_shape", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "cartesian_shape", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "geo_point", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "geo_point", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "geo_shape", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "geo_shape", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/greater_than.json b/docs/reference/esql/functions/kibana/definition/greater_than.json new file mode 100644 index 0000000000000..371569fdb3489 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/greater_than.json @@ -0,0 +1,315 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "greater_than", + "description" : "Check if one field is greater than another. If either field is <> then the result is `null`.", + "note" : "This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/greater_than_or_equal.json b/docs/reference/esql/functions/kibana/definition/greater_than_or_equal.json new file mode 100644 index 0000000000000..ed368d5677f77 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/greater_than_or_equal.json @@ -0,0 +1,315 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "greater_than_or_equal", + "description" : "Check if one field is greater than or equal to another. If either field is <> then the result is `null`.", + "note" : "This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/in.json b/docs/reference/esql/functions/kibana/definition/in.json new file mode 100644 index 0000000000000..7dd9889caefe0 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/in.json @@ -0,0 +1,263 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "in", + "description" : "The `IN` operator allows testing whether a field or expression equals an element in a list of literals, fields or expressions.", + "signatures" : [ + { + "params" : [ + { + "name" : "field", + "type" : "boolean", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "boolean", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "cartesian_point", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "cartesian_point", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "cartesian_shape", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "cartesian_shape", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "double", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "geo_point", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "geo_point", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "geo_shape", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "geo_shape", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "integer", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "ip", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "ip", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "keyword", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "text", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "long", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "keyword", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "text", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "field", + "type" : "version", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "inlist", + "type" : "version", + "optional" : false, + "description" : "A list of items." + } + ], + "variadic" : true, + "returnType" : "boolean" + } + ], + "examples" : [ + "ROW a = 1, b = 4, c = 3\n| WHERE c-a IN (3, b / 2, a)" + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/less_than.json b/docs/reference/esql/functions/kibana/definition/less_than.json new file mode 100644 index 0000000000000..b756319d67142 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/less_than.json @@ -0,0 +1,315 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "less_than", + "description" : "Check if one field is less than another. If either field is <> then the result is `null`.", + "note" : "This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/less_than_or_equal.json b/docs/reference/esql/functions/kibana/definition/less_than_or_equal.json new file mode 100644 index 0000000000000..e06ff383c4242 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/less_than_or_equal.json @@ -0,0 +1,315 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "less_than_or_equal", + "description" : "Check if one field is less than or equal to another. If either field is <> then the result is `null`.", + "note" : "This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/like.json b/docs/reference/esql/functions/kibana/definition/like.json new file mode 100644 index 0000000000000..a852b4271bb70 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/like.json @@ -0,0 +1,47 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "like", + "description" : "Use `LIKE` to filter data based on string patterns using wildcards. `LIKE`\nusually acts on a field placed on the left-hand side of the operator, but it can\nalso act on a constant (literal) expression. The right-hand side of the operator\nrepresents the pattern.\n\nThe following wildcard characters are supported:\n\n* `*` matches zero or more characters.\n* `?` matches one character.", + "signatures" : [ + { + "params" : [ + { + "name" : "str", + "type" : "keyword", + "optional" : false, + "description" : "A literal expression." + }, + { + "name" : "pattern", + "type" : "keyword", + "optional" : false, + "description" : "Pattern." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "str", + "type" : "text", + "optional" : false, + "description" : "A literal expression." + }, + { + "name" : "pattern", + "type" : "text", + "optional" : false, + "description" : "Pattern." + } + ], + "variadic" : true, + "returnType" : "boolean" + } + ], + "examples" : [ + "FROM employees\n| WHERE first_name LIKE \"?b*\"\n| KEEP first_name, last_name" + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/mod.json b/docs/reference/esql/functions/kibana/definition/mod.json new file mode 100644 index 0000000000000..78769f6bd4ecf --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/mod.json @@ -0,0 +1,188 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "mod", + "description" : "Divide one number by another and return the remainder. If either field is <> then the result is `null`.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "integer" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "unsigned_long" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/mul.json b/docs/reference/esql/functions/kibana/definition/mul.json new file mode 100644 index 0000000000000..6290369fb5b0f --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/mul.json @@ -0,0 +1,188 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "mul", + "description" : "Multiply two numbers together. If either field is <> then the result is `null`.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "integer" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value." + } + ], + "variadic" : false, + "returnType" : "unsigned_long" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/neg.json b/docs/reference/esql/functions/kibana/definition/neg.json new file mode 100644 index 0000000000000..bf203d8c7c226 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/neg.json @@ -0,0 +1,68 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "neg", + "description" : "Returns the negation of the argument.", + "signatures" : [ + { + "params" : [ + { + "name" : "field", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time interval." + } + ], + "variadic" : false, + "returnType" : "date_period" + }, + { + "params" : [ + { + "name" : "field", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time interval." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "field", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time interval." + } + ], + "variadic" : false, + "returnType" : "integer" + }, + { + "params" : [ + { + "name" : "field", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time interval." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "field", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time interval." + } + ], + "variadic" : false, + "returnType" : "time_duration" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/not_equals.json b/docs/reference/esql/functions/kibana/definition/not_equals.json new file mode 100644 index 0000000000000..c5e61e3adaf44 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/not_equals.json @@ -0,0 +1,405 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "not_equals", + "description" : "Check if two fields are unequal. If either field is <> then the result is `null`.", + "note" : "This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "boolean", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "boolean", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "cartesian_point", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "cartesian_point", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "cartesian_shape", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "cartesian_shape", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "datetime", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "geo_point", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "geo_point", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "geo_shape", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "geo_shape", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "ip", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "keyword", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "text", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + }, + { + "name" : "rhs", + "type" : "version", + "optional" : false, + "description" : "An expression." + } + ], + "variadic" : false, + "returnType" : "boolean" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/rlike.json b/docs/reference/esql/functions/kibana/definition/rlike.json new file mode 100644 index 0000000000000..bd6b83fe44a75 --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/rlike.json @@ -0,0 +1,47 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "rlike", + "description" : "Use `RLIKE` to filter data based on string patterns using using\n<>. `RLIKE` usually acts on a field placed on\nthe left-hand side of the operator, but it can also act on a constant (literal)\nexpression. The right-hand side of the operator represents the pattern.", + "signatures" : [ + { + "params" : [ + { + "name" : "str", + "type" : "keyword", + "optional" : false, + "description" : "A literal value." + }, + { + "name" : "pattern", + "type" : "keyword", + "optional" : false, + "description" : "A regular expression." + } + ], + "variadic" : true, + "returnType" : "boolean" + }, + { + "params" : [ + { + "name" : "str", + "type" : "text", + "optional" : false, + "description" : "A literal value." + }, + { + "name" : "pattern", + "type" : "text", + "optional" : false, + "description" : "A regular expression." + } + ], + "variadic" : true, + "returnType" : "boolean" + } + ], + "examples" : [ + "FROM employees\n| WHERE first_name RLIKE \".leja.*\"\n| KEEP first_name, last_name" + ] +} diff --git a/docs/reference/esql/functions/kibana/definition/sub.json b/docs/reference/esql/functions/kibana/definition/sub.json new file mode 100644 index 0000000000000..15888bd62b06b --- /dev/null +++ b/docs/reference/esql/functions/kibana/definition/sub.json @@ -0,0 +1,260 @@ +{ + "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", + "type" : "eval", + "name" : "sub", + "description" : "Subtract one number from another. If either field is <> then the result is `null`.", + "signatures" : [ + { + "params" : [ + { + "name" : "lhs", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "date_period" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "date_period", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "datetime" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "datetime", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "datetime" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "integer" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "double", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "double" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "integer", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "long" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "time_duration", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "time_duration" + }, + { + "params" : [ + { + "name" : "lhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value or a date time value." + }, + { + "name" : "rhs", + "type" : "unsigned_long", + "optional" : false, + "description" : "A numeric value or a date time value." + } + ], + "variadic" : false, + "returnType" : "unsigned_long" + } + ] +} diff --git a/docs/reference/esql/functions/kibana/docs/add.md b/docs/reference/esql/functions/kibana/docs/add.md new file mode 100644 index 0000000000000..3f99bd4c77551 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/add.md @@ -0,0 +1,7 @@ + + +### ADD +Add two numbers together. If either field is <> then the result is `null`. + diff --git a/docs/reference/esql/functions/kibana/docs/div.md b/docs/reference/esql/functions/kibana/docs/div.md new file mode 100644 index 0000000000000..a8b7b4e58f376 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/div.md @@ -0,0 +1,8 @@ + + +### DIV +Divide one number by another. If either field is <> then the result is `null`. + +Note: Division of two integer types will yield an integer result, rounding towards 0. If you need floating point division, <> one of the arguments to a `DOUBLE`. diff --git a/docs/reference/esql/functions/kibana/docs/equals.md b/docs/reference/esql/functions/kibana/docs/equals.md new file mode 100644 index 0000000000000..b8fcb72c2ccd5 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/equals.md @@ -0,0 +1,8 @@ + + +### EQUALS +Check if two fields are equal. If either field is <> then the result is `null`. + +Note: This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>. diff --git a/docs/reference/esql/functions/kibana/docs/greater_than.md b/docs/reference/esql/functions/kibana/docs/greater_than.md new file mode 100644 index 0000000000000..67f99eda3aed7 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/greater_than.md @@ -0,0 +1,8 @@ + + +### GREATER_THAN +Check if one field is greater than another. If either field is <> then the result is `null`. + +Note: This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>. diff --git a/docs/reference/esql/functions/kibana/docs/greater_than_or_equal.md b/docs/reference/esql/functions/kibana/docs/greater_than_or_equal.md new file mode 100644 index 0000000000000..73d3ac6371b07 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/greater_than_or_equal.md @@ -0,0 +1,8 @@ + + +### GREATER_THAN_OR_EQUAL +Check if one field is greater than or equal to another. If either field is <> then the result is `null`. + +Note: This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>. diff --git a/docs/reference/esql/functions/kibana/docs/in.md b/docs/reference/esql/functions/kibana/docs/in.md new file mode 100644 index 0000000000000..e096146374f38 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/in.md @@ -0,0 +1,11 @@ + + +### IN +The `IN` operator allows testing whether a field or expression equals an element in a list of literals, fields or expressions. + +``` +ROW a = 1, b = 4, c = 3 +| WHERE c-a IN (3, b / 2, a) +``` diff --git a/docs/reference/esql/functions/kibana/docs/less_than.md b/docs/reference/esql/functions/kibana/docs/less_than.md new file mode 100644 index 0000000000000..0d171d06c68d3 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/less_than.md @@ -0,0 +1,8 @@ + + +### LESS_THAN +Check if one field is less than another. If either field is <> then the result is `null`. + +Note: This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>. diff --git a/docs/reference/esql/functions/kibana/docs/less_than_or_equal.md b/docs/reference/esql/functions/kibana/docs/less_than_or_equal.md new file mode 100644 index 0000000000000..acb92288c2c46 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/less_than_or_equal.md @@ -0,0 +1,8 @@ + + +### LESS_THAN_OR_EQUAL +Check if one field is less than or equal to another. If either field is <> then the result is `null`. + +Note: This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>. diff --git a/docs/reference/esql/functions/kibana/docs/like.md b/docs/reference/esql/functions/kibana/docs/like.md new file mode 100644 index 0000000000000..4c400bdc65479 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/like.md @@ -0,0 +1,20 @@ + + +### LIKE +Use `LIKE` to filter data based on string patterns using wildcards. `LIKE` +usually acts on a field placed on the left-hand side of the operator, but it can +also act on a constant (literal) expression. The right-hand side of the operator +represents the pattern. + +The following wildcard characters are supported: + +* `*` matches zero or more characters. +* `?` matches one character. + +``` +FROM employees +| WHERE first_name LIKE "?b*" +| KEEP first_name, last_name +``` diff --git a/docs/reference/esql/functions/kibana/docs/mod.md b/docs/reference/esql/functions/kibana/docs/mod.md new file mode 100644 index 0000000000000..e6b3c92406072 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/mod.md @@ -0,0 +1,7 @@ + + +### MOD +Divide one number by another and return the remainder. If either field is <> then the result is `null`. + diff --git a/docs/reference/esql/functions/kibana/docs/mul.md b/docs/reference/esql/functions/kibana/docs/mul.md new file mode 100644 index 0000000000000..3f24f3b1a67bb --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/mul.md @@ -0,0 +1,7 @@ + + +### MUL +Multiply two numbers together. If either field is <> then the result is `null`. + diff --git a/docs/reference/esql/functions/kibana/docs/neg.md b/docs/reference/esql/functions/kibana/docs/neg.md new file mode 100644 index 0000000000000..2d1c65487343f --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/neg.md @@ -0,0 +1,7 @@ + + +### NEG +Returns the negation of the argument. + diff --git a/docs/reference/esql/functions/kibana/docs/not_equals.md b/docs/reference/esql/functions/kibana/docs/not_equals.md new file mode 100644 index 0000000000000..cff2130e766ed --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/not_equals.md @@ -0,0 +1,8 @@ + + +### NOT_EQUALS +Check if two fields are unequal. If either field is <> then the result is `null`. + +Note: This is pushed to the underlying search index if one side of the comparison is constant and the other side is a field in the index that has both an <> and <>. diff --git a/docs/reference/esql/functions/kibana/docs/rlike.md b/docs/reference/esql/functions/kibana/docs/rlike.md new file mode 100644 index 0000000000000..ed94553e7e44f --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/rlike.md @@ -0,0 +1,15 @@ + + +### RLIKE +Use `RLIKE` to filter data based on string patterns using using +<>. `RLIKE` usually acts on a field placed on +the left-hand side of the operator, but it can also act on a constant (literal) +expression. The right-hand side of the operator represents the pattern. + +``` +FROM employees +| WHERE first_name RLIKE ".leja.*" +| KEEP first_name, last_name +``` diff --git a/docs/reference/esql/functions/kibana/docs/sub.md b/docs/reference/esql/functions/kibana/docs/sub.md new file mode 100644 index 0000000000000..10746ed81cfe3 --- /dev/null +++ b/docs/reference/esql/functions/kibana/docs/sub.md @@ -0,0 +1,7 @@ + + +### SUB +Subtract one number from another. If either field is <> then the result is `null`. + diff --git a/docs/reference/esql/functions/layout/in.asciidoc b/docs/reference/esql/functions/layout/in.asciidoc new file mode 100644 index 0000000000000..b5a421cfd370e --- /dev/null +++ b/docs/reference/esql/functions/layout/in.asciidoc @@ -0,0 +1,15 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +[discrete] +[[esql-in]] +=== `IN` + +*Syntax* + +[.text-center] +image::esql/functions/signature/in.svg[Embedded,opts=inline] + +include::../parameters/in.asciidoc[] +include::../description/in.asciidoc[] +include::../types/in.asciidoc[] +include::../examples/in.asciidoc[] diff --git a/docs/reference/esql/functions/operators.asciidoc b/docs/reference/esql/functions/operators.asciidoc index ee344a52687c2..0e8fcd0e56ce8 100644 --- a/docs/reference/esql/functions/operators.asciidoc +++ b/docs/reference/esql/functions/operators.asciidoc @@ -13,7 +13,7 @@ Boolean operators for comparing against one or multiple expressions. * <> * <> * <> -* <> +* <> * <> * <> // end::op_list[] @@ -23,6 +23,6 @@ include::unary.asciidoc[] include::logical.asciidoc[] include::predicates.asciidoc[] include::cast.asciidoc[] -include::in.asciidoc[] +include::layout/in.asciidoc[] include::like.asciidoc[] include::rlike.asciidoc[] diff --git a/docs/reference/esql/functions/parameters/in.asciidoc b/docs/reference/esql/functions/parameters/in.asciidoc new file mode 100644 index 0000000000000..08c34183e5e52 --- /dev/null +++ b/docs/reference/esql/functions/parameters/in.asciidoc @@ -0,0 +1,9 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Parameters* + +`field`:: +An expression. + +`inlist`:: +A list of items. diff --git a/docs/reference/esql/functions/signature/in.svg b/docs/reference/esql/functions/signature/in.svg new file mode 100644 index 0000000000000..f31ce1b5e2b32 --- /dev/null +++ b/docs/reference/esql/functions/signature/in.svg @@ -0,0 +1 @@ +IN(field,inlist) \ No newline at end of file diff --git a/docs/reference/esql/functions/types/in.asciidoc b/docs/reference/esql/functions/types/in.asciidoc new file mode 100644 index 0000000000000..6ed2c250ef0ac --- /dev/null +++ b/docs/reference/esql/functions/types/in.asciidoc @@ -0,0 +1,22 @@ +// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. + +*Supported types* + +[%header.monospaced.styled,format=dsv,separator=|] +|=== +field | inlist | result +boolean | boolean | boolean +cartesian_point | cartesian_point | boolean +cartesian_shape | cartesian_shape | boolean +double | double | boolean +geo_point | geo_point | boolean +geo_shape | geo_shape | boolean +integer | integer | boolean +ip | ip | boolean +keyword | keyword | boolean +keyword | text | boolean +long | long | boolean +text | keyword | boolean +text | text | boolean +version | version | boolean +|=== diff --git a/docs/reference/esql/functions/types/neg.asciidoc b/docs/reference/esql/functions/types/neg.asciidoc index 28d3b2a512dec..c0d0a21711552 100644 --- a/docs/reference/esql/functions/types/neg.asciidoc +++ b/docs/reference/esql/functions/types/neg.asciidoc @@ -4,7 +4,7 @@ [%header.monospaced.styled,format=dsv,separator=|] |=== -v | result +field | result date_period | date_period double | double integer | integer diff --git a/docs/reference/esql/functions/types/rlike.asciidoc b/docs/reference/esql/functions/types/rlike.asciidoc index 436333fddf5ee..46532f2af3bf3 100644 --- a/docs/reference/esql/functions/types/rlike.asciidoc +++ b/docs/reference/esql/functions/types/rlike.asciidoc @@ -4,7 +4,7 @@ [%header.monospaced.styled,format=dsv,separator=|] |=== -str | pattern | caseInsensitive | result -keyword | keyword | boolean | boolean -text | text | boolean | boolean +str | pattern | result +keyword | keyword | boolean +text | text | boolean |=== diff --git a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/meta.csv-spec b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/meta.csv-spec index dc2860a5ad8dd..939556f2863b8 100644 --- a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/meta.csv-spec +++ b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/meta.csv-spec @@ -31,6 +31,7 @@ double e() "double|integer|long|unsigned_long floor(number:double|integer|long|unsigned_long)" "keyword from_base64(string:keyword|text)" "boolean|double|integer|ip|keyword|long|text|version greatest(first:boolean|double|integer|ip|keyword|long|text|version, ?rest...:boolean|double|integer|ip|keyword|long|text|version)" +"boolean in(field:boolean|cartesian_point|cartesian_shape|double|geo_point|geo_shape|integer|ip|keyword|long|text|version, inlist...:boolean|cartesian_point|cartesian_shape|double|geo_point|geo_shape|integer|ip|keyword|long|text|version)" "ip ip_prefix(ip:ip, prefixLengthV4:integer, prefixLengthV6:integer)" "boolean|double|integer|ip|keyword|long|text|version least(first:boolean|double|integer|ip|keyword|long|text|version, ?rest...:boolean|double|integer|ip|keyword|long|text|version)" "keyword left(string:keyword|text, length:integer)" @@ -152,6 +153,7 @@ exp |number |"double|integer|long|unsigne floor |number |"double|integer|long|unsigned_long" |Numeric expression. If `null`, the function returns `null`. from_base64 |string |"keyword|text" |A base64 string. greatest |first |"boolean|double|integer|ip|keyword|long|text|version" |First of the columns to evaluate. +in |[field, inlist] |["boolean|cartesian_point|cartesian_shape|double|geo_point|geo_shape|integer|ip|keyword|long|text|version", "boolean|cartesian_point|cartesian_shape|double|geo_point|geo_shape|integer|ip|keyword|long|text|version"] |["An expression.", "A list of items."] ip_prefix |[ip, prefixLengthV4, prefixLengthV6]|[ip, integer, integer] |[IP address of type `ip` (both IPv4 and IPv6 are supported)., Prefix length for IPv4 addresses., Prefix length for IPv6 addresses.] least |first |"boolean|double|integer|ip|keyword|long|text|version" |First of the columns to evaluate. left |[string, length] |["keyword|text", integer] |[The string from which to return a substring., The number of characters to return.] @@ -274,6 +276,7 @@ exp |Returns the value of e raised to the power of the given number. floor |Round a number down to the nearest integer. from_base64 |Decode a base64 string. greatest |Returns the maximum value from multiple columns. This is similar to <> except it is intended to run on multiple columns at once. +in |The `IN` operator allows testing whether a field or expression equals an element in a list of literals, fields or expressions. ip_prefix |Truncates an IP to a given prefix length. least |Returns the minimum value from multiple columns. This is similar to <> except it is intended to run on multiple columns at once. left |Returns the substring that extracts 'length' chars from 'string' starting from the left. @@ -397,6 +400,7 @@ exp |double floor |"double|integer|long|unsigned_long" |false |false |false from_base64 |keyword |false |false |false greatest |"boolean|double|integer|ip|keyword|long|text|version" |false |true |false +in |boolean |[false, false] |true |false ip_prefix |ip |[false, false, false] |false |false least |"boolean|double|integer|ip|keyword|long|text|version" |false |true |false left |keyword |[false, false] |false |false @@ -497,5 +501,5 @@ countFunctions#[skip:-8.15.99] meta functions | stats a = count(*), b = count(*), c = count(*) | mv_expand c; a:long | b:long | c:long -113 | 113 | 113 +114 | 114 | 114 ; diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java index de7e63e16d53e..0c323183d98b5 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java @@ -123,6 +123,7 @@ import org.elasticsearch.xpack.esql.expression.function.scalar.string.ToLower; import org.elasticsearch.xpack.esql.expression.function.scalar.string.ToUpper; import org.elasticsearch.xpack.esql.expression.function.scalar.string.Trim; +import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.In; import org.elasticsearch.xpack.esql.plan.logical.meta.MetaFunctions; import java.lang.reflect.Constructor; @@ -364,7 +365,9 @@ private FunctionDefinition[][] functions() { def(MvSlice.class, MvSlice::new, "mv_slice"), def(MvZip.class, MvZip::new, "mv_zip"), def(MvSum.class, MvSum::new, "mv_sum"), - def(Split.class, Split::new, "split") } }; + def(Split.class, Split::new, "split") }, + // Operators + new FunctionDefinition[] { def(In.class, In::new, "in") } }; } private static FunctionDefinition[][] snapshotFunctions() { diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLike.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLike.java index 56090b0fb9e32..bb923ec924d31 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLike.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLike.java @@ -16,6 +16,9 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo; import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper; +import org.elasticsearch.xpack.esql.expression.function.Example; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.esql.io.stream.PlanStreamInput; import java.io.IOException; @@ -27,7 +30,16 @@ public class RLike extends org.elasticsearch.xpack.esql.core.expression.predicate.regex.RLike implements EvaluatorMapper { public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(Expression.class, "RLike", RLike::new); - public RLike(Source source, Expression value, RLikePattern pattern) { + @FunctionInfo(returnType = "boolean", description = """ + Use `RLIKE` to filter data based on string patterns using using + <>. `RLIKE` usually acts on a field placed on + the left-hand side of the operator, but it can also act on a constant (literal) + expression. The right-hand side of the operator represents the pattern.""", examples = @Example(file = "docs", tag = "rlike")) + public RLike( + Source source, + @Param(name = "str", type = { "keyword", "text" }, description = "A literal value.") Expression value, + @Param(name = "pattern", type = { "keyword", "text" }, description = "A regular expression.") RLikePattern pattern + ) { super(source, value, pattern); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/WildcardLike.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/WildcardLike.java index 325cc0aea4461..15470bb56b29f 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/WildcardLike.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/WildcardLike.java @@ -47,8 +47,8 @@ also act on a constant (literal) expression. The right-hand side of the operator * `?` matches one character.""", examples = @Example(file = "docs", tag = "like")) public WildcardLike( Source source, - @Param(name = "str", type = { "keyword", "text" }) Expression left, - @Param(name = "pattern", type = { "keyword", "text" }) WildcardPattern pattern + @Param(name = "str", type = { "keyword", "text" }, description = "A literal expression.") Expression left, + @Param(name = "pattern", type = { "keyword", "text" }, description = "Pattern.") WildcardPattern pattern ) { super(source, left, pattern, false); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Add.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Add.java index a92741229aaa9..be1c2ddd67539 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Add.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Add.java @@ -16,6 +16,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo; import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.core.util.NumericUtils; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import java.io.IOException; import java.time.DateTimeException; @@ -31,7 +33,23 @@ public class Add extends DateTimeArithmeticOperation implements BinaryComparisonInversible { public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(Expression.class, "Add", Add::new); - public Add(Source source, Expression left, Expression right) { + @FunctionInfo( + returnType = { "double", "integer", "long", "date_period", "datetime", "time_duration", "unsigned_long" }, + description = "Add two numbers together. " + "If either field is <> then the result is `null`." + ) + public Add( + Source source, + @Param( + name = "lhs", + description = "A numeric value or a date time value.", + type = { "double", "integer", "long", "date_period", "datetime", "time_duration", "unsigned_long" } + ) Expression left, + @Param( + name = "rhs", + description = "A numeric value or a date time value.", + type = { "double", "integer", "long", "date_period", "datetime", "time_duration", "unsigned_long" } + ) Expression right + ) { super( source, left, diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Div.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Div.java index 6d84ce3558571..0e4c506a90d85 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Div.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Div.java @@ -16,6 +16,8 @@ import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.core.type.DataType; import org.elasticsearch.xpack.esql.core.util.NumericUtils; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import java.io.IOException; @@ -27,7 +29,18 @@ public class Div extends EsqlArithmeticOperation implements BinaryComparisonInve private DataType type; - public Div(Source source, Expression left, Expression right) { + @FunctionInfo( + returnType = { "double", "integer", "long", "unsigned_long" }, + description = "Divide one number by another. " + + "If either field is <> then the result is `null`.", + note = "Division of two integer types will yield an integer result, rounding towards 0. " + + "If you need floating point division, <> one of the arguments to a `DOUBLE`." + ) + public Div( + Source source, + @Param(name = "lhs", description = "A numeric value.", type = { "double", "integer", "long", "unsigned_long" }) Expression left, + @Param(name = "rhs", description = "A numeric value.", type = { "double", "integer", "long", "unsigned_long" }) Expression right + ) { this(source, left, right, null); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mod.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mod.java index 151c886bfdf8d..2381e3df9b617 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mod.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mod.java @@ -14,6 +14,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo; import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.core.util.NumericUtils; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import java.io.IOException; @@ -23,7 +25,16 @@ public class Mod extends EsqlArithmeticOperation { public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(Expression.class, "Mod", Mod::new); - public Mod(Source source, Expression left, Expression right) { + @FunctionInfo( + returnType = { "double", "integer", "long", "unsigned_long" }, + description = "Divide one number by another and return the remainder. " + + "If either field is <> then the result is `null`." + ) + public Mod( + Source source, + @Param(name = "lhs", description = "A numeric value.", type = { "double", "integer", "long", "unsigned_long" }) Expression left, + @Param(name = "rhs", description = "A numeric value.", type = { "double", "integer", "long", "unsigned_long" }) Expression right + ) { super( source, left, diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mul.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mul.java index 4a13a458cadc8..a73562ff153b2 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mul.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Mul.java @@ -15,6 +15,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo; import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.core.util.NumericUtils; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import java.io.IOException; @@ -24,7 +26,16 @@ public class Mul extends EsqlArithmeticOperation implements BinaryComparisonInversible { public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(Expression.class, "Mul", Mul::new); - public Mul(Source source, Expression left, Expression right) { + @FunctionInfo( + returnType = { "double", "integer", "long", "unsigned_long" }, + description = "Multiply two numbers together. " + + "If either field is <> then the result is `null`." + ) + public Mul( + Source source, + @Param(name = "lhs", description = "A numeric value.", type = { "double", "integer", "long", "unsigned_long" }) Expression left, + @Param(name = "rhs", description = "A numeric value.", type = { "double", "integer", "long", "unsigned_long" }) Expression right + ) { super( source, left, diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Neg.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Neg.java index d1ed5579c4485..d3bfaac228911 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Neg.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Neg.java @@ -17,6 +17,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo; import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.core.type.DataType; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.esql.expression.function.scalar.UnaryScalarFunction; import java.io.IOException; @@ -34,7 +36,18 @@ public class Neg extends UnaryScalarFunction { public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(Expression.class, "Neg", Neg::new); - public Neg(Source source, Expression field) { + @FunctionInfo( + returnType = { "double", "integer", "long", "date_period", "time_duration" }, + description = "Returns the negation of the argument." + ) + public Neg( + Source source, + @Param( + name = "field", + description = "A numeric value or a date time interval.", + type = { "double", "integer", "long", "date_period", "time_duration" } + ) Expression field + ) { super(source, field); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Sub.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Sub.java index 92330b537e761..015c0c2e75269 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Sub.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/Sub.java @@ -17,6 +17,8 @@ import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.core.type.DataType; import org.elasticsearch.xpack.esql.core.util.NumericUtils; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.esql.type.EsqlDataTypes; import java.io.IOException; @@ -34,7 +36,24 @@ public class Sub extends DateTimeArithmeticOperation implements BinaryComparisonInversible { public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(Expression.class, "Sub", Sub::new); - public Sub(Source source, Expression left, Expression right) { + @FunctionInfo( + returnType = { "double", "integer", "long", "date_period", "datetime", "time_duration", "unsigned_long" }, + description = "Subtract one number from another. " + + "If either field is <> then the result is `null`." + ) + public Sub( + Source source, + @Param( + name = "lhs", + description = "A numeric value or a date time value.", + type = { "double", "integer", "long", "date_period", "datetime", "time_duration", "unsigned_long" } + ) Expression left, + @Param( + name = "rhs", + description = "A numeric value or a date time value.", + type = { "double", "integer", "long", "date_period", "datetime", "time_duration", "unsigned_long" } + ) Expression right + ) { super( source, left, diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/Equals.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/Equals.java index 26a74e7bdb03c..32e15deb07b4e 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/Equals.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/Equals.java @@ -14,6 +14,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo; import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.core.type.DataType; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.EsqlArithmeticOperation; import java.time.ZoneId; @@ -43,7 +45,54 @@ public class Equals extends EsqlBinaryComparison implements Negatable> then the result is `null`.", + note = "This is pushed to the underlying search index if one side of the comparison is constant " + + "and the other side is a field in the index that has both an <> and <>." + ) + public Equals( + Source source, + @Param( + name = "lhs", + type = { + "boolean", + "cartesian_point", + "cartesian_shape", + "date", + "double", + "geo_point", + "geo_shape", + "integer", + "ip", + "keyword", + "long", + "text", + "unsigned_long", + "version" }, + description = "An expression." + ) Expression left, + @Param( + name = "rhs", + type = { + "boolean", + "cartesian_point", + "cartesian_shape", + "date", + "double", + "geo_point", + "geo_shape", + "integer", + "ip", + "keyword", + "long", + "text", + "unsigned_long", + "version" }, + description = "An expression." + ) Expression right + ) { super(source, left, right, BinaryComparisonOperation.EQ, evaluatorMap); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/GreaterThan.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/GreaterThan.java index 8ce8bf30ef617..33981a3337737 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/GreaterThan.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/GreaterThan.java @@ -14,6 +14,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo; import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.core.type.DataType; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.EsqlArithmeticOperation; import java.time.ZoneId; @@ -38,7 +40,26 @@ public class GreaterThan extends EsqlBinaryComparison implements Negatable> then the result is `null`.", + note = "This is pushed to the underlying search index if one side of the comparison is constant " + + "and the other side is a field in the index that has both an <> and <>." + ) + public GreaterThan( + Source source, + @Param( + name = "lhs", + type = { "boolean", "date", "double", "integer", "ip", "keyword", "long", "text", "unsigned_long", "version" }, + description = "An expression." + ) Expression left, + @Param( + name = "rhs", + type = { "boolean", "date", "double", "integer", "ip", "keyword", "long", "text", "unsigned_long", "version" }, + description = "An expression." + ) Expression right + ) { super(source, left, right, BinaryComparisonOperation.GT, evaluatorMap); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/GreaterThanOrEqual.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/GreaterThanOrEqual.java index d7bfec75dabfc..ffcd99558c6ad 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/GreaterThanOrEqual.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/GreaterThanOrEqual.java @@ -14,6 +14,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo; import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.core.type.DataType; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.EsqlArithmeticOperation; import java.time.ZoneId; @@ -38,7 +40,26 @@ public class GreaterThanOrEqual extends EsqlBinaryComparison implements Negatabl Map.entry(DataType.IP, GreaterThanOrEqualKeywordsEvaluator.Factory::new) ); - public GreaterThanOrEqual(Source source, Expression left, Expression right) { + @FunctionInfo( + returnType = { "boolean" }, + description = "Check if one field is greater than or equal to another. " + + "If either field is <> then the result is `null`.", + note = "This is pushed to the underlying search index if one side of the comparison is constant " + + "and the other side is a field in the index that has both an <> and <>." + ) + public GreaterThanOrEqual( + Source source, + @Param( + name = "lhs", + type = { "boolean", "date", "double", "integer", "ip", "keyword", "long", "text", "unsigned_long", "version" }, + description = "An expression." + ) Expression left, + @Param( + name = "rhs", + type = { "boolean", "date", "double", "integer", "ip", "keyword", "long", "text", "unsigned_long", "version" }, + description = "An expression." + ) Expression right + ) { super(source, left, right, BinaryComparisonOperation.GTE, evaluatorMap); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/In.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/In.java index 8dde4596a09fc..d1ed7c7bc2175 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/In.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/In.java @@ -23,6 +23,7 @@ import org.elasticsearch.xpack.esql.expression.EsqlTypeResolutions; import org.elasticsearch.xpack.esql.expression.function.Example; import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.esql.expression.function.scalar.EsqlScalarFunction; import org.elasticsearch.xpack.esql.expression.function.scalar.math.Cast; import org.elasticsearch.xpack.esql.io.stream.PlanStreamInput; @@ -60,10 +61,46 @@ public class In extends EsqlScalarFunction { @FunctionInfo( returnType = "boolean", description = "The `IN` operator allows testing whether a field or expression equals an element in a list of literals, " - + "fields or expressions:", + + "fields or expressions.", examples = @Example(file = "row", tag = "in-with-expressions") ) - public In(Source source, Expression value, List list) { + public In( + Source source, + @Param( + name = "field", + type = { + "boolean", + "cartesian_point", + "cartesian_shape", + "double", + "geo_point", + "geo_shape", + "integer", + "ip", + "keyword", + "long", + "text", + "version" }, + description = "An expression." + ) Expression value, + @Param( + name = "inlist", + type = { + "boolean", + "cartesian_point", + "cartesian_shape", + "double", + "geo_point", + "geo_shape", + "integer", + "ip", + "keyword", + "long", + "text", + "version" }, + description = "A list of items." + ) List list + ) { super(source, CollectionUtils.combine(list, value)); this.value = value; this.list = list; diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/LessThan.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/LessThan.java index b1562b6dc2be4..a9a1f774f4ebb 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/LessThan.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/LessThan.java @@ -14,6 +14,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo; import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.core.type.DataType; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.EsqlArithmeticOperation; import java.time.ZoneId; @@ -38,7 +40,26 @@ public class LessThan extends EsqlBinaryComparison implements Negatable> then the result is `null`.", + note = "This is pushed to the underlying search index if one side of the comparison is constant " + + "and the other side is a field in the index that has both an <> and <>." + ) + public LessThan( + Source source, + @Param( + name = "lhs", + type = { "boolean", "date", "double", "integer", "ip", "keyword", "long", "text", "unsigned_long", "version" }, + description = "An expression." + ) Expression left, + @Param( + name = "rhs", + type = { "boolean", "date", "double", "integer", "ip", "keyword", "long", "text", "unsigned_long", "version" }, + description = "An expression." + ) Expression right + ) { this(source, left, right, null); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/LessThanOrEqual.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/LessThanOrEqual.java index c31e055c8dd1a..5623750ea0f91 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/LessThanOrEqual.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/LessThanOrEqual.java @@ -14,6 +14,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo; import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.core.type.DataType; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.EsqlArithmeticOperation; import java.time.ZoneId; @@ -38,7 +40,26 @@ public class LessThanOrEqual extends EsqlBinaryComparison implements Negatable> then the result is `null`.", + note = "This is pushed to the underlying search index if one side of the comparison is constant " + + "and the other side is a field in the index that has both an <> and <>." + ) + public LessThanOrEqual( + Source source, + @Param( + name = "lhs", + type = { "boolean", "date", "double", "integer", "ip", "keyword", "long", "text", "unsigned_long", "version" }, + description = "An expression." + ) Expression left, + @Param( + name = "rhs", + type = { "boolean", "date", "double", "integer", "ip", "keyword", "long", "text", "unsigned_long", "version" }, + description = "An expression." + ) Expression right + ) { this(source, left, right, null); } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/NotEquals.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/NotEquals.java index 179ff61d9c017..d61953587f79b 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/NotEquals.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/comparison/NotEquals.java @@ -14,6 +14,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo; import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.core.type.DataType; +import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; +import org.elasticsearch.xpack.esql.expression.function.Param; import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.EsqlArithmeticOperation; import java.time.ZoneId; @@ -43,7 +45,54 @@ public class NotEquals extends EsqlBinaryComparison implements Negatable> then the result is `null`.", + note = "This is pushed to the underlying search index if one side of the comparison is constant " + + "and the other side is a field in the index that has both an <> and <>." + ) + public NotEquals( + Source source, + @Param( + name = "lhs", + type = { + "boolean", + "cartesian_point", + "cartesian_shape", + "date", + "double", + "geo_point", + "geo_shape", + "integer", + "ip", + "keyword", + "long", + "text", + "unsigned_long", + "version" }, + description = "An expression." + ) Expression left, + @Param( + name = "rhs", + type = { + "boolean", + "cartesian_point", + "cartesian_shape", + "date", + "double", + "geo_point", + "geo_shape", + "integer", + "ip", + "keyword", + "long", + "text", + "unsigned_long", + "version" }, + description = "An expression." + ) Expression right + ) { super(source, left, right, BinaryComparisonOperation.NEQ, evaluatorMap); } diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java index e1d48a58aaed4..494123d4f08f5 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java @@ -40,12 +40,29 @@ 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.nulls.IsNotNull; +import org.elasticsearch.xpack.esql.core.expression.predicate.nulls.IsNull; +import org.elasticsearch.xpack.esql.core.session.Configuration; 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.core.util.NumericUtils; import org.elasticsearch.xpack.esql.core.util.StringUtils; import org.elasticsearch.xpack.esql.evaluator.EvalMapper; +import org.elasticsearch.xpack.esql.expression.function.scalar.string.RLike; +import org.elasticsearch.xpack.esql.expression.function.scalar.string.WildcardLike; +import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.Add; +import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.Div; +import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.Mod; +import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.Mul; +import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.Neg; +import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.Sub; +import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.Equals; +import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.GreaterThan; +import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.GreaterThanOrEqual; +import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.LessThan; +import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.LessThanOrEqual; +import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.NotEquals; import org.elasticsearch.xpack.esql.optimizer.FoldNull; import org.elasticsearch.xpack.esql.parser.ExpressionBuilder; import org.elasticsearch.xpack.esql.planner.Layout; @@ -56,6 +73,7 @@ import java.io.IOException; import java.io.UncheckedIOException; +import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.nio.file.Files; @@ -76,6 +94,7 @@ import java.util.function.Function; import java.util.stream.Collectors; +import static java.util.Map.entry; import static org.elasticsearch.compute.data.BlockUtils.toJavaObject; import static org.elasticsearch.xpack.esql.SerializationTestUtils.assertSerialization; import static org.elasticsearch.xpack.esql.core.util.SpatialCoordinateTypes.CARTESIAN; @@ -90,6 +109,28 @@ * Base class for function tests. */ public abstract class AbstractFunctionTestCase extends ESTestCase { + /** + * Operators are unregistered functions. + */ + private static final Map> OPERATORS = Map.ofEntries( + entry("like", WildcardLike.class), + entry("rlike", RLike.class), + entry("equals", Equals.class), + entry("not_equals", NotEquals.class), + entry("greater_than", GreaterThan.class), + entry("greater_than_or_equal", GreaterThanOrEqual.class), + entry("less_than", LessThan.class), + entry("less_than_or_equal", LessThanOrEqual.class), + entry("add", Add.class), + entry("sub", Sub.class), + entry("mul", Mul.class), + entry("div", Div.class), + entry("mod", Mod.class), + entry("neg", Neg.class), + entry("is_null", IsNull.class), + entry("is_not_null", IsNotNull.class) + ); + /** * Generate a random value of the appropriate type to fit into blocks of {@code e}. */ @@ -489,20 +530,8 @@ public static void renderDocs() throws IOException { return; } String name = functionName(); - if (binaryOperator(name) != null) { - renderTypes(List.of("lhs", "rhs")); - return; - } - if (unaryOperator(name) != null) { - renderTypes(List.of("v")); - return; - } - if (name.equalsIgnoreCase("rlike")) { - renderTypes(List.of("str", "pattern", "caseInsensitive")); - return; - } - if (name.equalsIgnoreCase("like")) { - renderTypes(List.of("str", "pattern")); + if (binaryOperator(name) != null || unaryOperator(name) != null || likeOperator(name)) { + renderDocsForOperators(name); return; } FunctionDefinition definition = definition(name); @@ -680,6 +709,45 @@ private static void renderFullLayout(String name, boolean hasExamples, boolean h writeToTempDir("layout", rendered, "asciidoc"); } + private static Constructor constructorWithFunctionInfo(Class clazz) { + var constructors = clazz.getConstructors(); + if (constructors.length == 0) { + return null; + } + for (Constructor ctor : constructors) { + FunctionInfo functionInfo = ctor.getAnnotation(FunctionInfo.class); + if (functionInfo != null) { + return ctor; + } + } + return null; + } + + private static void renderDocsForOperators(String name) throws IOException { + Constructor ctor = constructorWithFunctionInfo(OPERATORS.get(name)); + assert ctor != null; + FunctionInfo functionInfo = ctor.getAnnotation(FunctionInfo.class); + assert functionInfo != null; + renderKibanaInlineDocs(name, functionInfo); + + var params = ctor.getParameters(); + + List args = new ArrayList<>(params.length); + for (int i = 1; i < params.length; i++) { // skipping 1st argument, the source + if (Configuration.class.isAssignableFrom(params[i].getType()) == false) { + Param paramInfo = params[i].getAnnotation(Param.class); + String paramName = paramInfo == null ? params[i].getName() : paramInfo.name(); + String[] type = paramInfo == null ? new String[] { "?" } : paramInfo.type(); + String desc = paramInfo == null ? "" : paramInfo.description().replace('\n', ' '); + boolean optional = paramInfo == null ? false : paramInfo.optional(); + DataType targetDataType = EsqlFunctionRegistry.getTargetType(type); + args.add(new EsqlFunctionRegistry.ArgSignature(paramName, type, desc, optional, targetDataType)); + } + } + renderKibanaFunctionDefinition(name, functionInfo, args, likeOperator(name)); + renderTypes(args.stream().map(EsqlFunctionRegistry.ArgSignature::name).toList()); + } + private static void renderKibanaInlineDocs(String name, FunctionInfo info) throws IOException { StringBuilder builder = new StringBuilder(); builder.append(""" @@ -854,6 +922,13 @@ private static String unaryOperator(String name) { }; } + /** + * If this tests is for a like or rlike operator return true, otherwise return {@code null}. + */ + private static boolean likeOperator(String name) { + return name.equalsIgnoreCase("rlike") || name.equalsIgnoreCase("like"); + } + /** * Write some text to a tempdir so we can copy it to the docs later. *

diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLikeTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLikeTests.java index 0074f83b3bbce..e07c0572902b9 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLikeTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLikeTests.java @@ -140,6 +140,18 @@ private static void cases(List cases, String title, Supplier { + TextAndPattern v = textAndPattern.get(); + return new TestCaseSupplier.TestCase( + List.of( + new TestCaseSupplier.TypedData(new BytesRef(v.text), type, "e"), + new TestCaseSupplier.TypedData(new BytesRef(v.pattern), type, "pattern").forceLiteral() + ), + startsWith("AutomataMatchEvaluator[input=Attribute[channel=0], pattern=digraph Automaton {\n"), + DataType.BOOLEAN, + equalTo(expected) + ); + })); } } @@ -152,10 +164,13 @@ protected void assertSimpleWithNulls(List data, Block value, int nullBlo protected Expression build(Source source, List args) { Expression expression = args.get(0); Literal pattern = (Literal) args.get(1); - Literal caseInsensitive = (Literal) args.get(2); + Literal caseInsensitive = args.size() > 2 ? (Literal) args.get(2) : null; String patternString = ((BytesRef) pattern.fold()).utf8ToString(); - boolean caseInsensitiveBool = (boolean) caseInsensitive.fold(); + boolean caseInsensitiveBool = caseInsensitive != null ? (boolean) caseInsensitive.fold() : false; logger.info("pattern={} caseInsensitive={}", patternString, caseInsensitiveBool); - return new RLike(source, expression, new RLikePattern(patternString), caseInsensitiveBool); + + return caseInsensitiveBool + ? new RLike(source, expression, new RLikePattern(patternString), true) + : new RLike(source, expression, new RLikePattern(patternString)); } } From 01d4388ba66aa1c0080388878cde4e64b7da48cf Mon Sep 17 00:00:00 2001 From: Fang Xing Date: Mon, 22 Jul 2024 12:56:51 -0400 Subject: [PATCH 6/7] remove in from EsqlFunctionRegistry --- .../MaxIpGroupingAggregatorFunction.java | 8 ++++---- .../MinIpGroupingAggregatorFunction.java | 8 ++++---- .../src/main/resources/meta.csv-spec | 18 +++++++----------- .../function/EsqlFunctionRegistry.java | 5 +---- .../function/AbstractFunctionTestCase.java | 16 +++++++--------- 5 files changed, 23 insertions(+), 32 deletions(-) diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxIpGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxIpGroupingAggregatorFunction.java index 2b6f4ac0c8c26..c556b23215e6b 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxIpGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MaxIpGroupingAggregatorFunction.java @@ -30,14 +30,14 @@ public final class MaxIpGroupingAggregatorFunction implements GroupingAggregator new IntermediateStateDesc("max", ElementType.BYTES_REF), new IntermediateStateDesc("seen", ElementType.BOOLEAN) ); - private final IpArrayState state; + private final MaxIpAggregator.GroupingState state; private final List channels; private final DriverContext driverContext; - public MaxIpGroupingAggregatorFunction(List channels, IpArrayState state, - DriverContext driverContext) { + public MaxIpGroupingAggregatorFunction(List channels, + MaxIpAggregator.GroupingState state, DriverContext driverContext) { this.channels = channels; this.state = state; this.driverContext = driverContext; @@ -178,7 +178,7 @@ public void addIntermediateRowInput(int groupId, GroupingAggregatorFunction inpu if (input.getClass() != getClass()) { throw new IllegalArgumentException("expected " + getClass() + "; got " + input.getClass()); } - IpArrayState inState = ((MaxIpGroupingAggregatorFunction) input).state; + MaxIpAggregator.GroupingState inState = ((MaxIpGroupingAggregatorFunction) input).state; state.enableGroupIdTracking(new SeenGroupIds.Empty()); MaxIpAggregator.combineStates(state, groupId, inState, position); } diff --git a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinIpGroupingAggregatorFunction.java b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinIpGroupingAggregatorFunction.java index 61cc2d91a017b..5b51f041bd966 100644 --- a/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinIpGroupingAggregatorFunction.java +++ b/x-pack/plugin/esql/compute/src/main/generated/org/elasticsearch/compute/aggregation/MinIpGroupingAggregatorFunction.java @@ -30,14 +30,14 @@ public final class MinIpGroupingAggregatorFunction implements GroupingAggregator new IntermediateStateDesc("max", ElementType.BYTES_REF), new IntermediateStateDesc("seen", ElementType.BOOLEAN) ); - private final IpArrayState state; + private final MinIpAggregator.GroupingState state; private final List channels; private final DriverContext driverContext; - public MinIpGroupingAggregatorFunction(List channels, IpArrayState state, - DriverContext driverContext) { + public MinIpGroupingAggregatorFunction(List channels, + MinIpAggregator.GroupingState state, DriverContext driverContext) { this.channels = channels; this.state = state; this.driverContext = driverContext; @@ -178,7 +178,7 @@ public void addIntermediateRowInput(int groupId, GroupingAggregatorFunction inpu if (input.getClass() != getClass()) { throw new IllegalArgumentException("expected " + getClass() + "; got " + input.getClass()); } - IpArrayState inState = ((MinIpGroupingAggregatorFunction) input).state; + MinIpAggregator.GroupingState inState = ((MinIpGroupingAggregatorFunction) input).state; state.enableGroupIdTracking(new SeenGroupIds.Empty()); MinIpAggregator.combineStates(state, groupId, inState, position); } diff --git a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/meta.csv-spec b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/meta.csv-spec index 939556f2863b8..1e23df1ab9107 100644 --- a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/meta.csv-spec +++ b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/meta.csv-spec @@ -31,7 +31,6 @@ double e() "double|integer|long|unsigned_long floor(number:double|integer|long|unsigned_long)" "keyword from_base64(string:keyword|text)" "boolean|double|integer|ip|keyword|long|text|version greatest(first:boolean|double|integer|ip|keyword|long|text|version, ?rest...:boolean|double|integer|ip|keyword|long|text|version)" -"boolean in(field:boolean|cartesian_point|cartesian_shape|double|geo_point|geo_shape|integer|ip|keyword|long|text|version, inlist...:boolean|cartesian_point|cartesian_shape|double|geo_point|geo_shape|integer|ip|keyword|long|text|version)" "ip ip_prefix(ip:ip, prefixLengthV4:integer, prefixLengthV6:integer)" "boolean|double|integer|ip|keyword|long|text|version least(first:boolean|double|integer|ip|keyword|long|text|version, ?rest...:boolean|double|integer|ip|keyword|long|text|version)" "keyword left(string:keyword|text, length:integer)" @@ -82,7 +81,7 @@ double pi() "double st_y(point:geo_point|cartesian_point)" "boolean starts_with(str:keyword|text, prefix:keyword|text)" "keyword substring(string:keyword|text, start:integer, ?length:integer)" -"long sum(number:double|integer|long)" +"long|double sum(number:double|integer|long)" "double tan(angle:double|integer|long|unsigned_long)" "double tanh(angle:double|integer|long|unsigned_long)" double tau() @@ -112,7 +111,7 @@ double tau() "keyword|text to_upper(str:keyword|text)" "version to_ver(field:keyword|text|version)" "version to_version(field:keyword|text|version)" -"boolean|double|integer|long|date top(field:boolean|double|integer|long|date, limit:integer, order:keyword)" +"boolean|double|integer|long|date|ip top(field:boolean|double|integer|long|date|ip, limit:integer, order:keyword)" "keyword|text trim(string:keyword|text)" "boolean|date|double|integer|ip|keyword|long|text|version values(field:boolean|date|double|integer|ip|keyword|long|text|version)" "double weighted_avg(number:double|integer|long, weight:double|integer|long)" @@ -153,7 +152,6 @@ exp |number |"double|integer|long|unsigne floor |number |"double|integer|long|unsigned_long" |Numeric expression. If `null`, the function returns `null`. from_base64 |string |"keyword|text" |A base64 string. greatest |first |"boolean|double|integer|ip|keyword|long|text|version" |First of the columns to evaluate. -in |[field, inlist] |["boolean|cartesian_point|cartesian_shape|double|geo_point|geo_shape|integer|ip|keyword|long|text|version", "boolean|cartesian_point|cartesian_shape|double|geo_point|geo_shape|integer|ip|keyword|long|text|version"] |["An expression.", "A list of items."] ip_prefix |[ip, prefixLengthV4, prefixLengthV6]|[ip, integer, integer] |[IP address of type `ip` (both IPv4 and IPv6 are supported)., Prefix length for IPv4 addresses., Prefix length for IPv6 addresses.] least |first |"boolean|double|integer|ip|keyword|long|text|version" |First of the columns to evaluate. left |[string, length] |["keyword|text", integer] |[The string from which to return a substring., The number of characters to return.] @@ -234,7 +232,7 @@ to_unsigned_lo|field |"boolean|date|keyword|text|d to_upper |str |"keyword|text" |String expression. If `null`, the function returns `null`. to_ver |field |"keyword|text|version" |Input value. The input can be a single- or multi-valued column or an expression. to_version |field |"keyword|text|version" |Input value. The input can be a single- or multi-valued column or an expression. -top |[field, limit, order] |["boolean|double|integer|long|date", integer, keyword] |[The field to collect the top values for.,The maximum number of values to collect.,The order to calculate the top values. Either `asc` or `desc`.] +top |[field, limit, order] |["boolean|double|integer|long|date|ip", integer, keyword] |[The field to collect the top values for.,The maximum number of values to collect.,The order to calculate the top values. Either `asc` or `desc`.] trim |string |"keyword|text" |String expression. If `null`, the function returns `null`. values |field |"boolean|date|double|integer|ip|keyword|long|text|version" |[""] weighted_avg |[number, weight] |["double|integer|long", "double|integer|long"] |[A numeric value., A numeric weight.] @@ -276,7 +274,6 @@ exp |Returns the value of e raised to the power of the given number. floor |Round a number down to the nearest integer. from_base64 |Decode a base64 string. greatest |Returns the maximum value from multiple columns. This is similar to <> except it is intended to run on multiple columns at once. -in |The `IN` operator allows testing whether a field or expression equals an element in a list of literals, fields or expressions. ip_prefix |Truncates an IP to a given prefix length. least |Returns the minimum value from multiple columns. This is similar to <> except it is intended to run on multiple columns at once. left |Returns the substring that extracts 'length' chars from 'string' starting from the left. @@ -327,7 +324,7 @@ st_x |Extracts the `x` coordinate from the supplied point. If the point st_y |Extracts the `y` coordinate from the supplied point. If the points is of type `geo_point` this is equivalent to extracting the `latitude` value. starts_with |Returns a boolean that indicates whether a keyword string starts with another string. substring |Returns a substring of a string, specified by a start position and an optional length. -sum |The sum of a numeric field. +sum |The sum of a numeric expression. tan |Returns the {wikipedia}/Sine_and_cosine[Tangent] trigonometric function of an angle. tanh |Returns the {wikipedia}/Hyperbolic_functions[Tangent] hyperbolic function of an angle. tau |Returns the https://tauday.com/tau-manifesto[ratio] of a circle's circumference to its radius. @@ -400,7 +397,6 @@ exp |double floor |"double|integer|long|unsigned_long" |false |false |false from_base64 |keyword |false |false |false greatest |"boolean|double|integer|ip|keyword|long|text|version" |false |true |false -in |boolean |[false, false] |true |false ip_prefix |ip |[false, false, false] |false |false least |"boolean|double|integer|ip|keyword|long|text|version" |false |true |false left |keyword |[false, false] |false |false @@ -451,7 +447,7 @@ st_x |double st_y |double |false |false |false starts_with |boolean |[false, false] |false |false substring |keyword |[false, false, true] |false |false -sum |long |false |false |true +sum |"long|double" |false |false |true tan |double |false |false |false tanh |double |false |false |false tau |double |null |false |false @@ -481,7 +477,7 @@ to_unsigned_lo|unsigned_long to_upper |"keyword|text" |false |false |false to_ver |version |false |false |false to_version |version |false |false |false -top |"boolean|double|integer|long|date" |[false, false, false] |false |true +top |"boolean|double|integer|long|date|ip" |[false, false, false] |false |true trim |"keyword|text" |false |false |false values |"boolean|date|double|integer|ip|keyword|long|text|version" |false |false |true weighted_avg |"double" |[false, false] |false |true @@ -501,5 +497,5 @@ countFunctions#[skip:-8.15.99] meta functions | stats a = count(*), b = count(*), c = count(*) | mv_expand c; a:long | b:long | c:long -114 | 114 | 114 +113 | 113 | 113 ; diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java index 0c323183d98b5..de7e63e16d53e 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java @@ -123,7 +123,6 @@ import org.elasticsearch.xpack.esql.expression.function.scalar.string.ToLower; import org.elasticsearch.xpack.esql.expression.function.scalar.string.ToUpper; import org.elasticsearch.xpack.esql.expression.function.scalar.string.Trim; -import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.In; import org.elasticsearch.xpack.esql.plan.logical.meta.MetaFunctions; import java.lang.reflect.Constructor; @@ -365,9 +364,7 @@ private FunctionDefinition[][] functions() { def(MvSlice.class, MvSlice::new, "mv_slice"), def(MvZip.class, MvZip::new, "mv_zip"), def(MvSum.class, MvSum::new, "mv_sum"), - def(Split.class, Split::new, "split") }, - // Operators - new FunctionDefinition[] { def(In.class, In::new, "in") } }; + def(Split.class, Split::new, "split") } }; } private static FunctionDefinition[][] snapshotFunctions() { diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java index 494123d4f08f5..0ec0a29dc530b 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java @@ -60,6 +60,7 @@ import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.Equals; import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.GreaterThan; import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.GreaterThanOrEqual; +import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.In; import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.LessThan; import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.LessThanOrEqual; import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.NotEquals; @@ -113,6 +114,7 @@ public abstract class AbstractFunctionTestCase extends ESTestCase { * Operators are unregistered functions. */ private static final Map> OPERATORS = Map.ofEntries( + entry("in", In.class), entry("like", WildcardLike.class), entry("rlike", RLike.class), entry("equals", Equals.class), @@ -530,7 +532,7 @@ public static void renderDocs() throws IOException { return; } String name = functionName(); - if (binaryOperator(name) != null || unaryOperator(name) != null || likeOperator(name)) { + if (binaryOperator(name) != null || unaryOperator(name) != null || likeOrInOperator(name)) { renderDocsForOperators(name); return; } @@ -710,11 +712,7 @@ private static void renderFullLayout(String name, boolean hasExamples, boolean h } private static Constructor constructorWithFunctionInfo(Class clazz) { - var constructors = clazz.getConstructors(); - if (constructors.length == 0) { - return null; - } - for (Constructor ctor : constructors) { + for (Constructor ctor : clazz.getConstructors()) { FunctionInfo functionInfo = ctor.getAnnotation(FunctionInfo.class); if (functionInfo != null) { return ctor; @@ -744,7 +742,7 @@ private static void renderDocsForOperators(String name) throws IOException { args.add(new EsqlFunctionRegistry.ArgSignature(paramName, type, desc, optional, targetDataType)); } } - renderKibanaFunctionDefinition(name, functionInfo, args, likeOperator(name)); + renderKibanaFunctionDefinition(name, functionInfo, args, likeOrInOperator(name)); renderTypes(args.stream().map(EsqlFunctionRegistry.ArgSignature::name).toList()); } @@ -925,8 +923,8 @@ private static String unaryOperator(String name) { /** * If this tests is for a like or rlike operator return true, otherwise return {@code null}. */ - private static boolean likeOperator(String name) { - return name.equalsIgnoreCase("rlike") || name.equalsIgnoreCase("like"); + private static boolean likeOrInOperator(String name) { + return name.equalsIgnoreCase("rlike") || name.equalsIgnoreCase("like") || name.equalsIgnoreCase("in"); } /** From f880f565e906499ff3fcaaca4421467430cc0c5d Mon Sep 17 00:00:00 2001 From: Fang Xing Date: Mon, 22 Jul 2024 13:14:47 -0400 Subject: [PATCH 7/7] remove a few generated docs for in --- .../esql/functions/description/in.asciidoc | 5 ----- .../reference/esql/functions/examples/in.asciidoc | 13 ------------- docs/reference/esql/functions/layout/in.asciidoc | 15 --------------- docs/reference/esql/functions/operators.asciidoc | 4 ++-- .../esql/functions/parameters/in.asciidoc | 9 --------- docs/reference/esql/functions/signature/in.svg | 1 - 6 files changed, 2 insertions(+), 45 deletions(-) delete mode 100644 docs/reference/esql/functions/description/in.asciidoc delete mode 100644 docs/reference/esql/functions/examples/in.asciidoc delete mode 100644 docs/reference/esql/functions/layout/in.asciidoc delete mode 100644 docs/reference/esql/functions/parameters/in.asciidoc delete mode 100644 docs/reference/esql/functions/signature/in.svg diff --git a/docs/reference/esql/functions/description/in.asciidoc b/docs/reference/esql/functions/description/in.asciidoc deleted file mode 100644 index a380fd8e72009..0000000000000 --- a/docs/reference/esql/functions/description/in.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Description* - -The `IN` operator allows testing whether a field or expression equals an element in a list of literals, fields or expressions. diff --git a/docs/reference/esql/functions/examples/in.asciidoc b/docs/reference/esql/functions/examples/in.asciidoc deleted file mode 100644 index 7bd53b49a36f8..0000000000000 --- a/docs/reference/esql/functions/examples/in.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -// 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}/row.csv-spec[tag=in-with-expressions] ----- -[%header.monospaced.styled,format=dsv,separator=|] -|=== -include::{esql-specs}/row.csv-spec[tag=in-with-expressions-result] -|=== - diff --git a/docs/reference/esql/functions/layout/in.asciidoc b/docs/reference/esql/functions/layout/in.asciidoc deleted file mode 100644 index b5a421cfd370e..0000000000000 --- a/docs/reference/esql/functions/layout/in.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -[discrete] -[[esql-in]] -=== `IN` - -*Syntax* - -[.text-center] -image::esql/functions/signature/in.svg[Embedded,opts=inline] - -include::../parameters/in.asciidoc[] -include::../description/in.asciidoc[] -include::../types/in.asciidoc[] -include::../examples/in.asciidoc[] diff --git a/docs/reference/esql/functions/operators.asciidoc b/docs/reference/esql/functions/operators.asciidoc index 0e8fcd0e56ce8..ee344a52687c2 100644 --- a/docs/reference/esql/functions/operators.asciidoc +++ b/docs/reference/esql/functions/operators.asciidoc @@ -13,7 +13,7 @@ Boolean operators for comparing against one or multiple expressions. * <> * <> * <> -* <> +* <> * <> * <> // end::op_list[] @@ -23,6 +23,6 @@ include::unary.asciidoc[] include::logical.asciidoc[] include::predicates.asciidoc[] include::cast.asciidoc[] -include::layout/in.asciidoc[] +include::in.asciidoc[] include::like.asciidoc[] include::rlike.asciidoc[] diff --git a/docs/reference/esql/functions/parameters/in.asciidoc b/docs/reference/esql/functions/parameters/in.asciidoc deleted file mode 100644 index 08c34183e5e52..0000000000000 --- a/docs/reference/esql/functions/parameters/in.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. - -*Parameters* - -`field`:: -An expression. - -`inlist`:: -A list of items. diff --git a/docs/reference/esql/functions/signature/in.svg b/docs/reference/esql/functions/signature/in.svg deleted file mode 100644 index f31ce1b5e2b32..0000000000000 --- a/docs/reference/esql/functions/signature/in.svg +++ /dev/null @@ -1 +0,0 @@ -IN(field,inlist) \ No newline at end of file