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 1C4B0200C70 for ; Thu, 4 May 2017 22:44:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1B00F160B9B; Thu, 4 May 2017 20:44:09 +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 5FB3E160BB0 for ; Thu, 4 May 2017 22:44:08 +0200 (CEST) Received: (qmail 88916 invoked by uid 500); 4 May 2017 20:44:07 -0000 Mailing-List: contact dev-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 dev@hive.apache.org Received: (qmail 88478 invoked by uid 99); 4 May 2017 20:44:07 -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; Thu, 04 May 2017 20:44:06 +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 893CBCD252; Thu, 4 May 2017 20:44:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.25 X-Spam-Level: *** X-Spam-Status: No, score=3.25 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id MxfOvT7dlViy; Thu, 4 May 2017 20:44:04 +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 5806E5F4AA; Thu, 4 May 2017 20:44:04 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id EE605E008E; Thu, 4 May 2017 20:44:03 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id C36EDC401CB; Thu, 4 May 2017 20:44:03 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3186491967185534646==" MIME-Version: 1.0 Subject: Re: Review Request 58994: HIVE-16556 : Modify schematool scripts to initialize and create METASTORE_DB_PROPERTIES table From: Naveen Gangam To: Sergio Pena , Naveen Gangam , Sahil Takiar Cc: Vihang Karajgaonkar , hive Date: Thu, 04 May 2017 20:44:03 -0000 Message-ID: <20170504204403.33377.39974@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Naveen Gangam X-ReviewGroup: hive X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/58994/ X-Sender: Naveen Gangam References: <20170504153948.33377.55603@reviews-vm2.apache.org> In-Reply-To: <20170504153948.33377.55603@reviews-vm2.apache.org> X-ReviewBoard-Diff-For: metastore/scripts/upgrade/mysql/041-HIVE-16556.mysql.sql X-ReviewBoard-Diff-For: metastore/scripts/upgrade/derby/041-HIVE-16556.derby.sql X-ReviewBoard-Diff-For: metastore/scripts/upgrade/mssql/026-HIVE-16556.mssql.sql X-ReviewBoard-Diff-For: metastore/scripts/upgrade/oracle/041-HIVE-16556.oracle.sql X-ReviewBoard-Diff-For: metastore/scripts/upgrade/postgres/040-HIVE-16556.postgres.sql Reply-To: Naveen Gangam X-ReviewRequest-Repository: hive-git archived-at: Thu, 04 May 2017 20:44:09 -0000 --===============3186491967185534646== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58994/#review173952 ----------------------------------------------------------- beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java Lines 960 (patched) Could you please give me the context for this change? Looks like only the test code is using it for now. Thanks metastore/scripts/upgrade/derby/041-HIVE-16556.derby.sql Lines 1 (patched) The last column name "DESC" is a bit ambiguious. It is also a reserved keyword in Oracle (and perhaps others too). Can you change it to something a bit more descriptive. perhaps "DESCRIPTION" or "COMMENT" if it fits your needs. COMMENT is used by some other tables in HMS schema as well. So would be consistent as well (if it works for you that is) metastore/scripts/upgrade/derby/041-HIVE-16556.derby.sql Lines 2 (patched) The new schema table is entirely detached from the rest of the tables, aka no FK references. I am sure this is by design and me lacking the entire context. metastore/scripts/upgrade/derby/hive-schema-3.0.0.derby.sql Lines 109 (patched) nit: Could you move this to be just below the last current "CREATE TABLE" statement but before the first "CREATE INDEX"? It just implies a certain order, thats all. metastore/scripts/upgrade/mssql/026-HIVE-16556.mssql.sql Lines 5 (patched) nit: I am guessing you had to insert quotes around "DESC" because it being a reserved word. This makes the definition inconsistent with other columns in this table that do not have the surrounding "". Changing the column name as suggested above should solve this as well. metastore/scripts/upgrade/mysql/hive-schema-3.0.0.mysql.sql Lines 835 (patched) nit: Can you move this "create table" to be just under the last current "create table" ? metastore/scripts/upgrade/oracle/041-HIVE-16556.oracle.sql Lines 6 (patched) nit: same as above metastore/scripts/upgrade/oracle/hive-schema-3.0.0.oracle.sql Lines 802 (patched) nit: same as above where the create table needs to be under the last current "create table" metastore/scripts/upgrade/postgres/040-HIVE-16556.postgres.sql Lines 6 (patched) nit: same as above metastore/scripts/upgrade/postgres/hive-schema-3.0.0.postgres.sql Lines 609 (patched) nit: same as above with ordering in the file. - Naveen Gangam On May 4, 2017, 3:39 p.m., Vihang Karajgaonkar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58994/ > ----------------------------------------------------------- > > (Updated May 4, 2017, 3:39 p.m.) > > > Review request for hive, Naveen Gangam, Sergio Pena, and Sahil Takiar. > > > Bugs: HIVE-16556 > https://issues.apache.org/jira/browse/HIVE-16556 > > > Repository: hive-git > > > Description > ------- > > HIVE-16556 : Modify schematool scripts to initialize and create METASTORE_DB_PROPERTIES table > > > Diffs > ----- > > beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java 7dd4d5f0a25ce4306b85facb87b0c02f59d29a16 > itests/hive-unit/src/test/java/org/apache/hive/beeline/TestSchemaTool.java 604c2345fcf04c877a8d257b9eef4610a58aea51 > metastore/scripts/upgrade/derby/041-HIVE-16556.derby.sql PRE-CREATION > metastore/scripts/upgrade/derby/hive-schema-3.0.0.derby.sql 8877681e05f9d9ecb3bec5d8579772b386dc7f08 > metastore/scripts/upgrade/derby/upgrade-2.3.0-to-3.0.0.derby.sql 3bba5235eb630e4ee5d14bf7f163dfb7166df0ed > metastore/scripts/upgrade/mssql/026-HIVE-16556.mssql.sql PRE-CREATION > metastore/scripts/upgrade/mssql/hive-schema-3.0.0.mssql.sql 98682a83760f89aec441af3f6cb5ff03f5251496 > metastore/scripts/upgrade/mssql/upgrade-2.3.0-to-3.0.0.mssql.sql 94d18a34d37dea44a684242cbe1bdc5c3784d2e6 > metastore/scripts/upgrade/mysql/041-HIVE-16556.mysql.sql PRE-CREATION > metastore/scripts/upgrade/mysql/hive-schema-3.0.0.mysql.sql 4db2f34159d6650fab4179d1478c6c91c72b5351 > metastore/scripts/upgrade/mysql/upgrade-2.3.0-to-3.0.0.mysql.sql e5d82e10160c2eab8571b3cd8f3078fbebcf3c5c > metastore/scripts/upgrade/oracle/041-HIVE-16556.oracle.sql PRE-CREATION > metastore/scripts/upgrade/oracle/hive-schema-3.0.0.oracle.sql 7907c59f35a4575a614fdfd0419486156130ab23 > metastore/scripts/upgrade/oracle/upgrade-2.3.0-to-3.0.0.oracle.sql 31c4f5dfbd94fd52317ad0cd65517e09925767f7 > metastore/scripts/upgrade/postgres/040-HIVE-16556.postgres.sql PRE-CREATION > metastore/scripts/upgrade/postgres/hive-schema-3.0.0.postgres.sql 49976d070d8a7ac825bb3920fa01f7d328aada9d > metastore/scripts/upgrade/postgres/upgrade-2.3.0-to-3.0.0.postgres.sql 2dd9bb9bfb607529f3ab9be4dccab34f26375e4f > > > Diff: https://reviews.apache.org/r/58994/diff/1/ > > > Testing > ------- > > 1. Used the testutils/metastore/metastore-upgrade-test.sh script to test against postgres, mysql and derby database. > 2. Manually tested against Oracle and MSSQL databases > 3. Added unit-test to cover derby as well. > > > Thanks, > > Vihang Karajgaonkar > > --===============3186491967185534646==--