nsivabalan commented on code in PR #9123:
URL: https://github.com/apache/hudi/pull/9123#discussion_r1257548654
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala:
##########
@@ -1094,6 +1094,11 @@ object HoodieSparkSqlWriter {
if (mergedParams.contains(PRECOMBINE_FIELD.key())) {
mergedParams.put(HoodiePayloadProps.PAYLOAD_ORDERING_FIELD_PROP_KEY,
mergedParams(PRECOMBINE_FIELD.key()))
}
+ if (mergedParams.get(OPERATION.key()).get == INSERT_OPERATION_OPT_VAL &&
mergedParams.contains(DataSourceWriteOptions.INSERT_DUP_POLICY.key())
+ && mergedParams.get(DataSourceWriteOptions.INSERT_DUP_POLICY.key()).get
!= FAIL_INSERT_DUP_POLICY) {
+ // enable merge allow duplicates when operation type is insert
+
mergedParams.put(HoodieWriteConfig.MERGE_ALLOW_DUPLICATE_ON_INSERTS_ENABLE.key(),
"true")
Review Comment:
this is not de-dup. this is actually achieving what you are claiming Danny.
i.e.
if you ingest RK1, val1 in commit and RK1, val2 in commit2 with insert
operation type, snapshot will return both values only when you set
"MERGE_ALLOW_DUPLICATE_ON_INSERTS_ENABLE.key" = true.
--
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]