Skip to content

Commit 0dbf9f7

Browse files
authored
ESQL: Add applies_to to COPY_SIGN docs (#132544)
It's in 9.1.0+ and the docs made it look like it was a forever thing.
1 parent 7e4ca40 commit 0dbf9f7

File tree

2 files changed

+13
-4
lines changed
  • docs/reference/query-languages/esql/_snippets/functions/layout
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/math

2 files changed

+13
-4
lines changed

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

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

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
2020
import org.elasticsearch.xpack.esql.core.tree.Source;
2121
import org.elasticsearch.xpack.esql.core.type.DataType;
22+
import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
23+
import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
2224
import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
2325
import org.elasticsearch.xpack.esql.expression.function.Param;
2426
import org.elasticsearch.xpack.esql.expression.function.scalar.EsqlScalarFunction;
@@ -61,10 +63,14 @@ EvalOperator.ExpressionEvaluator.Factory create(
6163

6264
private DataType dataType;
6365

64-
@FunctionInfo(description = """
65-
Returns a value with the magnitude of the first argument and the sign of the second argument.
66-
This function is similar to Java's Math.copySign(double magnitude, double sign) which is
67-
similar to `copysign` from [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).""", returnType = { "double", "integer", "long" })
66+
@FunctionInfo(
67+
description = """
68+
Returns a value with the magnitude of the first argument and the sign of the second argument.
69+
This function is similar to Java's Math.copySign(double magnitude, double sign) which is
70+
similar to `copysign` from [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).""",
71+
returnType = { "double", "integer", "long" },
72+
appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.GA, version = "9.1.0") }
73+
)
6874
public CopySign(
6975
Source source,
7076
@Param(

0 commit comments

Comments
 (0)