private void removeOrphanFiles(
      Table table,
      ConnectorSession session,
      SchemaTableName schemaTableName,
      long expireTimestamp) {
    Set<String> processedManifestFilePaths = new HashSet<>();
    // Similarly to issues like https://github.com/trinodb/trino/issues/13759,
    // equivalent paths may have different String representations due to things like double slashes.
    // Using file names may result in retaining files which could be removed.
    // However, in practice Iceberg metadata and data files have UUIDs in their names which makes
    // this unlikely.
    ImmutableSet.Builder<String> validMetadataFileNames = ImmutableSet.builder();
    ImmutableSet.Builder<String> validDataFileNames = ImmutableSet.builder();

    for (Snapshot snapshot : table.snapshots()) {
      if (snapshot.manifestListLocation() != null) {
        validMetadataFileNames.add(fileName(snapshot.manifestListLocation()));
      }

      for (ManifestFile manifest : snapshot.allManifests(table.io())) {
        if (!processedManifestFilePaths.add(manifest.path())) {
          // Already read this manifest
          continue;
        }

        validMetadataFileNames.add(fileName(manifest.path()));
        try (ManifestReader<? extends ContentFile<?>> manifestReader =
            readerForManifest(table, manifest)) {
          for (ContentFile<?> contentFile : manifestReader) {
            validDataFileNames.add(fileName(contentFile.path().toString()));
          }
        } catch (IOException e) {
          throw new TrinoException(
              ICEBERG_FILESYSTEM_ERROR,
              "Unable to list manifest file content from " + manifest.path(),
              e);
        }
      }
    }

    metadataFileLocations(table, false).stream()
        .map(IcebergUtil::fileName)
        .forEach(validMetadataFileNames::add);
    validMetadataFileNames.add(fileName(versionHintLocation(table)));

    scanAndDeleteInvalidFiles(
        table, session, schemaTableName, expireTimestamp, validDataFileNames.build(), "data");
    scanAndDeleteInvalidFiles(
        table,
        session,
        schemaTableName,
        expireTimestamp,
        validMetadataFileNames.build(),
        "metadata");
  }
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