wgtmac commented on code in PR #321:
URL: https://github.com/apache/iceberg-cpp/pull/321#discussion_r2534382430
##########
src/iceberg/transaction.h:
##########
@@ -39,6 +39,76 @@ class ICEBERG_EXPORT Transaction {
/// \return this transaction's table
virtual const std::shared_ptr<Table>& table() const = 0;
+ /// \brief Create a new schema addition operation
+ ///
+ /// \return a new AddSchema
+ virtual std::shared_ptr<AddSchema> AddSchema() = 0;
Review Comment:
```suggestion
virtual std::unique_ptr<AddSchema> AddSchema() = 0;
```
I'd suggest returning std::unique_ptr for all actions here and below.
##########
src/iceberg/transaction.h:
##########
@@ -39,6 +39,76 @@ class ICEBERG_EXPORT Transaction {
/// \return this transaction's table
virtual const std::shared_ptr<Table>& table() const = 0;
+ /// \brief Create a new schema addition operation
+ ///
+ /// \return a new AddSchema
+ virtual std::shared_ptr<AddSchema> AddSchema() = 0;
+
+ /// \brief Create a new set current schema operation
+ ///
+ /// \param schema_id the schema id to set as current
+ /// \return a new SetCurrentSchema
+ virtual std::shared_ptr<SetCurrentSchema> SetCurrentSchema(int32_t
schema_id) = 0;
+
+ /// \brief Create a new remove schemas operation
+ ///
+ /// \param schema_ids the schema ids to remove
+ /// \return a new RemoveSchemas
+ virtual std::shared_ptr<RemoveSchemas> RemoveSchemas(
+ const std::vector<int32_t>& schema_ids) = 0;
Review Comment:
```suggestion
std::span<const int32_t> schema_ids) = 0;
```
Should we use span to accept broader range of input types for here and below?
--
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]