mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
Kibana updates, remove links from JSON and split is-null/is-not-null (#125986)
In particular: * Remove all links (both asciidoc and markdown) from the JSON definition files. * This required a two phase edit, from asciidoc links to markdown, and then removal of markdown (replace with markdown text). This is because the asciidoc does not have the display text, and because some links were already markdown. * Split predicates into is_null and is_not_null * We kept the old combined version because the main docs still use that, so now we have both combined and separate versions, and Kibana can select the version they want.
This commit is contained in:
parent
d3a1b21a59
commit
7b263b4b83
49 changed files with 638 additions and 56 deletions
|
@ -0,0 +1,15 @@
|
|||
% This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
|
||||
**Example**
|
||||
|
||||
```esql
|
||||
FROM employees
|
||||
| WHERE is_rehired IS NOT NULL
|
||||
| STATS COUNT(emp_no)
|
||||
```
|
||||
|
||||
| COUNT(emp_no):long |
|
||||
| --- |
|
||||
| 84 |
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
% This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
|
||||
**Example**
|
||||
|
||||
```esql
|
||||
FROM employees
|
||||
| WHERE birth_date IS NULL
|
||||
| KEEP first_name, last_name
|
||||
| SORT first_name
|
||||
| LIMIT 3
|
||||
```
|
||||
|
||||
| first_name:keyword | last_name:keyword |
|
||||
| --- | --- |
|
||||
| Basil | Tramer |
|
||||
| Florian | Syrotiuk |
|
||||
| Lucien | Rosenbaum |
|
||||
|
||||
|
|
@ -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**
|
||||
|
||||
| field | result |
|
||||
| --- | --- |
|
||||
| boolean | boolean |
|
||||
| cartesian_point | boolean |
|
||||
| cartesian_shape | boolean |
|
||||
| date | boolean |
|
||||
| date_nanos | boolean |
|
||||
| double | boolean |
|
||||
| geo_point | boolean |
|
||||
| geo_shape | boolean |
|
||||
| integer | boolean |
|
||||
| ip | boolean |
|
||||
| keyword | boolean |
|
||||
| long | boolean |
|
||||
| text | boolean |
|
||||
| unsigned_long | boolean |
|
||||
| version | boolean |
|
||||
|
|
@ -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**
|
||||
|
||||
| field | result |
|
||||
| --- | --- |
|
||||
| boolean | boolean |
|
||||
| cartesian_point | boolean |
|
||||
| cartesian_shape | boolean |
|
||||
| date | boolean |
|
||||
| date_nanos | boolean |
|
||||
| double | boolean |
|
||||
| geo_point | boolean |
|
||||
| geo_shape | boolean |
|
||||
| integer | boolean |
|
||||
| ip | boolean |
|
||||
| keyword | boolean |
|
||||
| long | boolean |
|
||||
| text | boolean |
|
||||
| unsigned_long | boolean |
|
||||
| version | boolean |
|
||||
|
1
docs/reference/query-languages/esql/images/operators/is_not_null.svg
generated
Normal file
1
docs/reference/query-languages/esql/images/operators/is_not_null.svg
generated
Normal file
|
@ -0,0 +1 @@
|
|||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="204" height="46" viewbox="0 0 204 46"><defs><style type="text/css">.c{fill:none;stroke:#222222;}.j{fill:#000000;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}.l{fill:#e4f4ff;stroke:#222222;}.syn{fill:#8D8D8D;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}</style></defs><path class="c" d="M0 31h5m152 0h10m32 0h5"/><rect class="l" x="5" y="5" width="152" height="36" rx="7"/><text class="syn" x="15" y="31">IS NOT NULL</text><rect class="l" x="167" y="5" width="32" height="36" rx="7"/><text class="j" x="177" y="31">v</text></svg>
|
After Width: | Height: | Size: 798 B |
1
docs/reference/query-languages/esql/images/operators/is_null.svg
generated
Normal file
1
docs/reference/query-languages/esql/images/operators/is_null.svg
generated
Normal file
|
@ -0,0 +1 @@
|
|||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="156" height="46" viewbox="0 0 156 46"><defs><style type="text/css">.c{fill:none;stroke:#222222;}.j{fill:#000000;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}.l{fill:#e4f4ff;stroke:#222222;}.syn{fill:#8D8D8D;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}</style></defs><path class="c" d="M0 31h5m104 0h10m32 0h5"/><rect class="l" x="5" y="5" width="104" height="36" rx="7"/><text class="syn" x="15" y="31">IS NULL</text><rect class="l" x="119" y="5" width="32" height="36" rx="7"/><text class="j" x="129" y="31">v</text></svg>
|
After Width: | Height: | Size: 794 B |
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "greatest",
|
||||
"description" : "Returns the maximum value from multiple columns. This is similar to <<esql-mv_max>>\nexcept it is intended to run on multiple columns at once.",
|
||||
"description" : "Returns the maximum value from multiple columns. This is similar to `MV_MAX`\nexcept it is intended to run on multiple columns at once.",
|
||||
"note" : "When run on `keyword` or `text` fields, this returns the last string in alphabetical order. When run on `boolean` columns this will return `true` if any values are `true`.",
|
||||
"signatures" : [
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "least",
|
||||
"description" : "Returns the minimum value from multiple columns. This is similar to <<esql-mv_min>> except it is intended to run on multiple columns at once.",
|
||||
"description" : "Returns the minimum value from multiple columns. This is similar to `MV_MIN` except it is intended to run on multiple columns at once.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "match",
|
||||
"description" : "Use `MATCH` to perform a <<query-dsl-match-query,match query>> on the specified field.\nUsing `MATCH` is equivalent to using the `match` query in the Elasticsearch Query DSL.\n\nMatch can be used on fields from the text family like <<text, text>> and <<semantic-text, semantic_text>>,\nas well as other field types like keyword, boolean, dates, and numeric types.\n\nMatch can use <<esql-function-named-params,function named parameters>> to specify additional options for the match query.\nAll <<match-field-params,match query parameters>> are supported.\n\nFor a simplified syntax, you can use the <<esql-search-operators,match operator>> `:` operator instead of `MATCH`.\n\n`MATCH` returns true if the provided query matches the row.",
|
||||
"description" : "Use `MATCH` to perform a match query on the specified field.\nUsing `MATCH` is equivalent to using the `match` query in the Elasticsearch Query DSL.\n\nMatch can be used on fields from the text family like text and semantic_text,\nas well as other field types like keyword, boolean, dates, and numeric types.\n\nMatch can use function named parameters to specify additional options for the match query.\nAll match query parameters are supported.\n\nFor a simplified syntax, you can use the match operator `:` operator instead of `MATCH`.\n\n`MATCH` returns true if the provided query matches the row.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "agg",
|
||||
"name" : "median",
|
||||
"description" : "The value that is greater than half of all values and less than half of all values, also known as the 50% <<esql-percentile>>.",
|
||||
"note" : "Like <<esql-percentile>>, `MEDIAN` is <<esql-percentile-approximate,usually approximate>>.",
|
||||
"description" : "The value that is greater than half of all values and less than half of all values, also known as the 50% `PERCENTILE`.",
|
||||
"note" : "Like `PERCENTILE`, `MEDIAN` is usually approximate.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"type" : "agg",
|
||||
"name" : "median_absolute_deviation",
|
||||
"description" : "Returns the median absolute deviation, a measure of variability. It is a robust statistic, meaning that it is useful for describing data that may have outliers, or may not be normally distributed. For such data it can be more descriptive than standard deviation.\n\nIt is calculated as the median of each data point’s deviation from the median of the entire sample. That is, for a random variable `X`, the median absolute deviation is `median(|median(X) - X|)`.",
|
||||
"note" : "Like <<esql-percentile>>, `MEDIAN_ABSOLUTE_DEVIATION` is <<esql-percentile-approximate,usually approximate>>.",
|
||||
"note" : "Like `PERCENTILE`, `MEDIAN_ABSOLUTE_DEVIATION` is usually approximate.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "mv_first",
|
||||
"description" : "Converts a multivalued expression into a single valued column containing the\nfirst value. This is most useful when reading from a function that emits\nmultivalued columns in a known order like <<esql-split>>.",
|
||||
"description" : "Converts a multivalued expression into a single valued column containing the\nfirst value. This is most useful when reading from a function that emits\nmultivalued columns in a known order like `SPLIT`.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "mv_last",
|
||||
"description" : "Converts a multivalue expression into a single valued column containing the last\nvalue. This is most useful when reading from a function that emits multivalued\ncolumns in a known order like <<esql-split>>.",
|
||||
"description" : "Converts a multivalue expression into a single valued column containing the last\nvalue. This is most useful when reading from a function that emits multivalued\ncolumns in a known order like `SPLIT`.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "mv_slice",
|
||||
"description" : "Returns a subset of the multivalued field using the start and end index values.\nThis is most useful when reading from a function that emits multivalued columns\nin a known order like <<esql-split>> or <<esql-mv_sort>>.",
|
||||
"description" : "Returns a subset of the multivalued field using the start and end index values.\nThis is most useful when reading from a function that emits multivalued columns\nin a known order like `SPLIT` or `MV_SORT`.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "qstr",
|
||||
"description" : "Performs a <<query-dsl-query-string-query,query string query>>. Returns true if the provided query string matches the row.",
|
||||
"description" : "Performs a query string query. Returns true if the provided query string matches the row.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "st_contains",
|
||||
"description" : "Returns whether the first geometry contains the second geometry.\nThis is the inverse of the <<esql-st_within,ST_WITHIN>> function.",
|
||||
"description" : "Returns whether the first geometry contains the second geometry.\nThis is the inverse of the ST_WITHIN function.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "st_disjoint",
|
||||
"description" : "Returns whether the two geometries or geometry columns are disjoint.\nThis is the inverse of the <<esql-st_intersects,ST_INTERSECTS>> function.\nIn mathematical terms: ST_Disjoint(A, B) ⇔ A ⋂ B = ∅",
|
||||
"description" : "Returns whether the two geometries or geometry columns are disjoint.\nThis is the inverse of the ST_INTERSECTS function.\nIn mathematical terms: ST_Disjoint(A, B) ⇔ A ⋂ B = ∅",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "st_intersects",
|
||||
"description" : "Returns true if two geometries intersect.\nThey intersect if they have any point in common, including their interior points\n(points along lines or within polygons).\nThis is the inverse of the <<esql-st_disjoint,ST_DISJOINT>> function.\nIn mathematical terms: ST_Intersects(A, B) ⇔ A ⋂ B ≠ ∅",
|
||||
"description" : "Returns true if two geometries intersect.\nThey intersect if they have any point in common, including their interior points\n(points along lines or within polygons).\nThis is the inverse of the ST_DISJOINT function.\nIn mathematical terms: ST_Intersects(A, B) ⇔ A ⋂ B ≠ ∅",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "st_within",
|
||||
"description" : "Returns whether the first geometry is within the second geometry.\nThis is the inverse of the <<esql-st_contains,ST_CONTAINS>> function.",
|
||||
"description" : "Returns whether the first geometry is within the second geometry.\nThis is the inverse of the ST_CONTAINS function.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "tau",
|
||||
"description" : "Returns the [ratio](https://tauday.com/tau-manifesto) of a circle’s circumference to its radius.",
|
||||
"description" : "Returns the ratio of a circle’s circumference to its radius.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [ ],
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "to_cartesianpoint",
|
||||
"description" : "Converts an input value to a `cartesian_point` value.\nA string will only be successfully converted if it respects WKT Point format.",
|
||||
"description" : "Converts an input value to a `cartesian_point` value.\nA string will only be successfully converted if it respects the\nWKT Point format.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "to_cartesianshape",
|
||||
"description" : "Converts an input value to a `cartesian_shape` value.\nA string will only be successfully converted if it respects WKT format.",
|
||||
"description" : "Converts an input value to a `cartesian_shape` value.\nA string will only be successfully converted if it respects the\nWKT format.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "to_datetime",
|
||||
"description" : "Converts an input value to a date value.\nA string will only be successfully converted if it’s respecting the format `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'`.\nTo convert dates in other formats, use <<esql-date_parse>>.",
|
||||
"description" : "Converts an input value to a date value.\nA string will only be successfully converted if it’s respecting the format `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'`.\nTo convert dates in other formats, use `DATE_PARSE`.",
|
||||
"note" : "Note that when converting from nanosecond resolution to millisecond resolution with this function, the nanosecond date is truncated, not rounded.",
|
||||
"signatures" : [
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "to_geopoint",
|
||||
"description" : "Converts an input value to a `geo_point` value.\nA string will only be successfully converted if it respects WKT Point format.",
|
||||
"description" : "Converts an input value to a `geo_point` value.\nA string will only be successfully converted if it respects the\nWKT Point format.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "scalar",
|
||||
"name" : "to_geoshape",
|
||||
"description" : "Converts an input value to a `geo_shape` value.\nA string will only be successfully converted if it respects WKT format.",
|
||||
"description" : "Converts an input value to a `geo_shape` value.\nA string will only be successfully converted if it respects the\nWKT format.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "agg",
|
||||
"name" : "values",
|
||||
"description" : "Returns all values in a group as a multivalued field. The order of the returned values isn’t guaranteed. If you need the values returned in order use <<esql-mv_sort>>.",
|
||||
"description" : "Returns all values in a group as a multivalued field. The order of the returned values isn’t guaranteed. If you need the values returned in order use `MV_SORT`.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"type" : "operator",
|
||||
"operator" : "+",
|
||||
"name" : "add",
|
||||
"description" : "Add two numbers together. If either field is <<esql-multivalued-fields,multivalued>> then the result is `null`.",
|
||||
"description" : "Add two numbers together. If either field is multivalued then the result is `null`.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"type" : "operator",
|
||||
"operator" : "::",
|
||||
"name" : "cast",
|
||||
"description" : "The `::` operator provides a convenient alternative syntax to the TO_<type> [conversion functions](https://www.elastic.co/docs/reference/elasticsearch/query-languages/esql/esql-functions-operators#esql-type-conversion-functions).",
|
||||
"description" : "The `::` operator provides a convenient alternative syntax to the TO_<type> conversion functions.",
|
||||
"signatures" : [ ],
|
||||
"examples" : [
|
||||
"ROW ver = CONCAT((\"0\"::INT + 1)::STRING, \".2.3\")::VERSION"
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"type" : "operator",
|
||||
"operator" : "/",
|
||||
"name" : "div",
|
||||
"description" : "Divide one number by another. If either field is <<esql-multivalued-fields,multivalued>> 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, <<esql-cast-operator>> one of the arguments to a `DOUBLE`.",
|
||||
"description" : "Divide one number by another. If either field is multivalued 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, `Cast (::)` one of the arguments to a `DOUBLE`.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"type" : "operator",
|
||||
"operator" : "==",
|
||||
"name" : "equals",
|
||||
"description" : "Check if two fields are equal. If either field is <<esql-multivalued-fields,multivalued>> 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 <<mapping-index>> and <<doc-values>>.",
|
||||
"description" : "Check if two fields are equal. If either field is multivalued 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 mapping-index and doc-values.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"type" : "operator",
|
||||
"operator" : ">",
|
||||
"name" : "greater_than",
|
||||
"description" : "Check if one field is greater than another. If either field is <<esql-multivalued-fields,multivalued>> 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 <<mapping-index>> and <<doc-values>>.",
|
||||
"description" : "Check if one field is greater than another. If either field is multivalued 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 mapping-index and doc-values.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"type" : "operator",
|
||||
"operator" : ">=",
|
||||
"name" : "greater_than_or_equal",
|
||||
"description" : "Check if one field is greater than or equal to another. If either field is <<esql-multivalued-fields,multivalued>> 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 <<mapping-index>> and <<doc-values>>.",
|
||||
"description" : "Check if one field is greater than or equal to another. If either field is multivalued 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 mapping-index and doc-values.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
194
docs/reference/query-languages/esql/kibana/definition/operators/is_not_null.json
generated
Normal file
194
docs/reference/query-languages/esql/kibana/definition/operators/is_not_null.json
generated
Normal file
|
@ -0,0 +1,194 @@
|
|||
{
|
||||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "operator",
|
||||
"operator" : "predicates",
|
||||
"name" : "is_not_null",
|
||||
"description" : "Use `IS NOT NULL` to filter data based on whether the field exists or not.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "boolean",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "cartesian_point",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "cartesian_shape",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "date",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "date_nanos",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "double",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "geo_point",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "geo_shape",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "integer",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "ip",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "keyword",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "long",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "text",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "unsigned_long",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "version",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
}
|
||||
],
|
||||
"examples" : [
|
||||
"FROM employees\n| WHERE is_rehired IS NOT NULL\n| STATS COUNT(emp_no)"
|
||||
],
|
||||
"preview" : false,
|
||||
"snapshot_only" : false
|
||||
}
|
194
docs/reference/query-languages/esql/kibana/definition/operators/is_null.json
generated
Normal file
194
docs/reference/query-languages/esql/kibana/definition/operators/is_null.json
generated
Normal file
|
@ -0,0 +1,194 @@
|
|||
{
|
||||
"comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
|
||||
"type" : "operator",
|
||||
"operator" : "predicates",
|
||||
"name" : "is_null",
|
||||
"description" : "Use `IS NULL` to filter data based on whether the field exists or not.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "boolean",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "cartesian_point",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "cartesian_shape",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "date",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "date_nanos",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "double",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "geo_point",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "geo_shape",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "integer",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "ip",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "keyword",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "long",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "text",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "unsigned_long",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
},
|
||||
{
|
||||
"params" : [
|
||||
{
|
||||
"name" : "field",
|
||||
"type" : "version",
|
||||
"optional" : false,
|
||||
"description" : "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
}
|
||||
],
|
||||
"variadic" : false,
|
||||
"returnType" : "boolean"
|
||||
}
|
||||
],
|
||||
"examples" : [
|
||||
"FROM employees\n| WHERE birth_date IS NULL\n| KEEP first_name, last_name\n| SORT first_name\n| LIMIT 3"
|
||||
],
|
||||
"preview" : false,
|
||||
"snapshot_only" : false
|
||||
}
|
|
@ -3,8 +3,8 @@
|
|||
"type" : "operator",
|
||||
"operator" : "<",
|
||||
"name" : "less_than",
|
||||
"description" : "Check if one field is less than another. If either field is <<esql-multivalued-fields,multivalued>> 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 <<mapping-index>> and <<doc-values>>.",
|
||||
"description" : "Check if one field is less than another. If either field is multivalued 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 mapping-index and doc-values.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"type" : "operator",
|
||||
"operator" : "<=",
|
||||
"name" : "less_than_or_equal",
|
||||
"description" : "Check if one field is less than or equal to another. If either field is <<esql-multivalued-fields,multivalued>> 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 <<mapping-index>> and <<doc-values>>.",
|
||||
"description" : "Check if one field is less than or equal to another. If either field is multivalued 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 mapping-index and doc-values.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"type" : "operator",
|
||||
"operator" : ":",
|
||||
"name" : "match_operator",
|
||||
"description" : "Use the match operator (`:`) to perform a <<query-dsl-match-query,match query>> on the specified field.\nUsing `:` is equivalent to using the `match` query in the Elasticsearch Query DSL.\n\nThe match operator is equivalent to the <<esql-match,match function>>.\n\nFor using the function syntax, or adding <<match-field-params,match query parameters>>, you can use the\n<<esql-match,match function>>.\n\n`:` returns true if the provided query matches the row.",
|
||||
"description" : "Use the match operator (`:`) to perform a match query on the specified field.\nUsing `:` is equivalent to using the `match` query in the Elasticsearch Query DSL.\n\nThe match operator is equivalent to the match function.\n\nFor using the function syntax, or adding match query parameters, you can use the\nmatch function.\n\n`:` returns true if the provided query matches the row.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"type" : "operator",
|
||||
"operator" : "%",
|
||||
"name" : "mod",
|
||||
"description" : "Divide one number by another and return the remainder. If either field is <<esql-multivalued-fields,multivalued>> then the result is `null`.",
|
||||
"description" : "Divide one number by another and return the remainder. If either field is multivalued then the result is `null`.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"type" : "operator",
|
||||
"operator" : "*",
|
||||
"name" : "mul",
|
||||
"description" : "Multiply two numbers together. If either field is <<esql-multivalued-fields,multivalued>> then the result is `null`.",
|
||||
"description" : "Multiply two numbers together. If either field is multivalued then the result is `null`.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"type" : "operator",
|
||||
"operator" : "not rlike",
|
||||
"name" : "not_rlike",
|
||||
"description" : "Use `RLIKE` to filter data based on string patterns using using\n<<regexp-syntax,regular expressions>>. `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.",
|
||||
"description" : "Use `RLIKE` to filter data based on string patterns using using\nregular expressions. `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" : [
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"type" : "operator",
|
||||
"operator" : "!=",
|
||||
"name" : "not_equals",
|
||||
"description" : "Check if two fields are unequal. If either field is <<esql-multivalued-fields,multivalued>> 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 <<mapping-index>> and <<doc-values>>.",
|
||||
"description" : "Check if two fields are unequal. If either field is multivalued 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 mapping-index and doc-values.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"type" : "operator",
|
||||
"operator" : "predicates",
|
||||
"name" : "predicates",
|
||||
"description" : "For NULL comparison use the `IS NULL` and `IS NOT NULL` predicates:",
|
||||
"description" : "For NULL comparison use the `IS NULL` and `IS NOT NULL` predicates.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"type" : "operator",
|
||||
"operator" : "RLIKE",
|
||||
"name" : "rlike",
|
||||
"description" : "Use `RLIKE` to filter data based on string patterns using using\n<<regexp-syntax,regular expressions>>. `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.",
|
||||
"description" : "Use `RLIKE` to filter data based on string patterns using using\nregular expressions. `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" : [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"type" : "operator",
|
||||
"operator" : "-",
|
||||
"name" : "sub",
|
||||
"description" : "Subtract one number from another. If either field is <<esql-multivalued-fields,multivalued>> then the result is `null`.",
|
||||
"description" : "Subtract one number from another. If either field is multivalued then the result is `null`.",
|
||||
"signatures" : [
|
||||
{
|
||||
"params" : [
|
||||
|
|
12
docs/reference/query-languages/esql/kibana/docs/operators/is_not_null.md
generated
Normal file
12
docs/reference/query-languages/esql/kibana/docs/operators/is_not_null.md
generated
Normal file
|
@ -0,0 +1,12 @@
|
|||
<!--
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### IS_NOT_NULL
|
||||
Use `IS NOT NULL` to filter data based on whether the field exists or not.
|
||||
|
||||
```esql
|
||||
FROM employees
|
||||
| WHERE is_rehired IS NOT NULL
|
||||
| STATS COUNT(emp_no)
|
||||
```
|
14
docs/reference/query-languages/esql/kibana/docs/operators/is_null.md
generated
Normal file
14
docs/reference/query-languages/esql/kibana/docs/operators/is_null.md
generated
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!--
|
||||
This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
-->
|
||||
|
||||
### IS_NULL
|
||||
Use `IS NULL` to filter data based on whether the field exists or not.
|
||||
|
||||
```esql
|
||||
FROM employees
|
||||
| WHERE birth_date IS NULL
|
||||
| KEEP first_name, last_name
|
||||
| SORT first_name
|
||||
| LIMIT 3
|
||||
```
|
|
@ -3,7 +3,7 @@ This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../RE
|
|||
-->
|
||||
|
||||
### PREDICATES
|
||||
For NULL comparison use the `IS NULL` and `IS NOT NULL` predicates:
|
||||
For NULL comparison use the `IS NULL` and `IS NOT NULL` predicates.
|
||||
|
||||
```esql
|
||||
FROM employees
|
||||
|
|
|
@ -1037,7 +1037,10 @@ public abstract class DocsV3Support {
|
|||
}
|
||||
|
||||
private String removeAsciidocLinks(String asciidoc) {
|
||||
return asciidoc.replaceAll("[^ ]+\\[([^]]+)]", "$1");
|
||||
// Some docs have asciidoc links while others use the newer markdown, so we need to first replace asciidoc with markdown
|
||||
String md = replaceLinks(asciidoc);
|
||||
// Now replace the markdown with just the display text
|
||||
return md.replaceAll("\\[(\\s*`?[^]]+?`?\\s*)]\\(([^()\\s]+(?:\\([^()]*\\)[^()]*)*)\\)", "$1");
|
||||
}
|
||||
|
||||
private List<Map.Entry<List<DataType>, DataType>> sortedSignatures() {
|
||||
|
|
|
@ -36,14 +36,31 @@ public class NullPredicatesTests extends ESTestCase {
|
|||
if (System.getProperty("generateDocs") == null) {
|
||||
return;
|
||||
}
|
||||
DocsV3Support.OperatorConfig op = new DocsV3Support.OperatorConfig(
|
||||
"predicates",
|
||||
"IS NULL and IS NOT NULL",
|
||||
TestCastOperator.class,
|
||||
DocsV3Support.OperatorCategory.UNARY,
|
||||
false
|
||||
renderNullPredicate(
|
||||
new DocsV3Support.OperatorConfig(
|
||||
"predicates",
|
||||
"IS NULL and IS NOT NULL",
|
||||
TestNullPredicates.class,
|
||||
DocsV3Support.OperatorCategory.UNARY,
|
||||
false
|
||||
)
|
||||
);
|
||||
var docs = new DocsV3Support.OperatorsDocsSupport("predicates", NullPredicatesTests.class, op, NullPredicatesTests::signatures);
|
||||
renderNullPredicate(
|
||||
new DocsV3Support.OperatorConfig("is_null", "IS NULL", TestIsNullPredicate.class, DocsV3Support.OperatorCategory.UNARY, false)
|
||||
);
|
||||
renderNullPredicate(
|
||||
new DocsV3Support.OperatorConfig(
|
||||
"is_not_null",
|
||||
"IS NOT NULL",
|
||||
TestIsNotNullPredicate.class,
|
||||
DocsV3Support.OperatorCategory.UNARY,
|
||||
false
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
private static void renderNullPredicate(DocsV3Support.OperatorConfig op) throws IOException {
|
||||
var docs = new DocsV3Support.OperatorsDocsSupport(op.name(), NullPredicatesTests.class, op, NullPredicatesTests::signatures);
|
||||
docs.renderSignature();
|
||||
docs.renderDocs();
|
||||
}
|
||||
|
@ -62,14 +79,82 @@ public class NullPredicatesTests extends ESTestCase {
|
|||
/**
|
||||
* This class only exists to provide FunctionInfo for the documentation
|
||||
*/
|
||||
public class TestCastOperator {
|
||||
public class TestNullPredicates {
|
||||
@FunctionInfo(
|
||||
operator = "predicates",
|
||||
returnType = {},
|
||||
description = "For NULL comparison use the `IS NULL` and `IS NOT NULL` predicates:",
|
||||
description = "For NULL comparison use the `IS NULL` and `IS NOT NULL` predicates.",
|
||||
examples = { @Example(file = "null", tag = "is-null"), @Example(file = "null", tag = "is-not-null") }
|
||||
)
|
||||
public TestCastOperator(
|
||||
public TestNullPredicates(
|
||||
@Param(
|
||||
name = "field",
|
||||
type = {
|
||||
"boolean",
|
||||
"cartesian_point",
|
||||
"cartesian_shape",
|
||||
"date",
|
||||
"date_nanos",
|
||||
"double",
|
||||
"geo_point",
|
||||
"geo_shape",
|
||||
"integer",
|
||||
"ip",
|
||||
"keyword",
|
||||
"long",
|
||||
"text",
|
||||
"unsigned_long",
|
||||
"version" },
|
||||
description = "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
) Expression v
|
||||
) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class only exists to provide FunctionInfo for the documentation
|
||||
*/
|
||||
public class TestIsNullPredicate {
|
||||
@FunctionInfo(
|
||||
operator = "predicates",
|
||||
returnType = {},
|
||||
description = "Use `IS NULL` to filter data based on whether the field exists or not.",
|
||||
examples = { @Example(file = "null", tag = "is-null") }
|
||||
)
|
||||
public TestIsNullPredicate(
|
||||
@Param(
|
||||
name = "field",
|
||||
type = {
|
||||
"boolean",
|
||||
"cartesian_point",
|
||||
"cartesian_shape",
|
||||
"date",
|
||||
"date_nanos",
|
||||
"double",
|
||||
"geo_point",
|
||||
"geo_shape",
|
||||
"integer",
|
||||
"ip",
|
||||
"keyword",
|
||||
"long",
|
||||
"text",
|
||||
"unsigned_long",
|
||||
"version" },
|
||||
description = "Input value. The input can be a single- or multi-valued column or an expression."
|
||||
) Expression v
|
||||
) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class only exists to provide FunctionInfo for the documentation
|
||||
*/
|
||||
public class TestIsNotNullPredicate {
|
||||
@FunctionInfo(
|
||||
operator = "predicates",
|
||||
returnType = {},
|
||||
description = "Use `IS NOT NULL` to filter data based on whether the field exists or not.",
|
||||
examples = { @Example(file = "null", tag = "is-not-null") }
|
||||
)
|
||||
public TestIsNotNullPredicate(
|
||||
@Param(
|
||||
name = "field",
|
||||
type = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue