You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2021/05/20 06:14:00 UTC

[jira] [Resolved] (SPARK-28551) CTAS SQL with LOCATION properties won't check location path, cause data under this location lose

     [ https://issues.apache.org/jira/browse/SPARK-28551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wenchen Fan resolved SPARK-28551.
---------------------------------
    Fix Version/s: 3.2.0
       Resolution: Fixed

Issue resolved by pull request 32411
[https://github.com/apache/spark/pull/32411]

> CTAS SQL with LOCATION properties won't check location path, cause data under this location lose
> ------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-28551
>                 URL: https://issues.apache.org/jira/browse/SPARK-28551
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.4.0
>            Reporter: angerszhu
>            Priority: Major
>             Fix For: 3.2.0
>
>
> When we run SQL like 
> {code:java}
> CRETE TABLE TBL 
> LOCATION 'PATH_URI'
> AS
> SELECT QUERY{code}
> It won't check PATH_URI status, if there is some data under this path, it will just overwrite this path.
> If user careless write a path with important data store under the path, it will be a disaster。 
> Thought about add a checker in Catalyst for this situation.
> In addition, if it fails to delete the old path completely, old data and new data coexists. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org