File tree Expand file tree Collapse file tree 3 files changed +14
-13
lines changed
Expand file tree Collapse file tree 3 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -93,11 +93,6 @@ FastAppend& FastAppend::ToBranch(const std::string& branch) {
9393 return *this ;
9494}
9595
96- FastAppend& FastAppend::Set (const std::string& property, const std::string& value) {
97- summary_.Set (property, value);
98- return *this ;
99- }
100-
10196std::string FastAppend::operation () { return DataOperation::kAppend ; }
10297
10398Result<std::vector<ManifestFile>> FastAppend::Apply (
Original file line number Diff line number Diff line change @@ -75,13 +75,6 @@ class ICEBERG_EXPORT FastAppend : public SnapshotUpdate {
7575 // / \return Reference to this for method chaining
7676 FastAppend& ToBranch (const std::string& branch);
7777
78- // / \brief Set a summary property.
79- // /
80- // / \param property The property name
81- // / \param value The property value
82- // / \return Reference to this for method chaining
83- FastAppend& Set (const std::string& property, const std::string& value);
84-
8578 std::string operation () override ;
8679
8780 Result<std::vector<ManifestFile>> Apply (
@@ -110,7 +103,6 @@ class ICEBERG_EXPORT FastAppend : public SnapshotUpdate {
110103
111104 private:
112105 std::string table_name_;
113- SnapshotSummaryBuilder summary_;
114106 std::unordered_map<int32_t , DataFileSet> new_data_files_by_spec_;
115107 std::vector<ManifestFile> append_manifests_;
116108 std::vector<ManifestFile> rewritten_append_manifests_;
Original file line number Diff line number Diff line change @@ -76,6 +76,16 @@ class ICEBERG_EXPORT SnapshotUpdate : public PendingUpdate {
7676 return self;
7777 }
7878
79+ // / \brief Set a summary property.
80+ // /
81+ // / \param property The property name
82+ // / \param value The property value
83+ // / \return Reference to this for method chaining
84+ auto & Set (this auto & self, const std::string& property, const std::string& value) {
85+ self.summary_ .Set (property, value);
86+ return self;
87+ }
88+
7989 // / \brief Apply the update's changes to create a new snapshot.
8090 // /
8191 // / This method validates the changes, applies them to the metadata,
@@ -179,6 +189,10 @@ class ICEBERG_EXPORT SnapshotUpdate : public PendingUpdate {
179189
180190 std::string ManifestPath ();
181191
192+ protected:
193+ // / \brief Builder for tracking snapshot summary properties and metrics.
194+ SnapshotSummaryBuilder summary_;
195+
182196 private:
183197 // / \brief Returns the snapshot summary from the implementation and updates totals.
184198 Result<std::unordered_map<std::string, std::string>> ComputeSummary (
You can’t perform that action at this time.
0 commit comments