From 8f38b775ae1aa7f6d044f7760e6618304b6f5788 Mon Sep 17 00:00:00 2001 From: xvrl Date: Mon, 21 Jan 2013 16:31:32 -0800 Subject: [PATCH] fix expected object type --- .../query/timeseries/TimeseriesQueryQueryToolChest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQueryQueryToolChest.java b/client/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQueryQueryToolChest.java index 0e5d96b385c..108d82e0266 100644 --- a/client/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQueryQueryToolChest.java +++ b/client/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQueryQueryToolChest.java @@ -49,6 +49,7 @@ import org.joda.time.DateTime; import org.joda.time.Interval; import org.joda.time.Minutes; import org.joda.time.Period; +import org.joda.time.format.ISODateTimeFormat; import javax.annotation.Nullable; import java.nio.ByteBuffer; @@ -216,7 +217,10 @@ public class TimeseriesQueryQueryToolChest implements QueryToolChest aggsIter = aggs.iterator(); Iterator resultIter = results.iterator(); - DateTime timestamp = (DateTime)resultIter.next(); + DateTime timestamp = ISODateTimeFormat.dateTimeParser() + .withOffsetParsed() + .parseDateTime(resultIter.next().toString()); + while (aggsIter.hasNext() && resultIter.hasNext()) { final AggregatorFactory factory = aggsIter.next(); retVal.put(factory.getName(), factory.deserialize(resultIter.next()));