FAQ
Author: hashutosh
Date: Tue Dec 18 15:44:15 2012
New Revision: 1423478

URL: http://svn.apache.org/viewvc?rev=1423478&view=rev
Log:
HIVE-3794 : Oracle upgrade script for Hive is broken (Deepesh Khandelwal via Ashutosh Chauhan)

Modified:
hive/trunk/metastore/scripts/upgrade/derby/010-HIVE-3072.derby.sql
hive/trunk/metastore/scripts/upgrade/derby/hive-schema-0.10.0.derby.sql
hive/trunk/metastore/scripts/upgrade/mysql/010-HIVE-3072.mysql.sql
hive/trunk/metastore/scripts/upgrade/mysql/hive-schema-0.10.0.mysql.sql
hive/trunk/metastore/scripts/upgrade/oracle/010-HIVE-3072.oracle.sql
hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.10.0.oracle.sql
hive/trunk/metastore/scripts/upgrade/postgres/010-HIVE-3072.postgres.sql
hive/trunk/metastore/scripts/upgrade/postgres/hive-schema-0.10.0.postgres.sql
hive/trunk/metastore/src/model/package.jdo

Modified: hive/trunk/metastore/scripts/upgrade/derby/010-HIVE-3072.derby.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/derby/010-HIVE-3072.derby.sql?rev=1423478&r1=1423477&r2=1423478&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/derby/010-HIVE-3072.derby.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/derby/010-HIVE-3072.derby.sql Tue Dec 18 15:44:15 2012
@@ -14,13 +14,13 @@ ALTER TABLE "APP"."SKEWED_COL_NAMES" ADD

