private int readPageIfNeed() throws IOException {
    // Compute the number of values we want to read in this page.
    int leftInPage = (int) (endOfPageValueCount - valuesRead);
    if (leftInPage == 0) {
      // no data left in current page, load data from new page
      readPage();
      leftInPage = (int) (endOfPageValueCount - valuesRead);
    }
    return leftInPage;
  }
Collects data from a parquet page and returns the final row index where it stopped.
The returned index can be equal to or less than total.
@param total maximum number of rows to collect
@param lcv column vector to do initial setup in data collection time
@param valueList collection of values that will be fed into the vector later
@param category
@return
@throws IOException
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedListColumnReader.java