diff --git a/lib/trino-filesystem/src/test/java/io/trino/filesystem/TrackingFileSystemFactory.java b/lib/trino-filesystem/src/test/java/io/trino/filesystem/TrackingFileSystemFactory.java index 965982ac53af..9bbb650414f6 100644 --- a/lib/trino-filesystem/src/test/java/io/trino/filesystem/TrackingFileSystemFactory.java +++ b/lib/trino-filesystem/src/test/java/io/trino/filesystem/TrackingFileSystemFactory.java @@ -32,6 +32,7 @@ import static com.google.common.base.Verify.verify; import static io.trino.filesystem.TrackingFileSystemFactory.OperationType.INPUT_FILE_EXISTS; import static io.trino.filesystem.TrackingFileSystemFactory.OperationType.INPUT_FILE_GET_LENGTH; +import static io.trino.filesystem.TrackingFileSystemFactory.OperationType.INPUT_FILE_LAST_MODIFIED; import static io.trino.filesystem.TrackingFileSystemFactory.OperationType.INPUT_FILE_NEW_STREAM; import static io.trino.filesystem.TrackingFileSystemFactory.OperationType.OUTPUT_FILE_CREATE; import static io.trino.filesystem.TrackingFileSystemFactory.OperationType.OUTPUT_FILE_CREATE_EXCLUSIVE; @@ -50,6 +51,7 @@ public enum OperationType OUTPUT_FILE_CREATE_OR_OVERWRITE, OUTPUT_FILE_CREATE_EXCLUSIVE, OUTPUT_FILE_TO_INPUT_FILE, + INPUT_FILE_LAST_MODIFIED, } private final AtomicInteger fileId = new AtomicInteger(); @@ -251,6 +253,7 @@ public boolean exists() public Instant lastModified() throws IOException { + tracker.accept(INPUT_FILE_LAST_MODIFIED); return delegate.lastModified(); } diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetadataFileOperations.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetadataFileOperations.java index 1aba3b8ed814..1e659eb692d9 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetadataFileOperations.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetadataFileOperations.java @@ -39,6 +39,7 @@ import static com.google.inject.multibindings.OptionalBinder.newOptionalBinder; import static io.trino.SystemSessionProperties.MIN_INPUT_SIZE_PER_TASK; import static io.trino.filesystem.TrackingFileSystemFactory.OperationType.INPUT_FILE_GET_LENGTH; +import static io.trino.filesystem.TrackingFileSystemFactory.OperationType.INPUT_FILE_LAST_MODIFIED; import static io.trino.filesystem.TrackingFileSystemFactory.OperationType.INPUT_FILE_NEW_STREAM; import static io.trino.filesystem.TrackingFileSystemFactory.OperationType.OUTPUT_FILE_CREATE; import static io.trino.filesystem.TrackingFileSystemFactory.OperationType.OUTPUT_FILE_CREATE_OR_OVERWRITE; @@ -276,6 +277,7 @@ public void testReadWholePartition() .add(new FileOperation(SNAPSHOT, INPUT_FILE_GET_LENGTH)) .add(new FileOperation(SNAPSHOT, INPUT_FILE_NEW_STREAM)) .addCopies(new FileOperation(DATA, INPUT_FILE_NEW_STREAM), 4) + .addCopies(new FileOperation(DATA, INPUT_FILE_LAST_MODIFIED), 4) .build()); assertUpdate("DROP TABLE test_read_part_key");