stevenzwu commented on code in PR #13310:
URL: https://github.com/apache/iceberg/pull/13310#discussion_r2193545442


##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/source/SparkPositionDeltaWrite.java:
##########
@@ -736,7 +769,14 @@ public void update(InternalRow meta, InternalRow id, 
InternalRow row) throws IOE
 
     @Override
     public void insert(InternalRow row) throws IOException {
-      delegate.insert(row, dataSpec, null);
+      reinsert(null, row);
+    }
+
+    @Override
+    public void reinsert(InternalRow meta, InternalRow row) throws IOException 
{

Review Comment:
   I looked at `DeltaWithMetadataWritingSparkTask` in Spark code. it seems to 
do what I suggested in another comment regarding using projection pattern.
   ```
           case UPDATE_OPERATION =>
             rowProjection.project(row)
             rowIdProjection.project(row)
             metadataProjection.project(row)
             writer.update(metadataProjection, rowIdProjection, rowProjection)
   ```



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to