|
@@ -20,6 +20,8 @@ import org.elasticsearch.xpack.esql.core.tree.Source;
|
|
|
import org.elasticsearch.xpack.esql.core.type.DataType;
|
|
|
import org.elasticsearch.xpack.esql.core.util.NumericUtils;
|
|
|
import org.elasticsearch.xpack.esql.expression.function.Example;
|
|
|
+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;
|
|
@@ -40,11 +42,16 @@ public class Scalb extends EsqlScalarFunction {
|
|
|
private final Expression d;
|
|
|
private final Expression scaleFactor;
|
|
|
|
|
|
- @FunctionInfo(returnType = "double", description = """
|
|
|
- Returns the result of `d * 2 ^ scaleFactor`,
|
|
|
- Similar to Java's `scalb` function. Result is rounded as if
|
|
|
- performed by a single correctly rounded floating-point multiply
|
|
|
- to a member of the double value set.""", examples = @Example(file = "floats", tag = "scalb"))
|
|
|
+ @FunctionInfo(
|
|
|
+ returnType = "double",
|
|
|
+ description = """
|
|
|
+ Returns the result of `d * 2 ^ scaleFactor`,
|
|
|
+ Similar to Java's `scalb` function. Result is rounded as if
|
|
|
+ performed by a single correctly rounded floating-point multiply
|
|
|
+ to a member of the double value set.""",
|
|
|
+ examples = @Example(file = "floats", tag = "scalb"),
|
|
|
+ appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.GA, version = "9.1.0") }
|
|
|
+ )
|
|
|
|
|
|
public Scalb(
|
|
|
Source source,
|