### Description

A query like `any where true | head 2147483648` fails with `class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are in module java.base of loader 'bootstrap')`.

While one like `any where true | head 2147483640 + 8` fails with `"type": "arithmetic_exception", "reason": "integer overflow"`.
x-pack/plugin/eql/src/test/java/org/elasticsearch/xpack/eql/planner/QueryTranslatorFailTests.java
line 1:15: [length(plain_text)] cannot operate on field of data type [text]: \
            No keyword/multi-field defined exact matches for [plain_text]; define one or use MATCH/QUERY instead""", msg);
    }
    public void testMatchIsNotValidFunction() {
        VerificationException e = expectThrows(VerificationException.class, () -> plan("process where match(plain_text, \"foo.*\")"));
        String msg = e.getMessage();
        assertEquals("""
            Found 1 problem
            line 1:15: Unknown function [match], did you mean [cidrmatch]?""", msg);
    }
    public void testNumberFunctionAlreadyNumber() {
        VerificationException e = expectThrows(VerificationException.class, () -> plan("process where number(pid) == 1"));
        String msg = e.getMessage();
        assertEquals("""
            Found 1 problem
            line 1:15: first argument of [number(pid)] must be [string], found value [pid] type [long]""", msg);
    }
    public void testNumberFunctionFloatBase() {
        VerificationException e = expectThrows(VerificationException.class, () -> plan("process where number(process_name, 1.0) == 1"));
        String msg = e.getMessage();
        assertEquals("""
            Found 1 problem
            line 1:15: second argument of [number(process_name, 1.0)] must be [integer], found value [1.0] type [double]""", msg);
    }
    public void testNumberFunctionNonString() {
        VerificationException e = expectThrows(VerificationException.class, () -> plan("process where number(plain_text) == 1"));
        String msg = e.getMessage();
        assertEquals("""
            Found 1 problem
            line 1:15: [number(plain_text)] cannot operate on first argument field of data type [text]: \