JingsongLi commented on code in PR #1649:
URL: https://github.com/apache/incubator-paimon/pull/1649#discussion_r1274767449


##########
paimon-core/src/main/java/org/apache/paimon/table/sink/TableWrite.java:
##########
@@ -36,8 +37,19 @@ public interface TableWrite extends AutoCloseable {
     /** With {@link IOManager}, this is needed if 'write-buffer-spillable' is 
set to true. */
     TableWrite withIOManager(IOManager ioManager);
 
-    /** With {@link MemorySegmentPool} for the current table write. */
-    TableWrite withMemoryPool(MemorySegmentPool memoryPool);
+    /**
+     * With {@link MemorySegmentPool} for the current table write. Cannot be 
called with {@link
+     * #withMemoryPoolFactory} together.
+     */
+    default TableWrite withMemoryPool(MemorySegmentPool memoryPool) {
+        return withMemoryPoolFactory(new MemoryPoolFactory(memoryPool));
+    }
+
+    /**
+     * With {@link MemoryPoolFactory} for the current table write. Cannot be 
called with {@link
+     * #withMemoryPool} together.
+     */
+    TableWrite withMemoryPoolFactory(MemoryPoolFactory memoryPoolFactory);

Review Comment:
   Add this in `TableWriteImpl`. We can avoid making changes to this public 
classe



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