You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by vi...@apache.org on 2018/06/15 17:26:29 UTC

hive git commit: HIVE-19605 : TAB_COL_STATS table has no index on db/table name (addendum) (Vihang Karajgaonkar reviewed by Yongzhi Chen)

Repository: hive
Updated Branches:
  refs/heads/branch-2 9d9167542 -> 342757bed


HIVE-19605 : TAB_COL_STATS table has no index on db/table name (addendum) (Vihang Karajgaonkar reviewed by Yongzhi Chen)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/342757be
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/342757be
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/342757be

Branch: refs/heads/branch-2
Commit: 342757bed571ae72cc18a56d3861d13e055f3c46
Parents: 9d91675
Author: Vihang Karajgaonkar <vi...@cloudera.com>
Authored: Wed Jun 13 14:16:29 2018 -0700
Committer: Vihang Karajgaonkar <vi...@cloudera.com>
Committed: Fri Jun 15 10:23:51 2018 -0700

----------------------------------------------------------------------
 metastore/scripts/upgrade/derby/042-HIVE-19605.derby.sql          | 2 +-
 metastore/scripts/upgrade/derby/hive-schema-2.4.0.derby.sql       | 2 +-
 metastore/scripts/upgrade/mssql/027-HIVE-19605.mssql.sql          | 2 +-
 metastore/scripts/upgrade/mssql/hive-schema-2.4.0.mssql.sql       | 2 +-
 metastore/scripts/upgrade/mysql/042-HIVE-19605.mysql.sql          | 2 +-
 metastore/scripts/upgrade/mysql/hive-schema-2.4.0.mysql.sql       | 2 +-
 metastore/scripts/upgrade/oracle/042-HIVE-19605.oracle.sql        | 2 +-
 metastore/scripts/upgrade/oracle/hive-schema-2.4.0.oracle.sql     | 2 +-
 metastore/scripts/upgrade/postgres/041-HIVE-19605.postgres.sql    | 2 +-
 metastore/scripts/upgrade/postgres/hive-schema-2.4.0.postgres.sql | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/342757be/metastore/scripts/upgrade/derby/042-HIVE-19605.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/042-HIVE-19605.derby.sql b/metastore/scripts/upgrade/derby/042-HIVE-19605.derby.sql
index b2f458e..304cc09 100644
--- a/metastore/scripts/upgrade/derby/042-HIVE-19605.derby.sql
+++ b/metastore/scripts/upgrade/derby/042-HIVE-19605.derby.sql
@@ -1 +1 @@
-CREATE INDEX "APP"."TAB_COL_STATS_IDX" ON "APP"."TAB_COL_STATS" ("CAT_NAME", "DB_NAME", "TABLE_NAME", "COLUMN_NAME");
+CREATE INDEX "APP"."TAB_COL_STATS_IDX" ON "APP"."TAB_COL_STATS" ("DB_NAME", "TABLE_NAME", "COLUMN_NAME");

