public List<DoubleWritable> convertPercentileParameter(Object parameter) {
      ArrayList<HiveDecimalWritable> percentilesParameter = (ArrayList<HiveDecimalWritable>) parameter;
      List<DoubleWritable> percentileList = new ArrayList<>(percentilesParameter.size());
      for (HiveDecimalWritable hiveDecimalWritable : percentilesParameter) {
        Double percentile = hiveDecimalWritable.getHiveDecimal().doubleValue();
        PercentileContEvaluator.validatePercentile(percentile);
        percentileList.add(new DoubleWritable(percentile));
      }
      return percentileList;
    }
A state class to store intermediate aggregation results.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentileCont.java