@SuppressWarnings("unchecked")
  private List<Object> mergeJoinComputeKeys(Object row, Byte alias) throws HiveException {
    if ((joinKeysObjectInspectors != null) && (joinKeysObjectInspectors[alias] != null)) {
      return JoinUtil.computeKeys(row, joinKeys[alias], joinKeysObjectInspectors[alias]);
    } else {
      final List<Object> key = new ArrayList<Object>(1);
      ObjectInspectorUtils.partialCopyToStandardObject(key, row,
          Utilities.ReduceField.KEY.position, 1, (StructObjectInspector) inputObjInspectors[alias],
          ObjectInspectorCopyOption.WRITABLE);
      return (List<Object>) key.get(0); // this is always 0, even if KEY.position is not
    }
  }
Decides if the actual row must be an unmatched row.

Unmatched rows are those which are not part of the inner-join.
The current implementation has issues processing filtered rows in FOJ conditions.
Putting them in a separate group also reduces processing done for them.
ql/src/java/org/apache/hadoop/hive/ql/exec/CommonMergeJoinOperator.java