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 CE77D18F71 for ; Fri, 2 Oct 2015 01:54:26 +0000 (UTC) Received: (qmail 70528 invoked by uid 500); 2 Oct 2015 01:54:26 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 70503 invoked by uid 500); 2 Oct 2015 01:54:26 -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 70493 invoked by uid 99); 2 Oct 2015 01:54:26 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2015 01:54:26 +0000 Date: Fri, 2 Oct 2015 01:54:26 +0000 (UTC) From: "Chaoyu Tang (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-11786) Deprecate the use of redundant column in colunm stats related tables 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-11786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14940698#comment-14940698 ] Chaoyu Tang commented on HIVE-11786: ------------------------------------ The test failure is not related to the patch. > Deprecate the use of redundant column in colunm stats related tables > -------------------------------------------------------------------- > > Key: HIVE-11786 > URL: https://issues.apache.org/jira/browse/HIVE-11786 > Project: Hive > Issue Type: Bug > Components: Metastore > Reporter: Chaoyu Tang > Assignee: Chaoyu Tang > Attachments: HIVE-11786.1.patch, HIVE-11786.1.patch, HIVE-11786.2.patch, HIVE-11786.patch > > > The stats tables such as TAB_COL_STATS, PART_COL_STATS have redundant columns such as DB_NAME, TABLE_NAME, PARTITION_NAME since these tables already have foreign key like TBL_ID, or PART_ID referencing to TBLS or PARTITIONS. > These redundant columns violate database normalization rules and cause a lot of inconvenience (sometimes difficult) in column stats related feature implementation. For example, when renaming a table, we have to update TABLE_NAME column in these tables as well which is unnecessary. > This JIRA is first to deprecate the use of these columns at HMS code level. A followed JIRA is to be opened to focus on DB schema change and upgrade. -- This message was sent by Atlassian JIRA (v6.3.4#6332)