fix NPE in segmentMetadata query for null dimension values

This commit is contained in:
xvrl 2012-12-18 14:09:54 -08:00
parent 75d465aed0
commit 2a7214089e
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ public class SegmentMetadataQueryEngine
final Indexed<String> lookup = adapter.getDimValueLookup(input);
for (String dimVal : lookup) {
ImmutableConciseSet index = adapter.getInvertedIndex(input, dimVal);
size += index.size() * Charsets.UTF_8.encode(dimVal).capacity();
size += (dimVal == null) ? 0 : index.size() * Charsets.UTF_8.encode(dimVal).capacity();
}
return new SegmentMetadataResultValue.Dimension(
size,