### 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/main/java/org/elasticsearch/xpack/eql/parser/LogicalPlanBuilder.java
Source defaultOrderSource = synthetic("<default-order>");
        orders.add(new Order(defaultOrderSource, fieldTimestamp(), resultPosition(), position));
        
        Attribute tiebreaker = fieldTiebreaker();
        if (Expressions.isPresent(tiebreaker)) {
            orders.add(new Order(defaultOrderSource, tiebreaker, resultPosition(), position));
        }
        plan = new OrderBy(defaultOrderSource, plan, orders);
        
        Literal defaultSize = new Literal(synthetic("<default-size>"), params.size(), DataTypes.INTEGER);
        Source defaultLimitSource = synthetic("<default-limit>");
        LogicalPlan previous = plan;
        boolean missingLimit = true;
        for (PipeContext pipeCtx : ctx.pipe()) {
            plan = pipe(pipeCtx, previous);
            if (missingLimit && plan instanceof LimitWithOffset) {
                missingLimit = false;
                if (plan instanceof Head) {
                    previous = new Head(defaultLimitSource, defaultSize, previous);
                } else {
                    previous = new Tail(defaultLimitSource, defaultSize, previous);
                }
                plan = plan.replaceChildrenSameSize(singletonList(previous));
            }
            previous = plan;
        }
        
        if (missingLimit) {
            if (asc) {
                plan = new Head(defaultLimitSource, defaultSize, plan);