diff --git a/client/src/main/java/com/metamx/druid/query/filter/SelectorDimFilter.java b/client/src/main/java/com/metamx/druid/query/filter/SelectorDimFilter.java index 039d9893411..dd2f39dfe13 100644 --- a/client/src/main/java/com/metamx/druid/query/filter/SelectorDimFilter.java +++ b/client/src/main/java/com/metamx/druid/query/filter/SelectorDimFilter.java @@ -39,7 +39,7 @@ public class SelectorDimFilter implements DimFilter ) { Preconditions.checkArgument(dimension != null, "dimension must not be null"); - Preconditions.checkArgument(value != null, "value must not be null"); + this.dimension = dimension; this.value = value; } @@ -48,7 +48,7 @@ public class SelectorDimFilter implements DimFilter public byte[] getCacheKey() { byte[] dimensionBytes = dimension.getBytes(); - byte[] valueBytes = value.getBytes(); + byte[] valueBytes = (value == null) ? new byte[]{} : value.getBytes(); return ByteBuffer.allocate(1 + dimensionBytes.length + valueBytes.length) .put(DimFilterCacheHelper.SELECTOR_CACHE_ID)