public T2 retrieveNextIntermediateValue() {
        if (!wFrameDef.getStart().isUnbounded()
            && !this.intermediateVals.isEmpty()
            && this.numRows >= wFrameDef.getWindowSize()) {
          return this.intermediateVals.remove(0);
        }

        return null;
      }
Retrieve the next stored intermediate result, i.e.,
Get S[x-1] in the computation of S[x..y] = S[y] - S[x-1].
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFStreamingEvaluator.java