KnightChess commented on code in PR #6824:
URL: https://github.com/apache/hudi/pull/6824#discussion_r1002827833


##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/MergeIntoHoodieTableCommand.scala:
##########
@@ -160,7 +167,7 @@ case class MergeIntoHoodieTableCommand(mergeInto: 
MergeIntoTable) extends Hoodie
 
       // column order changed after left anti join , we should keep column 
order of source dataframe
       val cols = removeMetaFields(sourceDF).columns
-      executeInsertOnly(insertSourceDF.select(cols.head, cols.tail:_*), 
parameters)
+      executeInsertOnly(insertSourceDF.select(cols.head, cols.tail:_*), 
writeParam)

Review Comment:
   @xushiyan I think `executeInsertOnly` and `executeUpsert` is different from 
hudi op `insert` and `upsert`, just a condition branch for `merge into` sql. 
And for the SQL Semantic, I think `merge into` shoudl only be used to `upsert` 
op, and event shoudle not follow the hudi `precombineKey`, because  `merget 
into` sql has a lot of flexibility to update the record which we want.



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