fix expected object type

This commit is contained in:
xvrl 2013-01-21 16:31:32 -08:00
parent f05c050c53
commit 8f38b775ae
1 changed files with 5 additions and 1 deletions

View File

@ -49,6 +49,7 @@ import org.joda.time.DateTime;
import org.joda.time.Interval; import org.joda.time.Interval;
import org.joda.time.Minutes; import org.joda.time.Minutes;
import org.joda.time.Period; import org.joda.time.Period;
import org.joda.time.format.ISODateTimeFormat;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
@ -216,7 +217,10 @@ public class TimeseriesQueryQueryToolChest implements QueryToolChest<Result<Time
Iterator<AggregatorFactory> aggsIter = aggs.iterator(); Iterator<AggregatorFactory> aggsIter = aggs.iterator();
Iterator<Object> resultIter = results.iterator(); Iterator<Object> resultIter = results.iterator();
DateTime timestamp = (DateTime)resultIter.next(); DateTime timestamp = ISODateTimeFormat.dateTimeParser()
.withOffsetParsed()
.parseDateTime(resultIter.next().toString());
while (aggsIter.hasNext() && resultIter.hasNext()) { while (aggsIter.hasNext() && resultIter.hasNext()) {
final AggregatorFactory factory = aggsIter.next(); final AggregatorFactory factory = aggsIter.next();
retVal.put(factory.getName(), factory.deserialize(resultIter.next())); retVal.put(factory.getName(), factory.deserialize(resultIter.next()));