Skip to content
Merged

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import org.elasticsearch.xpack.esql.core.tree.Source;
import org.elasticsearch.xpack.esql.core.type.DataType;
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.FunctionType;
import org.elasticsearch.xpack.esql.expression.function.FunctionUtils;
Expand Down Expand Up @@ -63,7 +65,9 @@ public class Sample extends AggregateFunction implements ToAggregator, PostOptim
"version" },
description = "Collects sample values for a field.",
type = FunctionType.AGGREGATE,
examples = @Example(file = "stats_sample", tag = "doc")
examples = @Example(file = "stats_sample", tag = "doc"),
appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.GA, version = "9.1.0") }

)
public Sample(
Source source,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import org.elasticsearch.xpack.esql.core.tree.Source;
import org.elasticsearch.xpack.esql.core.type.DataType;
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.FunctionType;
import org.elasticsearch.xpack.esql.expression.function.MapParam;
Expand Down Expand Up @@ -93,14 +95,19 @@ public class Categorize extends GroupingFunction.NonEvaluatableGroupingFunction
tag = "docsCategorize",
description = "This example categorizes server logs messages into categories and aggregates their counts. "
) },
type = FunctionType.GROUPING
type = FunctionType.GROUPING,
appliesTo = {
@FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW, version = "9.0"),
@FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.GA, version = "9.1") }
)
public Categorize(
Source source,
@Param(name = "field", type = { "text", "keyword" }, description = "Expression to categorize") Expression field,
@MapParam(
name = "options",
description = "(Optional) Categorize additional options as <<esql-function-named-params,function named parameters>>.",
description = "(Optional) Categorize additional options as "
+ "<<esql-function-named-params,function named parameters>>. "
+ "{applies_to}`stack: ga 9.2`}",
params = {
@MapParam.MapParamEntry(
name = ANALYZER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
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;
Expand All @@ -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,
Expand Down
Loading