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 all 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
2 changes: 2 additions & 0 deletions docs/reference/esql/functions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ 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/definition` - function definitions for kibana's ESQL editor
* `kibana/docs` - 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
60 changes: 60 additions & 0 deletions docs/reference/esql/functions/kibana/definition/abs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
"type" : "eval",
"name" : "abs",
"description" : "Returns the absolute value.",
"signatures" : [
{
"params" : [
{
"name" : "number",
"type" : "double",
"optional" : false,
"description" : "Numeric expression. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "double"
},
{
"params" : [
{
"name" : "number",
"type" : "integer",
"optional" : false,
"description" : "Numeric expression. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "integer"
},
{
"params" : [
{
"name" : "number",
"type" : "long",
"optional" : false,
"description" : "Numeric expression. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "long"
},
{
"params" : [
{
"name" : "number",
"type" : "unsigned_long",
"optional" : false,
"description" : "Numeric expression. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "unsigned_long"
}
],
"examples" : [
"ROW number = -1.0 \n| EVAL abs_number = ABS(number)",
"FROM employees\n| KEEP first_name, last_name, height\n| EVAL abs_height = ABS(0.0 - height)"
]
}
59 changes: 59 additions & 0 deletions docs/reference/esql/functions/kibana/definition/acos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
"type" : "eval",
"name" : "acos",
"description" : "Returns the arccosine of `n` as an angle, expressed in radians.",
"signatures" : [
{
"params" : [
{
"name" : "number",
"type" : "double",
"optional" : false,
"description" : "Number between -1 and 1. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "double"
},
{
"params" : [
{
"name" : "number",
"type" : "integer",
"optional" : false,
"description" : "Number between -1 and 1. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "double"
},
{
"params" : [
{
"name" : "number",
"type" : "long",
"optional" : false,
"description" : "Number between -1 and 1. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "double"
},
{
"params" : [
{
"name" : "number",
"type" : "unsigned_long",
"optional" : false,
"description" : "Number between -1 and 1. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "double"
}
],
"examples" : [
"ROW a=.9\n| EVAL acos=ACOS(a)"
]
}
59 changes: 59 additions & 0 deletions docs/reference/esql/functions/kibana/definition/asin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
"type" : "eval",
"name" : "asin",
"description" : "Returns the arcsine of the input\nnumeric expression as an angle, expressed in radians.",
"signatures" : [
{
"params" : [
{
"name" : "number",
"type" : "double",
"optional" : false,
"description" : "Number between -1 and 1. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "double"
},
{
"params" : [
{
"name" : "number",
"type" : "integer",
"optional" : false,
"description" : "Number between -1 and 1. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "double"
},
{
"params" : [
{
"name" : "number",
"type" : "long",
"optional" : false,
"description" : "Number between -1 and 1. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "double"
},
{
"params" : [
{
"name" : "number",
"type" : "unsigned_long",
"optional" : false,
"description" : "Number between -1 and 1. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "double"
}
],
"examples" : [
"ROW a=.9\n| EVAL asin=ASIN(a)"
]
}
59 changes: 59 additions & 0 deletions docs/reference/esql/functions/kibana/definition/atan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
"type" : "eval",
"name" : "atan",
"description" : "Returns the arctangent of the input\nnumeric expression as an angle, expressed in radians.",
"signatures" : [
{
"params" : [
{
"name" : "number",
"type" : "double",
"optional" : false,
"description" : "Numeric expression. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "double"
},
{
"params" : [
{
"name" : "number",
"type" : "integer",
"optional" : false,
"description" : "Numeric expression. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "double"
},
{
"params" : [
{
"name" : "number",
"type" : "long",
"optional" : false,
"description" : "Numeric expression. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "double"
},
{
"params" : [
{
"name" : "number",
"type" : "unsigned_long",
"optional" : false,
"description" : "Numeric expression. If `null`, the function returns `null`."
}
],
"variadic" : false,
"returnType" : "double"
}
],
"examples" : [
"ROW a=12.9\n| EVAL atan=ATAN(a)"
]
}
Loading