Skip to content

Commit 4ecacd5

Browse files
committed
Simplify logic
1 parent adbaffb commit 4ecacd5

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/TemporalTimeTravelUtil.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,16 @@ private static long searchTowardsHeadLinear(TrinoFileSystem fileSystem, long sta
139139
.filter(Objects::nonNull)
140140
.findFirst();
141141

142-
if (commitInfo.isEmpty()) {
143-
entryNumber--;
144-
if (entryNumber < 0) {
145-
break;
146-
}
147-
entries = getEntriesFromJson(entryNumber, transactionLogDir, fileSystem, DataSize.ofBytes(0));
148-
continue;
149-
}
150-
151-
if (commitInfo.get().timestamp() <= epochMillis) {
142+
// if (commitInfo.isEmpty()) {
143+
// entryNumber--;
144+
// if (entryNumber < 0) {
145+
// break;
146+
// }
147+
// entries = getEntriesFromJson(entryNumber, transactionLogDir, fileSystem, DataSize.ofBytes(0));
148+
// continue;
149+
// }
150+
151+
if (commitInfo.isPresent() && commitInfo.get().timestamp() <= epochMillis) {
152152
return commitInfo.get().version();
153153
}
154154

0 commit comments

Comments
 (0)