private long getOldestInMemoryEventTimestamp(Map<TimePeriod.Duration, Executor> incrementalExecutorMap,
                                                 List<TimePeriod.Duration> incrementalDurations,
                                                 TimePeriod.Duration perValue) {
        long oldestEvent;
        TimePeriod.Duration incrementalDuration;
        for (int i = perValue.ordinal(); i >= incrementalDurations.get(0).ordinal(); i--) {
            incrementalDuration = TimePeriod.Duration.values()[i];
            //If the reduced granularity is not configured
            if (incrementalExecutorMap.containsKey(incrementalDuration)) {
                if (incrementalExecutorMap.get(incrementalDuration) instanceof PersistedIncrementalExecutor) {
                    return -1;
                }
                oldestEvent = ((IncrementalExecutor) incrementalExecutorMap.get(incrementalDuration)).
                        getAggregationStartTimestamp();
                if (oldestEvent != -1) {
                    return oldestEvent;
                }
            }
        }
        return -1;
    }
Defines the logic to find a matching event from an incremental aggregator (retrieval from incremental aggregator),
based on the logical conditions defined herewith.
modules/siddhi-core/src/main/java/io/siddhi/core/util/collection/operator/IncrementalAggregateCompileCondition.java