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 BE986200C0D for ; Tue, 31 Jan 2017 22:22:56 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BD3B5160B52; Tue, 31 Jan 2017 21:22:56 +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 132D0160B36 for ; Tue, 31 Jan 2017 22:22:55 +0100 (CET) Received: (qmail 45794 invoked by uid 500); 31 Jan 2017 21:22:55 -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 45785 invoked by uid 99); 31 Jan 2017 21:22:55 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jan 2017 21:22:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A113BC09D9 for ; Tue, 31 Jan 2017 21:22:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id LBcw-IxzeHaI for ; Tue, 31 Jan 2017 21:22:53 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 0952C5F3FF for ; Tue, 31 Jan 2017 21:22:53 +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 196E6E02D5 for ; Tue, 31 Jan 2017 21:22:52 +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 CB9802528B for ; Tue, 31 Jan 2017 21:22:51 +0000 (UTC) Date: Tue, 31 Jan 2017 21:22:51 +0000 (UTC) From: "Alexander Behm (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] (HIVE-15653) Some ALTER TABLE commands drop table stats MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 31 Jan 2017 21:22:56 -0000 [ https://issues.apache.org/jira/browse/HIVE-15653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15847540#comment-15847540 ] Alexander Behm commented on HIVE-15653: --------------------------------------- Thanks, [~ctang.ma]. I've already added a workaround to Impala, but not using StatsSetupConst.DO_NOT_UPDATE_STATS because sometimes we do want to update stats (e.g. compute stats). See: http://gerrit.cloudera.org:8080/5731 > Some ALTER TABLE commands drop table stats > ------------------------------------------ > > Key: HIVE-15653 > URL: https://issues.apache.org/jira/browse/HIVE-15653 > Project: Hive > Issue Type: Bug > Components: Metastore > Affects Versions: 1.1.0 > Reporter: Alexander Behm > Assignee: Chaoyu Tang > Priority: Critical > Fix For: 2.2.0 > > Attachments: HIVE-15653.1.patch, HIVE-15653.2.patch, HIVE-15653.3.patch, HIVE-15653.4.patch, HIVE-15653.5.patch, HIVE-15653.6.patch, HIVE-15653.patch > > > Some ALTER TABLE commands drop the table stats. That may make sense for some ALTER TABLE operations, but certainly not for others. Personally, I I think ALTER TABLE should only change what was requested by the user without any side effects that may be unclear to users. In particular, collecting stats can be an expensive operation so it's rather inconvenient for users if they get wiped accidentally. > Repro: > {code} > create table t (i int); > insert into t values(1); > analyze table t compute statistics; > alter table t set tblproperties('test'='test'); > hive> describe formatted t; > OK > # col_name data_type comment > > i int > > # Detailed Table Information > Database: default > Owner: abehm > CreateTime: Tue Jan 17 18:13:34 PST 2017 > LastAccessTime: UNKNOWN > Protect Mode: None > Retention: 0 > Location: hdfs://localhost:20500/test-warehouse/t > Table Type: MANAGED_TABLE > Table Parameters: > COLUMN_STATS_ACCURATE false > last_modified_by abehm > last_modified_time 1484705748 > numFiles 1 > numRows -1 > rawDataSize -1 > test test > totalSize 2 > transient_lastDdlTime 1484705748 > > # Storage Information > SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe > InputFormat: org.apache.hadoop.mapred.TextInputFormat > OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat > Compressed: No > Num Buckets: -1 > Bucket Columns: [] > Sort Columns: [] > Storage Desc Params: > serialization.format 1 > Time taken: 0.169 seconds, Fetched: 34 row(s) > {code} > The same behavior can be observed with several other ALTER TABLE commands. -- This message was sent by Atlassian JIRA (v6.3.15#6346)