nsivabalan commented on code in PR #14046:
URL: https://github.com/apache/hudi/pull/14046#discussion_r2400609863


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/ProvidesHoodieConfig.scala:
##########
@@ -215,7 +215,11 @@ trait ProvidesHoodieConfig extends Logging {
     val insertDupPolicy = combinedOpts.getOrElse(INSERT_DUP_POLICY.key(), 
INSERT_DUP_POLICY.defaultValue())
     val isNonStrictMode = insertMode == InsertMode.NON_STRICT
     val isPartitionedTable = hoodieCatalogTable.partitionFields.nonEmpty
-    val combineBeforeInsert = !hoodieCatalogTable.orderingFields.isEmpty && 
hoodieCatalogTable.primaryKeys.nonEmpty
+    val combineBeforeInsert = if (sparkSqlInsertIntoOperationSet && 
sparkSqlInsertIntoOperation == "insert") {

Review Comment:
   we should check if user has not overriden this config 
(hoodie.combine.before.insert) and only then apply this. if not, we should 
honor what user sets in the sql session
   



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