wgtmac commented on code in PR #493:
URL: https://github.com/apache/iceberg-cpp/pull/493#discussion_r2672434053
##########
src/iceberg/manifest/manifest_writer.h:
##########
@@ -158,6 +158,26 @@ class ICEBERG_EXPORT ManifestWriter {
std::shared_ptr<PartitionSpec> partition_spec,
std::shared_ptr<Schema> current_schema, ManifestContent content);
+ /// \brief Factory function to create a writer for a manifest file based on
format
+ /// version.
+ /// \param format_version The format version (1, 2, 3, etc.).
+ /// \param snapshot_id ID of the snapshot.
+ /// \param manifest_location Path to the manifest file.
+ /// \param file_io File IO implementation to use.
+ /// \param partition_spec Partition spec for the manifest.
+ /// \param current_schema Schema containing the source fields referenced by
partition
+ /// spec.
+ /// \param content Content of the manifest (required for format_version >=
2).
+ /// \param first_row_id First row ID of the snapshot (required for
format_version >= 3).
+ /// \return A Result containing the writer or an error.
+ static Result<std::unique_ptr<ManifestWriter>> MakeWriter(
+ int8_t format_version, std::optional<int64_t> snapshot_id,
+ std::string_view manifest_location, std::shared_ptr<FileIO> file_io,
+ std::shared_ptr<PartitionSpec> partition_spec,
+ std::shared_ptr<Schema> current_schema,
+ std::optional<ManifestContent> content = std::nullopt,
Review Comment:
It seems that `ManifestContent content = ManifestContent::kData` is a better
option?
--
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]