Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESQL: Generate kibana inline docs #106782

Merged
merged 25 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/reference/esql/functions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The files in these subdirectories are generated by ESQL's test suite:
* `signature` - railroad diagram of the syntax to invoke each function
* `types` - a table of each combination of support type for each parameter. These are generated from tests.
* `layout` - a fully generated description for each function
* `kibana` - the inline docs for kibana

Most functions can use the generated docs generated in the `layout` directory.
If we need something more custom for the function we can make a file in this
Expand Down
11 changes: 11 additions & 0 deletions docs/reference/esql/functions/kibana/abs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
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)
```
11 changes: 11 additions & 0 deletions docs/reference/esql/functions/kibana/acos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
-->

### ACOS
Returns the {wikipedia}/Inverse_trigonometric_functions[arccosine] of `n` as an angle, expressed in radians.

```
ROW a=.9
| EVAL acos=ACOS(a)
```
12 changes: 12 additions & 0 deletions docs/reference/esql/functions/kibana/asin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!--
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
-->

### ASIN
Returns the {wikipedia}/Inverse_trigonometric_functions[arcsine] of the input
numeric expression as an angle, expressed in radians.

```
ROW a=.9
| EVAL asin=ASIN(a)
```
12 changes: 12 additions & 0 deletions docs/reference/esql/functions/kibana/atan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!--
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
-->

### ATAN
Returns the {wikipedia}/Inverse_trigonometric_functions[arctangent] of the input
numeric expression as an angle, expressed in radians.

```
ROW a=12.9
| EVAL atan=ATAN(a)
```
12 changes: 12 additions & 0 deletions docs/reference/esql/functions/kibana/atan2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!--
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
-->

### ATAN2
The {wikipedia}/Atan2[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)
```
8 changes: 8 additions & 0 deletions docs/reference/esql/functions/kibana/auto_bucket.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!--
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
-->

### AUTO_BUCKET
Creates human-friendly buckets and returns a datetime value
for each row that corresponds to the resulting bucket the row falls into.

8 changes: 8 additions & 0 deletions docs/reference/esql/functions/kibana/case.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!--
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.

12 changes: 12 additions & 0 deletions docs/reference/esql/functions/kibana/ceil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!--
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 {javadoc}/java.base/java/lang/Math.html#ceil(double)[Math.ceil].
11 changes: 11 additions & 0 deletions docs/reference/esql/functions/kibana/coalesce.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
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)
```
7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/concat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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.

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

### COS
Returns the trigonometric cosine of an angle

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/cosh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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

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

### DATE_DIFF
Subtract 2 dates and return their difference in multiples of a unit specified in the 1st argument

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/date_extract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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.

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

### DATE_PARSE
Parses a string into a date value

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

### E
Euler’s number.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/ends_with.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/floor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/greatest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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 many columns.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/least.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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 many columns.

14 changes: 14 additions & 0 deletions docs/reference/esql/functions/kibana/left.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!--
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
```
7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/length.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/log.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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 number to a base.

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

### LOG10
Returns the log base 10.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/ltrim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/mv_avg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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.

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

### MV_CONCAT
Reduce a multivalued string field to a single valued field by concatenating all values.

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

### MV_COUNT
Reduce a multivalued field to a single valued field containing the count of values.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/mv_dedupe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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.

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

### MV_FIRST
Reduce a multivalued field to a single valued field containing the first value.

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

### MV_LAST
Reduce a multivalued field to a single valued field containing the last value.

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

### MV_MAX
Reduce a multivalued field to a single valued field containing the maximum value.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/mv_median.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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.

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

### MV_MIN
Reduce a multivalued field to a single valued field containing the minimum value.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/mv_slice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/mv_sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/mv_sum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/mv_zip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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.

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

### PI
The ratio of a circle’s circumference to its diameter.

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

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

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/replace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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 any match of the regular expression with the replacement string.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/right.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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 the string starting from the right.

7 changes: 7 additions & 0 deletions docs/reference/esql/functions/kibana/round.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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 closest number with the specified number of digits.

Loading