hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gunt...@apache.org
Subject svn commit: r1635653 - in /hive/branches/branch-0.14/metastore/scripts/upgrade/mssql: 004-HIVE-8550.mssql.sql hive-schema-0.14.0.mssql.sql upgrade-0.13.0-to-0.14.0.mssql.sql
Date Fri, 31 Oct 2014 01:39:54 GMT
Author: gunther
Date: Fri Oct 31 01:39:54 2014
New Revision: 1635653

URL: http://svn.apache.org/r1635653
Log:
HIVE-8550: Hive cannot load data into partitioned table with Unicode key (Xiaobing Zhou, reviewed
by Jason Dere)

Added:
    hive/branches/branch-0.14/metastore/scripts/upgrade/mssql/004-HIVE-8550.mssql.sql
Modified:
    hive/branches/branch-0.14/metastore/scripts/upgrade/mssql/hive-schema-0.14.0.mssql.sql
    hive/branches/branch-0.14/metastore/scripts/upgrade/mssql/upgrade-0.13.0-to-0.14.0.mssql.sql

Added: hive/branches/branch-0.14/metastore/scripts/upgrade/mssql/004-HIVE-8550.mssql.sql
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/metastore/scripts/upgrade/mssql/004-HIVE-8550.mssql.sql?rev=1635653&view=auto
==============================================================================
--- hive/branches/branch-0.14/metastore/scripts/upgrade/mssql/004-HIVE-8550.mssql.sql (added)
+++ hive/branches/branch-0.14/metastore/scripts/upgrade/mssql/004-HIVE-8550.mssql.sql Fri
Oct 31 01:39:54 2014
@@ -0,0 +1,13 @@
+--ALTER PARTITIONS.PART_NAME from varchar to nvarchar
+DROP INDEX PARTITIONS.UNIQUEPARTITION;
+ALTER TABLE PARTITIONS ALTER COLUMN PART_NAME NVARCHAR(767) NULL;
+CREATE UNIQUE INDEX UNIQUEPARTITION ON PARTITIONS (PART_NAME,TBL_ID);
+GO
+
+--ALTER SDS.LOCATION from varchar to nvarchar
+ALTER TABLE SDS ALTER COLUMN LOCATION NVARCHAR(4000) NULL;
+GO
+
+--ALTER PARTITION_KEY_VALS.PART_KEY_VAL from varchar to nvarchar
+ALTER TABLE PARTITION_KEY_VALS ALTER COLUMN PART_KEY_VAL NVARCHAR(255) NULL;
+GO
\ No newline at end of file

Modified: hive/branches/branch-0.14/metastore/scripts/upgrade/mssql/hive-schema-0.14.0.mssql.sql
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/metastore/scripts/upgrade/mssql/hive-schema-0.14.0.mssql.sql?rev=1635653&r1=1635652&r2=1635653&view=diff
==============================================================================
--- hive/branches/branch-0.14/metastore/scripts/upgrade/mssql/hive-schema-0.14.0.mssql.sql
(original)
+++ hive/branches/branch-0.14/metastore/scripts/upgrade/mssql/hive-schema-0.14.0.mssql.sql
Fri Oct 31 01:39:54 2014
@@ -140,7 +140,7 @@ CREATE TABLE PARTITIONS
     PART_ID bigint NOT NULL,
     CREATE_TIME int NOT NULL,
     LAST_ACCESS_TIME int NOT NULL,
-    PART_NAME varchar(767) NULL,
+    PART_NAME nvarchar(767) NULL,
     SD_ID bigint NULL,
     TBL_ID bigint NULL
 );
@@ -371,7 +371,7 @@ CREATE TABLE SDS
     INPUT_FORMAT varchar(4000) NULL,
     IS_COMPRESSED bit NOT NULL,
     IS_STOREDASSUBDIRECTORIES bit NOT NULL,
-    LOCATION varchar(4000) NULL,
+    LOCATION nvarchar(4000) NULL,
     NUM_BUCKETS int NOT NULL,
     OUTPUT_FORMAT varchar(4000) NULL,
     SERDE_ID bigint NULL
@@ -437,7 +437,7 @@ ALTER TABLE SKEWED_STRING_LIST_VALUES AD
 CREATE TABLE PARTITION_KEY_VALS
 (
     PART_ID bigint NOT NULL,
-    PART_KEY_VAL varchar(255) NULL,
+    PART_KEY_VAL nvarchar(255) NULL,
     INTEGER_IDX int NOT NULL
 );
 

Modified: hive/branches/branch-0.14/metastore/scripts/upgrade/mssql/upgrade-0.13.0-to-0.14.0.mssql.sql
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/metastore/scripts/upgrade/mssql/upgrade-0.13.0-to-0.14.0.mssql.sql?rev=1635653&r1=1635652&r2=1635653&view=diff
==============================================================================
--- hive/branches/branch-0.14/metastore/scripts/upgrade/mssql/upgrade-0.13.0-to-0.14.0.mssql.sql
(original)
+++ hive/branches/branch-0.14/metastore/scripts/upgrade/mssql/upgrade-0.13.0-to-0.14.0.mssql.sql
Fri Oct 31 01:39:54 2014
@@ -2,6 +2,7 @@ SELECT 'Upgrading MetaStore schema from 
 
 :r 002-HIVE-7784.mssql.sql;
 :r 003-HIVE-8239.mssql.sql;
+:r 004-HIVE-8550.mssql.sql;
 
 UPDATE VERSION SET SCHEMA_VERSION='0.14.0', VERSION_COMMENT='Hive release version 0.14.0'
where VER_ID=1;
 SELECT 'Finished upgrading MetaStore schema from 0.13.0 to 0.14.0' AS MESSAGE;



Mime
View raw message