From issues-return-191795-archive-asf-public=cust-asf.ponee.io@hive.apache.org Tue Jun 2 10:35:03 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 65DC918064C for ; Tue, 2 Jun 2020 12:35:03 +0200 (CEST) Received: (qmail 51619 invoked by uid 500); 2 Jun 2020 10:35:02 -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 51610 invoked by uid 99); 2 Jun 2020 10:35:02 -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; Tue, 02 Jun 2020 10:35:02 +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 D694AE2D8D for ; Tue, 2 Jun 2020 10:35:01 +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 7D806780688 for ; Tue, 2 Jun 2020 10:35:00 +0000 (UTC) Date: Tue, 2 Jun 2020 10:35:00 +0000 (UTC) From: "ASF GitHub Bot (Jira)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-23358) MSCK REPAIR should remove all insignificant zeroes from partition values (for numeric datatypes) before creating the partitions 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-23358?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated HIVE-23358: ---------------------------------- Labels: pull-request-available (was: ) > MSCK REPAIR should remove all insignificant zeroes from partition values = (for numeric datatypes) before creating the partitions > -------------------------------------------------------------------------= ------------------------------------------------------ > > Key: HIVE-23358 > URL: https://issues.apache.org/jira/browse/HIVE-23358 > Project: Hive > Issue Type: Bug > Components: Standalone Metastore > Affects Versions: 4.0.0 > Reporter: Adesh Kumar Rao > Assignee: Adesh Kumar Rao > Priority: Minor > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > For the following scenario > 1. Have partitioned data path as follows. > hdfs://mycluster/datapath/t1/year=3D2020/month=3D03/day=3D10 > hdfs://mycluster/datapath/t1/year=3D2020/month=3D03/day=3D11 > 2. create external table t1 (key int, value string) partitioned by (Year = int, Month int, Day int) stored as orc location hdfs://mycluster/datapath/t= 1''; > 3. msck repair table t1; > 4. show partitions t1;=C2=A0 > {noformat} > +----------------------------+ > | partition | > +----------------------------+ > | year=3D2020/month=3D03/day=3D10 | > | year=3D2020/month=3D03/day=3D11 | > +----------------------------+ > {noformat} > 5.show table extended like 't1' partition (Year=3D2020, Month=3D03, Day= =3D11);=20 > will throw an error: > {noformat} > Error: Error while compiling statement: FAILED: SemanticException [Error = 10006]: Partition not found {year=3D2020, month=3D3, day=3D11} (state=3D420= 00,code=3D10006) > {noformat} > When the partition directory are created without the extra zeroes, this w= orks fine. > {noformat} > hdfs://mycluster/datapath/t1/year=3D2020/month=3D3/day=3D10 > hdfs://mycluster/datapath/t1/year=3D2020/month=3D3/day=3D11 > {noformat} > This happens because while searching for partitions, hive strips the extr= a "0" in month key and then queries the metastore (partSpec=3D"year=3D2020/= month=3D3/day=3D10") which returns no rows. -- This message was sent by Atlassian Jira (v8.3.4#803005)