@InterfaceAudience.LimitedPrivate(value = {"Hive" })
  static int lengthFor(JavaDataModel model, Integer numVector) {
    int length = model.object();
    length += model.primitive1() * 2;       // two int
    length += model.primitive2();           // one double
    length += model.lengthForRandom() * 2;  // two Random

    if (numVector == null) {
      numVector = 16; // HiveConf hive.stats.ndv.error default produces 16 vectors
    }

    if (numVector > 0) {
      length += model.array() * 3;                    // three array
      length += model.primitive1() * numVector * 2;   // two int array
      length += (model.object() + model.array() + model.primitive1() +
          model.primitive2()) * numVector;   // bitset array
    }
    return length;
  }
Resets a distinctValueEstimator object to its original state.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/common/ndv/fm/FMSketch.java