@RequiresNonNull("factorWeights")
  private void setFactorWeight(int weight, int leftFactor, int rightFactor) {
    if (factorWeights[leftFactor][rightFactor] < weight) {
      factorWeights[leftFactor][rightFactor] = weight;
      factorWeights[rightFactor][leftFactor] = weight;
    }
  }
Sets an individual weight if the new weight is better than the current
one.

@param weight weight to be set
@param leftFactor index of left factor
@param rightFactor index of right factor
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveLoptMultiJoin.java