@Override
  protected void reProcessBigTable(int partitionId)
      throws HiveException {

    if (LOG.isDebugEnabled()) {
      LOG.debug(CLASS_NAME + " reProcessBigTable enter...");
    }

    if (spillReplayBatch == null) {
      // The process method was not called -- no big table rows.
      return;
    }

    HashPartition partition = firstSmallTable.getHashPartitions()[partitionId];

    int rowCount = 0;
    int batchCount = 0;

    try {
      VectorRowBytesContainer bigTable = partition.getMatchfileRowBytesContainer();
      bigTable.prepareForReading();

      while (bigTable.readNext()) {
        rowCount++;

        byte[] bytes = bigTable.currentBytes();
        int offset = bigTable.currentOffset();
        int length = bigTable.currentLength();

        bigTableVectorDeserializeRow.setBytes(bytes, offset, length);
        try {
          bigTableVectorDeserializeRow.deserialize(spillReplayBatch, spillReplayBatch.size);
        } catch (Exception e) {
          throw new HiveException(
              "\nDeserializeRead detail: " +
                  bigTableVectorDeserializeRow.getDetailedReadPositionString(),
              e);
        }
        spillReplayBatch.size++;

        if (spillReplayBatch.size == VectorizedRowBatch.DEFAULT_SIZE) {
          process(spillReplayBatch, posBigTable); // call process once we have a full batch
          spillReplayBatch.reset();
          batchCount++;
        }
      }
      // Process the row batch that has less than DEFAULT_SIZE rows
      if (spillReplayBatch.size > 0) {
        process(spillReplayBatch, posBigTable);
        spillReplayBatch.reset();
        batchCount++;
      }
      bigTable.clear();
    } catch (Exception e) {
      LOG.info(CLASS_NAME + " reProcessBigTable exception! " + e);
      throw new HiveException(e);
    }

    if (LOG.isDebugEnabled()) {
      LOG.debug(CLASS_NAME + " reProcessBigTable exit! " + rowCount + " row processed and " + batchCount + " batches processed");
    }
  }
Generate optimized results when entire batch key is repeated and it matched the hash map.

@param batch
         The big table batch.
@param hashMapResult
         The hash map results for the repeated key.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinGenerateResultOperator.java