public boolean isLeftFactorInRemovableSelfJoin(int factIdx) {
    HiveLoptMultiJoin.RemovableSelfJoin selfJoin = removableSelfJoinPairs.get(factIdx);
    if (selfJoin == null) {
      return false;
    }
    return selfJoin.leftFactor == factIdx;
  }
Returns whether the factor is the left factor in a self-join.

@param factIdx Factor in a self-join
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveLoptMultiJoin.java