@VisibleForTesting
    protected static float extractFloatFromLiteralValue(String colTypeLowerCase, String value) {
      if (colTypeLowerCase.equals(serdeConstants.TINYINT_TYPE_NAME)) {
        return Byte.parseByte(value);
      } else if (colTypeLowerCase.equals(serdeConstants.SMALLINT_TYPE_NAME)) {
        return Short.parseShort(value);
      } else if (colTypeLowerCase.equals(serdeConstants.INT_TYPE_NAME)) {
        return Integer.parseInt(value);
      } else if (colTypeLowerCase.equals(serdeConstants.BIGINT_TYPE_NAME)) {
        return Long.parseLong(value);
      } else if (colTypeLowerCase.equals(serdeConstants.FLOAT_TYPE_NAME)) {
        return Float.parseFloat(value);
      } else if (colTypeLowerCase.equals(serdeConstants.DOUBLE_TYPE_NAME)) {
        return (float) Double.parseDouble(value);
      } else if (colTypeLowerCase.startsWith(serdeConstants.DECIMAL_TYPE_NAME)) {
        return new BigDecimal(value).floatValue();
      } else if (colTypeLowerCase.startsWith(serdeConstants.TIMESTAMP_TYPE_NAME)) {
        return Timestamp.valueOf(value).toEpochSecond();
      } else if (colTypeLowerCase.startsWith(serdeConstants.DATE_TYPE_NAME)) {
        return Date.valueOf(value).toEpochSecond();
      } else {
        throw new IllegalStateException(
            "Unsupported type for comparator selectivity evaluation using histogram: " + colTypeLowerCase);
      }
    }
removes all values which are outside of the scope of the column
ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java