fresh-borzoni commented on code in PR #296:
URL: https://github.com/apache/fluss-rust/pull/296#discussion_r2788436795


##########
bindings/cpp/include/fluss.hpp:
##########
@@ -932,6 +936,61 @@ class Table {
     mutable std::shared_ptr<GenericRow::ColumnMap> column_map_;
 };
 
+class TableAppend {
+   public:
+    TableAppend(const TableAppend&) = delete;
+    TableAppend& operator=(const TableAppend&) = delete;
+    TableAppend(TableAppend&&) noexcept = default;
+    TableAppend& operator=(TableAppend&&) noexcept = default;
+
+    Result CreateWriter(AppendWriter& out);
+
+   private:
+    friend class Table;
+    explicit TableAppend(ffi::Table* table) noexcept;
+
+    ffi::Table* table_{nullptr};
+};

Review Comment:
   We already have the same in TableScan, I would avoid shared_ptr for now as 
it would complicate the CXX bridge. 
   The risk is only when someone decides to store builder and then explicitly 
destroy or move the original table before using the buillder, so I would just 
add a comment in upcoming doc to discourage this and avoid additional 
complexity with shared ownership



-- 
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]

Reply via email to