private int[][] getTargets(CommonJoinOperator<JoinDesc> join) {
      JoinCondDesc[] conds = join.getConf().getConds();

      int aliases = conds.length + 1;
      Vectors vector = new Vectors(aliases);
      for (JoinCondDesc cond : conds) {
        int left = cond.getLeft();
        int right = cond.getRight();
        switch (cond.getType()) {
        case JoinDesc.INNER_JOIN:
        case JoinDesc.LEFT_SEMI_JOIN:
          vector.add(left, right);
          vector.add(right, left);
          break;
        case JoinDesc.LEFT_OUTER_JOIN:
        case JoinDesc.ANTI_JOIN:
        //TODO : In case of anti join, bloom filter can be created on left side also ("IN (keylist right table)").
        // But the filter should be "not-in" ("NOT IN (keylist right table)") as we want to select the records from
        // left side which are not present in the right side. But it may cause wrong result as
        // bloom filter may have false positive and thus simply adding not is not correct,
        // special handling is required for "NOT IN".
          vector.add(right, left);
          break;
        case JoinDesc.RIGHT_OUTER_JOIN:
          vector.add(left, right);
          break;
        case JoinDesc.FULL_OUTER_JOIN:
          break;
        }
      }
      int[][] result = new int[aliases][];
      for (int pos = 0 ; pos < aliases; pos++) {
        // find all targets recursively
        result[pos] = vector.traverse(pos);
      }
      return result;
    }
creates synthetic predicates that represent "IN (keylist other table)"
ql/src/java/org/apache/hadoop/hive/ql/ppd/SyntheticJoinPredicate.java