Skip to content

Commit 5e29730

Browse files
authored
ESQL: Update function tests (#119586)
Updates our function tests now that type signatures are required for all signatures under test.
1 parent cc0e53e commit 5e29730

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,11 @@ public static List<TestCaseSupplier> stringCases(
110110
@Override
111111
public TestCase get() {
112112
TestCase supplied = supplier.get();
113-
if (types != null) {
114-
for (int i = 0; i < types.size(); i++) {
115-
if (supplied.getData().get(i).type() != types.get(i)) {
116-
throw new IllegalStateException(
117-
name + ": supplier/data type mismatch " + supplied.getData().get(i).type() + "/" + types.get(i)
118-
);
119-
}
113+
for (int i = 0; i < types.size(); i++) {
114+
if (supplied.getData().get(i).type() != types.get(i)) {
115+
throw new IllegalStateException(
116+
name + ": supplier/data type mismatch " + supplied.getData().get(i).type() + "/" + types.get(i)
117+
);
120118
}
121119
}
122120
return supplied;

0 commit comments

Comments
 (0)