hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1640624 - in /hive/branches/branch-0.14/metastore/scripts/upgrade/oracle: 020-HIVE-7784.oracle.sql pre-0-upgrade-0.13.0-to-0.14.0.oracle.sql
Date Wed, 19 Nov 2014 19:50:03 GMT
Author: sershe
Date: Wed Nov 19 19:50:03 2014
New Revision: 1640624

URL: http://svn.apache.org/r1640624
Log:
HIVE-8876 : incorrect upgrade script for Oracle (13->14) (Sergey Shelukhin, reviewed by
Ashutosh Chauhan)

Added:
    hive/branches/branch-0.14/metastore/scripts/upgrade/oracle/pre-0-upgrade-0.13.0-to-0.14.0.oracle.sql
Modified:
    hive/branches/branch-0.14/metastore/scripts/upgrade/oracle/020-HIVE-7784.oracle.sql

Modified: hive/branches/branch-0.14/metastore/scripts/upgrade/oracle/020-HIVE-7784.oracle.sql
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/metastore/scripts/upgrade/oracle/020-HIVE-7784.oracle.sql?rev=1640624&r1=1640623&r2=1640624&view=diff
==============================================================================
--- hive/branches/branch-0.14/metastore/scripts/upgrade/oracle/020-HIVE-7784.oracle.sql (original)
+++ hive/branches/branch-0.14/metastore/scripts/upgrade/oracle/020-HIVE-7784.oracle.sql Wed
Nov 19 19:50:03 2014
@@ -1,13 +1,2 @@
---
--- Create the table if it doesn't exist.
---
-declare pcs_count int;
-begin
-   select count(*) into pcs_count from user_tables where table_name = 'PART_COL_STATS';
-   if pcs_count = 0 then
-     EXECUTE IMMEDIATE 'CREATE TABLE PART_COL_STATS (CS_ID NUMBER NOT NULL, DB_NAME VARCHAR2(128)
NOT NULL, TABLE_NAME VARCHAR2(128) NOT NULL, PARTITION_NAME VARCHAR2(767) NOT NULL, COLUMN_NAME
VARCHAR2(128) NOT NULL, COLUMN_TYPE VARCHAR2(128) NOT NULL, PART_ID NUMBER NOT NULL,     
LONG_LOW_VALUE NUMBER, LONG_HIGH_VALUE NUMBER, DOUBLE_LOW_VALUE NUMBER, DOUBLE_HIGH_VALUE
NUMBER,      BIG_DECIMAL_LOW_VALUE VARCHAR2(4000), BIG_DECIMAL_HIGH_VALUE VARCHAR2(4000),
NUM_NULLS NUMBER NOT NULL, NUM_DISTINCTS NUMBER, AVG_COL_LEN NUMBER, MAX_COL_LEN NUMBER, NUM_TRUES
NUMBER, NUM_FALSES NUMBER, LAST_ANALYZED NUMBER NOT NULL)';
-   end if;
-end;
-/
-
 CREATE INDEX PCS_STATS_IDX ON PART_COL_STATS (DB_NAME,TABLE_NAME,COLUMN_NAME,PARTITION_NAME);
+

Added: hive/branches/branch-0.14/metastore/scripts/upgrade/oracle/pre-0-upgrade-0.13.0-to-0.14.0.oracle.sql
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/metastore/scripts/upgrade/oracle/pre-0-upgrade-0.13.0-to-0.14.0.oracle.sql?rev=1640624&view=auto
==============================================================================
--- hive/branches/branch-0.14/metastore/scripts/upgrade/oracle/pre-0-upgrade-0.13.0-to-0.14.0.oracle.sql
(added)
+++ hive/branches/branch-0.14/metastore/scripts/upgrade/oracle/pre-0-upgrade-0.13.0-to-0.14.0.oracle.sql
Wed Nov 19 19:50:03 2014
@@ -0,0 +1,23 @@
+-- Oracle has no easy way to do CREATE TABLE IF NOT EXISTS compatible with SchemaTool, so
do it here
+
+CREATE TABLE PART_COL_STATS (
+CS_ID NUMBER NOT NULL,
+DB_NAME VARCHAR2(128) NOT NULL,
+TABLE_NAME VARCHAR2(128) NOT NULL,
+PARTITION_NAME VARCHAR2(767) NOT NULL,
+COLUMN_NAME VARCHAR2(128) NOT NULL,
+COLUMN_TYPE VARCHAR2(128) NOT NULL,
+PART_ID NUMBER NOT NULL,
+LONG_LOW_VALUE NUMBER,
+LONG_HIGH_VALUE NUMBER,
+DOUBLE_LOW_VALUE NUMBER,
+DOUBLE_HIGH_VALUE NUMBER,
+BIG_DECIMAL_LOW_VALUE VARCHAR2(4000),
+BIG_DECIMAL_HIGH_VALUE VARCHAR2(4000),
+NUM_NULLS NUMBER NOT NULL,
+NUM_DISTINCTS NUMBER,
+AVG_COL_LEN NUMBER,
+MAX_COL_LEN NUMBER,
+NUM_TRUES NUMBER,
+NUM_FALSES NUMBER,
+LAST_ANALYZED NUMBER NOT NULL);



Mime
View raw message