tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject [4/4] tajo git commit: TAJO-1594: Catalog schema is invalid for some databases. (jihoon)
Date Fri, 08 May 2015 05:53:55 GMT
TAJO-1594: Catalog schema is invalid for some databases. (jihoon)

Closes #563


Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/410ca318
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/410ca318
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/410ca318

Branch: refs/heads/index_support
Commit: 410ca31889467b48fe77f24d0fcba37ed1f70b43
Parents: 5096081
Author: Jihoon Son <jihoonson@apache.org>
Authored: Fri May 8 14:54:39 2015 +0900
Committer: Jihoon Son <jihoonson@apache.org>
Committed: Fri May 8 14:55:10 2015 +0900

----------------------------------------------------------------------
 CHANGES                                            |  2 ++
 .../src/main/resources/schemas/derby/derby.xml     |  2 ++
 .../src/main/resources/schemas/mariadb/mariadb.xml | 17 +++++++++--------
 .../src/main/resources/schemas/mysql/mysql.xml     | 17 +++++++++--------
 .../src/main/resources/schemas/oracle/oracle.xml   |  9 ++++++---
 5 files changed, 28 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/410ca318/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index d448c09..67d656f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -114,6 +114,8 @@ Release 0.11.0 - unreleased
 
   BUG FIXES
 
+    TAJO-1594: Catalog schema is invalid for some databases. (jihoon)
+
     TAJO-1556: "insert into select" with reordered column list does not work.
     (Contributed by Yongjin Choi, Committed by jihoon)
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/410ca318/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/derby/derby.xml
----------------------------------------------------------------------
diff --git a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/derby/derby.xml b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/derby/derby.xml
index f3431e4..203e492 100644
--- a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/derby/derby.xml
+++ b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/derby/derby.xml
@@ -117,6 +117,8 @@
 					NULL_ORDERS VARCHAR(128) NOT NULL, -- array of null orderings
 					IS_UNIQUE BOOLEAN NOT NULL,
 					IS_CLUSTERED BOOLEAN NOT NULL,
+					FOREIGN KEY (DB_ID) REFERENCES DATABASES_ (DB_ID) ON DELETE CASCADE,
+					FOREIGN KEY (TID) REFERENCES TABLES (TID) ON DELETE CASCADE,
 					CONSTRAINT INDEXES_PK PRIMARY KEY (INDEX_ID),
 					CONSTRAINT C_INDEXES_UNIQ UNIQUE (DB_ID, INDEX_NAME)
 				)]]>

http://git-wip-us.apache.org/repos/asf/tajo/blob/410ca318/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mariadb/mariadb.xml
----------------------------------------------------------------------
diff --git a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mariadb/mariadb.xml
b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mariadb/mariadb.xml
index 79ccd0a..cee060b 100644
--- a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mariadb/mariadb.xml
+++ b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mariadb/mariadb.xml
@@ -94,20 +94,21 @@
       <tns:Object order="6" type="table" name="INDEXES">
         <tns:sql><![CDATA[
         CREATE TABLE INDEXES (
+          INDEX_ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
           DB_ID INT NOT NULL,
           TID INT NOT NULL,
-          INDEX_NAME VARCHAR(128) BINARY NOT NULL,
-          COLUMN_NAME VARCHAR(128) BINARY NOT NULL,
-          DATA_TYPE VARCHAR(128) NOT NULL,
-          INDEX_TYPE CHAR(32) NOT NULL,
+          INDEX_NAME VARCHAR(128) NOT NULL,
+          INDEX_TYPE CHAR(32) BINARY NOT NULL,
+          PATH VARCHAR(4096) NOT NULL,
+          COLUMN_NAMES VARCHAR(256) NOT NULL, -- array of column names
+          DATA_TYPES VARCHAR(128) NOT NULL, -- array of column types
+          ORDERS VARCHAR(128) NOT NULL, -- array of column orders
+          NULL_ORDERS VARCHAR(128) NOT NULL, -- array of null orderings
           IS_UNIQUE BOOLEAN NOT NULL,
           IS_CLUSTERED BOOLEAN NOT NULL,
-          IS_ASCENDING BOOLEAN NOT NULL,
-          PRIMARY KEY (DB_ID, INDEX_NAME),
           FOREIGN KEY (DB_ID) REFERENCES DATABASES_ (DB_ID) ON DELETE CASCADE,
           FOREIGN KEY (TID) REFERENCES TABLES (TID) ON DELETE CASCADE,
-          UNIQUE INDEX IDX_DB_ID_NAME (DB_ID, INDEX_NAME),
-          INDEX IDX_TID_COLUMN_NAME (TID, COLUMN_NAME)
+          UNIQUE INDEX IDX_DB_ID_NAME (DB_ID, INDEX_NAME)
         )]]>
         </tns:sql>
       </tns:Object>

