private void setJoinAdjustments(
      int[] adjustments,
      int nFieldsX,
      int nFieldsY,
      int nFieldsZ,
      int adjustY,
      int adjustZ) {
    for (int i = 0; i < nFieldsX; i++) {
      adjustments[i] = 0;
    }
    for (int i = nFieldsX; i < (nFieldsX + nFieldsY); i++) {
      adjustments[i] = adjustY;
    }
    for (int i = nFieldsX + nFieldsY;
         i < (nFieldsX + nFieldsY + nFieldsZ);
         i++) {
      adjustments[i] = adjustZ;
    }
  }
Sets an array to reflect how much each index corresponding to a field
needs to be adjusted. The array corresponds to fields in a 3-way join
between (X, Y, and Z). X remains unchanged, but Y and Z need to be
adjusted by some fixed amount as determined by the input.

@param adjustments array to be filled out
@param nFieldsX    number of fields in X
@param nFieldsY    number of fields in Y
@param nFieldsZ    number of fields in Z
@param adjustY     the amount to adjust Y by
@param adjustZ     the amount to adjust Z by
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveJoinSwapConstraintsRule.java