private boolean shouldUpdate(Object data, ValueState state) {
        long timestamp = (long) data;
        if (timestamp >= state.lastTimestamp) {
            state.lastTimestamp = timestamp;
            return true;
        }
        return false;
    }
This class implements the logic to aggregate data that is in-memory or in tables, in incremental data processing.
<p>
In-memory data is required to be aggregated when retrieving values from an aggregate.
Table data (tables used to persist incremental aggregates) needs to be aggregated when querying aggregate data from
a different server (apart from the server, which was used to define the aggregation).
modules/siddhi-core/src/main/java/io/siddhi/core/aggregation/IncrementalDataAggregator.java