public long estimateNumDistinctValues() {
    // FMSketch treats the ndv of all nulls as 1 but hll treates the ndv as 0.
    // In order to get rid of divide by 0 problem, we follow FMSketch
    return count() > 0 ? count() : 1;
  }
Java's default charset will be used for strings.
@param val
         - input string
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/common/ndv/hll/HyperLogLog.java