From 2709a8b0b69be40c4a449c7dfefbfef0e6d5e650 Mon Sep 17 00:00:00 2001 From: fjy Date: Wed, 7 May 2014 12:33:42 -0700 Subject: [PATCH] revert changes to hyperUnique --- .../query/aggregation/hyperloglog/HyperUniquesSerde.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/processing/src/main/java/io/druid/query/aggregation/hyperloglog/HyperUniquesSerde.java b/processing/src/main/java/io/druid/query/aggregation/hyperloglog/HyperUniquesSerde.java index 6e0ba09c06c..21803229284 100644 --- a/processing/src/main/java/io/druid/query/aggregation/hyperloglog/HyperUniquesSerde.java +++ b/processing/src/main/java/io/druid/query/aggregation/hyperloglog/HyperUniquesSerde.java @@ -33,15 +33,12 @@ import io.druid.segment.serde.ComplexMetricExtractor; import io.druid.segment.serde.ComplexMetricSerde; import java.nio.ByteBuffer; -import java.nio.charset.Charset; import java.util.List; /** */ public class HyperUniquesSerde extends ComplexMetricSerde { - private final static byte[] NULL_BYTES = "\u0000".getBytes(Charsets.UTF_8); - private static Ordering comparator = new Ordering() { @Override @@ -96,11 +93,7 @@ public class HyperUniquesSerde extends ComplexMetricSerde for (String dimensionValue : dimValues) { collector.add( - hashFn.hashBytes( - dimensionValue == null - ? NULL_BYTES - : dimensionValue.getBytes(Charsets.UTF_8) - ).asBytes() + hashFn.hashBytes(dimensionValue.getBytes(Charsets.UTF_8)).asBytes() ); } return collector;