Skip to content

Commit

Permalink
apache#1322 Allow null time for converting map to row
Browse files Browse the repository at this point in the history
  • Loading branch information
navis committed Jan 28, 2019
1 parent c5c0f1f commit a24e7f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
7 changes: 2 additions & 5 deletions common/src/main/java/io/druid/data/input/Rows.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,8 @@ public static Function<Map<String, Object>, Row> mapToRow(final String timestamp
@Override
public Row apply(Map<String, Object> input)
{
Object timestamp = input.get(timestampColumn);
if (timestamp == null) {
throw new IllegalArgumentException("cannot find time column '" + timestampColumn + "'");
}
return new MapBasedRow(new DateTime(timestamp), input);
final Object timestamp = input.get(timestampColumn);
return new MapBasedRow(timestamp == null ? null : new DateTime(timestamp), input);
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public Interval apply(TimelineObjectHolder<String, ServerSelector> input)
for (byte[] value : cachedValues.values()) {
total += value.length;
}
log.info(
log.debug(
"Requested %,d segments from cache for [%s] and returned %,d segments (%,d bytes), took %,d msec",
cacheKeys.size(), query.getType(), cachedValues.size(), total, System.currentTimeMillis() - start
);
Expand Down Expand Up @@ -641,7 +641,7 @@ sequence, new Closeable()
@Override
public void close() throws IOException
{
log.info(
log.debug(
"Deserialized %,d rows from %,d cached segments, took %,d msec",
cacheAccessor.rows(), numCachedSegments, cacheAccessor.time()
);
Expand Down
1 change: 1 addition & 0 deletions sql/src/main/java/io/druid/sql/calcite/rel/QueryMaker.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ private Query prepareQuery(Query<?> query)
@SuppressWarnings("unchecked")
private <T> Sequence<T> runQuery(final Query query)
{
LOG.info("Running.. %s", query);
return query.run(segmentWalker, Maps.newHashMap());
}

Expand Down

0 comments on commit a24e7f5

Please sign in to comment.