Browse Source

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.
Nik Everett 2 months ago
parent
commit
0dbf9f7e20

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

@@ -1,6 +1,9 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `COPY_SIGN` [esql-copy_sign]
+```{applies_to}
+stack: ga 9.1.0
+```
 
 **Syntax**
 

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

@@ -19,6 +19,8 @@ import org.elasticsearch.xpack.esql.core.expression.TypeResolutions;
 import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
 import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.expression.function.scalar.EsqlScalarFunction;
@@ -61,10 +63,14 @@ public class CopySign extends EsqlScalarFunction {
 
     private DataType dataType;
 
-    @FunctionInfo(description = """
-        Returns a value with the magnitude of the first argument and the sign of the second argument.
-        This function is similar to Java's Math.copySign(double magnitude, double sign) which is
-        similar to `copysign` from [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).""", returnType = { "double", "integer", "long" })
+    @FunctionInfo(
+        description = """
+            Returns a value with the magnitude of the first argument and the sign of the second argument.
+            This function is similar to Java's Math.copySign(double magnitude, double sign) which is
+            similar to `copysign` from [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).""",
+        returnType = { "double", "integer", "long" },
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.GA, version = "9.1.0") }
+    )
     public CopySign(
         Source source,
         @Param(