cloud-fan commented on code in PR #49493:
URL: https://github.com/apache/spark/pull/49493#discussion_r1916053950


##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/write/DeltaWriter.java:
##########
@@ -48,6 +48,23 @@ public interface DeltaWriter<T> extends DataWriter<T> {
    */
   void update(T metadata, T id, T row) throws IOException;
 
+  /**
+   * Inserts a new row with metadata.
+   * <p>
+   * This method is used by row-level operations to handle metadata associated 
with updates
+   * that are split into deletes and inserts. For new records added during a 
MERGE operation,
+   * metadata column values are set to {@code null}.
+   *
+   * @param metadata values for metadata columns
+   * @param row a row to insert
+   * @throws IOException if failure happens during disk/network IO like 
writing files
+   *
+   * @since 4.0.0
+   */
+  default void insert(T metadata, T row) throws IOException {

Review Comment:
   shall we simply name the new `write` function in the base class as `insert`?



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