Davis-Zhang-Onehouse commented on code in PR #12798:
URL: https://github.com/apache/hudi/pull/12798#discussion_r1966119010
##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/MergeIntoHoodieTableCommand.scala:
##########
@@ -53,10 +53,17 @@ import
org.apache.spark.sql.hudi.command.payload.ExpressionPayload
import org.apache.spark.sql.hudi.command.payload.ExpressionPayload._
import org.apache.spark.sql.types.{BooleanType, StructField, StructType}
+import java.util
Review Comment:
removed
##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/MergeIntoHoodieTableCommand.scala:
##########
@@ -819,9 +797,7 @@ case class MergeIntoHoodieTableCommand(mergeInto:
MergeIntoTable) extends Hoodie
// 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 (RecordMergeMode.EVENT_TIME_ORDERING.name()
-
.equals(getStringWithAltKeys(props.asJava.asInstanceOf[java.util.Map[String,
Object]],
- HoodieTableConfig.RECORD_MERGE_MODE))) {
Review Comment:
Use foreach if we don't care about the lambda return. Use map otherwise.
Foreach is equivalent to
option match { case Some(x) => f(x) case None => () }
Map is equivalent to
option match { case Some(x) => Some(f(x)) case None => None }
--
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]