@Override
    protected Object execute(Object[] data, State state) {
        long startTime;
        long endTime;

        if (data[0] instanceof Long) {
            startTime = (long) data[0];
        } else {
            startTime = IncrementalUnixTimeFunctionExecutor.getUnixTimeStamp(data[0].toString());
        }
        if (data[1] instanceof Long) {
            endTime = (long) data[1];
        } else {
            endTime = IncrementalUnixTimeFunctionExecutor.getUnixTimeStamp(data[1].toString());
        }

        if (!(startTime < endTime)) {
            throw new SiddhiAppRuntimeException("The start time must be less than the end time in the within clause. "
                    + "However, the given start time is " + startTime + " and given end time is " + endTime
                    + ", in unix time. Hence, start time is not less than end time.");
        }
        return new Long[]{startTime, endTime};
    }
Executor class for finding the start time and end time of the within clause in incremental processing.
This is important when retrieving incremental aggregate values by specifying a time range with 'within' clause.
modules/siddhi-core/src/main/java/io/siddhi/core/executor/incremental/IncrementalStartTimeEndTimeFunctionExecutor.java