nsivabalan commented on issue #16802: URL: https://github.com/apache/hudi/issues/16802#issuecomment-4795640675
This appears to be fixed on master by [PR #14052](https://github.com/apache/hudi/pull/14052) (commit `4f80914b2030`, _fix: Allow INSERT INTO sql to preserve duplicates values by default_). The two relevant changes: 1. `ProvidesHoodieConfig.deduceSparkSqlInsertIntoWriteOperation` no longer silently rewrites INSERT INTO to UPSERT when a preCombine/ordering field is present, so SQL INSERT INTO now actually runs as `WriteOperation.INSERT` as @nsivabalan called out in the PR review comment. 2. `HoodieSparkSqlWriter.scala` was changed from `mergedParams.put(MERGE_ALLOW_DUPLICATE_ON_INSERTS_ENABLE, "true")` to `mergedParams.getOrElseUpdate(...)`, so a user-set `hoodie.merge.allow.duplicate.on.inserts=false` is no longer clobbered. Coverage exists in `TestInsertTable3.scala` (`Test enable hoodie.merge.allow.duplicate.on.inserts when write`) which exercises both `false` (overwrite/dedup) and `true` (duplicates retained) flows. Closing as fixed in 1.1.0 — please reopen with a repro on a recent master build if you still see the original behavior. -- 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]
