Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 05CB71869B for ; Sun, 6 Dec 2015 20:16:46 +0000 (UTC) Received: (qmail 97572 invoked by uid 500); 6 Dec 2015 20:16:11 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 97398 invoked by uid 500); 6 Dec 2015 20:16:11 -0000 Mailing-List: contact dev-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 dev@hive.apache.org Received: (qmail 97318 invoked by uid 99); 6 Dec 2015 20:16:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Dec 2015 20:16:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 0F7012C1F5A for ; Sun, 6 Dec 2015 20:16:11 +0000 (UTC) Date: Sun, 6 Dec 2015 20:16:11 +0000 (UTC) From: "Toby Allsopp (JIRA)" To: dev@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HIVE-12604) Cannot drop a table after creating an index and then renaming to a different database MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Toby Allsopp created HIVE-12604: ----------------------------------- Summary: Cannot drop a table after creating an index and then renaming to a different database Key: HIVE-12604 URL: https://issues.apache.org/jira/browse/HIVE-12604 Project: Hive Issue Type: Bug Affects Versions: 1.2.1 Environment: Hortonworks Sandbox VM with HDP 2.3 Reporter: Toby Allsopp Priority: Minor {noformat} Connected to: Apache Hive (version 1.2.1.2.3.0.0-2557) Driver: Hive JDBC (version 1.2.1.2.3.0.0-2557) 0: jdbc:hive2://localhost:10000> create database db1; No rows affected (0.997 seconds) 0: jdbc:hive2://localhost:10000> create database db2; No rows affected (0.968 seconds) 0: jdbc:hive2://localhost:10000> create table db1.test (col1 int); No rows affected (1.758 seconds) 0: jdbc:hive2://localhost:10000> create index idx1 on table db1.test(col1) as 'compact' with deferred rebuild; No rows affected (0.287 seconds) 0: jdbc:hive2://localhost:10000> alter index idx1 on db1.test rebuild; INFO : Tez session hasn't been created yet. Opening session INFO : INFO : Status: Running (Executing on YARN cluster with App id application_1449025977131_0007) INFO : Map 1: -/- Reducer 2: 0/1 INFO : Map 1: -/- Reducer 2: 0(+1)/1 INFO : Map 1: -/- Reducer 2: 0/1 INFO : Map 1: -/- Reducer 2: 1/1 INFO : Loading data to table db1.db1__test_idx1__ from hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse/db1.db/b1__test_idx1__/.hive-staging_hive_2015-12-04_02-02-47_278_3621654884902999047-10/-ext-10000 INFO : Table db1.db1__test_idx1__ stats: [numFiles=1, numRows=0, totalSize=0, rawDataSize=0] No rows affected (7.792 seconds) 0: jdbc:hive2://localhost:10000> alter table db1.test rename to db2.test; No rows affected (0.261 seconds) 0: jdbc:hive2://localhost:10000> drop table db2.test; Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLask. MetaException(message:db2.db1__test_idx1__ table not found) (state=08S01,code=1) {noformat} Basically it looks like the rename to a different database left the index table in the old database. -- This message was sent by Atlassian JIRA (v6.3.4#6332)