forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ESQL: Generate more docs (elastic#106367)
This modifies the ESQL test infrastructure to generate more of the documentation for functions. It generates the *Description* section, the *Examples* section, and the *Parameters* section as separate files so we can use them as needed. It also generates a `layout` file that's just a guess as to how to render the whole thing. In some cases it'll work and we can use that instead of hand maintaining a "top level" description file for the function. Most newly generated files are unused. We have to chose to pick them up by replacing the sections we were manually maintaining with an include of the generated section. Or by replacing the entire hand maintained file with the generated top level file. Relates to elastic#104247
- Loading branch information
Showing
370 changed files
with
2,295 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Returns the absolute value. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
The arccosine of an angle, expressed in radians. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Inverse sine trigonometric function. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Inverse tangent trigonometric function. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
The angle between the positive x-axis and the ray from the origin to the point (x , y) in the Cartesian plane. |
5 changes: 5 additions & 0 deletions
5
docs/reference/esql/functions/description/auto_bucket.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Creates human-friendly buckets and returns a datetime value for each row that corresponds to the resulting bucket the row falls into. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Accepts pairs of conditions and values. The function returns the value that belongs to the first condition that evaluates to true. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Round a number up to the nearest integer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Returns the first of its arguments that is not null. If all arguments are null, it returns `null`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Concatenates two or more strings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Returns the trigonometric cosine of an angle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Returns the hyperbolic cosine of a number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Subtract 2 dates and return their difference in multiples of a unit specified in the 1st argument |
5 changes: 5 additions & 0 deletions
5
docs/reference/esql/functions/description/date_extract.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Extracts parts of a date, like year, month, day, hour. |
5 changes: 5 additions & 0 deletions
5
docs/reference/esql/functions/description/date_parse.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Parses a string into a date value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Euler’s number. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Returns a boolean that indicates whether a keyword string ends with another string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Round a number down to the nearest integer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Returns the maximum value from many columns. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Returns the minimum value from many columns. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Returns the substring that extracts 'length' chars from 'str' starting from the left. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Returns the character length of a string. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Returns the logarithm of a value to a base. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Returns the log base 10. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Removes leading whitespaces from a string. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Converts a multivalued field into a single valued field containing the average of all of the values. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Reduce a multivalued string field to a single valued field by concatenating all values. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Reduce a multivalued field to a single valued field containing the count of values. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Remove duplicate values from a multivalued field. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Reduce a multivalued field to a single valued field containing the first value. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Reduce a multivalued field to a single valued field containing the last value. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Reduce a multivalued field to a single valued field containing the maximum value. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. | ||
|
||
*Description* | ||
|
||
Converts a multivalued field into a single valued field containing the median value. |
Oops, something went wrong.