mirror of https://github.com/apache/druid.git
revert changes to hyperUnique
This commit is contained in:
parent
9d35490cdf
commit
2709a8b0b6
|
@ -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<HyperLogLogCollector> comparator = new Ordering<HyperLogLogCollector>()
|
||||
{
|
||||
@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;
|
||||
|
|
Loading…
Reference in New Issue