private static boolean formatCheck(
      HMSClientPool hiveClient, TableIdentifier tableIdentifier, Map<String, String> properties)
      throws IOException {
    AtomicBoolean isSupport = new AtomicBoolean(false);
    try {
      hiveClient.run(
          client -> {
            Table hiveTable = HiveTableUtil.loadHmsTable(hiveClient, tableIdentifier);
            StorageDescriptor storageDescriptor = hiveTable.getSd();
            SerDeInfo serDeInfo = storageDescriptor.getSerdeInfo();
            switch (storageDescriptor.getInputFormat()) {
              case HiveTableProperties.PARQUET_INPUT_FORMAT:
                if (storageDescriptor
                        .getOutputFormat()
                        .equals(HiveTableProperties.PARQUET_OUTPUT_FORMAT)
                    && serDeInfo
                        .getSerializationLib()
                        .equals(HiveTableProperties.PARQUET_ROW_FORMAT_SERDE)) {
                  properties.put(DEFAULT_FILE_FORMAT, FILE_FORMAT_PARQUET);
                  properties.put(BASE_FILE_FORMAT, FILE_FORMAT_PARQUET);
                  properties.put(CHANGE_FILE_FORMAT, FILE_FORMAT_PARQUET);
                  isSupport.set(true);
                } else {
                  throw new IllegalStateException(
                      "Please check your hive table storage format for parquet is right");
                }
                break;
              case HiveTableProperties.ORC_INPUT_FORMAT:
                if (storageDescriptor
                        .getOutputFormat()
                        .equals(HiveTableProperties.ORC_OUTPUT_FORMAT)
                    && serDeInfo
                        .getSerializationLib()
                        .equals(HiveTableProperties.ORC_ROW_FORMAT_SERDE)) {
                  properties.put(DEFAULT_FILE_FORMAT, FILE_FORMAT_ORC);
                  properties.put(BASE_FILE_FORMAT, FILE_FORMAT_ORC);
                  properties.put(CHANGE_FILE_FORMAT, FILE_FORMAT_ORC);
                  isSupport.set(true);
                } else {
                  throw new IllegalStateException(
                      "Please check your hive table storage format for orc is right");
                }
                break;
              default:
                isSupport.set(false);
                break;
            }
            return null;
          });
    } catch (Exception e) {
      throw new IOException(e);
    }
    return isSupport.get();
  }
Check whether the storage format is supported.

@param hiveClient Hive client from MixedHiveClient
@param tableIdentifier A table identifier
@return Support or not
amoro-format-mixed/amoro-mixed-hive/src/main/java/org/apache/amoro/hive/utils/UpgradeHiveTableUtil.java