Github user ilganeli commented on the issue:

    https://github.com/apache/spark/pull/16685
  
    @gatorsmile That's exactly right - in our testing, writing to databases 
with unique constraints proved to be extremely difficult to do efficiently. 
That's why this approach moves the maintenance of the unique constraint into 
the application (in this case the upsert function). 
    
    This is obviously suboptimal because it weakens the database to some degree 
but I think there's still enough utility in allowing an update operation. I 
know there's certainly been enough demand for it online and it's a common use 
case. I think with proper documentation of the challenges of doing an upsert 
and the necessary considerations for the table being updated, this can be a 
very welcome addition to Spark. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to