From e0e43deaec26384766a61874db4aaa6bda4ae415 Mon Sep 17 00:00:00 2001 From: Hagen Rother Date: Fri, 4 Apr 2014 13:04:40 +0200 Subject: [PATCH] fix a NPE leading to broker 500 response --- .../main/java/io/druid/query/groupby/GroupByQueryEngine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processing/src/main/java/io/druid/query/groupby/GroupByQueryEngine.java b/processing/src/main/java/io/druid/query/groupby/GroupByQueryEngine.java index ea58501635b..b8f63a5c4a5 100644 --- a/processing/src/main/java/io/druid/query/groupby/GroupByQueryEngine.java +++ b/processing/src/main/java/io/druid/query/groupby/GroupByQueryEngine.java @@ -182,7 +182,7 @@ public class GroupByQueryEngine final DimensionSelector dimSelector = dims.get(0); final IndexedInts row = dimSelector.getRow(); - if (row.size() == 0) { + if (row == null || row.size() == 0) { ByteBuffer newKey = key.duplicate(); newKey.putInt(dimSelector.getValueCardinality()); unaggregatedBuffers = updateValues(newKey, dims.subList(1, dims.size()));