public boolean iterate(LongWritable o, List<DoubleWritable> percentiles) {
      if (state.percentiles == null) {
        if(percentiles != null) {
          for (int i = 0; i < percentiles.size(); i++) {
            if (percentiles.get(i).get() < 0.0 || percentiles.get(i).get() > 1.0) {
              throw new RuntimeException("Percentile value must be within the range of 0 to 1.");
            }
          }
          state.percentiles = new ArrayList<>(percentiles);
        }
        else {
          state.percentiles = Collections.emptyList();
        }
      }
      if (o != null) {
        increment(state, o, 1);
      }
      return true;
    }
The evaluator for percentile computation based on long for an array of percentiles.
ql/src/java/org/apache/hadoop/hive/ql/udf/UDAFPercentile.java