Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 265E1183E3 for ; Tue, 4 Aug 2015 18:25:05 +0000 (UTC) Received: (qmail 39010 invoked by uid 500); 4 Aug 2015 18:25:05 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 38983 invoked by uid 500); 4 Aug 2015 18:25:05 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 38947 invoked by uid 99); 4 Aug 2015 18:25:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Aug 2015 18:25:04 +0000 Date: Tue, 4 Aug 2015 18:25:04 +0000 (UTC) From: "Szehon Ho (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-11319) CTAS with location qualifier overwrites directories MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-11319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Szehon Ho updated HIVE-11319: ----------------------------- Labels: backward-incompatible (was: ) > 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 > Labels: backward-incompatible > Attachments: HIVE-11319.1.patch, HIVE-11319.2.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)