Skip to content

Commit 1b4a458

Browse files
committed
Add applies to to ScalB function in elastic#127696
1 parent a345f56 commit 1b4a458

File tree

2 files changed

+15
-5
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

+15
-5
lines changed

docs/reference/query-languages/esql/_snippets/functions/layout/scalb.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/Scalb.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
import org.elasticsearch.xpack.esql.core.type.DataType;
2121
import org.elasticsearch.xpack.esql.core.util.NumericUtils;
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;
@@ -40,11 +42,16 @@ public class Scalb extends EsqlScalarFunction {
4042
private final Expression d;
4143
private final Expression scaleFactor;
4244

43-
@FunctionInfo(returnType = "double", description = """
44-
Returns the result of `d * 2 ^ scaleFactor`,
45-
Similar to Java's `scalb` function. Result is rounded as if
46-
performed by a single correctly rounded floating-point multiply
47-
to a member of the double value set.""", examples = @Example(file = "floats", tag = "scalb"))
45+
@FunctionInfo(
46+
returnType = "double",
47+
description = """
48+
Returns the result of `d * 2 ^ scaleFactor`,
49+
Similar to Java's `scalb` function. Result is rounded as if
50+
performed by a single correctly rounded floating-point multiply
51+
to a member of the double value set.""",
52+
examples = @Example(file = "floats", tag = "scalb"),
53+
appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.GA, version = "9.1.0") }
54+
)
4855

4956
public Scalb(
5057
Source source,

0 commit comments

Comments
 (0)