diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java index 34da3725056cb..e3ff92000ab21 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java @@ -596,6 +596,8 @@ public static void testFunctionInfo() { EsqlFunctionRegistry.FunctionDescription description = EsqlFunctionRegistry.description(definition); List args = description.args(); + assertTrue("expect description to be defined", description.description() != null && description.description().length() > 0); + List> typesFromSignature = new ArrayList<>(); Set returnFromSignature = new HashSet<>(); for (int i = 0; i < args.size(); i++) { @@ -611,21 +613,16 @@ public static void testFunctionInfo() { for (int i = 0; i < args.size(); i++) { Set annotationTypes = Arrays.stream(args.get(i).type()).collect(Collectors.toCollection(() -> new TreeSet<>())); - if (annotationTypes.equals(Set.of("?"))) { - continue; // TODO remove this eventually, so that all the functions will have to provide signature info - } Set signatureTypes = typesFromSignature.get(i); if (signatureTypes.isEmpty()) { continue; } - assertEquals(annotationTypes, signatureTypes); + assertEquals(signatureTypes, annotationTypes); } Set returnTypes = Arrays.stream(description.returnType()).collect(Collectors.toCollection(() -> new TreeSet<>())); - if (returnTypes.equals(Set.of("?")) == false) { - // TODO remove this eventually, so that all the functions will have to provide signature info - assertEquals(returnTypes, returnFromSignature); - } + assertEquals(returnFromSignature, returnTypes); + } /**