Fix to keep exhaustive agg from going on into forever
@@ -164,6 +164,13 @@ public abstract class RangeAggregator implements Aggregator, TimezoneAware
public void setEndTime(long endTime)
{
+ //This is to tell the exhaustive agg when to stop.
+ //If the end time is not specified in the query the end time is
+ //set to MAX_LONG which causes exhaustive agg to go on forever.
+ long now = System.currentTimeMillis();
+ if (endTime > now)
+ m_queryEndTime = now;
+ else
m_queryEndTime = endTime;
}
