From issues-return-189596-archive-asf-public=cust-asf.ponee.io@hive.apache.org Thu May 14 01:09:02 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 07D3A18064A for ; Thu, 14 May 2020 03:09:01 +0200 (CEST) Received: (qmail 25025 invoked by uid 500); 14 May 2020 01:09:01 -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 25015 invoked by uid 99); 14 May 2020 01:09:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 May 2020 01:09:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 88E15E103B for ; Thu, 14 May 2020 01:09:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 03FFE780076 for ; Thu, 14 May 2020 01:09:00 +0000 (UTC) Date: Thu, 14 May 2020 01:09:00 +0000 (UTC) From: "Mithun Antony (Jira)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-23390) Duplicate entry for a table in TAB_COL_STATS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-23390?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1710= 6766#comment-17106766 ]=20 Mithun Antony commented on HIVE-23390: -------------------------------------- Suggestion is to put a unique constraint in the TAB_COL_STATS=C2=A0 on colu= mns=C2=A0 DB_NAME, TABLE_NAME, COLUMN_NAME considering the fact that a ther= e will be only one record for a column=C2=A0 > Duplicate entry for a table in TAB_COL_STATS=20 > --------------------------------------------- > > Key: HIVE-23390 > URL: https://issues.apache.org/jira/browse/HIVE-23390 > Project: Hive > Issue Type: Bug > Components: Metastore > Affects Versions: 2.3.4 > Reporter: Mithun Antony > Priority: Major > > When *_analyze _* command was executed from presto to update the s= tats of a table for the first time from multiple cluster sharing the same H= ive metastore. Duplicate entry for the same table is inserted to the *_TAB_= COL_STATS_*=C2=A0table. > This lead to failure executing further *_analyze
_* commands.=C2= =A0 > {code:java} > Query failed: Multiple entries with same key: dummy=3DHiveColumnStatistic= s{integerStatistics=3DOptional[IntegerStatistics{min=3DOptionalLong[1], max= =3DOptionalLong[1]}], doubleStatistics=3DOptional.empty, decimalStatistics= =3DOptional.empty, dateStatistics=3DOptional.empty, booleanStatistics=3DOpt= ional.empty, maxValueSizeInBytes=3DOptionalLong.empty, totalSizeInBytes=3DO= ptionalLong.empty, nullsCount=3DOptionalLong[0], distinctValuesCount=3DOpti= onalLong[1]} and dummy=3DHiveColumnStatistics{integerStatistics=3DOptional[= IntegerStatistics{min=3DOptionalLong[1], max=3DOptionalLong[1]}], doubleSta= tistics=3DOptional.empty, decimalStatistics=3DOptional.empty, dateStatistic= s=3DOptional.empty, booleanStatistics=3DOptional.empty, maxValueSizeInBytes= =3DOptionalLong.empty, totalSizeInBytes=3DOptionalLong.empty, nullsCount=3D= OptionalLong[0], distinctValuesCount=3DOptionalLong[1]}. > {code} > Duplicate records in the *_TAB_COL_STATS_* > {code:java} > '7','default','dual','dummy','smallint','245671','1','1',NULL,NULL,NULL,N= ULL,'0','1',NULL,NULL,NULL,NULL,'1588345509' > '11','default','dual','dummy','smallint','245671','1','1',NULL,NULL,NULL= ,NULL,'0','1',NULL,NULL,NULL,NULL,'1588345509'{code} -- This message was sent by Atlassian Jira (v8.3.4#803005)