You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Yongzhi Chen (JIRA)" <ji...@apache.org> on 2015/08/02 13:47:04 UTC
[jira] [Updated] (HIVE-11319) CTAS with location qualifier
overwrites directories
[ https://issues.apache.org/jira/browse/HIVE-11319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yongzhi Chen updated HIVE-11319:
--------------------------------
Attachment: HIVE-11319.1.patch
> CTAS with location qualifier overwrites directories
> ---------------------------------------------------
>
> Key: HIVE-11319
> URL: https://issues.apache.org/jira/browse/HIVE-11319
> Project: Hive
> Issue Type: Bug
> Components: Parser
> Affects Versions: 0.14.0, 1.0.0, 1.2.0
> Reporter: Yongzhi Chen
> Assignee: Yongzhi Chen
> Attachments: HIVE-11319.1.patch
>
>
> CTAS with location clause acts as an insert overwrite. This can cause problems when there sub directories with in a directory.
> This cause some users accidentally wipe out directories with very important data. We should ban CTAS with location to a non-empty directory.
> Reproduce:
> create table ctas1
> location '/Users/ychen/tmp'
> as
> select * from jsmall limit 10;
> create table ctas2
> location '/Users/ychen/tmp'
> as
> select * from jsmall limit 5;
> Both creates will succeed. But value in table ctas1 will be replaced by ctas2 accidentally.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)