Davis-Zhang-Onehouse commented on code in PR #12584:
URL: https://github.com/apache/hudi/pull/12584#discussion_r1914007077
##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/MergeIntoHoodieTableCommand.scala:
##########
@@ -797,32 +804,68 @@ case class MergeIntoHoodieTableCommand(mergeInto:
MergeIntoTable) extends Hoodie
}
}
- private def checkInsertingActions(insertActions: Seq[InsertAction]): Unit = {
+ private def checkInsertingActions(insertActions: Seq[InsertAction], props:
Map[String, String]): Unit = {
insertActions.foreach(insert =>
assert(insert.assignments.length <= targetTableSchema.length,
s"The number of insert assignments[${insert.assignments.length}] must
be less than or equal to the " +
s"targetTable field size[${targetTableSchema.length}]"))
-
+ // Precombine field and record key field must be present in the assignment
clause of all insert actions for event time ordering mode.
+ // Check has no effect if we don't have such fields in target table or we
don't have insert actions
+ // Please note we are relying on merge mode in the table config as writer
merge mode is always "CUSTOM" for MIT.
+ if (props.getOrElse(HoodieTableConfig.RECORD_MERGE_MODE.key(),
HoodieTableConfig.RECORD_MERGE_MODE.defaultValue()).toString
+ .equals(RecordMergeMode.EVENT_TIME_ORDERING.name())) {
+ insertActions.foreach(action =>
Review Comment:
yeah, nothing changes on that front
--
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]