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

angerszhu updated SPARK-28551:
------------------------------
    Description: 
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.

> 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: Wish
>          Components: SQL
>    Affects Versions: 2.4.0, 3.0.0
>            Reporter: angerszhu
>            Priority: Major
>              Labels: SQL
>
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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

Reply via email to