### 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
}
    public void testSequenceWithTooLittleQueries() throws Exception {
        String s = errorParsing("sequence [any where true]");
        assertEquals("1:2: A sequence requires a minimum of 2 queries, found [1]", s);
    }
    public void testSequenceWithIncorrectOption() throws Exception {
        EqlClientException e = expectThrows(EqlClientException.class, () -> plan("sequence [any where true] with repeat=123"));
        String msg = e.getMessage();
        assertEquals("line 1:33: Unrecognized option [repeat], expecting [runs]", msg);
    }
    public void testSampleWithTooFewQueries() throws Exception {
        String s = errorParsing("sample [any where true]");
        assertEquals("1:2: A sample requires a minimum of 2 queries, found [1]", s);
    }
    public void testSampleWithTooManyQueries() throws Exception {
        String s = errorParsing(
            "sample [any where true] [any where true] [any where true] [any where true] [any where true] [any where true]"
        );
        assertEquals("1:94: A sample cannot contain more than 5 queries, found [6]", s);
    }
    public void testSampleWithNoJoinKeys() throws Exception {
        String s = errorParsing("sample [any where true] [any where true]");
        assertEquals("1:9: A sample must have at least one join key, found none", s);
    }
    public void testSampleWithPipes() throws Exception {
        String pipe = randomFrom(" | head 1", " | tail 1", " | head 1 | tail 1");
        String s = errorParsing("sample by host [any where true] [any where true]" + pipe);
        assertEquals("1:51: Samples do not support pipes yet", s);
    }
    public void testSamplesWithIncorrectOptions() {