http://git-wip-us.apache.org/repos/asf/hive/blob/342757be/metastore/scripts/upgrade/derby/hive-schema-2.4.0.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/hive-schema-2.4.0.derby.sql b/metastore/scripts/upgrade/derby/hive-schema-2.4.0.derby.sql
index b548ce2..9f1fa6a 100644
--- a/metastore/scripts/upgrade/derby/hive-schema-2.4.0.derby.sql
+++ b/metastore/scripts/upgrade/derby/hive-schema-2.4.0.derby.sql
@@ -124,7 +124,7 @@ CREATE UNIQUE INDEX "APP"."DBPRIVILEGEINDEX" ON "APP"."DB_PRIVS" ("DB_ID", "PRIN
 
 CREATE INDEX "APP"."PCS_STATS_IDX" ON "APP"."PART_COL_STATS" ("DB_NAME","TABLE_NAME","COLUMN_NAME","PARTITION_NAME");
 
-CREATE INDEX "APP"."TAB_COL_STATS_IDX" ON "APP"."TAB_COL_STATS" ("CAT_NAME", "DB_NAME", "TABLE_NAME", "COLUMN_NAME");
+CREATE INDEX "APP"."TAB_COL_STATS_IDX" ON "APP"."TAB_COL_STATS" ("DB_NAME", "TABLE_NAME", "COLUMN_NAME");
 
 CREATE INDEX "APP"."PARTPRIVILEGEINDEX" ON "APP"."PART_PRIVS" ("PART_ID", "PRINCIPAL_NAME", "PRINCIPAL_TYPE", "PART_PRIV", "GRANTOR", "GRANTOR_TYPE");
 

http://git-wip-us.apache.org/repos/asf/hive/blob/342757be/metastore/scripts/upgrade/mssql/027-HIVE-19605.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/027-HIVE-19605.mssql.sql b/metastore/scripts/upgrade/mssql/027-HIVE-19605.mssql.sql
index 149a445..813f605 100644
--- a/metastore/scripts/upgrade/mssql/027-HIVE-19605.mssql.sql
+++ b/metastore/scripts/upgrade/mssql/027-HIVE-19605.mssql.sql
@@ -1 +1 @@
-CREATE INDEX TAB_COL_STATS_IDX ON TAB_COL_STATS (CAT_NAME, DB_NAME, TABLE_NAME, COLUMN_NAME);
+CREATE INDEX TAB_COL_STATS_IDX ON TAB_COL_STATS (DB_NAME, TABLE_NAME, COLUMN_NAME);

http://git-wip-us.apache.org/repos/asf/hive/blob/342757be/metastore/scripts/upgrade/mssql/hive-schema-2.4.0.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/hive-schema-2.4.0.mssql.sql b/metastore/scripts/upgrade/mssql/hive-schema-2.4.0.mssql.sql
index 7892777..f424eda 100644
--- a/metastore/scripts/upgrade/mssql/hive-schema-2.4.0.mssql.sql
+++ b/metastore/scripts/upgrade/mssql/hive-schema-2.4.0.mssql.sql
@@ -238,7 +238,7 @@ CREATE TABLE TAB_COL_STATS
 );
 
 ALTER TABLE TAB_COL_STATS ADD CONSTRAINT TAB_COL_STATS_PK PRIMARY KEY (CS_ID);
-CREATE INDEX TAB_COL_STATS_IDX ON TAB_COL_STATS (CAT_NAME, DB_NAME, TABLE_NAME, COLUMN_NAME);
+CREATE INDEX TAB_COL_STATS_IDX ON TAB_COL_STATS (DB_NAME, TABLE_NAME, COLUMN_NAME);
 
 -- Table TYPES for classes [org.apache.hadoop.hive.metastore.model.MType]
 CREATE TABLE TYPES

http://git-wip-us.apache.org/repos/asf/hive/blob/342757be/metastore/scripts/upgrade/mysql/042-HIVE-19605.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/042-HIVE-19605.mysql.sql b/metastore/scripts/upgrade/mysql/042-HIVE-19605.mysql.sql
index 7a1b5a8..8d5aa49 100644
--- a/metastore/scripts/upgrade/mysql/042-HIVE-19605.mysql.sql
+++ b/metastore/scripts/upgrade/mysql/042-HIVE-19605.mysql.sql
@@ -1 +1 @@
-CREATE INDEX TAB_COL_STATS_IDX ON TAB_COL_STATS (CAT_NAME, DB_NAME, TABLE_NAME, COLUMN_NAME) USING BTREE;
+CREATE INDEX TAB_COL_STATS_IDX ON TAB_COL_STATS (DB_NAME, TABLE_NAME, COLUMN_NAME) USING BTREE;