ALTER TABLE "APP"."SKEWED_COL_NAMES" ADD CONSTRAINT "SKEWED_COL_NAMES_FK1" FOREIGN KEY ("SD_ID") REFERENCES "APP"."SDS" ("SD_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;

-CREATE TABLE "APP"."SKEWED_COL_VALUE_LOCATION_MAPPING" ("SD_ID" BIGINT NOT NULL, "STRING_LIST_ID_KID" BIGINT NOT NULL, "LOCATION" VARCHAR(4000));
+CREATE TABLE "APP"."SKEWED_COL_VALUE_LOC_MAP" ("SD_ID" BIGINT NOT NULL, "STRING_LIST_ID_KID" BIGINT NOT NULL, "LOCATION" VARCHAR(4000));

-ALTER TABLE "APP"."SKEWED_COL_VALUE_LOCATION_MAPPING" ADD CONSTRAINT "SKEWED_COL_VALUE_LOCATION_MAPPING_PK" PRIMARY KEY ("SD_ID", "STRING_LIST_ID_KID");
+ALTER TABLE "APP"."SKEWED_COL_VALUE_LOC_MAP" ADD CONSTRAINT "SKEWED_COL_VALUE_LOC_MAP_PK" PRIMARY KEY ("SD_ID", "STRING_LIST_ID_KID");

-ALTER TABLE "APP"."SKEWED_COL_VALUE_LOCATION_MAPPING" ADD CONSTRAINT "SKEWED_COL_VALUE_LOCATION_MAPPING_FK1" FOREIGN KEY ("SD_ID") REFERENCES "APP"."SDS" ("SD_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;
+ALTER TABLE "APP"."SKEWED_COL_VALUE_LOC_MAP" ADD CONSTRAINT "SKEWED_COL_VALUE_LOC_MAP_FK1" FOREIGN KEY ("SD_ID") REFERENCES "APP"."SDS" ("SD_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;

-ALTER TABLE "APP"."SKEWED_COL_VALUE_LOCATION_MAPPING" ADD CONSTRAINT "SKEWED_COL_VALUE_LOCATION_MAPPING_FK2" FOREIGN KEY ("STRING_LIST_ID_KID") REFERENCES "APP"."SKEWED_STRING_LIST" ("STRING_LIST_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;
+ALTER TABLE "APP"."SKEWED_COL_VALUE_LOC_MAP" ADD CONSTRAINT "SKEWED_COL_VALUE_LOC_MAP_FK2" FOREIGN KEY ("STRING_LIST_ID_KID") REFERENCES "APP"."SKEWED_STRING_LIST" ("STRING_LIST_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;

CREATE TABLE "APP"."SKEWED_VALUES" ("SD_ID_OID" BIGINT NOT NULL, "STRING_LIST_ID_EID" BIGINT NOT NULL, "INTEGER_IDX" INTEGER NOT NULL);

@@ -28,4 +28,4 @@ ALTER TABLE "APP"."SKEWED_VALUES" ADD CO

ALTER TABLE "APP"."SKEWED_VALUES" ADD CONSTRAINT "SKEWED_VALUES_FK1" FOREIGN KEY ("SD_ID_OID") REFERENCES "APP"."SDS" ("SD_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;

-ALTER TABLE "APP"."SKEWED_VALUES" ADD CONSTRAINT "SKEWED_VALUES_FK2" FOREIGN KEY ("STRING_LIST_ID_EID") REFERENCES "APP"."SKEWED_STRING_LIST" ("STRING_LIST_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;
\ No newline at end of file
+ALTER TABLE "APP"."SKEWED_VALUES" ADD CONSTRAINT "SKEWED_VALUES_FK2" FOREIGN KEY ("STRING_LIST_ID_EID") REFERENCES "APP"."SKEWED_STRING_LIST" ("STRING_LIST_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;

Modified: hive/trunk/metastore/scripts/upgrade/derby/hive-schema-0.10.0.derby.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/derby/hive-schema-0.10.0.derby.sql?rev=1423478&r1=1423477&r2=1423478&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/derby/hive-schema-0.10.0.derby.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/derby/hive-schema-0.10.0.derby.sql Tue Dec 18 15:44:15 2012
@@ -86,7 +86,7 @@ CREATE TABLE "APP"."SKEWED_STRING_LIST_V

CREATE TABLE "APP"."SKEWED_COL_NAMES" ("SD_ID" BIGINT NOT NULL, "SKEWED_COL_NAME" VARCHAR(256), "INTEGER_IDX" INTEGER NOT NULL);

-CREATE TABLE "APP"."SKEWED_COL_VALUE_LOCATION_MAPPING" ("SD_ID" BIGINT NOT NULL, "STRING_LIST_ID_KID" BIGINT NOT NULL, "LOCATION" VARCHAR(4000));
+CREATE TABLE "APP"."SKEWED_COL_VALUE_LOC_MAP" ("SD_ID" BIGINT NOT NULL, "STRING_LIST_ID_KID" BIGINT NOT NULL, "LOCATION" VARCHAR(4000));

CREATE TABLE "APP"."SKEWED_VALUES" ("SD_ID_OID" BIGINT NOT NULL, "STRING_LIST_ID_EID" BIGINT NOT NULL, "INTEGER_IDX" INTEGER NOT NULL);

@@ -199,7 +199,7 @@ ALTER TABLE "APP"."SKEWED_STRING_LIST_VA

ALTER TABLE "APP"."SKEWED_COL_NAMES" ADD CONSTRAINT "SKEWED_COL_NAMES_PK" PRIMARY KEY ("SD_ID", "INTEGER_IDX");

-ALTER TABLE "APP"."SKEWED_COL_VALUE_LOCATION_MAPPING" ADD CONSTRAINT "SKEWED_COL_VALUE_LOCATION_MAPPING_PK" PRIMARY KEY ("SD_ID", "STRING_LIST_ID_KID");
+ALTER TABLE "APP"."SKEWED_COL_VALUE_LOC_MAP" ADD CONSTRAINT "SKEWED_COL_VALUE_LOC_MAP_PK" PRIMARY KEY ("SD_ID", "STRING_LIST_ID_KID");

ALTER TABLE "APP"."SKEWED_VALUES" ADD CONSTRAINT "SKEWED_VALUES_PK" PRIMARY KEY ("SD_ID_OID", "INTEGER_IDX");

@@ -268,9 +268,9 @@ ALTER TABLE "APP"."SKEWED_STRING_LIST_VA

ALTER TABLE "APP"."SKEWED_COL_NAMES" ADD CONSTRAINT "SKEWED_COL_NAMES_FK1" FOREIGN KEY ("SD_ID") REFERENCES "APP"."SDS" ("SD_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;

-ALTER TABLE "APP"."SKEWED_COL_VALUE_LOCATION_MAPPING" ADD CONSTRAINT "SKEWED_COL_VALUE_LOCATION_MAPPING_FK1" FOREIGN KEY ("SD_ID") REFERENCES "APP"."SDS" ("SD_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;
+ALTER TABLE "APP"."SKEWED_COL_VALUE_LOC_MAP" ADD CONSTRAINT "SKEWED_COL_VALUE_LOC_MAP_FK1" FOREIGN KEY ("SD_ID") REFERENCES "APP"."SDS" ("SD_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;

-ALTER TABLE "APP"."SKEWED_COL_VALUE_LOCATION_MAPPING" ADD CONSTRAINT "SKEWED_COL_VALUE_LOCATION_MAPPING_FK2" FOREIGN KEY ("STRING_LIST_ID_KID") REFERENCES "APP"."SKEWED_STRING_LIST" ("STRING_LIST_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;
+ALTER TABLE "APP"."SKEWED_COL_VALUE_LOC_MAP" ADD CONSTRAINT "SKEWED_COL_VALUE_LOC_MAP_FK2" FOREIGN KEY ("STRING_LIST_ID_KID") REFERENCES "APP"."SKEWED_STRING_LIST" ("STRING_LIST_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;

ALTER TABLE "APP"."SKEWED_VALUES" ADD CONSTRAINT "SKEWED_VALUES_FK1" FOREIGN KEY ("SD_ID_OID") REFERENCES "APP"."SDS" ("SD_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;


Modified: hive/trunk/metastore/scripts/upgrade/mysql/010-HIVE-3072.mysql.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/mysql/010-HIVE-3072.mysql.sql?rev=1423478&r1=1423477&r2=1423478&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/mysql/010-HIVE-3072.mysql.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/mysql/010-HIVE-3072.mysql.sql Tue Dec 18 15:44:15 2012
@@ -23,15 +23,15 @@ CREATE TABLE IF NOT EXISTS `SKEWED_COL_N
CONSTRAINT `SKEWED_COL_NAMES_FK1` FOREIGN KEY (`SD_ID`) REFERENCES `SDS` (`SD_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-CREATE TABLE IF NOT EXISTS `SKEWED_COL_VALUE_LOCATION_MAPPING` (
+CREATE TABLE IF NOT EXISTS `SKEWED_COL_VALUE_LOC_MAP` (
`SD_ID` bigint(20) NOT NULL,
`STRING_LIST_ID_KID` bigint(20) NOT NULL,
`LOCATION` varchar(4000) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
PRIMARY KEY (`SD_ID`,`STRING_LIST_ID_KID`),
- KEY `SKEWED_COL_VALUE_LOCATION_MAPPING_N49` (`STRING_LIST_ID_KID`),
- KEY `SKEWED_COL_VALUE_LOCATION_MAPPING_N50` (`SD_ID`),
- CONSTRAINT `SKEWED_COL_VALUE_LOCATION_MAPPING_FK2` FOREIGN KEY (`STRING_LIST_ID_KID`) REFERENCES `SKEWED_STRING_LIST` (`STRING_LIST_ID`),
- CONSTRAINT `SKEWED_COL_VALUE_LOCATION_MAPPING_FK1` FOREIGN KEY (`SD_ID`) REFERENCES `SDS` (`SD_ID`)
+ KEY `SKEWED_COL_VALUE_LOC_MAP_N49` (`STRING_LIST_ID_KID`),
+ KEY `SKEWED_COL_VALUE_LOC_MAP_N50` (`SD_ID`),
+ CONSTRAINT `SKEWED_COL_VALUE_LOC_MAP_FK2` FOREIGN KEY (`STRING_LIST_ID_KID`) REFERENCES `SKEWED_STRING_LIST` (`STRING_LIST_ID`),
+ CONSTRAINT `SKEWED_COL_VALUE_LOC_MAP_FK1` FOREIGN KEY (`SD_ID`) REFERENCES `SDS` (`SD_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `SKEWED_VALUES` (

Modified: hive/trunk/metastore/scripts/upgrade/mysql/hive-schema-0.10.0.mysql.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/mysql/hive-schema-0.10.0.mysql.sql?rev=1423478&r1=1423477&r2=1423478&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/mysql/hive-schema-0.10.0.mysql.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/mysql/hive-schema-0.10.0.mysql.sql Tue Dec 18 15:44:15 2012
@@ -474,20 +474,20 @@ CREATE TABLE IF NOT EXISTS `SKEWED_COL_N
/*!40101 SET character_set_client = @saved_cs_client */;

--
--- Table structure for table `SKEWED_COL_VALUE_LOCATION_MAPPING`
+-- Table structure for table `SKEWED_COL_VALUE_LOC_MAP`
--

/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE IF NOT EXISTS `SKEWED_COL_VALUE_LOCATION_MAPPING` (
+CREATE TABLE IF NOT EXISTS `SKEWED_COL_VALUE_LOC_MAP` (
`SD_ID` bigint(20) NOT NULL,
`STRING_LIST_ID_KID` bigint(20) NOT NULL,
`LOCATION` varchar(4000) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
PRIMARY KEY (`SD_ID`,`STRING_LIST_ID_KID`),
- KEY `SKEWED_COL_VALUE_LOCATION_MAPPING_N49` (`STRING_LIST_ID_KID`),
- KEY `SKEWED_COL_VALUE_LOCATION_MAPPING_N50` (`SD_ID`),
- CONSTRAINT `SKEWED_COL_VALUE_LOCATION_MAPPING_FK2` FOREIGN KEY (`STRING_LIST_ID_KID`) REFERENCES `SKEWED_STRING_LIST` (`STRING_LIST_ID`),
- CONSTRAINT `SKEWED_COL_VALUE_LOCATION_MAPPING_FK1` FOREIGN KEY (`SD_ID`) REFERENCES `SDS` (`SD_ID`)
+ KEY `SKEWED_COL_VALUE_LOC_MAP_N49` (`STRING_LIST_ID_KID`),
+ KEY `SKEWED_COL_VALUE_LOC_MAP_N50` (`SD_ID`),
+ CONSTRAINT `SKEWED_COL_VALUE_LOC_MAP_FK2` FOREIGN KEY (`STRING_LIST_ID_KID`) REFERENCES `SKEWED_STRING_LIST` (`STRING_LIST_ID`),
+ CONSTRAINT `SKEWED_COL_VALUE_LOC_MAP_FK1` FOREIGN KEY (`SD_ID`) REFERENCES `SDS` (`SD_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;


Modified: hive/trunk/metastore/scripts/upgrade/oracle/010-HIVE-3072.oracle.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/oracle/010-HIVE-3072.oracle.sql?rev=1423478&r1=1423477&r2=1423478&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/oracle/010-HIVE-3072.oracle.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/oracle/010-HIVE-3072.oracle.sql Tue Dec 18 15:44:15 2012
@@ -1,9 +1,9 @@
CREATE TABLE SKEWED_STRING_LIST
(
- SD_ID NUMBER NOT NULL
+ STRING_LIST_ID NUMBER NOT NULL
);

-ALTER TABLE SKEWED_STRING_LIST ADD CONSTRAINT SKEWED_STRING_LIST_PK PRIMARY KEY (SD_ID);
+ALTER TABLE SKEWED_STRING_LIST ADD CONSTRAINT SKEWED_STRING_LIST_PK PRIMARY KEY (STRING_LIST_ID);

CREATE TABLE SKEWED_STRING_LIST_VALUES
(
@@ -27,18 +27,18 @@ ALTER TABLE SKEWED_COL_NAMES ADD CONSTRA

ALTER TABLE SKEWED_COL_NAMES ADD CONSTRAINT SKEWED_COL_NAMES_FK1 FOREIGN KEY (SD_ID) REFERENCES SDS (SD_ID) INITIALLY DEFERRED ;

-CREATE TABLE SKEWED_COL_VALUE_LOCATION_MAPPING
+CREATE TABLE SKEWED_COL_VALUE_LOC_MAP
(
SD_ID NUMBER NOT NULL,
STRING_LIST_ID_KID NUMBER NOT NULL,
"LOCATION" VARCHAR2(4000) NULL
);

-ALTER TABLE SKEWED_COL_VALUE_LOCATION_MAPPING ADD CONSTRAINT SKEWED_COL_VALUE_LOCATION_MAPPING_PK PRIMARY KEY (SD_ID,STRING_LIST_ID_KID);
+ALTER TABLE SKEWED_COL_VALUE_LOC_MAP ADD CONSTRAINT SKEWED_COL_VALUE_LOC_MAP_PK PRIMARY KEY (SD_ID,STRING_LIST_ID_KID);

-ALTER TABLE SKEWED_COL_VALUE_LOCATION_MAPPING ADD CONSTRAINT SKEWED_COL_VALUE_LOCATION_MAPPING_FK1 FOREIGN KEY (STRING_LIST_ID_KID) REFERENCES SKEWED_STRING_LIST (STRING_LIST_ID) INITIALLY DEFERRED ;
+ALTER TABLE SKEWED_COL_VALUE_LOC_MAP ADD CONSTRAINT SKEWED_COL_VALUE_LOC_MAP_FK1 FOREIGN KEY (STRING_LIST_ID_KID) REFERENCES SKEWED_STRING_LIST (STRING_LIST_ID) INITIALLY DEFERRED ;

-ALTER TABLE SKEWED_COL_VALUE_LOCATION_MAPPING ADD CONSTRAINT SKEWED_COL_VALUE_LOCATION_MAPPING_FK2 FOREIGN KEY (SD_ID) REFERENCES SDS (SD_ID) INITIALLY DEFERRED ;
+ALTER TABLE SKEWED_COL_VALUE_LOC_MAP ADD CONSTRAINT SKEWED_COL_VALUE_LOC_MAP_FK2 FOREIGN KEY (SD_ID) REFERENCES SDS (SD_ID) INITIALLY DEFERRED ;

CREATE TABLE SKEWED_VALUES
(
@@ -51,4 +51,4 @@ ALTER TABLE SKEWED_VALUES ADD CONSTRAINT

ALTER TABLE SKEWED_VALUES ADD CONSTRAINT SKEWED_VALUES_FK1 FOREIGN KEY (STRING_LIST_ID_EID) REFERENCES SKEWED_STRING_LIST (STRING_LIST_ID) INITIALLY DEFERRED ;

-ALTER TABLE SKEWED_VALUES ADD CONSTRAINT SKEWED_VALUES_FK2 FOREIGN KEY (SD_ID_OID) REFERENCES SDS (SD_ID) INITIALLY DEFERRED ;
\ No newline at end of file
+ALTER TABLE SKEWED_VALUES ADD CONSTRAINT SKEWED_VALUES_FK2 FOREIGN KEY (SD_ID_OID) REFERENCES SDS (SD_ID) INITIALLY DEFERRED ;

Modified: hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.10.0.oracle.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.10.0.oracle.sql?rev=1423478&r1=1423477&r2=1423478&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.10.0.oracle.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.10.0.oracle.sql Tue Dec 18 15:44:15 2012
@@ -394,10 +394,10 @@ ALTER TABLE PARTITION_EVENTS ADD CONSTRA
-- Table SKEWED_STRING_LIST for classes [org.apache.hadoop.hive.metastore.model.MStringList]
CREATE TABLE SKEWED_STRING_LIST
(
- SD_ID NUMBER NOT NULL
+ STRING_LIST_ID NUMBER NOT NULL
);

-ALTER TABLE SKEWED_STRING_LIST ADD CONSTRAINT SKEWED_STRING_LIST_PK PRIMARY KEY (SD_ID);
+ALTER TABLE SKEWED_STRING_LIST ADD CONSTRAINT SKEWED_STRING_LIST_PK PRIMARY KEY (STRING_LIST_ID);

CREATE TABLE SKEWED_STRING_LIST_VALUES
(
@@ -421,18 +421,18 @@ ALTER TABLE SKEWED_COL_NAMES ADD CONSTRA

ALTER TABLE SKEWED_COL_NAMES ADD CONSTRAINT SKEWED_COL_NAMES_FK1 FOREIGN KEY (SD_ID) REFERENCES SDS (SD_ID) INITIALLY DEFERRED ;

-CREATE TABLE SKEWED_COL_VALUE_LOCATION_MAPPING
+CREATE TABLE SKEWED_COL_VALUE_LOC_MAP
(
SD_ID NUMBER NOT NULL,
STRING_LIST_ID_KID NUMBER NOT NULL,
"LOCATION" VARCHAR2(4000) NULL
);

-ALTER TABLE SKEWED_COL_VALUE_LOCATION_MAPPING ADD CONSTRAINT SKEWED_COL_VALUE_LOCATION_MAPPING_PK PRIMARY KEY (SD_ID,STRING_LIST_ID_KID);
+ALTER TABLE SKEWED_COL_VALUE_LOC_MAP ADD CONSTRAINT SKEWED_COL_VALUE_LOC_MAP_PK PRIMARY KEY (SD_ID,STRING_LIST_ID_KID);

-ALTER TABLE SKEWED_COL_VALUE_LOCATION_MAPPING ADD CONSTRAINT SKEWED_COL_VALUE_LOCATION_MAPPING_FK1 FOREIGN KEY (STRING_LIST_ID_KID) REFERENCES SKEWED_STRING_LIST (STRING_LIST_ID) INITIALLY DEFERRED ;
+ALTER TABLE SKEWED_COL_VALUE_LOC_MAP ADD CONSTRAINT SKEWED_COL_VALUE_LOC_MAP_FK1 FOREIGN KEY (STRING_LIST_ID_KID) REFERENCES SKEWED_STRING_LIST (STRING_LIST_ID) INITIALLY DEFERRED ;

-ALTER TABLE SKEWED_COL_VALUE_LOCATION_MAPPING ADD CONSTRAINT SKEWED_COL_VALUE_LOCATION_MAPPING_FK2 FOREIGN KEY (SD_ID) REFERENCES SDS (SD_ID) INITIALLY DEFERRED ;
+ALTER TABLE SKEWED_COL_VALUE_LOC_MAP ADD CONSTRAINT SKEWED_COL_VALUE_LOC_MAP_FK2 FOREIGN KEY (SD_ID) REFERENCES SDS (SD_ID) INITIALLY DEFERRED ;

CREATE TABLE SKEWED_VALUES
(

Modified: hive/trunk/metastore/scripts/upgrade/postgres/010-HIVE-3072.postgres.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/postgres/010-HIVE-3072.postgres.sql?rev=1423478&r1=1423477&r2=1423478&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/postgres/010-HIVE-3072.postgres.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/postgres/010-HIVE-3072.postgres.sql Tue Dec 18 15:44:15 2012
@@ -31,20 +31,20 @@ ALTER TABLE ONLY "SKEWED_COL_NAMES"
ALTER TABLE ONLY "SKEWED_COL_NAMES"
ADD CONSTRAINT "SKEWED_COL_NAMES_fkey" FOREIGN KEY ("SD_ID") REFERENCES "SDS"("SD_ID") DEFERRABLE;

-CREATE TABLE "SKEWED_COL_VALUE_LOCATION_MAPPING" (
+CREATE TABLE "SKEWED_COL_VALUE_LOC_MAP" (
"SD_ID" bigint NOT NULL,
"STRING_LIST_ID_KID" bigint NOT NULL,
"LOCATION" character varying(4000) DEFAULT NULL::character varying
);

-ALTER TABLE ONLY "SKEWED_COL_VALUE_LOCATION_MAPPING"
- ADD CONSTRAINT "SKEWED_COL_VALUE_LOCATION_MAPPING_pkey" PRIMARY KEY ("SD_ID", "STRING_LIST_ID_KID");
+ALTER TABLE ONLY "SKEWED_COL_VALUE_LOC_MAP"
+ ADD CONSTRAINT "SKEWED_COL_VALUE_LOC_MAP_pkey" PRIMARY KEY ("SD_ID", "STRING_LIST_ID_KID");

-ALTER TABLE ONLY "SKEWED_COL_VALUE_LOCATION_MAPPING"
- ADD CONSTRAINT "SKEWED_COL_VALUE_LOCATION_MAPPING_fkey1" FOREIGN KEY ("SD_ID") REFERENCES "SDS"("SD_ID") DEFERRABLE;
+ALTER TABLE ONLY "SKEWED_COL_VALUE_LOC_MAP"
+ ADD CONSTRAINT "SKEWED_COL_VALUE_LOC_MAP_fkey1" FOREIGN KEY ("SD_ID") REFERENCES "SDS"("SD_ID") DEFERRABLE;

-ALTER TABLE ONLY "SKEWED_COL_VALUE_LOCATION_MAPPING"
- ADD CONSTRAINT "SKEWED_COL_VALUE_LOCATION_MAPPING_fkey2" FOREIGN KEY ("STRING_LIST_ID_KID") REFERENCES "SKEWED_STRING_LIST"("STRING_LIST_ID") DEFERRABLE;
+ALTER TABLE ONLY "SKEWED_COL_VALUE_LOC_MAP"
+ ADD CONSTRAINT "SKEWED_COL_VALUE_LOC_MAP_fkey2" FOREIGN KEY ("STRING_LIST_ID_KID") REFERENCES "SKEWED_STRING_LIST"("STRING_LIST_ID") DEFERRABLE;

CREATE TABLE "SKEWED_VALUES" (
"SD_ID_OID" bigint NOT NULL,
@@ -59,4 +59,4 @@ ALTER TABLE ONLY "SKEWED_VALUES"
ADD CONSTRAINT "SKEWED_VALUES_fkey1" FOREIGN KEY ("STRING_LIST_ID_EID") REFERENCES "SKEWED_STRING_LIST"("STRING_LIST_ID") DEFERRABLE;

ALTER TABLE ONLY "SKEWED_VALUES"
- ADD CONSTRAINT "SKEWED_VALUES_fkey2" FOREIGN KEY ("SD_ID_OID") REFERENCES "SDS"("SD_ID") DEFERRABLE;
\ No newline at end of file
+ ADD CONSTRAINT "SKEWED_VALUES_fkey2" FOREIGN KEY ("SD_ID_OID") REFERENCES "SDS"("SD_ID") DEFERRABLE;

Modified: hive/trunk/metastore/scripts/upgrade/postgres/hive-schema-0.10.0.postgres.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/postgres/hive-schema-0.10.0.postgres.sql?rev=1423478&r1=1423477&r2=1423478&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/postgres/hive-schema-0.10.0.postgres.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/postgres/hive-schema-0.10.0.postgres.sql Tue Dec 18 15:44:15 2012
@@ -462,7 +462,7 @@ CREATE TABLE "SKEWED_COL_NAMES" (
"INTEGER_IDX" bigint NOT NULL
);

-CREATE TABLE "SKEWED_COL_VALUE_LOCATION_MAPPING" (
+CREATE TABLE "SKEWED_COL_VALUE_LOC_MAP" (
"SD_ID" bigint NOT NULL,
"STRING_LIST_ID_KID" bigint NOT NULL,
"LOCATION" character varying(4000) DEFAULT NULL::character varying
@@ -817,8 +817,8 @@ ALTER TABLE ONLY SKEWED_STRING_LIST_VALU
ALTER TABLE ONLY "SKEWED_COL_NAMES"
ADD CONSTRAINT "SKEWED_COL_NAMES_pkey" PRIMARY KEY ("SD_ID", "INTEGER_IDX");

-ALTER TABLE ONLY "SKEWED_COL_VALUE_LOCATION_MAPPING"
- ADD CONSTRAINT "SKEWED_COL_VALUE_LOCATION_MAPPING_pkey" PRIMARY KEY ("SD_ID", "STRING_LIST_ID_KID");
+ALTER TABLE ONLY "SKEWED_COL_VALUE_LOC_MAP"
+ ADD CONSTRAINT "SKEWED_COL_VALUE_LOC_MAP_pkey" PRIMARY KEY ("SD_ID", "STRING_LIST_ID_KID");

ALTER TABLE ONLY "SKEWED_VALUES"
ADD CONSTRAINT "SKEWED_VALUES_pkey" PRIMARY KEY ("SD_ID_OID", "INTEGER_IDX");
@@ -1118,11 +1118,11 @@ ALTER TABLE ONLY "SKEWED_COL_NAMES"
ADD CONSTRAINT "SKEWED_COL_NAMES_fkey" FOREIGN KEY ("SD_ID") REFERENCES "SDS"("SD_ID") DEFERRABLE;


-ALTER TABLE ONLY "SKEWED_COL_VALUE_LOCATION_MAPPING"
- ADD CONSTRAINT "SKEWED_COL_VALUE_LOCATION_MAPPING_fkey1" FOREIGN KEY ("SD_ID") REFERENCES "SDS"("SD_ID") DEFERRABLE;
+ALTER TABLE ONLY "SKEWED_COL_VALUE_LOC_MAP"
+ ADD CONSTRAINT "SKEWED_COL_VALUE_LOC_MAP_fkey1" FOREIGN KEY ("SD_ID") REFERENCES "SDS"("SD_ID") DEFERRABLE;

-ALTER TABLE ONLY "SKEWED_COL_VALUE_LOCATION_MAPPING"
- ADD CONSTRAINT "SKEWED_COL_VALUE_LOCATION_MAPPING_fkey2" FOREIGN KEY ("STRING_LIST_ID_KID") REFERENCES "SKEWED_STRING_LIST"("STRING_LIST_ID") DEFERRABLE;
+ALTER TABLE ONLY "SKEWED_COL_VALUE_LOC_MAP"
+ ADD CONSTRAINT "SKEWED_COL_VALUE_LOC_MAP_fkey2" FOREIGN KEY ("STRING_LIST_ID_KID") REFERENCES "SKEWED_STRING_LIST"("STRING_LIST_ID") DEFERRABLE;

ALTER TABLE ONLY "SKEWED_VALUES"
ADD CONSTRAINT "SKEWED_VALUES_fkey1" FOREIGN KEY ("STRING_LIST_ID_EID") REFERENCES "SKEWED_STRING_LIST"("STRING_LIST_ID") DEFERRABLE;

Modified: hive/trunk/metastore/src/model/package.jdo
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/model/package.jdo?rev=1423478&r1=1423477&r2=1423478&view=diff
==============================================================================
--- hive/trunk/metastore/src/model/package.jdo (original)
+++ hive/trunk/metastore/src/model/package.jdo Tue Dec 18 15:44:15 2012
@@ -318,7 +318,7 @@
<collection element-type="MStringList"/>
<join/>
</field>
- <field name="skewedColValueLocationMaps" table="SKEWED_COL_VALUE_LOCATION_MAPPING">
+ <field name="skewedColValueLocationMaps" table="SKEWED_COL_VALUE_LOC_MAP">
<map key-type="MStringList" value-type="java.lang.String"/>
<join>
<column name="SD_ID"/>

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedDec 18, '12 at 3:44p
activeDec 18, '12 at 3:44p
posts1
users1
websitehive.apache.org

1 user in discussion

Hashutosh: 1 post

People

Translate

site design / logo © 2021 Grokbase