Merge pull request #460 from liquidm/fix_npe_in_groupby

fix a NPE leading to broker 500 response
This commit is contained in:
fjy 2014-04-04 11:51:53 -06:00
commit e94badc917
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ public class GroupByQueryEngine
final DimensionSelector dimSelector = dims.get(0); final DimensionSelector dimSelector = dims.get(0);
final IndexedInts row = dimSelector.getRow(); final IndexedInts row = dimSelector.getRow();
if (row.size() == 0) { if (row == null || row.size() == 0) {
ByteBuffer newKey = key.duplicate(); ByteBuffer newKey = key.duplicate();
newKey.putInt(dimSelector.getValueCardinality()); newKey.putInt(dimSelector.getValueCardinality());
unaggregatedBuffers = updateValues(newKey, dims.subList(1, dims.size())); unaggregatedBuffers = updateValues(newKey, dims.subList(1, dims.size()));