### 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
import org.elasticsearch.xpack.ql.ParsingException;
import org.elasticsearch.xpack.ql.QlIllegalArgumentException;
import static org.hamcrest.Matchers.startsWith;
public class QueryTranslatorFailTests extends AbstractQueryTranslatorTestCase {
    private String error(String query) {
        VerificationException e = expectThrows(VerificationException.class, () -> plan(query));
        assertTrue(e.getMessage().startsWith("Found "));
        final String header = "Found 1 problem\nline ";
        return e.getMessage().substring(header.length());
    }
    private String errorParsing(String eql) {
        Exception e = expectThrows(Exception.class, () -> plan(eql));
        assertTrue(e.getClass().getSimpleName().endsWith("ParsingException"));
        final String header = "line ";
        return e.getMessage().substring(header.length());
    }
    public void testBetweenMissingOrNullParams() {
        final String[] queries = {
            "process where between() == \"yst\"",
            "process where between(process_name) == \"yst\"",
            "process where between(process_name, \"s\") == \"yst\"",
            "process where between(null) == \"yst\"",
            "process where between(process_name, null) == \"yst\"",
            "process where between(process_name, \"s\", \"e\", false, false) == \"yst\"", };
        for (String query : queries) {
            ParsingException e = expectThrows(ParsingException.class, () -> plan(query));
            assertEquals("line 1:16: error building [between]: expects three or four arguments", e.getMessage());
        }
    }
    public void testBetweenWrongTypeParams() {