This is an automated email from the ASF dual-hosted git repository.

ngangam pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 3abe2ad  HIVE-25551: Schema upgrade for MSSQL fails when adding TYPE 
column in DBS table(Ayush Saxena via Naveen Gangam)
3abe2ad is described below

commit 3abe2ade91831d00357f916337813a9467e7e7cc
Author: Ayush Saxena <ayushsax...@apache.org>
AuthorDate: Thu Sep 23 18:40:15 2021 +0530

    HIVE-25551: Schema upgrade for MSSQL fails when adding TYPE column in DBS 
table(Ayush Saxena via Naveen Gangam)
---
 .../metastore-server/src/main/sql/mssql/hive-schema-4.0.0.mssql.sql     | 2 +-
 .../src/main/sql/mssql/upgrade-3.2.0-to-4.0.0.mssql.sql                 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/standalone-metastore/metastore-server/src/main/sql/mssql/hive-schema-4.0.0.mssql.sql
 
b/standalone-metastore/metastore-server/src/main/sql/mssql/hive-schema-4.0.0.mssql.sql
index e0df604..6f704a0 100644
--- 
a/standalone-metastore/metastore-server/src/main/sql/mssql/hive-schema-4.0.0.mssql.sql
+++ 
b/standalone-metastore/metastore-server/src/main/sql/mssql/hive-schema-4.0.0.mssql.sql
@@ -308,7 +308,7 @@ CREATE TABLE DBS
     CTLG_NAME nvarchar(256) DEFAULT 'hive',
     CREATE_TIME INT,
     DB_MANAGED_LOCATION_URI nvarchar(4000) NULL,
-    TYPE nvarchar(32) DEFAULT 'native' NOT NULL,
+    TYPE nvarchar(32) DEFAULT 'NATIVE' NOT NULL,
     DATACONNECTOR_NAME nvarchar(128) NULL,
     REMOTE_DBNAME nvarchar(128) NULL
 );
diff --git 
a/standalone-metastore/metastore-server/src/main/sql/mssql/upgrade-3.2.0-to-4.0.0.mssql.sql
 
b/standalone-metastore/metastore-server/src/main/sql/mssql/upgrade-3.2.0-to-4.0.0.mssql.sql
index e6e1058..91bca6c 100644
--- 
a/standalone-metastore/metastore-server/src/main/sql/mssql/upgrade-3.2.0-to-4.0.0.mssql.sql
+++ 
b/standalone-metastore/metastore-server/src/main/sql/mssql/upgrade-3.2.0-to-4.0.0.mssql.sql
@@ -201,7 +201,7 @@ CREATE TABLE "DATACONNECTOR_PARAMS"(
   PRIMARY KEY ("NAME", "PARAM_KEY"),
   CONSTRAINT DATACONNECTOR_NAME_FK1 FOREIGN KEY ("NAME") REFERENCES 
"DATACONNECTORS" ("NAME") ON DELETE CASCADE
 );
-ALTER TABLE "DBS" ADD "TYPE" nvarchar(32) DEFAULT "NATIVE" NOT NULL;
+ALTER TABLE "DBS" ADD "TYPE" nvarchar(32) DEFAULT 'NATIVE' NOT NULL;
 ALTER TABLE "DBS" ADD "DATACONNECTOR_NAME" nvarchar(128) NULL;
 ALTER TABLE "DBS" ADD "REMOTE_DBNAME" nvarchar(128) NULL;
 UPDATE "DBS" SET TYPE='NATIVE' WHERE TYPE IS NULL;

Reply via email to