diff --git a/processing/src/main/java/io/druid/segment/IndexMerger.java b/processing/src/main/java/io/druid/segment/IndexMerger.java index 77063e5104e..1831e1a1f67 100644 --- a/processing/src/main/java/io/druid/segment/IndexMerger.java +++ b/processing/src/main/java/io/druid/segment/IndexMerger.java @@ -946,9 +946,6 @@ public class IndexMerger } MutableBitmap bitset = bitmapSerdeFactory.getBitmapFactory().makeEmptyMutableBitmap(); - if ((dictId == 0) && (Iterables.getFirst(dimVals, "") == null)) { - bitset.or(nullRowsList.get(i)); - } for (Integer row : CombiningIterable.createSplatted( convertedInverteds, Ordering.natural().nullsFirst() @@ -958,6 +955,10 @@ public class IndexMerger } } + if ((dictId == 0) && (Iterables.getFirst(dimVals, "") == null)) { + bitset.or(nullRowsList.get(i)); + } + writer.write( bitmapSerdeFactory.getBitmapFactory().makeImmutableBitmap(bitset) );