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 B181E10442 for ; Tue, 14 Jan 2014 00:50:02 +0000 (UTC) Received: (qmail 46730 invoked by uid 500); 14 Jan 2014 00:48:55 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 46346 invoked by uid 500); 14 Jan 2014 00:48:53 -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 46297 invoked by uid 500); 14 Jan 2014 00:48:52 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 46292 invoked by uid 99); 14 Jan 2014 00:48:51 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jan 2014 00:48:51 +0000 Date: Tue, 14 Jan 2014 00:48:51 +0000 (UTC) From: "Ashutosh Chauhan (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-6185) DDLTask is inconsistent in creating a table and adding a partition when dealing with location 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-6185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ashutosh Chauhan updated HIVE-6185: ----------------------------------- Resolution: Fixed Fix Version/s: 0.13.0 Status: Resolved (was: Patch Available) Committed to trunk. Thanks, Xuefu! > DDLTask is inconsistent in creating a table and adding a partition when dealing with location > --------------------------------------------------------------------------------------------- > > Key: HIVE-6185 > URL: https://issues.apache.org/jira/browse/HIVE-6185 > Project: Hive > Issue Type: Bug > Components: Query Processor > Affects Versions: 0.12.0 > Reporter: Xuefu Zhang > Assignee: Xuefu Zhang > Fix For: 0.13.0 > > Attachments: HIVE-6185.1.patch, HIVE-6185.2.patch, HIVE-6185.3.patch, HIVE-6185.patch, HIVE-6185.patch > > > When creating a table, Hive uses URI to represent location: > {code} > if (crtTbl.getLocation() != null) { > tbl.setDataLocation(new Path(crtTbl.getLocation()).toUri()); > } > {code} > When adding a partition, Hive uses Path to represent location: > {code} > // set partition path relative to table > db.createPartition(tbl, addPartitionDesc.getPartSpec(), new Path(tbl > .getPath(), addPartitionDesc.getLocation()), addPartitionDesc.getPartParams(), > addPartitionDesc.getInputFormat(), > addPartitionDesc.getOutputFormat(), > addPartitionDesc.getNumBuckets(), > addPartitionDesc.getCols(), > addPartitionDesc.getSerializationLib(), > addPartitionDesc.getSerdeParams(), > addPartitionDesc.getBucketCols(), > addPartitionDesc.getSortCols()); > {code} > This disparity makes the values stored in metastore be encoded differently, causing problems w.r.t. special character as demonstrated in HIVE-5446. As a result, the code dealing with location for table is different for partition, creating maintenance burden. > We need to standardize it to Path to be in line with other Path related cleanup effort. -- This message was sent by Atlassian JIRA (v6.1.5#6160)