public static int lengthFor(JavaDataModel model, KllFloatsSketch kll) {
    return model == null ? KllFloatsSketch.getMaxSerializedSizeBytes(kll.getK(), kll.getN(), KllSketch.SketchType.FLOATS_SKETCH, false)
        : (int) model.lengthForByteArrayOfSize(kll.getSerializedSizeBytes());
  }
Returns the length of the given KLL sketch according to the given java data model.
@param model the java data model to compute the length
@param kll the KLL sketch to compute the length for
@return the length of the given KLL sketch according to the given java data model
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/common/histogram/kll/KllUtils.java