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 1C12211352 for ; Wed, 14 May 2014 16:42:20 +0000 (UTC) Received: (qmail 52467 invoked by uid 500); 13 May 2014 18:46:18 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 52236 invoked by uid 500); 13 May 2014 18:46:18 -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 52113 invoked by uid 500); 13 May 2014 18:46:18 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 51982 invoked by uid 99); 13 May 2014 18:46:18 -0000 Received: from Unknown (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 May 2014 18:46:18 +0000 Date: Tue, 13 May 2014 18:46:18 +0000 (UTC) From: "Mariano Dominguez (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-7046) Propagate addition of new columns to partition schema 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-7046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mariano Dominguez updated HIVE-7046: ------------------------------------ Affects Version/s: 0.11.0 0.13.0 > Propagate addition of new columns to partition schema > ----------------------------------------------------- > > Key: HIVE-7046 > URL: https://issues.apache.org/jira/browse/HIVE-7046 > Project: Hive > Issue Type: Improvement > Components: Database/Schema > Affects Versions: 0.11.0, 0.12.0, 0.13.0 > Reporter: Mariano Dominguez > > Hive reads data according to the partition schema, not the table schema (because of HIVE-3833). ALTER TABLE only updates the table schema, and the changes are not propagated to partitions. Thus, the schema of a partition will differ from that of the table after altering the table schema; this is done to preserve the ability to read existing data, particularly when using binary formats such as RCFile. Binary formats do not allow changing the type of a field because of the way serialization works; a field serialized as a string will be displayed incorrectly if read as an integer. > Unfortunately, as a side effect, this behavior limits the ability to add new columns to already exiting partitions using ALTER TABLE ADD COLUMNS. A possible workaround is to manually recreate the partitions, but this process could be unnecessarily cumbersome if the number of partitions is high. New columns should be propagated to existing partitions automatically instead. -- This message was sent by Atlassian JIRA (v6.2#6252)