public int rowToProcess(WindowFrameDef wFrameDef) {
    int rowToProcess = numRowsReceived - 1 - Math.max(0, wFrameDef.getEnd().getRelativeOffset());
    return rowToProcess >= 0 ? rowToProcess : -1;
  }
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