mirror of https://github.com/apache/druid.git
fix selector dim filter check for value null
This commit is contained in:
parent
ef12439df9
commit
0fa8b48fb7
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue