@Override
    public Object lag(int amt) throws HiveException {
      int i = PTFRollingPartition.this.numRowsProcessed - amt;
      int start = PTFRollingPartition.this.numRowsReceived
          - PTFRollingPartition.this.currWindow.size();

      i = i < start ? start : i;
      return PTFRollingPartition.this.getAt(i);
    }
Gets the next row index that the data within the window are available and can be processed
@param wFrameDef
@return
ql/src/java/org/apache/hadoop/hive/ql/exec/PTFRollingPartition.java