### 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/parser/LogicalPlanTests.java
LogicalPlan fullQuery = parser.createStatement("process where process_name == \"net.exe\"");
        Expression fullExpression = expr("event.category == \"process\" and process_name == \"net.exe\"");
        assertEquals(wrapFilter(fullExpression), fullQuery);
    }
    public void testParameterizedEventQuery() {
        ParserParams params = new ParserParams(UTC).fieldEventCategory("myCustomEvent");
        LogicalPlan fullQuery = parser.createStatement("process where process_name == \"net.exe\"", params);
        Expression fullExpression = expr("myCustomEvent == \"process\" and process_name == \"net.exe\"");
        assertEquals(wrapFilter(fullExpression), fullQuery);
    }
    public void testJoinPlan() {
        LogicalPlan plan = parser.createStatement(
            "join by pid "
                + "  [process where true] "
                + "  [network where true] "
                + "  [registry where true] "
                + "  [file where true] "
                + " "
                + "until [process where event_subtype_full == \"termination_event\"]"
        );
        plan = defaultPipes(plan);
        assertEquals(Join.class, plan.getClass());
        Join join = (Join) plan;
        assertEquals(KeyedFilter.class, join.until().getClass());
        KeyedFilter f = join.until();
        Expression key = f.keys().get(0);
        assertEquals(UnresolvedAttribute.class, key.getClass());
        assertEquals("pid", ((UnresolvedAttribute) key).name());
        List<? extends LogicalPlan> queries = join.queries();
        assertEquals(4, queries.size());