protected void finishInner(VectorizedRowBatch batch,
      int allMatchCount, int equalKeySeriesCount, int spillCount, int hashMapResultCount)
          throws HiveException, IOException {

    int numSel = 0;

    /*
     * Optimize by running value expressions only over the matched rows.
     */
    if (allMatchCount > 0 && bigTableValueExpressions != null) {
      performValueExpressions(batch, allMatches, allMatchCount);
    }

    for (int i = 0; i < equalKeySeriesCount; i++) {
      int hashMapResultIndex = equalKeySeriesHashMapResultIndices[i];
      VectorMapJoinHashMapResult hashMapResult = hashMapResults[hashMapResultIndex];
      int allMatchesIndex = equalKeySeriesAllMatchIndices[i];
      boolean isSingleValue = equalKeySeriesIsSingleValue[i];
      int duplicateCount = equalKeySeriesDuplicateCounts[i];

      if (isSingleValue) {
        numSel = generateHashMapResultSingleValue(
                    batch, hashMapResult, allMatches, allMatchesIndex, duplicateCount, numSel);
      } else {
        generateHashMapResultMultiValue(
            batch, hashMapResult, allMatches, allMatchesIndex, duplicateCount);
      }
    }

    if (spillCount > 0) {
      spillHashMapBatch(batch, (VectorMapJoinHashTableResult[]) hashMapResults,
          spills, spillHashMapResultIndices, spillCount);
    }

    batch.size = numSel;
    batch.selectedInUse = true;
  }
Generate the inner join output results for one vectorized row batch.

@param batch
         The big table batch with any matching and any non matching rows both as
         selected in use.
@param allMatchCount
         Number of matches in allMatches.
@param equalKeySeriesCount
         Number of single value matches.
@param spillCount
         Number of spills in spills.
@param hashMapResultCount
         Number of entries in hashMapResults.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerGenerateResultOperator.java