shenjiayu17 commented on code in PR #5828:
URL: https://github.com/apache/hudi/pull/5828#discussion_r909171336


##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/MergeIntoHoodieTableCommand.scala:
##########
@@ -213,6 +221,26 @@ case class MergeIntoHoodieTableCommand(mergeInto: 
MergeIntoTable) extends Hoodie
     }
   }
 
+  /**
+   * Check whether expression of preCombine field have the same column name 
with target column.
+   *
+   * Merge expression cases that return true:
+   * 1) merge into .. on .. update set ts = s0.ts
+   * 2) merge into .. on .. update set ts = cast(s0.ts as int)
+   * 3) merge into .. on .. update set ts = s0.ts+1 (expressions like this 
whose sub node has the same column name with target)
+   * "ts" is preCombine field of h0.
+   */
+  private def isEqualToTargetPreCombineField(targetColumnName: String, 
sourceExpression: Expression): Boolean = {

Review Comment:
   Thanks for explaining, I agree with you.
   I have modified it with your suggestion above.



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