[SPARK-29324][SQL] Fix overwrite behaviour for saveAsTable #25995
[SPARK-29324][SQL] Fix overwrite behaviour for saveAsTable #25995karuppayya wants to merge 2 commits intoapache:masterfrom
Conversation
|
Can one of the admins verify this patch? |
|
Can someone help review this change |
|
Sorry, but I miss you point; this is not an expected behaivour? metadata also should be overwritten in the overwrite mode? |
|
Without the change, an external table become a managed table, the file format could change as well(Say table was created using Orc file format, after overwrite it will change to parquet which is the default FF)
|
|
Can someone review this change? |
|
|
Also during
@cloud-fan Any thoughts on these? |
This is a bug that we should fix. But I'm not sure this would happen as we explicitly drop and re-create the table.
This behavior makes sense if you think about it as |
|
Closing this per discussed above. |
What changes were proposed in this pull request?
When saveAstable is used in overwrite mode, the metadata of the table gets overwritten.
In this PR, adding changes to retain the metadata after overwrite to an existing table
Why are the changes needed?
The tables metadata gets overwritten without this change
Does this PR introduce any user-facing change?
No
How was this patch tested?
Added Unit tests