Skip to content

Commit eed0a19

Browse files
[ES|QL] Update function metadata (#215622)
This PR updates the function definitions and inline docs based on the latest metadata from Elasticsearch. --------- Co-authored-by: Stratoula Kalafateli <[email protected]>
1 parent f81572e commit eed0a19

File tree

3 files changed

+63
-59
lines changed

3 files changed

+63
-59
lines changed

src/platform/packages/private/kbn-language-documentation/src/sections/generated/aggregation_functions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ export const functions = {
477477
-->
478478
479479
### VALUES
480-
Returns all values in a group as a multivalued field. The order of the returned values isn’t guaranteed. If you need the values returned in order use esql-mv_sort.
480+
Returns all values in a group as a multivalued field. The order of the returned values isn’t guaranteed. If you need the values returned in order use \`MV_SORT\`.
481481
482482
\`\`\` esql
483483
FROM employees

src/platform/packages/private/kbn-language-documentation/src/sections/generated/scalar_functions.tsx

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const functions = {
7171
-->
7272
7373
### ACOS
74-
Returns the arccosine of \`n\` as an angle, expressed in radians.
74+
Returns the [arccosine](https://en.wikipedia.org/wiki/Inverse_trigonometric_functions) of \`n\` as an angle, expressed in radians.
7575
7676
\`\`\` esql
7777
ROW a=.9
@@ -102,7 +102,7 @@ export const functions = {
102102
-->
103103
104104
### ASIN
105-
Returns the arcsine of the input
105+
Returns the [arcsine](https://en.wikipedia.org/wiki/Inverse_trigonometric_functions) of the input
106106
numeric expression as an angle, expressed in radians.
107107
108108
\`\`\` esql
@@ -134,7 +134,7 @@ export const functions = {
134134
-->
135135
136136
### ATAN
137-
Returns the arctangent of the input
137+
Returns the [arctangent](https://en.wikipedia.org/wiki/Inverse_trigonometric_functions) of the input
138138
numeric expression as an angle, expressed in radians.
139139
140140
\`\`\` esql
@@ -168,7 +168,7 @@ export const functions = {
168168
-->
169169
170170
### ATAN2
171-
The angle between the positive x-axis and the ray from the
171+
The [angle](https://en.wikipedia.org/wiki/Atan2) between the positive x-axis and the ray from the
172172
origin to the point (x , y) in the Cartesian plane, expressed in radians.
173173
174174
\`\`\` esql
@@ -353,7 +353,7 @@ export const functions = {
353353
ROW a=1.8
354354
| EVAL a=CEIL(a)
355355
\`\`\`
356-
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.
356+
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](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Math.html#ceil(double)).
357357
`,
358358
description:
359359
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
@@ -483,7 +483,7 @@ export const functions = {
483483
-->
484484
485485
### COS
486-
Returns the cosine of an angle.
486+
Returns the [cosine](https://en.wikipedia.org/wiki/Sine_and_cosine) of an angle.
487487
488488
\`\`\` esql
489489
ROW a=1.8
@@ -514,7 +514,7 @@ export const functions = {
514514
-->
515515
516516
### COSH
517-
Returns the hyperbolic cosine of a number.
517+
Returns the [hyperbolic cosine](https://en.wikipedia.org/wiki/Hyperbolic_functions) of a number.
518518
519519
\`\`\` esql
520520
ROW a=1.8
@@ -718,7 +718,7 @@ export const functions = {
718718
-->
719719
720720
### E
721-
Returns Euler’s number.
721+
Returns [Euler’s number](https://en.wikipedia.org/wiki/E_(mathematical_constant)).
722722
723723
\`\`\` esql
724724
ROW E()
@@ -824,7 +824,7 @@ export const functions = {
824824
\`\`\`
825825
Note: This is a noop for \`long\` (including unsigned) and \`integer\`.
826826
For \`double\` this picks the closest \`double\` value to the integer
827-
similar to Math.floor.
827+
similar to [Math.floor](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Math.html#floor(double)).
828828
`,
829829
description:
830830
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
@@ -1309,7 +1309,7 @@ export const functions = {
13091309
Use \`MATCH\` to perform a match query on the specified field.
13101310
Using \`MATCH\` is equivalent to using the \`match\` query in the Elasticsearch Query DSL.
13111311
1312-
Match can be used on fields from the text family like text and semantic_text,
1312+
Match can be used on fields from the text family like text and semantic_text,
13131313
as well as other field types like keyword, boolean, dates, and numeric types.
13141314
13151315
Match can use function named parameters to specify additional options for the match query.
@@ -2004,7 +2004,7 @@ export const functions = {
20042004
-->
20052005
20062006
### PI
2007-
Returns Pi, the ratio of a circle’s circumference to its diameter.
2007+
Returns [Pi](https://en.wikipedia.org/wiki/Pi), the ratio of a circle’s circumference to its diameter.
20082008
20092009
\`\`\` esql
20102010
ROW PI()
@@ -2419,7 +2419,7 @@ export const functions = {
24192419
-->
24202420
24212421
### SIN
2422-
Returns the sine of an angle.
2422+
Returns the [sine](https://en.wikipedia.org/wiki/Sine_and_cosine) of an angle.
24232423
24242424
\`\`\` esql
24252425
ROW a=1.8
@@ -2450,7 +2450,7 @@ export const functions = {
24502450
-->
24512451
24522452
### SINH
2453-
Returns the hyperbolic sine of a number.
2453+
Returns the [hyperbolic sine](https://en.wikipedia.org/wiki/Hyperbolic_functions) of a number.
24542454
24552455
\`\`\` esql
24562456
ROW a=1.8
@@ -2583,7 +2583,7 @@ export const functions = {
25832583
25842584
### ST_CONTAINS
25852585
Returns whether the first geometry contains the second geometry.
2586-
This is the inverse of the \`ST_WITHIN\` function.
2586+
This is the inverse of the ST_WITHIN function.
25872587
25882588
\`\`\` esql
25892589
FROM airport_city_boundaries
@@ -2619,7 +2619,7 @@ export const functions = {
26192619
26202620
### ST_DISJOINT
26212621
Returns whether the two geometries or geometry columns are disjoint.
2622-
This is the inverse of the \`ST_INTERSECTS\` function.
2622+
This is the inverse of the ST_INTERSECTS function.
26232623
In mathematical terms: ST_Disjoint(A, B) ⇔ A ⋂ B = ∅
26242624
26252625
\`\`\` esql
@@ -2732,7 +2732,7 @@ export const functions = {
27322732
Returns true if two geometries intersect.
27332733
They intersect if they have any point in common, including their interior points
27342734
(points along lines or within polygons).
2735-
This is the inverse of the \`ST_DISJOINT\` function.
2735+
This is the inverse of the ST_DISJOINT function.
27362736
In mathematical terms: ST_Intersects(A, B) ⇔ A ⋂ B ≠ ∅
27372737
27382738
\`\`\` esql
@@ -2768,7 +2768,7 @@ export const functions = {
27682768
27692769
### ST_WITHIN
27702770
Returns whether the first geometry is within the second geometry.
2771-
This is the inverse of the \`ST_CONTAINS\` function.
2771+
This is the inverse of the ST_CONTAINS function.
27722772
27732773
\`\`\` esql
27742774
FROM airport_city_boundaries
@@ -3087,7 +3087,7 @@ export const functions = {
30873087
-->
30883088
30893089
### TAN
3090-
Returns the tangent of an angle.
3090+
Returns the [tangent](https://en.wikipedia.org/wiki/Sine_and_cosine) of an angle.
30913091
30923092
\`\`\` esql
30933093
ROW a=1.8
@@ -3118,7 +3118,7 @@ export const functions = {
31183118
-->
31193119
31203120
### TANH
3121-
Returns the hyperbolic tangent of a number.
3121+
Returns the [hyperbolic tangent](https://en.wikipedia.org/wiki/Hyperbolic_functions) of a number.
31223122
31233123
\`\`\` esql
31243124
ROW a=1.8
@@ -3283,7 +3283,8 @@ export const functions = {
32833283
32843284
### TO_CARTESIANPOINT
32853285
Converts an input value to a \`cartesian_point\` value.
3286-
A string will only be successfully converted if it respects WKT Point format.
3286+
A string will only be successfully converted if it respects the
3287+
[WKT Point](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry) format.
32873288
32883289
\`\`\` esql
32893290
ROW wkt = ["POINT(4297.11 -1475.53)", "POINT(7580.93 2272.77)"]
@@ -3319,7 +3320,8 @@ export const functions = {
33193320
33203321
### TO_CARTESIANSHAPE
33213322
Converts an input value to a \`cartesian_shape\` value.
3322-
A string will only be successfully converted if it respects WKT format.
3323+
A string will only be successfully converted if it respects the
3324+
[WKT](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry) format.
33233325
33243326
\`\`\` esql
33253327
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))"]
@@ -3455,7 +3457,7 @@ export const functions = {
34553457
-->
34563458
34573459
### TO_DEGREES
3458-
Converts a number in radians to degrees.
3460+
Converts a number in [radians](https://en.wikipedia.org/wiki/Radian) to [degrees](https://en.wikipedia.org/wiki/Degree_(angle)).
34593461
34603462
\`\`\` esql
34613463
ROW rad = [1.57, 3.14, 4.71]
@@ -3490,7 +3492,7 @@ export const functions = {
34903492
34913493
### TO_DOUBLE
34923494
Converts an input value to a double value. If the input parameter is of a date type,
3493-
its value will be interpreted as milliseconds since the Unix epoch,
3495+
its value will be interpreted as milliseconds since the [Unix epoch](https://en.wikipedia.org/wiki/Unix_time),
34943496
converted to double. Boolean \`true\` will be converted to double \`1.0\`, \`false\` to \`0.0\`.
34953497
34963498
\`\`\` esql
@@ -3526,7 +3528,8 @@ export const functions = {
35263528
35273529
### TO_GEOPOINT
35283530
Converts an input value to a \`geo_point\` value.
3529-
A string will only be successfully converted if it respects WKT Point format.
3531+
A string will only be successfully converted if it respects the
3532+
[WKT Point](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry) format.
35303533
35313534
\`\`\` esql
35323535
ROW wkt = "POINT(42.97109630194 14.7552534413725)"
@@ -3561,7 +3564,8 @@ export const functions = {
35613564
35623565
### TO_GEOSHAPE
35633566
Converts an input value to a \`geo_shape\` value.
3564-
A string will only be successfully converted if it respects WKT format.
3567+
A string will only be successfully converted if it respects the
3568+
[WKT](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry) format.
35653569
35663570
\`\`\` esql
35673571
ROW wkt = "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))"
@@ -3597,7 +3601,7 @@ export const functions = {
35973601
### TO_INTEGER
35983602
Converts an input value to an integer value.
35993603
If the input parameter is of a date type, its value will be interpreted as milliseconds
3600-
since the Unix epoch, converted to integer.
3604+
since the [Unix epoch](https://en.wikipedia.org/wiki/Unix_time), converted to integer.
36013605
Boolean \`true\` will be converted to integer \`1\`, \`false\` to \`0\`.
36023606
36033607
\`\`\` esql
@@ -3668,7 +3672,7 @@ export const functions = {
36683672
36693673
### TO_LONG
36703674
Converts an input value to a long value. If the input parameter is of a date type,
3671-
its value will be interpreted as milliseconds since the Unix epoch, converted to long.
3675+
its value will be interpreted as milliseconds since the [Unix epoch](https://en.wikipedia.org/wiki/Unix_time), converted to long.
36723676
Boolean \`true\` will be converted to long \`1\`, \`false\` to \`0\`.
36733677
36743678
\`\`\` esql
@@ -3737,7 +3741,7 @@ export const functions = {
37373741
-->
37383742
37393743
### TO_RADIANS
3740-
Converts a number in degrees to radians.
3744+
Converts a number in [degrees](https://en.wikipedia.org/wiki/Degree_(angle)) to [radians](https://en.wikipedia.org/wiki/Radian).
37413745
37423746
\`\`\` esql
37433747
ROW deg = [90.0, 180.0, 270.0]
@@ -3839,7 +3843,7 @@ export const functions = {
38393843
38403844
### TO_UNSIGNED_LONG
38413845
Converts an input value to an unsigned long value. If the input parameter is of a date type,
3842-
its value will be interpreted as milliseconds since the Unix epoch, converted to unsigned long.
3846+
its value will be interpreted as milliseconds since the [Unix epoch](https://en.wikipedia.org/wiki/Unix_time), converted to unsigned long.
38433847
Boolean \`true\` will be converted to unsigned long \`1\`, \`false\` to \`0\`.
38443848
38453849
\`\`\` esql

0 commit comments

Comments
 (0)