diff --git a/processing/src/main/java/io/druid/query/TimewarpOperator.java b/processing/src/main/java/io/druid/query/TimewarpOperator.java index a532a9c0e57..ac2a5f8c930 100644 --- a/processing/src/main/java/io/druid/query/TimewarpOperator.java +++ b/processing/src/main/java/io/druid/query/TimewarpOperator.java @@ -75,19 +75,19 @@ public class TimewarpOperator implements PostProcessingOperator return postProcess(baseQueryRunner, DateTime.now().getMillis()); } - public QueryRunner postProcess(final QueryRunner baseRunner, final long t) + public QueryRunner postProcess(final QueryRunner baseRunner, final long now) { return new QueryRunner() { @Override public Sequence run(Query query) { - final long offset = computeOffset(t); + final long offset = computeOffset(now); final Interval interval = query.getIntervals().get(0); final Interval modifiedInterval = new Interval( interval.getStartMillis() + offset, - Math.min(interval.getEndMillis() + offset, t + offset) + Math.min(interval.getEndMillis() + offset, now + offset) ); return Sequences.map( baseRunner.run( @@ -106,7 +106,7 @@ public class TimewarpOperator implements PostProcessingOperator value = new TimeBoundaryResultValue( ImmutableMap.of( TimeBoundaryQuery.MIN_TIME, boundary.getMinTime().minus(offset), - TimeBoundaryQuery.MAX_TIME, new DateTime(Math.min(boundary.getMaxTime().getMillis() - offset, t)) + TimeBoundaryQuery.MAX_TIME, new DateTime(Math.min(boundary.getMaxTime().getMillis() - offset, now)) ) ); }