zhjwpku commented on code in PR #317:
URL: https://github.com/apache/iceberg-cpp/pull/317#discussion_r2556786489


##########
src/iceberg/manifest_writer.cc:
##########
@@ -21,15 +21,88 @@
 
 #include "iceberg/manifest_entry.h"
 #include "iceberg/manifest_list.h"
+#include "iceberg/result.h"
 #include "iceberg/schema.h"
+#include "iceberg/table_metadata.h"
 #include "iceberg/util/macros.h"
 #include "iceberg/v1_metadata.h"
 #include "iceberg/v2_metadata.h"
 #include "iceberg/v3_metadata.h"
 
 namespace iceberg {
 
-Status ManifestWriter::Add(const ManifestEntry& entry) {
+Status ManifestWriter::WriteAddedEntry(std::shared_ptr<DataFile> file,
+                                       std::optional<int64_t> 
data_sequence_number) {
+  ManifestEntry added;
+  added.status = ManifestStatus::kAdded;
+  added.snapshot_id = adapter_->snapshot_id();
+  added.data_file = std::move(file);

Review Comment:
   Since DataFile is a struct, I can not think of a better way than adding a 
Clone method to DataFile, any suggestion?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to