Github user dongjoon-hyun commented on the issue:
https://github.com/apache/spark/pull/14086
Hi, @srowen .
I'm looking at your advice more. Here is my summary so far in general.
**SaveMode.TRUNCATE**
- Truncate the content only, not a structure of existing data source.
- I prefer this mode raises exception if there is a problem.
(I mean it's not safe for the users to have `SaveMode.Overwrite` as a the
fallback operation.)
- The (SCC) is the key.
**Behavior (how to handle an check schema compatibility)**
- JDBC: USE `TRUCATE TABLE` if the source has the same dialect (SAME DB),
the same schema(name, type, nullability, order).
- File-based Source(like JSON): DELETE FILE ONLY if the inferred schema is
identical (Directory means partitions.)
Dose this make sense to you? If I missed some of your advice, please let me
know.
---
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]