flyrain commented on code in PR #6898:
URL: https://github.com/apache/iceberg/pull/6898#discussion_r1114837323


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/ChangelogIterator.java:
##########
@@ -147,19 +163,6 @@ private int[] generateIndicesForIdentifySameRow(Row row) {
     return indices;
   }
 
-  private Row[] createUpdateChangelog(
-      GenericRowWithSchema currentRow, GenericRowWithSchema nextRow) {
-    GenericInternalRow deletedRow = new 
GenericInternalRow(currentRow.values());
-    GenericInternalRow insertedRow = new GenericInternalRow(nextRow.values());
-
-    deletedRow.update(changeTypeIndex, UPDATE_BEFORE);
-    insertedRow.update(changeTypeIndex, UPDATE_AFTER);
-
-    return new Row[] {
-      RowFactory.create(deletedRow.values()), 
RowFactory.create(insertedRow.values())
-    };
-  }
-
   private boolean isCarryoverRecord(Row currentRow, Row nextRow) {
     for (int idx : indicesForIdentifySameRow) {
       if (!isColumnSame(currentRow, nextRow, idx)) {

Review Comment:
   To precompute would be faster than to check within the loop.  More details 
are in 
https://github.com/apache/iceberg/pull/6344/files/e813670402459901ed4f2b36cb24349145b705ac#r1060949312.
 



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