diff --git a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMetadata.java b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMetadata.java index ca70235b60d..cf2c73785fd 100644 --- a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMetadata.java +++ b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMetadata.java @@ -3085,6 +3085,7 @@ private CommitInfoEntry getCommitInfoEntry( session.getUser(), operation, ImmutableMap.of("queryId", session.getQueryId()), + ImmutableMap.of(), null, null, "trino-" + nodeVersion + "-" + nodeId, diff --git a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/CommitInfoEntry.java b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/CommitInfoEntry.java index 44a99a59ae6..8ec6af0ab71 100644 --- a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/CommitInfoEntry.java +++ b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/CommitInfoEntry.java @@ -25,6 +25,7 @@ public record CommitInfoEntry( String userName, String operation, Map operationParameters, + Map operationMetrics, Job job, Notebook notebook, String clusterId, @@ -39,7 +40,7 @@ public record CommitInfoEntry( public CommitInfoEntry withVersion(long version) { - return new CommitInfoEntry(version, timestamp, userId, userName, operation, operationParameters, job, notebook, clusterId, readVersion, isolationLevel, isBlindAppend); + return new CommitInfoEntry(version, timestamp, userId, userName, operation, operationParameters, operationMetrics, job, notebook, clusterId, readVersion, isolationLevel, isBlindAppend); } public record Job(String jobId, String jobName, String runId, String jobOwnerId, String triggerType) {} diff --git a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/checkpoint/CheckpointEntryIterator.java b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/checkpoint/CheckpointEntryIterator.java index ff31cdbd885..c2a1fadad73 100644 --- a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/checkpoint/CheckpointEntryIterator.java +++ b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/checkpoint/CheckpointEntryIterator.java @@ -443,6 +443,7 @@ private DeltaLakeTransactionLogEntry buildCommitInfoEntry(ConnectorSession sessi commitInfo.getString("userName"), commitInfo.getString("operation"), commitInfo.getMap(stringMap, "operationParameters"), + commitInfo.getMap(stringMap, "operationMetrics"), new CommitInfoEntry.Job( job.getString("jobId"), job.getString("jobName"), diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeAlluxioCacheFileOperations.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeAlluxioCacheFileOperations.java index cc6902dc057..e33d77357de 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeAlluxioCacheFileOperations.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeAlluxioCacheFileOperations.java @@ -84,15 +84,15 @@ public void testCacheFileOperations() assertFileSystemAccesses( "SELECT * FROM test_cache_file_operations", ImmutableMultiset.builder() - .add(new CacheOperation("Alluxio.readCached", "00000000000000000000.json", 0, 794)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000000.json", 0, 816)) .add(new CacheOperation("InputFile.length", "00000000000000000000.json")) - .add(new CacheOperation("Alluxio.readCached", "00000000000000000001.json", 0, 636)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000001.json", 0, 658)) .add(new CacheOperation("InputFile.length", "00000000000000000001.json")) - .add(new CacheOperation("Alluxio.readCached", "00000000000000000002.json", 0, 636)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000002.json", 0, 658)) .add(new CacheOperation("InputFile.length", "00000000000000000002.json")) - .add(new CacheOperation("Alluxio.readExternalStream", "00000000000000000002.json", 0, 636)) + .add(new CacheOperation("Alluxio.readExternalStream", "00000000000000000002.json", 0, 658)) .add(new CacheOperation("InputFile.newStream", "00000000000000000002.json")) - .add(new CacheOperation("Alluxio.writeCache", "00000000000000000002.json", 0, 636)) + .add(new CacheOperation("Alluxio.writeCache", "00000000000000000002.json", 0, 658)) .add(new CacheOperation("InputFile.length", "00000000000000000003.json")) .add(new CacheOperation("InputFile.newStream", "_last_checkpoint")) .add(new CacheOperation("Alluxio.readCached", "key=p1/", 0, 220)) @@ -105,11 +105,11 @@ public void testCacheFileOperations() assertFileSystemAccesses( "SELECT * FROM test_cache_file_operations", ImmutableMultiset.builder() - .add(new CacheOperation("Alluxio.readCached", "00000000000000000000.json", 0, 794)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000000.json", 0, 816)) .add(new CacheOperation("InputFile.length", "00000000000000000000.json")) - .add(new CacheOperation("Alluxio.readCached", "00000000000000000001.json", 0, 636)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000001.json", 0, 658)) .add(new CacheOperation("InputFile.length", "00000000000000000001.json")) - .add(new CacheOperation("Alluxio.readCached", "00000000000000000002.json", 0, 636)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000002.json", 0, 658)) .add(new CacheOperation("InputFile.length", "00000000000000000002.json")) .add(new CacheOperation("InputFile.length", "00000000000000000003.json")) .add(new CacheOperation("InputFile.newStream", "_last_checkpoint")) @@ -122,19 +122,19 @@ public void testCacheFileOperations() assertFileSystemAccesses( "SELECT * FROM test_cache_file_operations", ImmutableMultiset.builder() - .add(new CacheOperation("Alluxio.readCached", "00000000000000000000.json", 0, 794)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000000.json", 0, 816)) .add(new CacheOperation("InputFile.length", "00000000000000000000.json")) - .add(new CacheOperation("Alluxio.readCached", "00000000000000000001.json", 0, 636)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000001.json", 0, 658)) .add(new CacheOperation("InputFile.length", "00000000000000000001.json")) - .add(new CacheOperation("Alluxio.readCached", "00000000000000000002.json", 0, 636)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000002.json", 0, 658)) .add(new CacheOperation("InputFile.length", "00000000000000000002.json")) - .add(new CacheOperation("Alluxio.readCached", "00000000000000000003.json", 0, 636)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000003.json", 0, 658)) .add(new CacheOperation("InputFile.length", "00000000000000000003.json")) - .add(new CacheOperation("Alluxio.readCached", "00000000000000000004.json", 0, 636)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000004.json", 0, 658)) .add(new CacheOperation("InputFile.length", "00000000000000000004.json")) - .add(new CacheOperation("Alluxio.readCached", "00000000000000000005.json", 0, 636)) - .add(new CacheOperation("Alluxio.readExternalStream", "00000000000000000005.json", 0, 636)) - .add(new CacheOperation("Alluxio.writeCache", "00000000000000000005.json", 0, 636)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000005.json", 0, 658)) + .add(new CacheOperation("Alluxio.readExternalStream", "00000000000000000005.json", 0, 658)) + .add(new CacheOperation("Alluxio.writeCache", "00000000000000000005.json", 0, 658)) .add(new CacheOperation("InputFile.newStream", "00000000000000000005.json")) .add(new CacheOperation("InputFile.length", "00000000000000000005.json")) .add(new CacheOperation("InputFile.length", "00000000000000000006.json")) @@ -154,17 +154,17 @@ public void testCacheFileOperations() assertFileSystemAccesses( "SELECT * FROM test_cache_file_operations", ImmutableMultiset.builder() - .add(new CacheOperation("Alluxio.readCached", "00000000000000000000.json", 0, 794)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000000.json", 0, 816)) .add(new CacheOperation("InputFile.length", "00000000000000000000.json")) - .add(new CacheOperation("Alluxio.readCached", "00000000000000000001.json", 0, 636)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000001.json", 0, 658)) .add(new CacheOperation("InputFile.length", "00000000000000000001.json")) - .add(new CacheOperation("Alluxio.readCached", "00000000000000000002.json", 0, 636)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000002.json", 0, 658)) .add(new CacheOperation("InputFile.length", "00000000000000000002.json")) - .add(new CacheOperation("Alluxio.readCached", "00000000000000000003.json", 0, 636)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000003.json", 0, 658)) .add(new CacheOperation("InputFile.length", "00000000000000000003.json")) - .add(new CacheOperation("Alluxio.readCached", "00000000000000000004.json", 0, 636)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000004.json", 0, 658)) .add(new CacheOperation("InputFile.length", "00000000000000000004.json")) - .add(new CacheOperation("Alluxio.readCached", "00000000000000000005.json", 0, 636)) + .add(new CacheOperation("Alluxio.readCached", "00000000000000000005.json", 0, 658)) .add(new CacheOperation("InputFile.length", "00000000000000000005.json")) .add(new CacheOperation("InputFile.length", "00000000000000000006.json")) .add(new CacheOperation("InputFile.newStream", "_last_checkpoint"))