nsivabalan commented on a change in pull request #2188:
URL: https://github.com/apache/hudi/pull/2188#discussion_r549017785



##########
File path: 
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/SparkWriteHelper.java
##########
@@ -62,7 +62,7 @@ public static SparkWriteHelper newInstance() {
       // we cannot allow the user to change the key or partitionPath, since 
that will affect
       // everything
       // so pick it from one of the records.
-      return new HoodieRecord<T>(rec1.getKey(), reducedData);
+      return new HoodieRecord<T>(rec1.getData().equals(reducedData) ? 
rec1.getKey() : rec2.getKey(), reducedData);

Review comment:
       not sure why this is required. this is within reduceByKey and so 
rec1.getKey and rec2.getKey should be same right? 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to