http://git-wip-us.apache.org/repos/asf/hive/blob/342757be/metastore/scripts/upgrade/mysql/hive-schema-2.4.0.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/hive-schema-2.4.0.mysql.sql b/metastore/scripts/upgrade/mysql/hive-schema-2.4.0.mysql.sql
index 6c67d0b..3dd8b66 100644
--- a/metastore/scripts/upgrade/mysql/hive-schema-2.4.0.mysql.sql
+++ b/metastore/scripts/upgrade/mysql/hive-schema-2.4.0.mysql.sql
@@ -672,7 +672,7 @@ CREATE TABLE IF NOT EXISTS `TAB_COL_STATS` (
   CONSTRAINT `TAB_COL_STATS_FK` FOREIGN KEY (`TBL_ID`) REFERENCES `TBLS` (`TBL_ID`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-CREATE INDEX TAB_COL_STATS_IDX ON TAB_COL_STATS (CAT_NAME, DB_NAME, TABLE_NAME, COLUMN_NAME) USING BTREE;
+CREATE INDEX TAB_COL_STATS_IDX ON TAB_COL_STATS (DB_NAME, TABLE_NAME, COLUMN_NAME) USING BTREE;
 
 --
 -- Table structure for table `PART_COL_STATS`

http://git-wip-us.apache.org/repos/asf/hive/blob/342757be/metastore/scripts/upgrade/oracle/042-HIVE-19605.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/042-HIVE-19605.oracle.sql b/metastore/scripts/upgrade/oracle/042-HIVE-19605.oracle.sql
index 149a445..813f605 100644
--- a/metastore/scripts/upgrade/oracle/042-HIVE-19605.oracle.sql
+++ b/metastore/scripts/upgrade/oracle/042-HIVE-19605.oracle.sql
@@ -1 +1 @@
-CREATE INDEX TAB_COL_STATS_IDX ON TAB_COL_STATS (CAT_NAME, DB_NAME, TABLE_NAME, COLUMN_NAME);
+CREATE INDEX TAB_COL_STATS_IDX ON TAB_COL_STATS (DB_NAME, TABLE_NAME, COLUMN_NAME);

http://git-wip-us.apache.org/repos/asf/hive/blob/342757be/metastore/scripts/upgrade/oracle/hive-schema-2.4.0.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/hive-schema-2.4.0.oracle.sql b/metastore/scripts/upgrade/oracle/hive-schema-2.4.0.oracle.sql
index 3554fc4..696d7d8 100644
--- a/metastore/scripts/upgrade/oracle/hive-schema-2.4.0.oracle.sql
+++ b/metastore/scripts/upgrade/oracle/hive-schema-2.4.0.oracle.sql
@@ -500,7 +500,7 @@ ALTER TABLE TAB_COL_STATS ADD CONSTRAINT TAB_COL_STATS_FK FOREIGN KEY (TBL_ID) R
 
 CREATE INDEX TAB_COL_STATS_N49 ON TAB_COL_STATS(TBL_ID);
 
-CREATE INDEX TAB_COL_STATS_IDX ON TAB_COL_STATS (CAT_NAME, DB_NAME, TABLE_NAME, COLUMN_NAME);
+CREATE INDEX TAB_COL_STATS_IDX ON TAB_COL_STATS (DB_NAME, TABLE_NAME, COLUMN_NAME);
 
 CREATE TABLE PART_COL_STATS (
  CS_ID NUMBER NOT NULL,

http://git-wip-us.apache.org/repos/asf/hive/blob/342757be/metastore/scripts/upgrade/postgres/041-HIVE-19605.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/041-HIVE-19605.postgres.sql b/metastore/scripts/upgrade/postgres/041-HIVE-19605.postgres.sql
index 371d0f0..a6ec045 100644
--- a/metastore/scripts/upgrade/postgres/041-HIVE-19605.postgres.sql
+++ b/metastore/scripts/upgrade/postgres/041-HIVE-19605.postgres.sql
@@ -1 +1 @@
-CREATE INDEX "TAB_COL_STATS_IDX" ON "TAB_COL_STATS" USING btree ("CAT_NAME", "DB_NAME","TABLE_NAME","COLUMN_NAME");
+CREATE INDEX "TAB_COL_STATS_IDX" ON "TAB_COL_STATS" USING btree ("DB_NAME","TABLE_NAME","COLUMN_NAME");

http://git-wip-us.apache.org/repos/asf/hive/blob/342757be/metastore/scripts/upgrade/postgres/hive-schema-2.4.0.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/hive-schema-2.4.0.postgres.sql b/metastore/scripts/upgrade/postgres/hive-schema-2.4.0.postgres.sql
index 4866788..4e5d314 100644
--- a/metastore/scripts/upgrade/postgres/hive-schema-2.4.0.postgres.sql
+++ b/metastore/scripts/upgrade/postgres/hive-schema-2.4.0.postgres.sql
@@ -1178,7 +1178,7 @@ CREATE INDEX "TAB_COL_STATS_N49" ON "TAB_COL_STATS" USING btree ("TBL_ID");
 -- Name: TAB_COL_STATS_IDX; Type: INDEX; Schema: public; Owner: hiveuser; Tablespace:
 --
 
-CREATE INDEX "TAB_COL_STATS_IDX" ON "TAB_COL_STATS" USING btree ("CAT_NAME", "DB_NAME","TABLE_NAME","COLUMN_NAME");
+CREATE INDEX "TAB_COL_STATS_IDX" ON "TAB_COL_STATS" USING btree ("DB_NAME","TABLE_NAME","COLUMN_NAME");
 
 --
 -- Name: PART_COL_STATS_N49; Type: INDEX; Schema: public; Owner: hiveuser; Tablespace: