int findInMemoryBatchIndex(int row) {
    int batchIndex = Collections.binarySearch(inMemoryStartRowIndex, row);
    batchIndex = batchIndex < 0 ? (batchIndex + 1) * -1 - 1 : batchIndex;
    return batchIndex;
  }
Finds the batch which contains a given row with binary search. The row reflects a global row
number within the partition, so as the values in inMemoryStartRowIndex. This method assumes
that the caller loaded the needed block into memory, and refresh the index via
refreshInMemoryStartRowIndex.

@param row
@return batchIndex
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFGroupBatches.java