**Build scan:**
https://gradle-enterprise.elastic.co/s/fvg2knbi424p4/tests/:x-pack:plugin:esql:test/org.elasticsearch.xpack.esql.expression.function.scalar.conditional.LeastTests/testEvaluateInManyThreads%20%7BTestCase=(%3Ckeyword%3E,%20%3Ckeyword%3E,%20%3Ckeyword%3E,%20%3Ckeyword%3E,%20%3Ckeyword%3E,%20%3Ckeyword%3E,%20%3Ckeyword%3E)%20null%20in%204%7D
**Reproduction lines:**
```
gradlew ':x-pack:plugin:esql:test' --tests "org.elasticsearch.xpack.esql.expression.function.scalar.conditional.GreatestTests.testEvaluateInManyThreads {TestCase=(<mv_integer>) null in 0}" -Dtests.seed=BCCD8A2AFCEA37CB -Dtests.locale=zh -Dtests.timezone=Europe/Guernsey -Druntime.java=21

gradlew ':x-pack:plugin:esql:test' --tests "org.elasticsearch.xpack.esql.expression.function.scalar.conditional.LeastTests.testEvaluateInManyThreads {TestCase=(<keyword>, <keyword>, <keyword>, <keyword>, <keyword>, <keyword>, <keyword>) null in 4}" -Dtests.seed=BCCD8A2AFCEA37CB -Dtests.locale=lt -Dtests.timezone=Indian/Christmas -Druntime.java=21

 gradlew ':x-pack:plugin:esql:test' --tests "org.elasticsearch.xpack.esql.expression.function.scalar.conditional.GreatestTests.testEvaluateInManyThreads {TestCase=(<mv_integer>) null in 0}" -Dtests.seed=BCCD8A2AFCEA37CB -Dtests.locale=zh -Dtests.timezone=Europe/Guernsey -Druntime.java=21
```

**Applicable branches:**
main

**Reproduces locally?:**
Yes

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.xpack.esql.expression.function.scalar.conditional.LeastTests&tests.test=testEvaluateInManyThreads%20%7BTestCase%3D(%3Ckeyword%3E,%20%3Ckeyword%3E,%20%3Ckeyword%3E,%20%3Ckeyword%3E,%20%3Ckeyword%3E,%20%3Ckeyword%3E,%20%3Ckeyword%3E)%20null%20in%204%7D


**Failure excerpt:**
```
org.elasticsearch.xpack.esql.expression.function.scalar.conditional.GreatestTests > classMethod FAILED
    java.lang.AssertionError: expected:<[boolean, double, integer, ip, keyword, long, text, version]> but was:<[integer]>


```
x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java
*                                   on input types like {@link Greatest} or {@link Coalesce}.
     */
    protected static List<TestCaseSupplier> anyNullIsNull(boolean entirelyNullPreservesType, List<TestCaseSupplier> testCaseSuppliers) {
        typesRequired(testCaseSuppliers);
        List<TestCaseSupplier> suppliers = new ArrayList<>(testCaseSuppliers.size());
        suppliers.addAll(testCaseSuppliers);
        /*
         * For each original test case, add as many copies as there were
         * arguments, replacing one of the arguments with null and keeping
         * the others.
         *
         * Also, if this was the first time we saw the signature we copy it
         * *again*, replacing the argument with null, but annotating the
         * argument's type as `null` explicitly.
         */
        Set<List<DataType>> uniqueSignatures = new HashSet<>();
        for (TestCaseSupplier original : testCaseSuppliers) {
            boolean firstTimeSeenSignature = uniqueSignatures.add(original.types());
            for (int nullPosition = 0; nullPosition < original.types().size(); nullPosition++) {
                int finalNullPosition = nullPosition;
                suppliers.add(new TestCaseSupplier(original.name() + " null in " + nullPosition, original.types(), () -> {
                    TestCaseSupplier.TestCase oc = original.get();
                    List<TestCaseSupplier.TypedData> data = IntStream.range(0, oc.getData().size()).mapToObj(i -> {
                        TestCaseSupplier.TypedData od = oc.getData().get(i);
                        if (i == finalNullPosition) {
                            return new TestCaseSupplier.TypedData(null, od.type(), od.name());
                        }
                        return od;
                    }).toList();
                    return new TestCaseSupplier.TestCase(