private org.apache.hadoop.hive.metastore.api.Table newHiveTable(
      TableMeta meta, Schema schema, PartitionSpec partitionSpec) {
    final long currentTimeMillis = System.currentTimeMillis();

    // set table comment here!
    Map<String, String> parameters = new HashMap<>();
    Optional<String> comment = Optional.ofNullable(meta.getProperties().get("comment"));
    comment.ifPresent(val -> parameters.put("comment", val));

    org.apache.hadoop.hive.metastore.api.Table newTable =
        new org.apache.hadoop.hive.metastore.api.Table(
            meta.getTableIdentifier().getTableName(),
            meta.getTableIdentifier().getDatabase(),
            meta.getProperties()
                .getOrDefault(TableProperties.OWNER, System.getProperty("user.name")),
            (int) currentTimeMillis / 1000,
            (int) currentTimeMillis / 1000,
            Integer.MAX_VALUE,
            null,
            HiveSchemaUtil.hivePartitionFields(schema, partitionSpec),
            parameters,
            null,
            null,
            TableType.EXTERNAL_TABLE.toString());

    newTable
        .getParameters()
        .put("EXTERNAL", "TRUE"); // Using the external table type also requires this
    return newTable;
  }
we check the privilege by calling existing method, the method will throw the
UncheckedIOException Exception
amoro-format-mixed/amoro-mixed-hive/src/main/java/org/apache/amoro/hive/catalog/MixedHiveTables.java