You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "laskoviymishka (via GitHub)" <gi...@apache.org> on 2026/10/07 21:21:52 UTC
[PR] refactor(table): export SnapshotLogEntryAsOf for metadata-table time travel [iceberg-go]
laskoviymishka opened a new pull request, #2150:
URL: https://github.com/apache/iceberg-go/pull/2150
Promote the snapshot-log time-travel resolver from the unexported snapshotLogEntryAsOf to the exported SnapshotLogEntryAsOf, so code outside the table package (the forthcoming table/inspect package) can resolve a snapshot as of a timestamp without reaching into table internals.
Pure rename plus repoint of the in-package callers (the as-of-timestamp scan, Table.SnapshotAsOf, and the metadata_log_entries inspection). No behavior change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] refactor(table): export SnapshotLogEntryAsOf for metadata-table time travel [iceberg-go]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade merged PR #2150:
URL: https://github.com/apache/iceberg-go/pull/2150
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] refactor(table): export SnapshotLogEntryAsOf for metadata-table time travel [iceberg-go]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on code in PR #2150:
URL: https://github.com/apache/iceberg-go/pull/2150#discussion_r4258068072
##########
table/snapshots.go:
##########
@@ -548,11 +548,13 @@ type SnapshotLogEntry struct {
TimestampMs int64 `json:"timestamp-ms"`
}
-// snapshotLogEntryAsOf returns the log entry with the greatest eligible
-// timestamp. Snapshot-log entries can be out of chronological order when
-// commits have small clock skews, so the result must not depend on iteration
-// order.
-func snapshotLogEntryAsOf(entries iter.Seq[SnapshotLogEntry], timestampMs int64, inclusive bool) (SnapshotLogEntry, bool) {
+// SnapshotLogEntryAsOf returns the snapshot-log entry with the greatest
+// timestamp at or before timestampMs (or strictly before it when inclusive is
+// false), and whether one was found. Snapshot-log entries can be out of
+// chronological order when commits have small clock skews, so the result must
+// not depend on iteration order. It is the time-travel resolution used by the
Review Comment:
Nit: "the result must not depend on iteration order" holds only for distinct timestamps. On a tie the strict `>` keeps the first eligible entry in log order. Now that this is public API, I'd state the tie-break explicitly ("on equal timestamps, the earliest entry in log order wins") or switch to `>=` to take the last, matching Java's `SnapshotUtil` walk, and add a tie case to the existing tests either way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org