diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java index c449acd96815..b9a7b0460575 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java @@ -1189,7 +1189,7 @@ private void removeOrphanFiles(Table table, ConnectorSession session, SchemaTabl private void removeOrphanMetadataFiles(Table table, ConnectorSession session, SchemaTableName schemaTableName, long expireTimestamp) { ImmutableSet manifests = stream(table.snapshots()) - .flatMap(snapshot -> snapshot.allManifests().stream()) + .flatMap(snapshot -> snapshot.allManifests(table.io()).stream()) .map(ManifestFile::path) .collect(toImmutableSet()); List manifestLists = ReachableFileUtil.manifestListLocations(table); @@ -1721,7 +1721,7 @@ public Optional> applyFilter(C Table icebergTable = catalog.loadTable(session, table.getSchemaTableName()); Long snapshotId = table.getSnapshotId().orElseThrow(() -> new IllegalStateException("Snapshot id must be present")); - Set partitionSpecIds = icebergTable.snapshot(snapshotId).allManifests().stream() + Set partitionSpecIds = icebergTable.snapshot(snapshotId).allManifests(icebergTable.io()).stream() .map(ManifestFile::partitionSpecId) .collect(toImmutableSet()); diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/ManifestsTable.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/ManifestsTable.java index 896b5a4feb08..1c2c69ef5466 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/ManifestsTable.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/ManifestsTable.java @@ -114,7 +114,7 @@ private static List buildPages(ConnectorTableMetadata tableMetadata, Table Map partitionSpecsById = icebergTable.specs(); - snapshot.allManifests().forEach(file -> { + snapshot.allManifests(icebergTable.io()).forEach(file -> { pagesBuilder.beginRow(); pagesBuilder.appendVarchar(file.path()); pagesBuilder.appendBigint(file.length());