Browse Source

[ESQL] Edit versioning info for `absent` and `present` functions (#135076)

* Mark `absent` and `present` as FunctionAppliesToLifecycle.COMING

* include md files

* update as ga

* Update absent.md

* Update present.md

* [CI] Auto commit changes from spotless

* remove serverless versions

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Kostas Krikellas 3 weeks ago
parent
commit
61772f5da4

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

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

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

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

+ 3 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/Absent.java

@@ -17,6 +17,8 @@ import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.expression.SurrogateExpression;
 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.Param;
@@ -41,6 +43,7 @@ public class Absent extends AggregateFunction implements SurrogateExpression {
         description = "Returns true if the input expression yields no non-null values within the current aggregation context. "
             + "Otherwise it returns false.",
         type = FunctionType.AGGREGATE,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.GA, version = "9.2.0") },
         examples = {
             @Example(file = "absent", tag = "absent"),
             @Example(

+ 3 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/Present.java

@@ -18,6 +18,8 @@ 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.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.Param;
@@ -42,6 +44,7 @@ public class Present extends AggregateFunction implements ToAggregator {
         description = "Returns true if the input expression yields any non-null values within the current aggregation context. "
             + "Otherwise it returns false.",
         type = FunctionType.AGGREGATE,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.GA, version = "9.2.0") },
         examples = {
             @Example(file = "present", tag = "present"),
             @Example(