mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
3820 lines
122 KiB
TypeScript
3820 lines
122 KiB
TypeScript
/*
|
|
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
|
* Public License v 1"; you may not use this file except in compliance with, at
|
|
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
|
*/
|
|
|
|
import React from 'react';
|
|
import { i18n } from '@kbn/i18n';
|
|
import { Markdown } from '@kbn/shared-ux-markdown';
|
|
|
|
// DO NOT RENAME!
|
|
export const functions = {
|
|
label: i18n.translate('languageDocumentation.documentationESQL.functions', {
|
|
defaultMessage: 'Functions',
|
|
}),
|
|
description: i18n.translate(
|
|
'languageDocumentation.documentationESQL.functionsDocumentationESQLDescription',
|
|
{
|
|
defaultMessage: `Functions are supported by ROW, EVAL and WHERE.`,
|
|
}
|
|
),
|
|
// items are managed by scripts/generate_esql_docs.ts
|
|
items: [
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.abs', {
|
|
defaultMessage: 'ABS',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.abs.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ABS
|
|
Returns the absolute value.
|
|
|
|
\`\`\`
|
|
ROW number = -1.0
|
|
| EVAL abs_number = ABS(number)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.acos', {
|
|
defaultMessage: 'ACOS',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.acos.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ACOS
|
|
Returns the arccosine of \`n\` as an angle, expressed in radians.
|
|
|
|
\`\`\`
|
|
ROW a=.9
|
|
| EVAL acos=ACOS(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.asin', {
|
|
defaultMessage: 'ASIN',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.asin.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ASIN
|
|
Returns the arcsine of the input
|
|
numeric expression as an angle, expressed in radians.
|
|
|
|
\`\`\`
|
|
ROW a=.9
|
|
| EVAL asin=ASIN(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.atan', {
|
|
defaultMessage: 'ATAN',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.atan.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ATAN
|
|
Returns the arctangent of the input
|
|
numeric expression as an angle, expressed in radians.
|
|
|
|
\`\`\`
|
|
ROW a=12.9
|
|
| EVAL atan=ATAN(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.atan2', {
|
|
defaultMessage: 'ATAN2',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.atan2.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ATAN2
|
|
The angle between the positive x-axis and the ray from the
|
|
origin to the point (x , y) in the Cartesian plane, expressed in radians.
|
|
|
|
\`\`\`
|
|
ROW y=12.9, x=.6
|
|
| EVAL atan2=ATAN2(y, x)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.bit_length', {
|
|
defaultMessage: 'BIT_LENGTH',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.bit_length.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### BIT_LENGTH
|
|
Returns the bit length of a string.
|
|
|
|
\`\`\`
|
|
FROM airports
|
|
| WHERE country == "India"
|
|
| KEEP city
|
|
| EVAL fn_length = LENGTH(city), fn_bit_length = BIT_LENGTH(city)
|
|
\`\`\`
|
|
Note: All strings are in UTF-8, so a single character can use multiple bytes.
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.bucket', {
|
|
defaultMessage: 'BUCKET',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.bucket.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### BUCKET
|
|
Creates groups of values - buckets - out of a datetime or numeric input.
|
|
The size of the buckets can either be provided directly, or chosen based on a recommended count and values range.
|
|
|
|
\`\`\`
|
|
FROM employees
|
|
| WHERE hire_date >= "1985-01-01T00:00:00Z" AND hire_date < "1986-01-01T00:00:00Z"
|
|
| STATS hire_date = MV_SORT(VALUES(hire_date)) BY month = BUCKET(hire_date, 20, "1985-01-01T00:00:00Z", "1986-01-01T00:00:00Z")
|
|
| SORT hire_date
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.byte_length', {
|
|
defaultMessage: 'BYTE_LENGTH',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.byte_length.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### BYTE_LENGTH
|
|
Returns the byte length of a string.
|
|
|
|
\`\`\`
|
|
FROM airports
|
|
| WHERE country == "India"
|
|
| KEEP city
|
|
| EVAL fn_length = LENGTH(city), fn_byte_length = BYTE_LENGTH(city)
|
|
\`\`\`
|
|
Note: All strings are in UTF-8, so a single character can use multiple bytes.
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.case', {
|
|
defaultMessage: 'CASE',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.case.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### CASE
|
|
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\`.
|
|
|
|
\`\`\`
|
|
FROM employees
|
|
| EVAL type = CASE(
|
|
languages <= 1, "monolingual",
|
|
languages <= 2, "bilingual",
|
|
"polyglot")
|
|
| KEEP emp_no, languages, type
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.categorize', {
|
|
defaultMessage: 'CATEGORIZE',
|
|
}),
|
|
preview: true,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.categorize.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### CATEGORIZE
|
|
Groups text messages into categories of similarly formatted text values.
|
|
|
|
\`\`\`
|
|
FROM sample_data
|
|
| STATS count=COUNT() BY category=CATEGORIZE(message)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.cbrt', {
|
|
defaultMessage: 'CBRT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.cbrt.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### CBRT
|
|
Returns the cube root of a number. The input can be any numeric value, the return value is always a double.
|
|
Cube roots of infinities are null.
|
|
|
|
\`\`\`
|
|
ROW d = 1000.0
|
|
| EVAL c = cbrt(d)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.ceil', {
|
|
defaultMessage: 'CEIL',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.ceil.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### CEIL
|
|
Round a number up to the nearest integer.
|
|
|
|
\`\`\`
|
|
ROW a=1.8
|
|
| EVAL a=CEIL(a)
|
|
\`\`\`
|
|
Note: This is a noop for \`long\` (including unsigned) and \`integer\`. For \`double\` this picks the closest \`double\` value to the integer similar to Math.ceil.
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.cidr_match', {
|
|
defaultMessage: 'CIDR_MATCH',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.cidr_match.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### CIDR_MATCH
|
|
Returns true if the provided IP is contained in one of the provided CIDR blocks.
|
|
|
|
\`\`\`
|
|
FROM hosts
|
|
| WHERE CIDR_MATCH(ip1, "127.0.0.2/32", "127.0.0.3/32")
|
|
| KEEP card, host, ip0, ip1
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.coalesce', {
|
|
defaultMessage: 'COALESCE',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.coalesce.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### COALESCE
|
|
Returns the first of its arguments that is not null. If all arguments are null, it returns \`null\`.
|
|
|
|
\`\`\`
|
|
ROW a=null, b="b"
|
|
| EVAL COALESCE(a, b)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.concat', {
|
|
defaultMessage: 'CONCAT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.concat.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### CONCAT
|
|
Concatenates two or more strings.
|
|
|
|
\`\`\`
|
|
FROM employees
|
|
| KEEP first_name, last_name
|
|
| EVAL fullname = CONCAT(first_name, " ", last_name)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.cos', {
|
|
defaultMessage: 'COS',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.cos.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### COS
|
|
Returns the cosine of an angle.
|
|
|
|
\`\`\`
|
|
ROW a=1.8
|
|
| EVAL cos=COS(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.cosh', {
|
|
defaultMessage: 'COSH',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.cosh.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### COSH
|
|
Returns the hyperbolic cosine of a number.
|
|
|
|
\`\`\`
|
|
ROW a=1.8
|
|
| EVAL cosh=COSH(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.date_diff', {
|
|
defaultMessage: 'DATE_DIFF',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.date_diff.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### DATE_DIFF
|
|
Subtracts the \`startTimestamp\` from the \`endTimestamp\` and returns the difference in multiples of \`unit\`.
|
|
If \`startTimestamp\` is later than the \`endTimestamp\`, negative values are returned.
|
|
|
|
\`\`\`
|
|
ROW date1 = TO_DATETIME("2023-12-02T11:00:00.000Z"), date2 = TO_DATETIME("2023-12-02T11:00:00.001Z")
|
|
| EVAL dd_ms = DATE_DIFF("microseconds", date1, date2)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.date_extract', {
|
|
defaultMessage: 'DATE_EXTRACT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.date_extract.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### DATE_EXTRACT
|
|
Extracts parts of a date, like year, month, day, hour.
|
|
|
|
\`\`\`
|
|
ROW date = DATE_PARSE("yyyy-MM-dd", "2022-05-06")
|
|
| EVAL year = DATE_EXTRACT("year", date)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.date_format', {
|
|
defaultMessage: 'DATE_FORMAT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.date_format.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### DATE_FORMAT
|
|
Returns a string representation of a date, in the provided format.
|
|
|
|
\`\`\`
|
|
FROM employees
|
|
| KEEP first_name, last_name, hire_date
|
|
| EVAL hired = DATE_FORMAT("yyyy-MM-dd", hire_date)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.date_parse', {
|
|
defaultMessage: 'DATE_PARSE',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.date_parse.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### DATE_PARSE
|
|
Returns a date by parsing the second argument using the format specified in the first argument.
|
|
|
|
\`\`\`
|
|
ROW date_string = "2022-05-06"
|
|
| EVAL date = DATE_PARSE("yyyy-MM-dd", date_string)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.date_trunc', {
|
|
defaultMessage: 'DATE_TRUNC',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.date_trunc.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### DATE_TRUNC
|
|
Rounds down a date to the closest interval.
|
|
|
|
\`\`\`
|
|
FROM employees
|
|
| KEEP first_name, last_name, hire_date
|
|
| EVAL year_hired = DATE_TRUNC(1 year, hire_date)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.e', {
|
|
defaultMessage: 'E',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.e.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### E
|
|
Returns Euler's number.
|
|
|
|
\`\`\`
|
|
ROW E()
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.ends_with', {
|
|
defaultMessage: 'ENDS_WITH',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.ends_with.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ENDS_WITH
|
|
Returns a boolean that indicates whether a keyword string ends with another string.
|
|
|
|
\`\`\`
|
|
FROM employees
|
|
| KEEP last_name
|
|
| EVAL ln_E = ENDS_WITH(last_name, "d")
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.exp', {
|
|
defaultMessage: 'EXP',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.exp.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### EXP
|
|
Returns the value of e raised to the power of the given number.
|
|
|
|
\`\`\`
|
|
ROW d = 5.0
|
|
| EVAL s = EXP(d)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.floor', {
|
|
defaultMessage: 'FLOOR',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.floor.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### FLOOR
|
|
Round a number down to the nearest integer.
|
|
|
|
\`\`\`
|
|
ROW a=1.8
|
|
| EVAL a=FLOOR(a)
|
|
\`\`\`
|
|
Note: This is a noop for \`long\` (including unsigned) and \`integer\`.
|
|
For \`double\` this picks the closest \`double\` value to the integer
|
|
similar to Math.floor.
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.from_base64', {
|
|
defaultMessage: 'FROM_BASE64',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.from_base64.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### FROM_BASE64
|
|
Decode a base64 string.
|
|
|
|
\`\`\`
|
|
row a = "ZWxhc3RpYw=="
|
|
| eval d = from_base64(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.greatest', {
|
|
defaultMessage: 'GREATEST',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.greatest.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### GREATEST
|
|
Returns the maximum value from multiple columns. This is similar to \`MV_MAX\`
|
|
except it is intended to run on multiple columns at once.
|
|
|
|
\`\`\`
|
|
ROW a = 10, b = 20
|
|
| EVAL g = GREATEST(a, b)
|
|
\`\`\`
|
|
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\`.
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.hypot', {
|
|
defaultMessage: 'HYPOT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.hypot.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### HYPOT
|
|
Returns the hypotenuse of two numbers. The input can be any numeric values, the return value is always a double.
|
|
Hypotenuses of infinities are null.
|
|
|
|
\`\`\`
|
|
ROW a = 3.0, b = 4.0
|
|
| EVAL c = HYPOT(a, b)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.ip_prefix', {
|
|
defaultMessage: 'IP_PREFIX',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.ip_prefix.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### IP_PREFIX
|
|
Truncates an IP to a given prefix length.
|
|
|
|
\`\`\`
|
|
row ip4 = to_ip("1.2.3.4"), ip6 = to_ip("fe80::cae2:65ff:fece:feb9")
|
|
| eval ip4_prefix = ip_prefix(ip4, 24, 0), ip6_prefix = ip_prefix(ip6, 0, 112);
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.least', {
|
|
defaultMessage: 'LEAST',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.least.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### LEAST
|
|
Returns the minimum value from multiple columns. This is similar to \`MV_MIN\` except it is intended to run on multiple columns at once.
|
|
|
|
\`\`\`
|
|
ROW a = 10, b = 20
|
|
| EVAL l = LEAST(a, b)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.left', {
|
|
defaultMessage: 'LEFT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.left.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### LEFT
|
|
Returns the substring that extracts 'length' chars from 'string' starting from the left.
|
|
|
|
\`\`\`
|
|
FROM employees
|
|
| KEEP last_name
|
|
| EVAL left = LEFT(last_name, 3)
|
|
| SORT last_name ASC
|
|
| LIMIT 5
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.length', {
|
|
defaultMessage: 'LENGTH',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.length.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### LENGTH
|
|
Returns the character length of a string.
|
|
|
|
\`\`\`
|
|
FROM airports
|
|
| WHERE country == "India"
|
|
| KEEP city
|
|
| EVAL fn_length = LENGTH(city)
|
|
\`\`\`
|
|
Note: All strings are in UTF-8, so a single character can use multiple bytes.
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.locate', {
|
|
defaultMessage: 'LOCATE',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.locate.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### LOCATE
|
|
Returns an integer that indicates the position of a keyword substring within another string.
|
|
Returns \`0\` if the substring cannot be found.
|
|
Note that string positions start from \`1\`.
|
|
|
|
\`\`\`
|
|
row a = "hello"
|
|
| eval a_ll = locate(a, "ll")
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.log', {
|
|
defaultMessage: 'LOG',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.log.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### LOG
|
|
Returns the logarithm of a value to a base. The input can be any numeric value, the return value is always a double.
|
|
|
|
Logs of zero, negative numbers, and base of one return \`null\` as well as a warning.
|
|
|
|
\`\`\`
|
|
ROW base = 2.0, value = 8.0
|
|
| EVAL s = LOG(base, value)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.log10', {
|
|
defaultMessage: 'LOG10',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.log10.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### LOG10
|
|
Returns the logarithm of a value to base 10. The input can be any numeric value, the return value is always a double.
|
|
|
|
Logs of 0 and negative numbers return \`null\` as well as a warning.
|
|
|
|
\`\`\`
|
|
ROW d = 1000.0
|
|
| EVAL s = LOG10(d)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.ltrim', {
|
|
defaultMessage: 'LTRIM',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.ltrim.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### LTRIM
|
|
Removes leading whitespaces from a string.
|
|
|
|
\`\`\`
|
|
ROW message = " some text ", color = " red "
|
|
| EVAL message = LTRIM(message)
|
|
| EVAL color = LTRIM(color)
|
|
| EVAL message = CONCAT("'", message, "'")
|
|
| EVAL color = CONCAT("'", color, "'")
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.match', {
|
|
defaultMessage: 'MATCH',
|
|
}),
|
|
preview: true,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.match.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MATCH
|
|
Performs a match query on the specified field. Returns true if the provided query matches the row.
|
|
|
|
\`\`\`
|
|
FROM books
|
|
| WHERE MATCH(author, "Faulkner")
|
|
| KEEP book_no, author
|
|
| SORT book_no
|
|
| LIMIT 5;
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_append', {
|
|
defaultMessage: 'MV_APPEND',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_append.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_APPEND
|
|
Concatenates values of two multi-value fields.
|
|
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_avg', {
|
|
defaultMessage: 'MV_AVG',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_avg.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_AVG
|
|
Converts a multivalued field into a single valued field containing the average of all of the values.
|
|
|
|
\`\`\`
|
|
ROW a=[3, 5, 1, 6]
|
|
| EVAL avg_a = MV_AVG(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_concat', {
|
|
defaultMessage: 'MV_CONCAT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_concat.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_CONCAT
|
|
Converts a multivalued string expression into a single valued column containing the concatenation of all values separated by a delimiter.
|
|
|
|
\`\`\`
|
|
ROW a=["foo", "zoo", "bar"]
|
|
| EVAL j = MV_CONCAT(a, ", ")
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_count', {
|
|
defaultMessage: 'MV_COUNT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_count.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_COUNT
|
|
Converts a multivalued expression into a single valued column containing a count of the number of values.
|
|
|
|
\`\`\`
|
|
ROW a=["foo", "zoo", "bar"]
|
|
| EVAL count_a = MV_COUNT(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_dedupe', {
|
|
defaultMessage: 'MV_DEDUPE',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_dedupe.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_DEDUPE
|
|
Remove duplicate values from a multivalued field.
|
|
|
|
\`\`\`
|
|
ROW a=["foo", "foo", "bar", "foo"]
|
|
| EVAL dedupe_a = MV_DEDUPE(a)
|
|
\`\`\`
|
|
Note: \`MV_DEDUPE\` may, but won't always, sort the values in the column.
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_first', {
|
|
defaultMessage: 'MV_FIRST',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_first.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_FIRST
|
|
Converts a multivalued expression into a single valued column containing the
|
|
first value. This is most useful when reading from a function that emits
|
|
multivalued columns in a known order like \`SPLIT\`.
|
|
|
|
\`\`\`
|
|
ROW a="foo;bar;baz"
|
|
| EVAL first_a = MV_FIRST(SPLIT(a, ";"))
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_last', {
|
|
defaultMessage: 'MV_LAST',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_last.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_LAST
|
|
Converts a multivalue expression into a single valued column containing the last
|
|
value. This is most useful when reading from a function that emits multivalued
|
|
columns in a known order like \`SPLIT\`.
|
|
|
|
\`\`\`
|
|
ROW a="foo;bar;baz"
|
|
| EVAL last_a = MV_LAST(SPLIT(a, ";"))
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_max', {
|
|
defaultMessage: 'MV_MAX',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_max.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_MAX
|
|
Converts a multivalued expression into a single valued column containing the maximum value.
|
|
|
|
\`\`\`
|
|
ROW a=[3, 5, 1]
|
|
| EVAL max_a = MV_MAX(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_median', {
|
|
defaultMessage: 'MV_MEDIAN',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_median.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_MEDIAN
|
|
Converts a multivalued field into a single valued field containing the median value.
|
|
|
|
\`\`\`
|
|
ROW a=[3, 5, 1]
|
|
| EVAL median_a = MV_MEDIAN(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_median_absolute_deviation',
|
|
{
|
|
defaultMessage: 'MV_MEDIAN_ABSOLUTE_DEVIATION',
|
|
}
|
|
),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_median_absolute_deviation.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_MEDIAN_ABSOLUTE_DEVIATION
|
|
Converts a multivalued field into a single valued field containing the median absolute deviation.
|
|
|
|
It 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|)\`.
|
|
|
|
\`\`\`
|
|
ROW values = [0, 2, 5, 6]
|
|
| EVAL median_absolute_deviation = MV_MEDIAN_ABSOLUTE_DEVIATION(values), median = MV_MEDIAN(values)
|
|
\`\`\`
|
|
Note: If the field has an even number of values, the medians will be calculated as the average of the middle two values. If the value is not a floating point number, the averages are rounded towards 0.
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_min', {
|
|
defaultMessage: 'MV_MIN',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_min.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_MIN
|
|
Converts a multivalued expression into a single valued column containing the minimum value.
|
|
|
|
\`\`\`
|
|
ROW a=[2, 1]
|
|
| EVAL min_a = MV_MIN(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_percentile', {
|
|
defaultMessage: 'MV_PERCENTILE',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_percentile.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_PERCENTILE
|
|
Converts a multivalued field into a single valued field containing the value at which a certain percentage of observed values occur.
|
|
|
|
\`\`\`
|
|
ROW values = [5, 5, 10, 12, 5000]
|
|
| EVAL p50 = MV_PERCENTILE(values, 50), median = MV_MEDIAN(values)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_pseries_weighted_sum', {
|
|
defaultMessage: 'MV_PSERIES_WEIGHTED_SUM',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_pseries_weighted_sum.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_PSERIES_WEIGHTED_SUM
|
|
Converts a multivalued expression into a single-valued column by multiplying every element on the input list by its corresponding term in P-Series and computing the sum.
|
|
|
|
\`\`\`
|
|
ROW a = [70.0, 45.0, 21.0, 21.0, 21.0]
|
|
| EVAL sum = MV_PSERIES_WEIGHTED_SUM(a, 1.5)
|
|
| KEEP sum
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_slice', {
|
|
defaultMessage: 'MV_SLICE',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_slice.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_SLICE
|
|
Returns a subset of the multivalued field using the start and end index values.
|
|
This is most useful when reading from a function that emits multivalued columns
|
|
in a known order like \`SPLIT\` or \`MV_SORT\`.
|
|
|
|
\`\`\`
|
|
row a = [1, 2, 2, 3]
|
|
| eval a1 = mv_slice(a, 1), a2 = mv_slice(a, 2, 3)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_sort', {
|
|
defaultMessage: 'MV_SORT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_sort.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_SORT
|
|
Sorts a multivalued field in lexicographical order.
|
|
|
|
\`\`\`
|
|
ROW a = [4, 2, -3, 2]
|
|
| EVAL sa = mv_sort(a), sd = mv_sort(a, "DESC")
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_sum', {
|
|
defaultMessage: 'MV_SUM',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_sum.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_SUM
|
|
Converts a multivalued field into a single valued field containing the sum of all of the values.
|
|
|
|
\`\`\`
|
|
ROW a=[3, 5, 6]
|
|
| EVAL sum_a = MV_SUM(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.mv_zip', {
|
|
defaultMessage: 'MV_ZIP',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.mv_zip.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### MV_ZIP
|
|
Combines the values from two multivalued fields with a delimiter that joins them together.
|
|
|
|
\`\`\`
|
|
ROW a = ["x", "y", "z"], b = ["1", "2"]
|
|
| EVAL c = mv_zip(a, b, "-")
|
|
| KEEP a, b, c
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.now', {
|
|
defaultMessage: 'NOW',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.now.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### NOW
|
|
Returns current date and time.
|
|
|
|
\`\`\`
|
|
ROW current_date = NOW()
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.pi', {
|
|
defaultMessage: 'PI',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.pi.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### PI
|
|
Returns Pi, the ratio of a circle's circumference to its diameter.
|
|
|
|
\`\`\`
|
|
ROW PI()
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.pow', {
|
|
defaultMessage: 'POW',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.pow.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### POW
|
|
Returns the value of \`base\` raised to the power of \`exponent\`.
|
|
|
|
\`\`\`
|
|
ROW base = 2.0, exponent = 2
|
|
| EVAL result = POW(base, exponent)
|
|
\`\`\`
|
|
Note: It is still possible to overflow a double result here; in that case, null will be returned.
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.qstr', {
|
|
defaultMessage: 'QSTR',
|
|
}),
|
|
preview: true,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.qstr.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### QSTR
|
|
Performs a query string query. Returns true if the provided query string matches the row.
|
|
|
|
\`\`\`
|
|
FROM books
|
|
| WHERE QSTR("author: Faulkner")
|
|
| KEEP book_no, author
|
|
| SORT book_no
|
|
| LIMIT 5;
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.repeat', {
|
|
defaultMessage: 'REPEAT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.repeat.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### REPEAT
|
|
Returns a string constructed by concatenating \`string\` with itself the specified \`number\` of times.
|
|
|
|
\`\`\`
|
|
ROW a = "Hello!"
|
|
| EVAL triple_a = REPEAT(a, 3)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.replace', {
|
|
defaultMessage: 'REPLACE',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.replace.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### REPLACE
|
|
The function substitutes in the string \`str\` any match of the regular expression \`regex\`
|
|
with the replacement string \`newStr\`.
|
|
|
|
\`\`\`
|
|
ROW str = "Hello World"
|
|
| EVAL str = REPLACE(str, "World", "Universe")
|
|
| KEEP str
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.reverse', {
|
|
defaultMessage: 'REVERSE',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.reverse.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### REVERSE
|
|
Returns a new string representing the input string in reverse order.
|
|
|
|
\`\`\`
|
|
ROW message = "Some Text" | EVAL message_reversed = REVERSE(message);
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.right', {
|
|
defaultMessage: 'RIGHT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.right.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### RIGHT
|
|
Return the substring that extracts 'length' chars from 'str' starting from the right.
|
|
|
|
\`\`\`
|
|
FROM employees
|
|
| KEEP last_name
|
|
| EVAL right = RIGHT(last_name, 3)
|
|
| SORT last_name ASC
|
|
| LIMIT 5
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.round', {
|
|
defaultMessage: 'ROUND',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.round.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ROUND
|
|
Rounds a number to the specified number of decimal places.
|
|
Defaults to 0, which returns the nearest integer. If the
|
|
precision is a negative number, rounds to the number of digits left
|
|
of the decimal point.
|
|
|
|
\`\`\`
|
|
FROM employees
|
|
| KEEP first_name, last_name, height
|
|
| EVAL height_ft = ROUND(height * 3.281, 1)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.rtrim', {
|
|
defaultMessage: 'RTRIM',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.rtrim.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### RTRIM
|
|
Removes trailing whitespaces from a string.
|
|
|
|
\`\`\`
|
|
ROW message = " some text ", color = " red "
|
|
| EVAL message = RTRIM(message)
|
|
| EVAL color = RTRIM(color)
|
|
| EVAL message = CONCAT("'", message, "'")
|
|
| EVAL color = CONCAT("'", color, "'")
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.signum', {
|
|
defaultMessage: 'SIGNUM',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.signum.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### SIGNUM
|
|
Returns the sign of the given number.
|
|
It returns \`-1\` for negative numbers, \`0\` for \`0\` and \`1\` for positive numbers.
|
|
|
|
\`\`\`
|
|
ROW d = 100.0
|
|
| EVAL s = SIGNUM(d)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.sin', {
|
|
defaultMessage: 'SIN',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.sin.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### SIN
|
|
Returns the sine of an angle.
|
|
|
|
\`\`\`
|
|
ROW a=1.8
|
|
| EVAL sin=SIN(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.sinh', {
|
|
defaultMessage: 'SINH',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.sinh.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### SINH
|
|
Returns the hyperbolic sine of a number.
|
|
|
|
\`\`\`
|
|
ROW a=1.8
|
|
| EVAL sinh=SINH(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.space', {
|
|
defaultMessage: 'SPACE',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.space.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### SPACE
|
|
Returns a string made of \`number\` spaces.
|
|
|
|
\`\`\`
|
|
ROW message = CONCAT("Hello", SPACE(1), "World!");
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.split', {
|
|
defaultMessage: 'SPLIT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.split.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### SPLIT
|
|
Split a single valued string into multiple strings.
|
|
|
|
\`\`\`
|
|
ROW words="foo;bar;baz;qux;quux;corge"
|
|
| EVAL word = SPLIT(words, ";")
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.sqrt', {
|
|
defaultMessage: 'SQRT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.sqrt.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### SQRT
|
|
Returns the square root of a number. The input can be any numeric value, the return value is always a double.
|
|
Square roots of negative numbers and infinities are null.
|
|
|
|
\`\`\`
|
|
ROW d = 100.0
|
|
| EVAL s = SQRT(d)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.st_contains', {
|
|
defaultMessage: 'ST_CONTAINS',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.st_contains.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ST_CONTAINS
|
|
Returns whether the first geometry contains the second geometry.
|
|
This is the inverse of the \`ST_WITHIN\` function.
|
|
|
|
\`\`\`
|
|
FROM airport_city_boundaries
|
|
| WHERE ST_CONTAINS(city_boundary, TO_GEOSHAPE("POLYGON((109.35 18.3, 109.45 18.3, 109.45 18.4, 109.35 18.4, 109.35 18.3))"))
|
|
| KEEP abbrev, airport, region, city, city_location
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.st_disjoint', {
|
|
defaultMessage: 'ST_DISJOINT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.st_disjoint.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ST_DISJOINT
|
|
Returns whether the two geometries or geometry columns are disjoint.
|
|
This is the inverse of the \`ST_INTERSECTS\` function.
|
|
In mathematical terms: ST_Disjoint(A, B) ⇔ A ⋂ B = ∅
|
|
|
|
\`\`\`
|
|
FROM airport_city_boundaries
|
|
| WHERE ST_DISJOINT(city_boundary, TO_GEOSHAPE("POLYGON((-10 -60, 120 -60, 120 60, -10 60, -10 -60))"))
|
|
| KEEP abbrev, airport, region, city, city_location
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.st_distance', {
|
|
defaultMessage: 'ST_DISTANCE',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.st_distance.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ST_DISTANCE
|
|
Computes the distance between two points.
|
|
For cartesian geometries, this is the pythagorean distance in the same units as the original coordinates.
|
|
For geographic geometries, this is the circular distance along the great circle in meters.
|
|
|
|
\`\`\`
|
|
FROM airports
|
|
| WHERE abbrev == "CPH"
|
|
| EVAL distance = ST_DISTANCE(location, city_location)
|
|
| KEEP abbrev, name, location, city_location, distance
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.st_envelope', {
|
|
defaultMessage: 'ST_ENVELOPE',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.st_envelope.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ST_ENVELOPE
|
|
Determines the minimum bounding box of the supplied geometry.
|
|
|
|
\`\`\`
|
|
FROM airport_city_boundaries
|
|
| WHERE abbrev == "CPH"
|
|
| EVAL envelope = ST_ENVELOPE(city_boundary)
|
|
| KEEP abbrev, airport, envelope
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.st_intersects', {
|
|
defaultMessage: 'ST_INTERSECTS',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.st_intersects.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ST_INTERSECTS
|
|
Returns true if two geometries intersect.
|
|
They intersect if they have any point in common, including their interior points
|
|
(points along lines or within polygons).
|
|
This is the inverse of the \`ST_DISJOINT\` function.
|
|
In mathematical terms: ST_Intersects(A, B) ⇔ A ⋂ B ≠ ∅
|
|
|
|
\`\`\`
|
|
FROM airports
|
|
| WHERE ST_INTERSECTS(location, TO_GEOSHAPE("POLYGON((42 14, 43 14, 43 15, 42 15, 42 14))"))
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.st_within', {
|
|
defaultMessage: 'ST_WITHIN',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.st_within.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ST_WITHIN
|
|
Returns whether the first geometry is within the second geometry.
|
|
This is the inverse of the \`ST_CONTAINS\` function.
|
|
|
|
\`\`\`
|
|
FROM airport_city_boundaries
|
|
| WHERE ST_WITHIN(city_boundary, TO_GEOSHAPE("POLYGON((109.1 18.15, 109.6 18.15, 109.6 18.65, 109.1 18.65, 109.1 18.15))"))
|
|
| KEEP abbrev, airport, region, city, city_location
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.st_x', {
|
|
defaultMessage: 'ST_X',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.st_x.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ST_X
|
|
Extracts the \`x\` coordinate from the supplied point.
|
|
If the points is of type \`geo_point\` this is equivalent to extracting the \`longitude\` value.
|
|
|
|
\`\`\`
|
|
ROW point = TO_GEOPOINT("POINT(42.97109629958868 14.7552534006536)")
|
|
| EVAL x = ST_X(point), y = ST_Y(point)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.st_xmax', {
|
|
defaultMessage: 'ST_XMAX',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.st_xmax.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ST_XMAX
|
|
Extracts the maximum value of the \`x\` coordinates from the supplied geometry.
|
|
If the geometry is of type \`geo_point\` or \`geo_shape\` this is equivalent to extracting the maximum \`longitude\` value.
|
|
|
|
\`\`\`
|
|
FROM airport_city_boundaries
|
|
| WHERE abbrev == "CPH"
|
|
| EVAL envelope = ST_ENVELOPE(city_boundary)
|
|
| EVAL xmin = ST_XMIN(envelope), xmax = ST_XMAX(envelope), ymin = ST_YMIN(envelope), ymax = ST_YMAX(envelope)
|
|
| KEEP abbrev, airport, xmin, xmax, ymin, ymax
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.st_xmin', {
|
|
defaultMessage: 'ST_XMIN',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.st_xmin.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ST_XMIN
|
|
Extracts the minimum value of the \`x\` coordinates from the supplied geometry.
|
|
If the geometry is of type \`geo_point\` or \`geo_shape\` this is equivalent to extracting the minimum \`longitude\` value.
|
|
|
|
\`\`\`
|
|
FROM airport_city_boundaries
|
|
| WHERE abbrev == "CPH"
|
|
| EVAL envelope = ST_ENVELOPE(city_boundary)
|
|
| EVAL xmin = ST_XMIN(envelope), xmax = ST_XMAX(envelope), ymin = ST_YMIN(envelope), ymax = ST_YMAX(envelope)
|
|
| KEEP abbrev, airport, xmin, xmax, ymin, ymax
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.st_y', {
|
|
defaultMessage: 'ST_Y',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.st_y.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### 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.
|
|
|
|
\`\`\`
|
|
ROW point = TO_GEOPOINT("POINT(42.97109629958868 14.7552534006536)")
|
|
| EVAL x = ST_X(point), y = ST_Y(point)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.st_ymax', {
|
|
defaultMessage: 'ST_YMAX',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.st_ymax.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ST_YMAX
|
|
Extracts the maximum value of the \`y\` coordinates from the supplied geometry.
|
|
If the geometry is of type \`geo_point\` or \`geo_shape\` this is equivalent to extracting the maximum \`latitude\` value.
|
|
|
|
\`\`\`
|
|
FROM airport_city_boundaries
|
|
| WHERE abbrev == "CPH"
|
|
| EVAL envelope = ST_ENVELOPE(city_boundary)
|
|
| EVAL xmin = ST_XMIN(envelope), xmax = ST_XMAX(envelope), ymin = ST_YMIN(envelope), ymax = ST_YMAX(envelope)
|
|
| KEEP abbrev, airport, xmin, xmax, ymin, ymax
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.st_ymin', {
|
|
defaultMessage: 'ST_YMIN',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.st_ymin.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### ST_YMIN
|
|
Extracts the minimum value of the \`y\` coordinates from the supplied geometry.
|
|
If the geometry is of type \`geo_point\` or \`geo_shape\` this is equivalent to extracting the minimum \`latitude\` value.
|
|
|
|
\`\`\`
|
|
FROM airport_city_boundaries
|
|
| WHERE abbrev == "CPH"
|
|
| EVAL envelope = ST_ENVELOPE(city_boundary)
|
|
| EVAL xmin = ST_XMIN(envelope), xmax = ST_XMAX(envelope), ymin = ST_YMIN(envelope), ymax = ST_YMAX(envelope)
|
|
| KEEP abbrev, airport, xmin, xmax, ymin, ymax
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.starts_with', {
|
|
defaultMessage: 'STARTS_WITH',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.starts_with.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### STARTS_WITH
|
|
Returns a boolean that indicates whether a keyword string starts with another string.
|
|
|
|
\`\`\`
|
|
FROM employees
|
|
| KEEP last_name
|
|
| EVAL ln_S = STARTS_WITH(last_name, "B")
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.substring', {
|
|
defaultMessage: 'SUBSTRING',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.substring.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### SUBSTRING
|
|
Returns a substring of a string, specified by a start position and an optional length.
|
|
|
|
\`\`\`
|
|
FROM employees
|
|
| KEEP last_name
|
|
| EVAL ln_sub = SUBSTRING(last_name, 1, 3)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.tan', {
|
|
defaultMessage: 'TAN',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.tan.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TAN
|
|
Returns the tangent of an angle.
|
|
|
|
\`\`\`
|
|
ROW a=1.8
|
|
| EVAL tan=TAN(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.tanh', {
|
|
defaultMessage: 'TANH',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.tanh.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TANH
|
|
Returns the hyperbolic tangent of a number.
|
|
|
|
\`\`\`
|
|
ROW a=1.8
|
|
| EVAL tanh=TANH(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.tau', {
|
|
defaultMessage: 'TAU',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.tau.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TAU
|
|
Returns the ratio of a circle's circumference to its radius.
|
|
|
|
\`\`\`
|
|
ROW TAU()
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_base64', {
|
|
defaultMessage: 'TO_BASE64',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_base64.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_BASE64
|
|
Encode a string to a base64 string.
|
|
|
|
\`\`\`
|
|
row a = "elastic"
|
|
| eval e = to_base64(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_boolean', {
|
|
defaultMessage: 'TO_BOOLEAN',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_boolean.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_BOOLEAN
|
|
Converts an input value to a boolean value.
|
|
A string value of *true* will be case-insensitive converted to the Boolean *true*.
|
|
For anything else, including the empty string, the function will return *false*.
|
|
The numerical value of *0* will be converted to *false*, anything else will be converted to *true*.
|
|
|
|
\`\`\`
|
|
ROW str = ["true", "TRuE", "false", "", "yes", "1"]
|
|
| EVAL bool = TO_BOOLEAN(str)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_cartesianpoint', {
|
|
defaultMessage: 'TO_CARTESIANPOINT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_cartesianpoint.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_CARTESIANPOINT
|
|
Converts an input value to a \`cartesian_point\` value.
|
|
A string will only be successfully converted if it respects WKT Point format.
|
|
|
|
\`\`\`
|
|
ROW wkt = ["POINT(4297.11 -1475.53)", "POINT(7580.93 2272.77)"]
|
|
| MV_EXPAND wkt
|
|
| EVAL pt = TO_CARTESIANPOINT(wkt)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_cartesianshape', {
|
|
defaultMessage: 'TO_CARTESIANSHAPE',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_cartesianshape.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_CARTESIANSHAPE
|
|
Converts an input value to a \`cartesian_shape\` value.
|
|
A string will only be successfully converted if it respects WKT format.
|
|
|
|
\`\`\`
|
|
ROW wkt = ["POINT(4297.11 -1475.53)", "POLYGON ((3339584.72 1118889.97, 4452779.63 4865942.27, 2226389.81 4865942.27, 1113194.90 2273030.92, 3339584.72 1118889.97))"]
|
|
| MV_EXPAND wkt
|
|
| EVAL geom = TO_CARTESIANSHAPE(wkt)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_date_nanos', {
|
|
defaultMessage: 'TO_DATE_NANOS',
|
|
}),
|
|
preview: true,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_date_nanos.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_DATE_NANOS
|
|
Converts an input to a nanosecond-resolution date value (aka date_nanos).
|
|
|
|
Note: The range for date nanos is 1970-01-01T00:00:00.000000000Z to 2262-04-11T23:47:16.854775807Z. Additionally, integers cannot be converted into date nanos, as the range of integer nanoseconds only covers about 2 seconds after epoch.
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_dateperiod', {
|
|
defaultMessage: 'TO_DATEPERIOD',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_dateperiod.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_DATEPERIOD
|
|
Converts an input value into a \`date_period\` value.
|
|
|
|
\`\`\`
|
|
row x = "2024-01-01"::datetime | eval y = x + "3 DAYS"::date_period, z = x - to_dateperiod("3 days");
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_datetime', {
|
|
defaultMessage: 'TO_DATETIME',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_datetime.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_DATETIME
|
|
Converts an input value to a date value.
|
|
A string will only be successfully converted if it's respecting the format \`yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\`.
|
|
To convert dates in other formats, use \`DATE_PARSE\`.
|
|
|
|
\`\`\`
|
|
ROW string = ["1953-09-02T00:00:00.000Z", "1964-06-02T00:00:00.000Z", "1964-06-02 00:00:00"]
|
|
| EVAL datetime = TO_DATETIME(string)
|
|
\`\`\`
|
|
Note: Note that when converting from nanosecond resolution to millisecond resolution with this function, the nanosecond date is truncated, not rounded.
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_degrees', {
|
|
defaultMessage: 'TO_DEGREES',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_degrees.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_DEGREES
|
|
Converts a number in radians to degrees.
|
|
|
|
\`\`\`
|
|
ROW rad = [1.57, 3.14, 4.71]
|
|
| EVAL deg = TO_DEGREES(rad)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_double', {
|
|
defaultMessage: 'TO_DOUBLE',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_double.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_DOUBLE
|
|
Converts an input value to a double value. If the input parameter is of a date type,
|
|
its value will be interpreted as milliseconds since the Unix epoch,
|
|
converted to double. Boolean *true* will be converted to double *1.0*, *false* to *0.0*.
|
|
|
|
\`\`\`
|
|
ROW str1 = "5.20128E11", str2 = "foo"
|
|
| EVAL dbl = TO_DOUBLE("520128000000"), dbl1 = TO_DOUBLE(str1), dbl2 = TO_DOUBLE(str2)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_geopoint', {
|
|
defaultMessage: 'TO_GEOPOINT',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_geopoint.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_GEOPOINT
|
|
Converts an input value to a \`geo_point\` value.
|
|
A string will only be successfully converted if it respects WKT Point format.
|
|
|
|
\`\`\`
|
|
ROW wkt = "POINT(42.97109630194 14.7552534413725)"
|
|
| EVAL pt = TO_GEOPOINT(wkt)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_geoshape', {
|
|
defaultMessage: 'TO_GEOSHAPE',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_geoshape.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_GEOSHAPE
|
|
Converts an input value to a \`geo_shape\` value.
|
|
A string will only be successfully converted if it respects WKT format.
|
|
|
|
\`\`\`
|
|
ROW wkt = "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))"
|
|
| EVAL geom = TO_GEOSHAPE(wkt)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_integer', {
|
|
defaultMessage: 'TO_INTEGER',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_integer.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_INTEGER
|
|
Converts an input value to an integer value.
|
|
If the input parameter is of a date type, its value will be interpreted as milliseconds
|
|
since the Unix epoch, converted to integer.
|
|
Boolean *true* will be converted to integer *1*, *false* to *0*.
|
|
|
|
\`\`\`
|
|
ROW long = [5013792, 2147483647, 501379200000]
|
|
| EVAL int = TO_INTEGER(long)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_ip', {
|
|
defaultMessage: 'TO_IP',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_ip.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_IP
|
|
Converts an input string to an IP value.
|
|
|
|
\`\`\`
|
|
ROW str1 = "1.1.1.1", str2 = "foo"
|
|
| EVAL ip1 = TO_IP(str1), ip2 = TO_IP(str2)
|
|
| WHERE CIDR_MATCH(ip1, "1.0.0.0/8")
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_long', {
|
|
defaultMessage: 'TO_LONG',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_long.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_LONG
|
|
Converts an input value to a long value. If the input parameter is of a date type,
|
|
its value will be interpreted as milliseconds since the Unix epoch, converted to long.
|
|
Boolean *true* will be converted to long *1*, *false* to *0*.
|
|
|
|
\`\`\`
|
|
ROW str1 = "2147483648", str2 = "2147483648.2", str3 = "foo"
|
|
| EVAL long1 = TO_LONG(str1), long2 = TO_LONG(str2), long3 = TO_LONG(str3)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_lower', {
|
|
defaultMessage: 'TO_LOWER',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_lower.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_LOWER
|
|
Returns a new string representing the input string converted to lower case.
|
|
|
|
\`\`\`
|
|
ROW message = "Some Text"
|
|
| EVAL message_lower = TO_LOWER(message)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_radians', {
|
|
defaultMessage: 'TO_RADIANS',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_radians.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_RADIANS
|
|
Converts a number in degrees to radians.
|
|
|
|
\`\`\`
|
|
ROW deg = [90.0, 180.0, 270.0]
|
|
| EVAL rad = TO_RADIANS(deg)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_string', {
|
|
defaultMessage: 'TO_STRING',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_string.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_STRING
|
|
Converts an input value into a string.
|
|
|
|
\`\`\`
|
|
ROW a=10
|
|
| EVAL j = TO_STRING(a)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_timeduration', {
|
|
defaultMessage: 'TO_TIMEDURATION',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_timeduration.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_TIMEDURATION
|
|
Converts an input value into a \`time_duration\` value.
|
|
|
|
\`\`\`
|
|
row x = "2024-01-01"::datetime | eval y = x + "3 hours"::time_duration, z = x - to_timeduration("3 hours");
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_unsigned_long', {
|
|
defaultMessage: 'TO_UNSIGNED_LONG',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_unsigned_long.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_UNSIGNED_LONG
|
|
Converts an input value to an unsigned long value. If the input parameter is of a date type,
|
|
its value will be interpreted as milliseconds since the Unix epoch, converted to unsigned long.
|
|
Boolean *true* will be converted to unsigned long *1*, *false* to *0*.
|
|
|
|
\`\`\`
|
|
ROW str1 = "2147483648", str2 = "2147483648.2", str3 = "foo"
|
|
| EVAL long1 = TO_UNSIGNED_LONG(str1), long2 = TO_ULONG(str2), long3 = TO_UL(str3)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_upper', {
|
|
defaultMessage: 'TO_UPPER',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_upper.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_UPPER
|
|
Returns a new string representing the input string converted to upper case.
|
|
|
|
\`\`\`
|
|
ROW message = "Some Text"
|
|
| EVAL message_upper = TO_UPPER(message)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.to_version', {
|
|
defaultMessage: 'TO_VERSION',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate(
|
|
'languageDocumentation.documentationESQL.to_version.markdown',
|
|
{
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TO_VERSION
|
|
Converts an input string to a version value.
|
|
|
|
\`\`\`
|
|
ROW v = TO_VERSION("1.2.3")
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
}
|
|
)}
|
|
/>
|
|
),
|
|
},
|
|
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
|
|
{
|
|
label: i18n.translate('languageDocumentation.documentationESQL.trim', {
|
|
defaultMessage: 'TRIM',
|
|
}),
|
|
preview: false,
|
|
description: (
|
|
<Markdown
|
|
openLinksInNewTab
|
|
readOnly
|
|
enableSoftLineBreaks
|
|
markdownContent={i18n.translate('languageDocumentation.documentationESQL.trim.markdown', {
|
|
defaultMessage: `<!--
|
|
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
-->
|
|
|
|
### TRIM
|
|
Removes leading and trailing whitespaces from a string.
|
|
|
|
\`\`\`
|
|
ROW message = " some text ", color = " red "
|
|
| EVAL message = TRIM(message)
|
|
| EVAL color = TRIM(color)
|
|
\`\`\`
|
|
`,
|
|
description:
|
|
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
|
ignoreTag: true,
|
|
})}
|
|
/>
|
|
),
|
|
},
|
|
],
|
|
};
|