public boolean hasAllFactors(
          HiveLoptJoinTree joinTree,
          BitSet factorsNeeded) {
    return BitSets.contains(BitSets.of(joinTree.getTreeOrder()), factorsNeeded);
  }
Returns whether if a join tree contains all factors required.

@param joinTree Join tree to be examined
@param factorsNeeded Bitmap of factors required

@return true if join tree contains all required factors
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveLoptMultiJoin.java