http://git-wip-us.apache.org/repos/asf/tajo/blob/410ca318/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mysql/mysql.xml
----------------------------------------------------------------------
diff --git a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mysql/mysql.xml b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mysql/mysql.xml
index 34337fb..3a1bc0a 100644
--- a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mysql/mysql.xml
+++ b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mysql/mysql.xml
@@ -95,20 +95,21 @@
       <tns:Object order="6" type="table" name="INDEXES">
         <tns:sql><![CDATA[
         CREATE TABLE INDEXES (
+          INDEX_ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
           DB_ID INT NOT NULL,
           TID INT NOT NULL,
-          INDEX_NAME VARCHAR(128) BINARY NOT NULL,
-          COLUMN_NAME VARCHAR(128) BINARY NOT NULL,
-          DATA_TYPE VARCHAR(128) NOT NULL,
-          INDEX_TYPE CHAR(32) NOT NULL,
+          INDEX_NAME VARCHAR(128) NOT NULL,
+          INDEX_TYPE CHAR(32) BINARY NOT NULL,
+          PATH VARCHAR(4096) NOT NULL,
+          COLUMN_NAMES VARCHAR(256) NOT NULL, -- array of column names
+          DATA_TYPES VARCHAR(128) NOT NULL, -- array of column types
+          ORDERS VARCHAR(128) NOT NULL, -- array of column orders
+          NULL_ORDERS VARCHAR(128) NOT NULL, -- array of null orderings
           IS_UNIQUE BOOLEAN NOT NULL,
           IS_CLUSTERED BOOLEAN NOT NULL,
-          IS_ASCENDING BOOLEAN NOT NULL,
-          PRIMARY KEY (DB_ID, INDEX_NAME),
           FOREIGN KEY (DB_ID) REFERENCES DATABASES_ (DB_ID) ON DELETE CASCADE,
           FOREIGN KEY (TID) REFERENCES TABLES (TID) ON DELETE CASCADE,
-          UNIQUE INDEX IDX_DB_ID_NAME (DB_ID, INDEX_NAME),
-          INDEX IDX_TID_COLUMN_NAME (TID, COLUMN_NAME)
+          UNIQUE INDEX IDX_DB_ID_NAME (DB_ID, INDEX_NAME)
         )]]>
         </tns:sql>
       </tns:Object>

http://git-wip-us.apache.org/repos/asf/tajo/blob/410ca318/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/oracle/oracle.xml
----------------------------------------------------------------------
diff --git a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/oracle/oracle.xml
b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/oracle/oracle.xml
index b83d899..5b5d17d 100644
--- a/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/oracle/oracle.xml
+++ b/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/oracle/oracle.xml
@@ -146,16 +146,19 @@
   		<tns:Object order="14" type="table" name="INDEXES">
   			<tns:sql><![CDATA[
   			CREATE TABLE INDEXES (
+  				INDEX_ID NUMBER(10) NOT NULL PRIMARY KEY,
   				DB_ID INT NOT NULL,
   				TID INT NOT NULL,
   				INDEX_NAME VARCHAR2(128) NOT NULL,
-  				COLUMN_NAME VARCHAR2(128) NOT NULL,
-  				DATA_TYPE VARCHAR2(128) NOT NULL,
   				INDEX_TYPE CHAR(32) NOT NULL,
+  				PATH VARCHAR(4096) NOT NULL,
+  				COLUMN_NAMES VARCHAR(256) NOT NULL, -- array of column names
+  				DATA_TYPES VARCHAR(128) NOT NULL, -- array of column types
+  				ORDERS VARCHAR(128) NOT NULL, -- array of column orders
+  				NULL_ORDERS VARCHAR(128) NOT NULL, -- array of null orderings
   				IS_UNIQUE CHAR NOT NULL,
   				IS_CLUSTERED CHAR NOT NULL,
   				IS_ASCENDING CHAR NOT NULL,
-  				CONSTRAINT INDEXES_PKEY PRIMARY KEY (DB_ID, INDEX_NAME),
   				FOREIGN KEY (DB_ID) REFERENCES DATABASES_ (DB_ID) ON DELETE CASCADE,
   				FOREIGN KEY (TID) REFERENCES TABLES (TID) ON DELETE CASCADE
 				)]]>


Mime
View raw message