2424
2525#include " iceberg/iceberg_export.h"
2626#include " iceberg/result.h"
27- #include " iceberg/snapshot.h"
2827#include " iceberg/type_fwd.h"
2928#include " iceberg/update/pending_update.h"
30- #include " iceberg/util/timepoint.h"
3129
3230namespace iceberg {
3331
@@ -51,25 +49,25 @@ class ICEBERG_EXPORT SnapshotManager : public PendingUpdate {
5149 // / \brief Apply supported changes in given snapshot and create a new snapshot which
5250 // / will be set as the current snapshot on commit.
5351 // /
54- // / \param snapshot_id A snapshot ID whose changes to apply
52+ // / \param snapshot_id A Snapshot ID whose changes to apply
5553 // / \return Reference to this for method chaining
5654 SnapshotManager& Cherrypick (int64_t snapshot_id);
5755
58- // / \brief Roll this table's data back to a specific Snapshot identified by id .
56+ // / \brief Roll this table's data back to a specific Snapshot ID .
5957 // /
60- // / \param snapshot_id Long id of the snapshot to roll back table data to
58+ // / \param snapshot_id Snapshot ID to roll back table data to
6159 // / \return Reference to this for method chaining
6260 SnapshotManager& SetCurrentSnapshot (int64_t snapshot_id);
6361
64- // / \brief Roll this table's data back to the last Snapshot before the given timestamp.
62+ // / \brief Roll this table's data back to the last snapshot before the given timestamp.
6563 // /
6664 // / \param timestamp_ms A timestamp in milliseconds
6765 // / \return Reference to this for method chaining
68- SnapshotManager& RollbackToTime (TimePointMs timestamp_ms);
66+ SnapshotManager& RollbackToTime (int64_t timestamp_ms);
6967
70- // / \brief Rollback table's state to a specific Snapshot identified by id .
68+ // / \brief Rollback table's state to a specific Snapshot ID .
7169 // /
72- // / \param snapshot_id Long id of snapshot id to roll back table to. Must be an ancestor
70+ // / \param snapshot_id Snapshot ID to roll back table to. Must be an ancestor
7371 // / of the current snapshot
7472 // / \return Reference to this for method chaining
7573 SnapshotManager& RollbackTo (int64_t snapshot_id);
@@ -82,14 +80,14 @@ class ICEBERG_EXPORT SnapshotManager : public PendingUpdate {
8280 // / \return Reference to this for method chaining
8381 SnapshotManager& CreateBranch (const std::string& name);
8482
85- // / \brief Create a new branch pointing to the given snapshot id .
83+ // / \brief Create a new branch pointing to the given Snapshot ID .
8684 // /
8785 // / \param name Branch name
88- // / \param snapshot_id ID of the snapshot which will be the head of the branch
86+ // / \param snapshot_id Snapshot ID which will be the head of the branch
8987 // / \return Reference to this for method chaining
9088 SnapshotManager& CreateBranch (const std::string& name, int64_t snapshot_id);
9189
92- // / \brief Create a new tag pointing to the given snapshot id .
90+ // / \brief Create a new tag pointing to the given Snapshot ID .
9391 // /
9492 // / \param name Tag name
9593 // / \param snapshot_id Snapshot ID for the head of the new tag
@@ -111,30 +109,30 @@ class ICEBERG_EXPORT SnapshotManager : public PendingUpdate {
111109 // / \brief Replaces the tag with the given name to point to the specified snapshot.
112110 // /
113111 // / \param name Tag to replace
114- // / \param snapshot_id New snapshot id for the given tag
112+ // / \param snapshot_id New Snapshot ID for the given tag
115113 // / \return Reference to this for method chaining
116114 SnapshotManager& ReplaceTag (const std::string& name, int64_t snapshot_id);
117115
118116 // / \brief Replaces the branch with the given name to point to the specified snapshot.
119117 // /
120118 // / \param name Branch to replace
121- // / \param snapshot_id New snapshot id for the given branch
119+ // / \param snapshot_id New Snapshot ID for the given branch
122120 // / \return Reference to this for method chaining
123121 SnapshotManager& ReplaceBranch (const std::string& name, int64_t snapshot_id);
124122
125- // / \brief Replaces the from branch to point to the to snapshot. The to will remain
126- // / unchanged, and from branch will retain its retention properties. If the from branch
127- // / does not exist, it will be created with default retention properties.
123+ // / \brief Replaces the ` from` branch to point to the `to` snapshot. The `to` will
124+ // / remain unchanged, and ` from` branch will retain its retention properties. If the
125+ // / `from` branch does not exist, it will be created with default retention properties.
128126 // /
129127 // / \param from Branch to replace
130128 // / \param to The branch from should be replaced with
131129 // / \return Reference to this for method chaining
132130 SnapshotManager& ReplaceBranch (const std::string& from, const std::string& to);
133131
134- // / \brief Performs a fast-forward of from up to the to snapshot if from is an ancestor
135- // / of to . The to will remain unchanged, and from will retain its retention properties.
136- // / If the from branch does not exist, it will be created with default retention
137- // / properties.
132+ // / \brief Performs a fast-forward of ` from` up to the `to` snapshot if ` from` is an
133+ // / ancestor of `to` . The `to` will remain unchanged, and ` from` will retain its
134+ // / retention properties. If the ` from` branch does not exist, it will be created with
135+ // / default retention properties.
138136 // /
139137 // / \param from Branch to fast-forward
140138 // / \param to Ref for the from branch to be fast forwarded to
@@ -171,11 +169,6 @@ class ICEBERG_EXPORT SnapshotManager : public PendingUpdate {
171169 // / \return Reference to this for method chaining
172170 SnapshotManager& SetMaxRefAgeMs (const std::string& name, int64_t max_ref_age_ms);
173171
174- // / \brief Apply the pending changes and return the current snapshot.
175- // /
176- // / \return The current snapshot after applying changes, or an error
177- Result<std::shared_ptr<Snapshot>> Apply ();
178-
179172 // / \brief Commit all pending changes.
180173 // /
181174 // / \return Status indicating success or failure
@@ -193,7 +186,7 @@ class ICEBERG_EXPORT SnapshotManager : public PendingUpdate {
193186 // / \brief Commit any pending reference updates if they exist.
194187 Status CommitIfRefUpdatesExist ();
195188
196- std::shared_ptr<UpdateSnapshotReference> update_snapshot_references_operation_ ;
189+ std::shared_ptr<UpdateSnapshotReference> update_snap_refs_ ;
197190};
198191
199192} // namespace iceberg
0 commit comments