Skip to content

Commit 0a5721f

Browse files
committed
ES|QL: Add PRESENT ES|QL function
- Fix unit tests Part of #131069
1 parent 4c38aaa commit 0a5721f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2152,7 +2152,7 @@ public void testFilterByAggregate() {
21522152
error("FROM employees | WHERE min(languages) > 2")
21532153
);
21542154
assertEquals(
2155-
"1:19: aggregate function [present(name)] not allowed outside STATS command",
2155+
"1:19: aggregate function [present(gender)] not allowed outside STATS command",
21562156
error("FROM test | WHERE present(gender)")
21572157
);
21582158
}

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/aggregate/PresentTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static Iterable<Object[]> parameters() {
7979
List.of(dataType),
8080
() -> new TestCaseSupplier.TestCase(
8181
List.of(TestCaseSupplier.TypedData.multiRow(List.of(), dataType, "field")),
82-
"Present[field=Attribute[channel=0]]",
82+
"Present",
8383
DataType.BOOLEAN,
8484
equalTo(false)
8585
)
@@ -103,7 +103,7 @@ private static TestCaseSupplier makeSupplier(TestCaseSupplier.TypedDataSupplier
103103

104104
return new TestCaseSupplier.TestCase(
105105
List.of(fieldTypedData),
106-
"Present[field=Attribute[channel=0]]",
106+
"Present",
107107
DataType.BOOLEAN,
108108
equalTo(present)
109109
);

0 commit comments

Comments
 (0)