Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6A84F200CCB for ; Thu, 20 Jul 2017 19:04:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 68C0816BB15; Thu, 20 Jul 2017 17:04:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AE9B916BB14 for ; Thu, 20 Jul 2017 19:04:04 +0200 (CEST) Received: (qmail 5670 invoked by uid 500); 20 Jul 2017 17:04:02 -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 5529 invoked by uid 99); 20 Jul 2017 17:04:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2017 17:04:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 78FEA1A1B1A for ; Thu, 20 Jul 2017 17:04:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id t8ktWV7ZD_BT for ; Thu, 20 Jul 2017 17:04:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 1D06860D34 for ; Thu, 20 Jul 2017 17:04:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6950DE08B7 for ; Thu, 20 Jul 2017 17:04:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 21C3A21EBE for ; Thu, 20 Jul 2017 17:04:00 +0000 (UTC) Date: Thu, 20 Jul 2017 17:04:00 +0000 (UTC) From: "Barna Zsombor Klara (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-17001) Insert overwrite table doesn't clean partition directory on HDFS if partition is missing from HMS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 20 Jul 2017 17:04:05 -0000 [ https://issues.apache.org/jira/browse/HIVE-17001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Barna Zsombor Klara updated HIVE-17001: --------------------------------------- Status: Open (was: Patch Available) Cancelling the patch as after some discussions it was decided that this should not be an issue. Data in the directory could be copied there on purpose by the user and should not be deleted without a warning. > Insert overwrite table doesn't clean partition directory on HDFS if partition is missing from HMS > ------------------------------------------------------------------------------------------------- > > Key: HIVE-17001 > URL: https://issues.apache.org/jira/browse/HIVE-17001 > Project: Hive > Issue Type: Bug > Components: HiveServer2, Metastore > Reporter: Barna Zsombor Klara > Assignee: Barna Zsombor Klara > Attachments: HIVE-17001.01.patch > > > Insert overwrite table should clear existing data before creating the new data files. > For a partitioned table we will clean any folder of existing partitions on HDFS, however if the partition folder exists only on HDFS and the partition definition is missing in HMS, the folder is not cleared. > Reproduction steps: > 1. CREATE TABLE test( col1 string) PARTITIONED BY (ds string); > 2. INSERT INTO test PARTITION(ds='p1') values ('a'); > 3. Copy the data to a different folder with different name. > 4. ALTER TABLE test DROP PARTITION (ds='p1'); > 5. Recreate the partition directory, copy and rename the data file back > 6. INSERT OVERWRITE TABLE test PARTITION(ds='p1') values ('b'); > 7. SELECT * from test; > will result in 2 records being returned instead of 1. -- This message was sent by Atlassian JIRA (v6.4.14#64029)