kazdy commented on code in PR #7269:
URL: https://github.com/apache/hudi/pull/7269#discussion_r1029589433
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/ProvidesHoodieConfig.scala:
##########
@@ -165,10 +165,14 @@ trait ProvidesHoodieConfig extends Logging {
// Only validate duplicate key for COW, for MOR it will do the merge
with the DefaultHoodieRecordPayload
// on reading.
classOf[ValidateDuplicateKeyPayload].getCanonicalName
+ } else if (operation == INSERT_OPERATION_OPT_VAL &&
+ tableType == COW_TABLE_TYPE_OPT_VAL && hasPrecombineColumn == false &&
insertMode == InsertMode.STRICT){
+ classOf[ValidateDuplicateKeyPayload].getCanonicalName
Review Comment:
Although this works, I'm not sure if this is correct approach to add if here.
Should the operation here in this case be UPSERT_OPERATION_OPT_VAL rahter
than INSERT_OPERATION_OPT_VAL?
I decided to go stay with INSERT_OPERATION_OPT_VAL since UPSERT always
requires preCombineKey. At least from the perspective of a Hudi user.
--
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]