private Optional<SystemTable> getRawSystemTable(
      ConnectorSession session, SchemaTableName tableName) {
    IcebergTableName name = IcebergTableName.from(tableName.getTableName());
    if (name.getTableType() == DATA) {
      return Optional.empty();
    }

    // load the base table for the system table
    Table table;
    try {
      table =
          loadTable(session, new SchemaTableName(tableName.getSchemaName(), name.getTableName()));
    } catch (TableNotFoundException e) {
      return Optional.empty();
    } catch (UnknownTableTypeException e) {
      // avoid dealing with non Iceberg tables
      return Optional.empty();
    }

    SchemaTableName systemTableName =
        new SchemaTableName(tableName.getSchemaName(), name.getTableNameWithType());
    switch (name.getTableType()) {
      case DATA:
        // Handled above.
        break;
      case HISTORY:
        return Optional.of(new HistoryTable(systemTableName, table));
      case SNAPSHOTS:
        return Optional.of(new SnapshotsTable(systemTableName, typeManager, table));
      case PARTITIONS:
        return Optional.of(
            new PartitionTable(systemTableName, typeManager, table, getCurrentSnapshotId(table)));
      case MANIFESTS:
        return Optional.of(new ManifestsTable(systemTableName, table, getCurrentSnapshotId(table)));
      case FILES:
        return Optional.of(
            new FilesTable(systemTableName, typeManager, table, getCurrentSnapshotId(table)));
      case PROPERTIES:
        return Optional.of(new PropertiesTable(systemTableName, table));
    }
    return Optional.empty();
  }
Iceberg original metadata has some problems for mixed-format table, such as iceberg version,
table type. So copy from IcebergMetadata and made some change
amoro-format-mixed/amoro-mixed-trino/src/main/java/org/apache/amoro/trino/unkeyed/IcebergMetadata.java