code: private boolean ensureBatch() throws IOException {
  
  		if (nextRow >= rowsInBatch) {
  			// No more rows available in the Rows array.
  			nextRow = 0;
  			// Try to read the next batch if rows from the ORC file.
  			boolean moreRows = orcRowsReader.nextBatch(rowBatch);
  
  			if (moreRows) {
  				// Load the data into the Rows array.
  				rowsInBatch = fillRows(rows, schema, rowBatch, selectedFields);
  			}
  			return moreRows;
  		}
  		// there is at least one Row left in the Rows array.
  		return true;
  	}
docs: Checks if there is at least one row left in the batch to return.
  If no more row are available, it reads another batch of rows.
  
  @return Returns true if there is one more row to return, false otherwise.
  @throws IOException throw if an exception happens while reading a batch.