public final BasePartitionEvaluator getPartitionWindowingEvaluator(
      WindowFrameDef winFrame,
      PTFPartition partition,
      List<PTFExpressionDef> parameters,
      ObjectInspector outputOI, boolean nullsLast) {
    if (partitionEvaluator == null) {
      partitionEvaluator = createPartitionEvaluator(winFrame, partition, parameters, outputOI,
          nullsLast);
    }

    return partitionEvaluator;
  }
When evaluating an aggregates over a fixed Window, streaming is not possible
especially for RANGE Window type. For such case, the whole partition data needs
to be collected and then to evaluate the aggregates. The naive approach is to
calculate a row range for each row and to perform the aggregates. For some
functions, a better implementation can be used to reduce the calculation.
Note: since the evaluator is reused across different partitions, AggregationBuffer
needs reset before aggregating for the new partition in the implementation.
@param winFrame    the Window definition in play for this evaluation.
@param partition   the partition data
@param parameters  the list of the expressions in the function
@param outputOI    the output object inspector
@param nullsLast   the nulls last configuration
@return            the evaluator, default to BasePartitionEvaluator which
                   implements the naive approach
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFEvaluator.java