Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 584c60e

Browse files
authoredMay 23, 2025··
ESQL: Enable docs for ROUND_TO (#128378)
Plug the docs in for ROUND_TO.
1 parent 7207692 commit 584c60e

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed
 

‎docs/reference/query-languages/esql/_snippets/functions/layout/round_to.md

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/reference/query-languages/esql/_snippets/lists/math-functions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* [`PI`](../../functions-operators/math-functions.md#esql-pi)
1717
* [`POW`](../../functions-operators/math-functions.md#esql-pow)
1818
* [`ROUND`](../../functions-operators/math-functions.md#esql-round)
19+
* [`ROUND_TO`](../../functions-operators/math-functions.md#esql-round_to)
1920
* [`SCALB`](../../functions-operators/math-functions.md#esql-scalb)
2021
* [`SIGNUM`](../../functions-operators/math-functions.md#esql-signum)
2122
* [`SIN`](../../functions-operators/math-functions.md#esql-sin)

‎docs/reference/query-languages/esql/functions-operators/math-functions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ mapped_pages:
6666
:::{include} ../_snippets/functions/layout/round.md
6767
:::
6868

69+
:::{include} ../_snippets/functions/layout/round_to.md
70+
:::
71+
6972
:::{include} ../_snippets/functions/layout/scalb.md
7073
:::
7174

‎x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundTo.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
import org.elasticsearch.xpack.esql.core.tree.Source;
2121
import org.elasticsearch.xpack.esql.core.type.DataType;
2222
import org.elasticsearch.xpack.esql.expression.function.Example;
23+
import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
24+
import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
2325
import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
2426
import org.elasticsearch.xpack.esql.expression.function.Param;
2527
import org.elasticsearch.xpack.esql.expression.function.scalar.EsqlScalarFunction;
@@ -50,8 +52,13 @@ public class RoundTo extends EsqlScalarFunction {
5052

5153
private DataType resultType;
5254

53-
@FunctionInfo(returnType = { "double", "integer", "long", "date", "date_nanos" }, description = """
54-
Rounds down to one of a list of fixed points.""", examples = @Example(file = "math", tag = "round_to"))
55+
@FunctionInfo(
56+
returnType = { "double", "integer", "long", "date", "date_nanos" },
57+
description = """
58+
Rounds down to one of a list of fixed points.""",
59+
examples = @Example(file = "math", tag = "round_to"),
60+
appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.COMING, version = "8.19.0/9.1.0") }
61+
)
5562
public RoundTo(
5663
Source source,
5764
@Param(

0 commit comments

Comments
 (0)
Please sign in to comment.