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 03F9E200C6F for ; Tue, 25 Apr 2017 00:31:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 02996160B99; Mon, 24 Apr 2017 22:31:11 +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 4B08F160BA5 for ; Tue, 25 Apr 2017 00:31:10 +0200 (CEST) Received: (qmail 10856 invoked by uid 500); 24 Apr 2017 22:31:08 -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 10838 invoked by uid 99); 24 Apr 2017 22:31:08 -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; Mon, 24 Apr 2017 22:31:08 +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 BAB521B0267 for ; Mon, 24 Apr 2017 22:31:07 +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-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 3Bh6L9PmH4Vv for ; Mon, 24 Apr 2017 22:31:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 8C56761F52 for ; Mon, 24 Apr 2017 22:31:05 +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 CCC93E0D3A for ; Mon, 24 Apr 2017 22:31:04 +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 32D7521B5A for ; Mon, 24 Apr 2017 22:31:04 +0000 (UTC) Date: Mon, 24 Apr 2017 22:31:04 +0000 (UTC) From: "Chaoyu Tang (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-16147) Rename a partitioned table should not drop its partition columns stats MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 24 Apr 2017 22:31:11 -0000 [ https://issues.apache.org/jira/browse/HIVE-16147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15982021#comment-15982021 ] Chaoyu Tang commented on HIVE-16147: ------------------------------------ Patch has been uploaded to RB. [~pxiong], could you help to review it. Thanks. > Rename a partitioned table should not drop its partition columns stats > ---------------------------------------------------------------------- > > Key: HIVE-16147 > URL: https://issues.apache.org/jira/browse/HIVE-16147 > Project: Hive > Issue Type: Bug > Reporter: Chaoyu Tang > Assignee: Chaoyu Tang > Attachments: HIVE-16147.patch > > > When a partitioned table (e.g. sample_pt) is renamed (e.g to sample_pt_rename), describing its partition shows that the partition column stats are still accurate, but actually they all have been dropped. > It could be reproduce as following: > 1. analyze table sample_pt compute statistics for columns; > 2. describe formatted default.sample_pt partition (dummy = 3): COLUMN_STATS for all columns are true > {code} > ... > # Detailed Partition Information > Partition Value: [3] > Database: default > Table: sample_pt > CreateTime: Fri Jan 20 15:42:30 EST 2017 > LastAccessTime: UNKNOWN > Location: file:/user/hive/warehouse/apache/sample_pt/dummy=3 > Partition Parameters: > COLUMN_STATS_ACCURATE {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"code\":\"true\",\"description\":\"true\",\"salary\":\"true\",\"total_emp\":\"true\"}} > last_modified_by ctang > last_modified_time 1485217063 > numFiles 1 > numRows 100 > rawDataSize 5143 > totalSize 5243 > transient_lastDdlTime 1488842358 > ... > {code} > 3: describe formatted default.sample_pt partition (dummy = 3) salary: column stats exists > {code} > # col_name data_type min max num_nulls distinct_count avg_col_len max_col_len num_trues num_falses comment > > salary int 1 151370 0 94 from deserializer > {code} > 4. alter table sample_pt rename to sample_pt_rename; > 5. describe formatted default.sample_pt_rename partition (dummy = 3): describe the rename table partition (dummy =3) shows that COLUMN_STATS for columns are still true. > {code} > # Detailed Partition Information > Partition Value: [3] > Database: default > Table: sample_pt_rename > CreateTime: Fri Jan 20 15:42:30 EST 2017 > LastAccessTime: UNKNOWN > Location: file:/user/hive/warehouse/apache/sample_pt_rename/dummy=3 > Partition Parameters: > COLUMN_STATS_ACCURATE {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"code\":\"true\",\"description\":\"true\",\"salary\":\"true\",\"total_emp\":\"true\"}} > last_modified_by ctang > last_modified_time 1485217063 > numFiles 1 > numRows 100 > rawDataSize 5143 > totalSize 5243 > transient_lastDdlTime 1488842358 > {code} > describe formatted default.sample_pt_rename partition (dummy = 3) salary: the column stats have been dropped. > {code} > # col_name data_type comment > > salary int from deserializer > Time taken: 0.131 seconds, Fetched: 3 row(s) > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)