docs: public Type getCombinedType(Type other, int operation) {
  
          if (other.typeCode == Types.SQL_ALL_TYPES) {
              other = this;
          }
  
          switch (operation) {
  
              // A VoltDB extension to be more sql compliant
              // drop this special case handling of ADD
              /* disable 2 lines ...
              case OpTypes.ADD :
                  break;
              ... disabled 2 lines */
              // End of VoltDB extension
  
              case OpTypes.MULTIPLY :
                  if (other.isIntervalType()) {
                      return other.getCombinedType(this, OpTypes.MULTIPLY);
                  }
                  break;
  
              case OpTypes.DIVIDE :
              case OpTypes.SUBTRACT :
              default :
  
                  // all derivatives of equality ops or comparison ops
                  return getAggregateType(other);
          }
  
          // resolution for ADD and MULTIPLY only
          if (!other.isNumberType()) {
              throw Error.error(ErrorCode.X_42562);
          }
  
          if (typeWidth == DOUBLE_WIDTH
                  || ((NumberType) other).typeWidth == DOUBLE_WIDTH) {
              return Type.SQL_DOUBLE;
          }
  
          int sum = typeWidth + ((NumberType) other).typeWidth;
  
          if (sum <= INTEGER_WIDTH) {
              return Type.SQL_INTEGER;
          }
  
          if (sum <= BIGINT_WIDTH) {
              return Type.SQL_BIGINT;
          }
  
          int  newScale;
          long newDigits;
  
          switch (operation) {
  
  //            case OpCodes.DIVIDE :
  //            case OpCodes.SUBTRACT :
              case OpTypes.ADD :
                  newScale = scale > other.scale ? scale
                                                 : other.scale;
                  newDigits = precision - scale > other.precision - other.scale
                              ? precision - scale
                              : other.precision - other.scale;
  
                  newDigits++;
                  break;
  
              case OpTypes.MULTIPLY :
                  newDigits = precision - scale + other.precision - other.scale;
                  newScale  = scale + other.scale;
                  break;
  
              default :
                  throw Error.runtimeError(ErrorCode.U_S0500, "NumberType");
          }
  
          return getNumberType(Types.SQL_DECIMAL, newScale + newDigits,
                               newScale);
      }