tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject [3/5] tajo git commit: TAJO-2099: Implement an Adapter for legacy Schema.
Date Mon, 28 Mar 2016 04:07:26 GMT
http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestJoinOrderAlgorithm.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestJoinOrderAlgorithm.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestJoinOrderAlgorithm.java
index 4ae3e5a..ce5a6ab 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestJoinOrderAlgorithm.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestJoinOrderAlgorithm.java
@@ -67,16 +67,16 @@ public class TestJoinOrderAlgorithm {
       catalog.createFunction(funcDesc);
     }
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("name", Type.TEXT);
     schema.addColumn("empid", Type.INT4);
     schema.addColumn("deptname", Type.TEXT);
 
-    Schema schema2 = new Schema();
+    Schema schema2 = SchemaFactory.newV1();
     schema2.addColumn("deptname", Type.TEXT);
     schema2.addColumn("manager", Type.TEXT);
 
-    Schema schema3 = new Schema();
+    Schema schema3 = SchemaFactory.newV1();
     schema3.addColumn("deptname", Type.TEXT);
     schema3.addColumn("score", Type.INT4);
     schema3.addColumn("phone", Type.INT4);
@@ -101,7 +101,7 @@ public class TestJoinOrderAlgorithm {
 
     ///////////////////////////////////////////////////////////////////////////
     // creating table for overflow in JoinOrderOptimizer.
-    Schema schema4 = new Schema();
+    Schema schema4 = SchemaFactory.newV1();
     schema4.addColumn("deptname", Type.TEXT);
     schema4.addColumn("manager", Type.TEXT);
     // Set store type as FAKEFILE to prevent auto update of physical information in LogicalPlanner.updatePhysicalInfo()

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestLogicalOptimizer.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestLogicalOptimizer.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestLogicalOptimizer.java
index 1b911a1..56ef78b 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestLogicalOptimizer.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestLogicalOptimizer.java
@@ -65,16 +65,16 @@ public class TestLogicalOptimizer {
       catalog.createFunction(funcDesc);
     }
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("name", Type.TEXT);
     schema.addColumn("empid", Type.INT4);
     schema.addColumn("deptname", Type.TEXT);
 
-    Schema schema2 = new Schema();
+    Schema schema2 = SchemaFactory.newV1();
     schema2.addColumn("deptname", Type.TEXT);
     schema2.addColumn("manager", Type.TEXT);
 
-    Schema schema3 = new Schema();
+    Schema schema3 = SchemaFactory.newV1();
     schema3.addColumn("deptname", Type.TEXT);
     schema3.addColumn("score", Type.INT4);
     schema3.addColumn("phone", Type.INT4);

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestLogicalPlanner.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestLogicalPlanner.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestLogicalPlanner.java
index 98874ba..d09ef77 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestLogicalPlanner.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestLogicalPlanner.java
@@ -86,16 +86,16 @@ public class TestLogicalPlanner {
       catalog.createFunction(funcDesc);
     }
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("name", Type.TEXT);
     schema.addColumn("empid", Type.INT4);
     schema.addColumn("deptname", Type.TEXT);
 
-    Schema schema2 = new Schema();
+    Schema schema2 = SchemaFactory.newV1();
     schema2.addColumn("deptname", Type.TEXT);
     schema2.addColumn("manager", Type.TEXT);
 
-    Schema schema3 = new Schema();
+    Schema schema3 = SchemaFactory.newV1();
     schema3.addColumn("deptname", Type.TEXT);
     schema3.addColumn("score", Type.INT4);
 
@@ -222,7 +222,7 @@ public class TestLogicalPlanner {
     testJsonSerDerObject(root);
     testCloneLogicalNode(root);
 
-    Schema expectedSchema = new Schema();
+    Schema expectedSchema = SchemaFactory.newV1();
     expectedSchema.addColumn("name", Type.TEXT);
     expectedSchema.addColumn("empid", Type.INT4);
     expectedSchema.addColumn("deptname", Type.TEXT);
@@ -291,7 +291,7 @@ public class TestLogicalPlanner {
 
   static Schema expectedJoinSchema;
   static {
-    expectedJoinSchema = new Schema();
+    expectedJoinSchema = SchemaFactory.newV1();
     expectedJoinSchema.addColumn("name", Type.TEXT);
     expectedJoinSchema.addColumn("deptname", Type.TEXT);
     expectedJoinSchema.addColumn("score", Type.INT4);
@@ -1290,7 +1290,7 @@ public class TestLogicalPlanner {
     String tableName = CatalogUtil.normalizeIdentifier("partitioned_table");
     String qualifiedTableName = CatalogUtil.buildFQName(DEFAULT_DATABASE_NAME, tableName);
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", Type.INT4)
       .addColumn("name", Type.TEXT)
       .addColumn("age", Type.INT4)
@@ -1299,7 +1299,7 @@ public class TestLogicalPlanner {
     KeyValueSet opts = new KeyValueSet();
     opts.set("file.delimiter", ",");
 
-    Schema partSchema = new Schema();
+    Schema partSchema = SchemaFactory.newV1();
     partSchema.addColumn("id", Type.INT4);
     partSchema.addColumn("name", Type.TEXT);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestPlannerUtil.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestPlannerUtil.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestPlannerUtil.java
index c9e0c46..6479124 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestPlannerUtil.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestPlannerUtil.java
@@ -72,16 +72,16 @@ public class TestPlannerUtil {
     catalog.createTablespace(DEFAULT_TABLESPACE_NAME, "hdfs://localhost:1234/warehouse");
     catalog.createDatabase(DEFAULT_DATABASE_NAME, DEFAULT_TABLESPACE_NAME);
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("name", Type.TEXT);
     schema.addColumn("empid", CatalogUtil.newSimpleDataType(Type.INT4));
     schema.addColumn("deptname", Type.TEXT);
 
-    Schema schema2 = new Schema();
+    Schema schema2 = SchemaFactory.newV1();
     schema2.addColumn("deptname", Type.TEXT);
     schema2.addColumn("manager", Type.TEXT);
 
-    Schema schema3 = new Schema();
+    Schema schema3 = SchemaFactory.newV1();
     schema3.addColumn("deptname", Type.TEXT);
     schema3.addColumn("score", CatalogUtil.newSimpleDataType(Type.INT4));
 
@@ -188,10 +188,10 @@ public class TestPlannerUtil {
 
   @Test
   public final void testGetJoinKeyPairs() {
-    Schema outerSchema = new Schema();
+    Schema outerSchema = SchemaFactory.newV1();
     outerSchema.addColumn("employee.id1", CatalogUtil.newSimpleDataType(Type.INT4));
     outerSchema.addColumn("employee.id2", CatalogUtil.newSimpleDataType(Type.INT4));
-    Schema innerSchema = new Schema();
+    Schema innerSchema = SchemaFactory.newV1();
     innerSchema.addColumn("people.fid1", CatalogUtil.newSimpleDataType(Type.INT4));
     innerSchema.addColumn("people.fid2", CatalogUtil.newSimpleDataType(Type.INT4));
 
@@ -250,10 +250,10 @@ public class TestPlannerUtil {
 
   @Test
   public final void testGetSortKeysFromJoinQual() {
-    Schema outerSchema = new Schema();
+    Schema outerSchema = SchemaFactory.newV1();
     outerSchema.addColumn("employee.id1", CatalogUtil.newSimpleDataType(Type.INT4));
     outerSchema.addColumn("employee.id2", CatalogUtil.newSimpleDataType(Type.INT4));
-    Schema innerSchema = new Schema();
+    Schema innerSchema = SchemaFactory.newV1();
     innerSchema.addColumn("people.fid1", CatalogUtil.newSimpleDataType(Type.INT4));
     innerSchema.addColumn("people.fid2", CatalogUtil.newSimpleDataType(Type.INT4));
 
@@ -286,10 +286,10 @@ public class TestPlannerUtil {
 
   @Test
   public final void testComparatorsFromJoinQual() {
-    Schema outerSchema = new Schema();
+    Schema outerSchema = SchemaFactory.newV1();
     outerSchema.addColumn("employee.id1", CatalogUtil.newSimpleDataType(Type.INT4));
     outerSchema.addColumn("employee.id2", CatalogUtil.newSimpleDataType(Type.INT4));
-    Schema innerSchema = new Schema();
+    Schema innerSchema = SchemaFactory.newV1();
     innerSchema.addColumn("people.fid1", CatalogUtil.newSimpleDataType(Type.INT4));
     innerSchema.addColumn("people.fid2", CatalogUtil.newSimpleDataType(Type.INT4));
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestUniformRangePartition.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestUniformRangePartition.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestUniformRangePartition.java
index 178af47..ece17c7 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestUniformRangePartition.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/TestUniformRangePartition.java
@@ -19,6 +19,7 @@
 package org.apache.tajo.engine.planner;
 
 import org.apache.tajo.catalog.Schema;
+import org.apache.tajo.catalog.SchemaFactory;
 import org.apache.tajo.catalog.SortSpec;
 import org.apache.tajo.common.TajoDataTypes.Type;
 import org.apache.tajo.datum.DatumFactory;
@@ -38,7 +39,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForINT2Asc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.INT2);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -68,7 +69,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForINT2Desc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.INT2);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -99,7 +100,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForINT4Asc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.INT4);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -129,7 +130,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForINT4Desc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.INT4);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -160,7 +161,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForINT8Asc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.INT8);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -190,7 +191,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForInt8Desc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.INT8);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -221,7 +222,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForFloat4Asc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.FLOAT4);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -251,7 +252,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForFloat4Desc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.FLOAT4);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -282,7 +283,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForFloat8Asc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.FLOAT8);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -312,7 +313,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForFloat8Desc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.FLOAT8);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -346,7 +347,7 @@ public class TestUniformRangePartition {
    */
   @Test
   public void testIncrementOfText() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("l_returnflag", Type.TEXT)
         .addColumn("l_linestatus", Type.TEXT);
 
@@ -393,7 +394,7 @@ public class TestUniformRangePartition {
    */
   @Test
   public void testIncrementOfText2() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("l_returnflag", Type.TEXT)
         .addColumn("l_linestatus", Type.TEXT);
 
@@ -438,7 +439,7 @@ public class TestUniformRangePartition {
    */
   @Test
   public void testIncrementOfText3() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("l_returnflag", Type.TEXT)
         .addColumn("l_linestatus", Type.TEXT)
         .addColumn("final", Type.TEXT);
@@ -471,7 +472,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testIncrementOfUnicode() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.TEXT);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -499,7 +500,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testIncrementOfUnicodeOneCharSinglePartition() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.TEXT);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -529,7 +530,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testIncrementOfUnicodeOneCharMultiPartition() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.TEXT);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -559,7 +560,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForUnicodeTextAsc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.TEXT);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -589,7 +590,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForUnicodeDiffLenBeginTextAsc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.TEXT);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -619,7 +620,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForUnicodeDiffLenEndTextAsc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.TEXT);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -649,7 +650,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForUnicodeTextDesc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.TEXT);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -680,7 +681,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForUnicodeDiffLenBeginTextDesc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.TEXT);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -711,7 +712,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForUnicodeDiffLenEndTextDesc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("col1", Type.TEXT);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -742,7 +743,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testIncrementOfInt8() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("l_orderkey", Type.INT8)
         .addColumn("l_linenumber", Type.INT8);
 
@@ -769,7 +770,7 @@ public class TestUniformRangePartition {
   }
 
   @Test public void testIncrementOfInt8AndFinal() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("l_orderkey", Type.INT8)
         .addColumn("l_linenumber", Type.INT8)
         .addColumn("final", Type.INT8);
@@ -802,7 +803,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testIncrementOfFloat8() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("l_orderkey", Type.FLOAT8)
         .addColumn("l_linenumber", Type.FLOAT8)
         .addColumn("final", Type.FLOAT8);
@@ -835,7 +836,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testIncrementOfInet4() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("l_orderkey", Type.INET4)
         .addColumn("l_linenumber", Type.INET4)
         .addColumn("final", Type.INET4);
@@ -868,7 +869,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartition() {
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("l_returnflag", Type.TEXT);
     schema.addColumn("l_linestatus", Type.TEXT);
 
@@ -897,7 +898,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForOnePartNum() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("l_returnflag", Type.TEXT)
         .addColumn("l_linestatus", Type.TEXT);
 
@@ -919,7 +920,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForOnePartNumWithOneOfTheValueNull() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("l_returnflag", Type.TEXT)
         .addColumn("l_linestatus", Type.TEXT);
 
@@ -941,7 +942,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForMultipleChars() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("KEY1", Type.TEXT);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -970,7 +971,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForMultipleChars2() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("KEY1", Type.TEXT);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -1001,7 +1002,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForMultipleChars2Desc() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("KEY1", Type.TEXT);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -1033,7 +1034,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForMultipleCharsWithSameFirstChar() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("KEY1", Type.TEXT);
 
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
@@ -1064,7 +1065,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionForOnePartNumWithBothValueNull() {
-    Schema schema = new Schema()
+    Schema schema = SchemaFactory.newV1()
         .addColumn("l_returnflag", Type.TEXT)
         .addColumn("l_linestatus", Type.TEXT);
 
@@ -1086,7 +1087,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionWithNull() {
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("l_returnflag", Type.TEXT);
     schema.addColumn("l_linestatus", Type.TEXT);
 
@@ -1115,7 +1116,7 @@ public class TestUniformRangePartition {
 
   @Test
   public void testPartitionWithINET4() {
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("l_returnflag", Type.INET4);
     schema.addColumn("l_linestatus", Type.INET4);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java
index 30c46e5..580fe86 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java
@@ -79,7 +79,7 @@ public class TestExternalSortExec {
     catalog.createDatabase(TajoConstants.DEFAULT_DATABASE_NAME, DEFAULT_TABLESPACE_NAME);
     conf.setVar(TajoConf.ConfVars.WORKER_TEMPORAL_DIR, testDir.toString());
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("managerid", Type.INT4);
     schema.addColumn("empid", Type.INT4);
     schema.addColumn("deptname", Type.TEXT);

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java
index 2e26a2a..40dc373 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java
@@ -101,7 +101,7 @@ public class TestFullOuterHashJoinExec {
     //  7     | dep_7     | 1007
     //  8     | dep_8     | 1008
     //  9     | dep_9     | 1009
-    Schema dep3Schema = new Schema();
+    Schema dep3Schema = SchemaFactory.newV1();
     dep3Schema.addColumn("dep_id", Type.INT4);
     dep3Schema.addColumn("dep_name", Type.TEXT);
     dep3Schema.addColumn("loc_id", Type.INT4);
@@ -131,7 +131,7 @@ public class TestFullOuterHashJoinExec {
     //   102    |  job_102
     //   103    |  job_103
 
-    Schema job3Schema = new Schema();
+    Schema job3Schema = SchemaFactory.newV1();
     job3Schema.addColumn("job_id", Type.INT4);
     job3Schema.addColumn("job_title", Type.TEXT);
 
@@ -166,7 +166,7 @@ public class TestFullOuterHashJoinExec {
     //  21     |  fn_21     |  ln_21    |  1     | 123    | 101
     //  23     |  fn_23     |  ln_23    |  3     | 369    | 103
 
-    Schema emp3Schema = new Schema();
+    Schema emp3Schema = SchemaFactory.newV1();
     emp3Schema.addColumn("emp_id", Type.INT4);
     emp3Schema.addColumn("first_name", Type.TEXT);
     emp3Schema.addColumn("last_name", Type.TEXT);
@@ -222,7 +222,7 @@ public class TestFullOuterHashJoinExec {
     // -----------------------------------------------
     // this table is empty, no rows
 
-    Schema phone3Schema = new Schema();
+    Schema phone3Schema = SchemaFactory.newV1();
     phone3Schema.addColumn("emp_id", Type.INT4);
     phone3Schema.addColumn("phone_number", Type.TEXT);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java
index fd42b9a..9c426ad 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java
@@ -105,7 +105,7 @@ public class TestFullOuterMergeJoinExec {
     //  7     | dep_7     | 1007
     //  8     | dep_8     | 1008
     //  9     | dep_9     | 1009
-    Schema dep3Schema = new Schema();
+    Schema dep3Schema = SchemaFactory.newV1();
     dep3Schema.addColumn("dep_id", Type.INT4);
     dep3Schema.addColumn("dep_name", Type.TEXT);
     dep3Schema.addColumn("loc_id", Type.INT4);
@@ -143,7 +143,7 @@ public class TestFullOuterMergeJoinExec {
     //  8     | dep_8     | 1008
     //  9     | dep_9     | 1009
     // 10     | dep_10    | 1010
-    Schema dep4Schema = new Schema();
+    Schema dep4Schema = SchemaFactory.newV1();
     dep4Schema.addColumn("dep_id", Type.INT4);
     dep4Schema.addColumn("dep_name", Type.TEXT);
     dep4Schema.addColumn("loc_id", Type.INT4);
@@ -175,7 +175,7 @@ public class TestFullOuterMergeJoinExec {
     //   102    |  job_102
     //   103    |  job_103
 
-    Schema job3Schema = new Schema();
+    Schema job3Schema = SchemaFactory.newV1();
     job3Schema.addColumn("job_id", Type.INT4);
     job3Schema.addColumn("job_title", Type.TEXT);
 
@@ -210,7 +210,7 @@ public class TestFullOuterMergeJoinExec {
     //  21     |  fn_21     |  ln_21    |  1     | 123    | 101
     //  23     |  fn_23     |  ln_23    |  3     | 369    | 103
 
-    Schema emp3Schema = new Schema();
+    Schema emp3Schema = SchemaFactory.newV1();
     emp3Schema.addColumn("emp_id", Type.INT4);
     emp3Schema.addColumn("first_name", Type.TEXT);
     emp3Schema.addColumn("last_name", Type.TEXT);
@@ -266,7 +266,7 @@ public class TestFullOuterMergeJoinExec {
     // -----------------------------------------------
     // this table is empty, no rows
 
-    Schema phone3Schema = new Schema();
+    Schema phone3Schema = SchemaFactory.newV1();
     phone3Schema.addColumn("emp_id", Type.INT4);
     phone3Schema.addColumn("phone_number", Type.TEXT);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java
index aeda300..f4257f1 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java
@@ -78,7 +78,7 @@ public class TestHashAntiJoinExec {
     catalog.createDatabase(DEFAULT_DATABASE_NAME, DEFAULT_TABLESPACE_NAME);
     conf = util.getConfiguration();
 
-    Schema employeeSchema = new Schema();
+    Schema employeeSchema = SchemaFactory.newV1();
     employeeSchema.addColumn("managerid", Type.INT4);
     employeeSchema.addColumn("empid", Type.INT4);
     employeeSchema.addColumn("memid", Type.INT4);
@@ -105,7 +105,7 @@ public class TestHashAntiJoinExec {
     employee = CatalogUtil.newTableDesc("default.employee", employeeSchema, employeeMeta, employeePath);
     catalog.createTable(employee);
 
-    Schema peopleSchema = new Schema();
+    Schema peopleSchema = SchemaFactory.newV1();
     peopleSchema.addColumn("empid", Type.INT4);
     peopleSchema.addColumn("fk_memid", Type.INT4);
     peopleSchema.addColumn("name", Type.TEXT);

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java
index 2f4d66f..0731d9c 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java
@@ -80,7 +80,7 @@ public class TestHashJoinExec {
     catalog.createDatabase(TajoConstants.DEFAULT_DATABASE_NAME, DEFAULT_TABLESPACE_NAME);
     conf = util.getConfiguration();
 
-    Schema employeeSchema = new Schema();
+    Schema employeeSchema = SchemaFactory.newV1();
     employeeSchema.addColumn("managerid", Type.INT4);
     employeeSchema.addColumn("empid", Type.INT4);
     employeeSchema.addColumn("memid", Type.INT4);
@@ -104,7 +104,7 @@ public class TestHashJoinExec {
     employee = CatalogUtil.newTableDesc("default.employee", employeeSchema, employeeMeta, employeePath);
     catalog.createTable(employee);
 
-    Schema peopleSchema = new Schema();
+    Schema peopleSchema = SchemaFactory.newV1();
     peopleSchema.addColumn("empid", Type.INT4);
     peopleSchema.addColumn("fk_memid", Type.INT4);
     peopleSchema.addColumn("name", Type.TEXT);

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java
index 2b50310..5244652 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java
@@ -78,7 +78,7 @@ public class TestHashSemiJoinExec {
     catalog.createDatabase(DEFAULT_DATABASE_NAME, DEFAULT_TABLESPACE_NAME);
     conf = util.getConfiguration();
 
-    Schema employeeSchema = new Schema();
+    Schema employeeSchema = SchemaFactory.newV1();
     employeeSchema.addColumn("managerid", Type.INT4);
     employeeSchema.addColumn("empid", Type.INT4);
     employeeSchema.addColumn("memid", Type.INT4);
@@ -105,7 +105,7 @@ public class TestHashSemiJoinExec {
     employee = CatalogUtil.newTableDesc("default.employee", employeeSchema, employeeMeta, employeePath);
     catalog.createTable(employee);
 
-    Schema peopleSchema = new Schema();
+    Schema peopleSchema = SchemaFactory.newV1();
     peopleSchema.addColumn("empid", Type.INT4);
     peopleSchema.addColumn("fk_memid", Type.INT4);
     peopleSchema.addColumn("name", Type.TEXT);

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java
index ab5f509..61ccd00 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java
@@ -99,7 +99,7 @@ public class TestLeftOuterHashJoinExec {
     //  7     | dep_7     | 1007
     //  8     | dep_8     | 1008
     //  9     | dep_9     | 1009
-    Schema dep3Schema = new Schema();
+    Schema dep3Schema = SchemaFactory.newV1();
     dep3Schema.addColumn("dep_id", Type.INT4);
     dep3Schema.addColumn("dep_name", Type.TEXT);
     dep3Schema.addColumn("loc_id", Type.INT4);
@@ -129,7 +129,7 @@ public class TestLeftOuterHashJoinExec {
     //   102    |  job_102
     //   103    |  job_103
 
-    Schema job3Schema = new Schema();
+    Schema job3Schema = SchemaFactory.newV1();
     job3Schema.addColumn("job_id", Type.INT4);
     job3Schema.addColumn("job_title", Type.TEXT);
 
@@ -165,7 +165,7 @@ public class TestLeftOuterHashJoinExec {
     //  21     |  fn_21     |  ln_21    |  1     | 123    | 101
     //  23     |  fn_23     |  ln_23    |  3     | 369    | 103
 
-    Schema emp3Schema = new Schema();
+    Schema emp3Schema = SchemaFactory.newV1();
     emp3Schema.addColumn("emp_id", Type.INT4);
     emp3Schema.addColumn("first_name", Type.TEXT);
     emp3Schema.addColumn("last_name", Type.TEXT);
@@ -222,7 +222,7 @@ public class TestLeftOuterHashJoinExec {
     // -----------------------------------------------
     // this table is empty, no rows
 
-    Schema phone3Schema = new Schema();
+    Schema phone3Schema = SchemaFactory.newV1();
     phone3Schema.addColumn("emp_id", Type.INT4);
     phone3Schema.addColumn("phone_number", Type.TEXT);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
index d297825..88018e9 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
@@ -78,7 +78,7 @@ public class TestMergeJoinExec {
     catalog.createDatabase(TajoConstants.DEFAULT_DATABASE_NAME, DEFAULT_TABLESPACE_NAME);
     conf = util.getConfiguration();
 
-    Schema employeeSchema = new Schema();
+    Schema employeeSchema = SchemaFactory.newV1();
     employeeSchema.addColumn("managerid", Type.INT4);
     employeeSchema.addColumn("empid", Type.INT4);
     employeeSchema.addColumn("memid", Type.INT4);
@@ -108,7 +108,7 @@ public class TestMergeJoinExec {
     employee = CatalogUtil.newTableDesc("default.employee", employeeSchema, employeeMeta, employeePath);
     catalog.createTable(employee);
 
-    Schema peopleSchema = new Schema();
+    Schema peopleSchema = SchemaFactory.newV1();
     peopleSchema.addColumn("empid", Type.INT4);
     peopleSchema.addColumn("fk_memid", Type.INT4);
     peopleSchema.addColumn("name", Type.TEXT);

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
index 2528399..28d99b1 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
@@ -104,12 +104,12 @@ public class TestPhysicalPlanner {
       catalog.createFunction(funcDesc);
     }
 
-    Schema employeeSchema = new Schema();
+    Schema employeeSchema = SchemaFactory.newV1();
     employeeSchema.addColumn("name", Type.TEXT);
     employeeSchema.addColumn("empid", Type.INT4);
     employeeSchema.addColumn("deptname", Type.TEXT);
 
-    Schema scoreSchema = new Schema();
+    Schema scoreSchema = SchemaFactory.newV1();
     scoreSchema.addColumn("deptname", Type.TEXT);
     scoreSchema.addColumn("class", Type.TEXT);
     scoreSchema.addColumn("score", Type.INT4);

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestProgressExternalSortExec.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestProgressExternalSortExec.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestProgressExternalSortExec.java
index 15250a3..21a08bd 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestProgressExternalSortExec.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestProgressExternalSortExec.java
@@ -80,7 +80,7 @@ public class TestProgressExternalSortExec {
     catalog.createDatabase(DEFAULT_DATABASE_NAME, DEFAULT_TABLESPACE_NAME);
     conf.setVar(TajoConf.ConfVars.WORKER_TEMPORAL_DIR, testDir.toString());
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("managerid", TajoDataTypes.Type.INT4);
     schema.addColumn("empid", TajoDataTypes.Type.INT4);
     schema.addColumn("deptname", TajoDataTypes.Type.TEXT);

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java
index 9a7eaff..a5c54b8 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java
@@ -93,7 +93,7 @@ public class TestRightOuterHashJoinExec {
     //  7     | dep_7     | 1007
     //  8     | dep_8     | 1008
     //  9     | dep_9     | 1009
-    Schema dep3Schema = new Schema();
+    Schema dep3Schema = SchemaFactory.newV1();
     dep3Schema.addColumn("dep_id", Type.INT4);
     dep3Schema.addColumn("dep_name", Type.TEXT);
     dep3Schema.addColumn("loc_id", Type.INT4);
@@ -124,7 +124,7 @@ public class TestRightOuterHashJoinExec {
     //   102    |  job_102
     //   103    |  job_103
 
-    Schema job3Schema = new Schema();
+    Schema job3Schema = SchemaFactory.newV1();
     job3Schema.addColumn("job_id", Type.INT4);
     job3Schema.addColumn("job_title", Type.TEXT);
 
@@ -160,7 +160,7 @@ public class TestRightOuterHashJoinExec {
     //  21     |  fn_21     |  ln_21    |  1     | 123    | 101
     //  23     |  fn_23     |  ln_23    |  3     | 369    | 103
 
-    Schema emp3Schema = new Schema();
+    Schema emp3Schema = SchemaFactory.newV1();
     emp3Schema.addColumn("emp_id", Type.INT4);
     emp3Schema.addColumn("first_name", Type.TEXT);
     emp3Schema.addColumn("last_name", Type.TEXT);

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java
index 280722b..22946e9 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java
@@ -104,7 +104,7 @@ public class TestRightOuterMergeJoinExec {
     //  7     | dep_7     | 1007
     //  8     | dep_8     | 1008
     //  9     | dep_9     | 1009
-    Schema dep3Schema = new Schema();
+    Schema dep3Schema = SchemaFactory.newV1();
     dep3Schema.addColumn("dep_id", Type.INT4);
     dep3Schema.addColumn("dep_name", Type.TEXT);
     dep3Schema.addColumn("loc_id", Type.INT4);
@@ -143,7 +143,7 @@ public class TestRightOuterMergeJoinExec {
     //  8     | dep_8     | 1008
     //  9     | dep_9     | 1009
     // 10     | dep_10    | 1010
-    Schema dep4Schema = new Schema();
+    Schema dep4Schema = SchemaFactory.newV1();
     dep4Schema.addColumn("dep_id", Type.INT4);
     dep4Schema.addColumn("dep_name", Type.TEXT);
     dep4Schema.addColumn("loc_id", Type.INT4);
@@ -176,7 +176,7 @@ public class TestRightOuterMergeJoinExec {
     //   102    |  job_102
     //   103    |  job_103
 
-    Schema job3Schema = new Schema();
+    Schema job3Schema = SchemaFactory.newV1();
     job3Schema.addColumn("job_id", Type.INT4);
     job3Schema.addColumn("job_title", Type.TEXT);
 
@@ -212,7 +212,7 @@ public class TestRightOuterMergeJoinExec {
     //  21     |  fn_21     |  ln_21    |  1     | 123    | 101
     //  23     |  fn_23     |  ln_23    |  3     | 369    | 103
 
-    Schema emp3Schema = new Schema();
+    Schema emp3Schema = SchemaFactory.newV1();
     emp3Schema.addColumn("emp_id", Type.INT4);
     emp3Schema.addColumn("first_name", Type.TEXT);
     emp3Schema.addColumn("last_name", Type.TEXT);
@@ -269,7 +269,7 @@ public class TestRightOuterMergeJoinExec {
     // -----------------------------------------------
     // this table is empty, no rows
 
-    Schema phone3Schema = new Schema();
+    Schema phone3Schema = SchemaFactory.newV1();
     phone3Schema.addColumn("emp_id", Type.INT4);
     phone3Schema.addColumn("phone_number", Type.TEXT);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java
index 872815d..43cc719 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java
@@ -81,7 +81,7 @@ public class TestSortExec {
     workDir = CommonTestingUtil.getTestDir(TEST_PATH);
     sm = TablespaceManager.getLocalFs();
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("managerid", Type.INT4);
     schema.addColumn("empid", Type.INT4);
     schema.addColumn("deptname", Type.TEXT);
@@ -156,7 +156,7 @@ public class TestSortExec {
    * Later it should be moved TestUniformPartitions.
    */
   public void testTAJO_946() {
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("l_orderkey", Type.INT8);
     SortSpec [] sortSpecs = PlannerUtil.schemaToSortSpecs(schema);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestSortIntersectExec.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestSortIntersectExec.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestSortIntersectExec.java
index df78667..2012362 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestSortIntersectExec.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestSortIntersectExec.java
@@ -84,7 +84,7 @@ public class TestSortIntersectExec {
     catalog.createDatabase(DEFAULT_DATABASE_NAME, DEFAULT_TABLESPACE_NAME);
     conf = util.getConfiguration();
 
-    Schema employeeSchema1 = new Schema();
+    Schema employeeSchema1 = SchemaFactory.newV1();
     employeeSchema1.addColumn("managerid", TajoDataTypes.Type.INT4);
     employeeSchema1.addColumn("empid", TajoDataTypes.Type.INT4);
     employeeSchema1.addColumn("memid", TajoDataTypes.Type.INT4);
@@ -111,7 +111,7 @@ public class TestSortIntersectExec {
     employee1 = CatalogUtil.newTableDesc("default.employee1", employeeSchema1, employeeMeta1, employeePath1);
     catalog.createTable(employee1);
 
-    Schema employeeSchema2 = new Schema();
+    Schema employeeSchema2 = SchemaFactory.newV1();
     employeeSchema2.addColumn("managerid", TajoDataTypes.Type.INT4);
     employeeSchema2.addColumn("empid", TajoDataTypes.Type.INT4);
     employeeSchema2.addColumn("memid", TajoDataTypes.Type.INT4);

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestTupleSorter.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestTupleSorter.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestTupleSorter.java
index 2f7330b..3485df4 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestTupleSorter.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestTupleSorter.java
@@ -24,6 +24,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.tajo.catalog.Column;
 import org.apache.tajo.catalog.Schema;
+import org.apache.tajo.catalog.SchemaFactory;
 import org.apache.tajo.catalog.SortSpec;
 import org.apache.tajo.common.TajoDataTypes.Type;
 import org.apache.tajo.datum.Datum;
@@ -69,7 +70,7 @@ public class TestTupleSorter {
     Column col4 = new Column("col4", Type.INT8);
     Column col5 = new Column("col5", Type.INTERVAL);
 
-    Schema schema = new Schema(new Column[] {col0, col1, col2, col3, col4, col5});
+    Schema schema = SchemaFactory.newV1(new Column[] {col0, col1, col2, col3, col4, col5});
 
     long[] time1 = new long[ITERATION];
     long[] time2 = new long[ITERATION];

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestUnSafeTuple.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestUnSafeTuple.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestUnSafeTuple.java
index 48170f6..e2b865e 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestUnSafeTuple.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/planner/physical/TestUnSafeTuple.java
@@ -20,6 +20,7 @@ package org.apache.tajo.engine.planner.physical;
 
 import org.apache.tajo.catalog.Column;
 import org.apache.tajo.catalog.Schema;
+import org.apache.tajo.catalog.SchemaFactory;
 import org.apache.tajo.catalog.SchemaUtil;
 import org.apache.tajo.common.TajoDataTypes.Type;
 import org.apache.tajo.datum.Datum;
@@ -48,7 +49,7 @@ public class TestUnSafeTuple {
     Column col3 = new Column("col3", Type.FLOAT4);
     Column col4 = new Column("col4", Type.FLOAT8);
 
-    schema = new Schema(new Column[]{col0, col1, col2, col3, col4});
+    schema = SchemaFactory.newV1(new Column[]{col0, col1, col2, col3, col4});
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
index ea4a7c8..b346d08 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
@@ -20,6 +20,7 @@ package org.apache.tajo.engine.query;
 
 import org.apache.tajo.*;
 import org.apache.tajo.catalog.Schema;
+import org.apache.tajo.catalog.SchemaFactory;
 import org.apache.tajo.common.TajoDataTypes.Type;
 import org.apache.tajo.conf.TajoConf.ConfVars;
 import org.apache.tajo.storage.StorageConstants;
@@ -420,7 +421,7 @@ public class TestGroupByQuery extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", Type.TEXT);
     schema.addColumn("code", Type.TEXT);
     schema.addColumn("qty", Type.INT4);
@@ -474,7 +475,7 @@ public class TestGroupByQuery extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("col1", Type.TEXT);
     schema.addColumn("col2", Type.TEXT);
     schema.addColumn("col3", Type.TEXT);
@@ -504,7 +505,7 @@ public class TestGroupByQuery extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("col1", Type.TEXT);
     schema.addColumn("col2", Type.TEXT);
 
@@ -691,7 +692,7 @@ public class TestGroupByQuery extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("col1", Type.TEXT);
     schema.addColumn("col2", Type.TEXT);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestHBaseTable.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestHBaseTable.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestHBaseTable.java
index d4712dc..a179f88 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestHBaseTable.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestHBaseTable.java
@@ -37,6 +37,7 @@ import org.apache.tajo.IntegrationTest;
 import org.apache.tajo.QueryTestCaseBase;
 import org.apache.tajo.TajoTestingCluster;
 import org.apache.tajo.catalog.Schema;
+import org.apache.tajo.catalog.SchemaFactory;
 import org.apache.tajo.catalog.TableDesc;
 import org.apache.tajo.common.TajoDataTypes.Type;
 import org.apache.tajo.conf.TajoConf;
@@ -821,7 +822,7 @@ public class TestHBaseTable extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", Type.TEXT);
     schema.addColumn("name", Type.TEXT);
     List<String> datas = new ArrayList<>();
@@ -877,7 +878,7 @@ public class TestHBaseTable extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", Type.TEXT);
     schema.addColumn("name", Type.TEXT);
     List<String> datas = new ArrayList<>();
@@ -935,7 +936,7 @@ public class TestHBaseTable extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", Type.TEXT);
     schema.addColumn("name", Type.TEXT);
     List<String> datas = new ArrayList<>();
@@ -993,7 +994,7 @@ public class TestHBaseTable extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id1", Type.TEXT);
     schema.addColumn("id2", Type.TEXT);
     schema.addColumn("name", Type.TEXT);
@@ -1050,7 +1051,7 @@ public class TestHBaseTable extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", Type.INT4);
     schema.addColumn("name", Type.TEXT);
     List<String> datas = new ArrayList<>();
@@ -1106,7 +1107,7 @@ public class TestHBaseTable extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("rk", Type.TEXT);
     schema.addColumn("col2_key", Type.TEXT);
     schema.addColumn("col2_value", Type.TEXT);
@@ -1195,7 +1196,7 @@ public class TestHBaseTable extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", Type.INT4);
     schema.addColumn("name", Type.TEXT);
     List<String> datas = new ArrayList<>();
@@ -1267,7 +1268,7 @@ public class TestHBaseTable extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", Type.TEXT);
     schema.addColumn("name", Type.TEXT);
     List<String> datas = new ArrayList<>();
@@ -1388,7 +1389,7 @@ public class TestHBaseTable extends QueryTestCaseBase {
       tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
       tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-      Schema schema = new Schema();
+      Schema schema = SchemaFactory.newV1();
       schema.addColumn("id", Type.TEXT);
       schema.addColumn("name", Type.TEXT);
       schema.addColumn("comment", Type.TEXT);

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java
index 9b5b9ed..34f26a6 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java
@@ -26,10 +26,7 @@ import org.apache.hadoop.fs.Path;
 import org.apache.tajo.QueryTestCaseBase;
 import org.apache.tajo.TajoConstants;
 import org.apache.tajo.TajoTestingCluster;
-import org.apache.tajo.catalog.Column;
-import org.apache.tajo.catalog.Schema;
-import org.apache.tajo.catalog.TableDesc;
-import org.apache.tajo.catalog.TableMeta;
+import org.apache.tajo.catalog.*;
 import org.apache.tajo.common.TajoDataTypes;
 import org.apache.tajo.conf.TajoConf.ConfVars;
 import org.apache.tajo.datum.Datum;
@@ -149,37 +146,37 @@ public class TestJoinQuery extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", TajoDataTypes.Type.INT4);
     schema.addColumn("name", TajoDataTypes.Type.TEXT);
     String[] data = new String[]{"1|table11-1", "2|table11-2", "3|table11-3", "4|table11-4", "5|table11-5"};
     TajoTestingCluster.createTable("jointable11", schema, tableOptions, data, 2);
 
-    schema = new Schema();
+    schema = SchemaFactory.newV1();
     schema.addColumn("id", TajoDataTypes.Type.INT4);
     schema.addColumn("name", TajoDataTypes.Type.TEXT);
     data = new String[]{"1|table12-1", "2|table12-2"};
     TajoTestingCluster.createTable("jointable12", schema, tableOptions, data, 2);
 
-    schema = new Schema();
+    schema = SchemaFactory.newV1();
     schema.addColumn("id", TajoDataTypes.Type.INT4);
     schema.addColumn("name", TajoDataTypes.Type.TEXT);
     data = new String[]{"2|table13-2", "3|table13-3"};
     TajoTestingCluster.createTable("jointable13", schema, tableOptions, data);
 
-    schema = new Schema();
+    schema = SchemaFactory.newV1();
     schema.addColumn("id", TajoDataTypes.Type.INT4);
     schema.addColumn("name", TajoDataTypes.Type.TEXT);
     data = new String[]{"1|table14-1", "2|table14-2", "3|table14-3", "4|table14-4"};
     TajoTestingCluster.createTable("jointable14", schema, tableOptions, data);
 
-    schema = new Schema();
+    schema = SchemaFactory.newV1();
     schema.addColumn("id", TajoDataTypes.Type.INT4);
     schema.addColumn("name", TajoDataTypes.Type.TEXT);
     data = new String[]{};
     TajoTestingCluster.createTable("jointable15", schema, tableOptions, data);
 
-    schema = new Schema();
+    schema = SchemaFactory.newV1();
     schema.addColumn("id", TajoDataTypes.Type.INT4);
     schema.addColumn("name", TajoDataTypes.Type.TEXT);
     data = new String[]{"1000000|a", "1000001|b", "2|c", "3|d", "4|e"};

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestNullValues.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestNullValues.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestNullValues.java
index 791a819..2bca027 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestNullValues.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestNullValues.java
@@ -22,6 +22,7 @@ import org.apache.tajo.IntegrationTest;
 import org.apache.tajo.TajoTestingCluster;
 import org.apache.tajo.TpchTestBase;
 import org.apache.tajo.catalog.Schema;
+import org.apache.tajo.catalog.SchemaFactory;
 import org.apache.tajo.client.TajoClient;
 import org.apache.tajo.common.TajoDataTypes.Type;
 import org.apache.tajo.storage.StorageConstants;
@@ -58,7 +59,7 @@ public class TestNullValues {
   @Test
   public final void testIsNull() throws Exception {
     String [] table = new String[] {"nulltable1"};
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("col1", Type.INT4);
     schema.addColumn("col2", Type.TEXT);
     schema.addColumn("col3", Type.FLOAT4);
@@ -83,7 +84,7 @@ public class TestNullValues {
   @Test
   public final void testIsNotNull() throws Exception {
     String [] table = new String[] {"nulltable2"};
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("col1", Type.INT4);
     schema.addColumn("col2", Type.TEXT);
     Schema [] schemas = new Schema[] {schema};
@@ -108,7 +109,7 @@ public class TestNullValues {
   @Test
   public final void testIsNotNull2() throws Exception {
     String [] table = new String[] {"nulltable3"};
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("col1", Type.INT8);
     schema.addColumn("col2", Type.INT8);
     schema.addColumn("col3", Type.INT8);
@@ -138,7 +139,7 @@ public class TestNullValues {
   @Test
   public final void testIsNotNull3() throws Exception {
     String [] table = new String[] {"nulltable4"};
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("col1", Type.INT8);
     schema.addColumn("col2", Type.INT8);
     schema.addColumn("col3", Type.INT8);
@@ -251,7 +252,7 @@ public class TestNullValues {
 
   private ResultSet runNullTableQuery(String tableName, String query, TajoClient client) throws Exception {
     String [] table = new String[] {tableName};
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("col1", Type.INT4);
     schema.addColumn("col2", Type.TEXT);
     schema.addColumn("col3", Type.FLOAT4);

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java
index a2dec50..f206e20 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java
@@ -23,6 +23,7 @@ import org.apache.tajo.*;
 import org.apache.tajo.TajoProtos.QueryState;
 import org.apache.tajo.catalog.CatalogService;
 import org.apache.tajo.catalog.Schema;
+import org.apache.tajo.catalog.SchemaFactory;
 import org.apache.tajo.catalog.TableDesc;
 import org.apache.tajo.client.QueryStatus;
 import org.apache.tajo.common.TajoDataTypes.Type;
@@ -498,7 +499,7 @@ public class TestSelectQuery extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", Type.INT4);
     schema.addColumn("name", Type.TEXT);
     String[] data = new String[]{ "1|table11-1", "2|table11-2", "3|table11-3", "4|table11-4", "5|table11-5" };

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestSortQuery.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestSortQuery.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestSortQuery.java
index d889d34..582d0b0 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestSortQuery.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestSortQuery.java
@@ -20,6 +20,7 @@ package org.apache.tajo.engine.query;
 
 import org.apache.tajo.*;
 import org.apache.tajo.catalog.Schema;
+import org.apache.tajo.catalog.SchemaFactory;
 import org.apache.tajo.common.TajoDataTypes.Type;
 import org.apache.tajo.conf.TajoConf.ConfVars;
 import org.apache.tajo.storage.StorageConstants;
@@ -111,7 +112,7 @@ public class TestSortQuery extends QueryTestCaseBase {
       tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
       tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-      Schema schema = new Schema();
+      Schema schema = SchemaFactory.newV1();
       schema.addColumn("col1", Type.INT4);
       schema.addColumn("col2", Type.TEXT);
       String[] data = new String[]{
@@ -213,7 +214,7 @@ public class TestSortQuery extends QueryTestCaseBase {
       tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
       tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-      Schema schema = new Schema();
+      Schema schema = SchemaFactory.newV1();
       schema.addColumn("id", Type.INT4);
       schema.addColumn("name", Type.TEXT);
       String[] data = new String[]{
@@ -239,7 +240,7 @@ public class TestSortQuery extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", Type.INT4);
     schema.addColumn("name", Type.TEXT);
     String[] data = new String[]{ "1|111", "2|\\N", "3|333" };
@@ -276,7 +277,7 @@ public class TestSortQuery extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", Type.INT4);
     schema.addColumn("name", Type.TEXT);
     String[] data = new String[]{ "1|111", "2|\\N", "3|333" };
@@ -304,7 +305,7 @@ public class TestSortQuery extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", Type.INT4);
     schema.addColumn("name", Type.TEXT);
     String[] data = new String[]{ "1|111", "2|\\N", "3|333" };
@@ -332,7 +333,7 @@ public class TestSortQuery extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", Type.INT4);
     schema.addColumn("name", Type.TEXT);
     String[] data = new String[]{ "1|111", "2|\\N", "3|333" };
@@ -362,7 +363,7 @@ public class TestSortQuery extends QueryTestCaseBase {
       tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
       tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-      Schema schema = new Schema();
+      Schema schema = SchemaFactory.newV1();
       schema.addColumn("col1", Type.INT4);
       schema.addColumn("col2", Type.TEXT);
       String[] data = new String[]{
@@ -390,7 +391,7 @@ public class TestSortQuery extends QueryTestCaseBase {
       tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
       tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-      Schema schema = new Schema();
+      Schema schema = SchemaFactory.newV1();
       schema.addColumn("col1", Type.INT4);
       schema.addColumn("col2", Type.TEXT);
       String[] data = new String[]{

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestTablePartitions.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestTablePartitions.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestTablePartitions.java
index de2cbdf..3438759 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestTablePartitions.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestTablePartitions.java
@@ -24,10 +24,7 @@ import org.apache.hadoop.io.compress.CompressionCodec;
 import org.apache.hadoop.io.compress.CompressionCodecFactory;
 import org.apache.hadoop.io.compress.DeflateCodec;
 import org.apache.tajo.*;
-import org.apache.tajo.catalog.CatalogService;
-import org.apache.tajo.catalog.CatalogUtil;
-import org.apache.tajo.catalog.Schema;
-import org.apache.tajo.catalog.TableDesc;
+import org.apache.tajo.catalog.*;
 import org.apache.tajo.client.TajoClientUtil;
 import org.apache.tajo.exception.ReturnStateUtil;
 import org.apache.tajo.catalog.proto.CatalogProtos.PartitionDescProto;
@@ -1094,7 +1091,7 @@ public class TestTablePartitions extends QueryTestCaseBase {
       tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
       tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-      Schema schema = new Schema();
+      Schema schema = SchemaFactory.newV1();
       schema.addColumn("col1", TajoDataTypes.Type.TEXT);
       schema.addColumn("col2", TajoDataTypes.Type.TEXT);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestWindowQuery.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestWindowQuery.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestWindowQuery.java
index 9993992..19b8bbc 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestWindowQuery.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestWindowQuery.java
@@ -23,6 +23,7 @@ import org.apache.tajo.QueryTestCaseBase;
 import org.apache.tajo.TajoConstants;
 import org.apache.tajo.TajoTestingCluster;
 import org.apache.tajo.catalog.Schema;
+import org.apache.tajo.catalog.SchemaFactory;
 import org.apache.tajo.common.TajoDataTypes;
 import org.apache.tajo.storage.StorageConstants;
 import org.apache.tajo.util.KeyValueSet;
@@ -265,7 +266,7 @@ public class TestWindowQuery extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", TajoDataTypes.Type.INT4);
     schema.addColumn("time", TajoDataTypes.Type.TIME);
     String[] data = new String[]{ "1|12:11:12", "2|10:11:13", "2|05:42:41" };
@@ -300,7 +301,7 @@ public class TestWindowQuery extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", TajoDataTypes.Type.INT4);
     schema.addColumn("time", TajoDataTypes.Type.TIME);
     String[] data = new String[]{ "1|12:11:12", "2|10:11:13", "2|05:42:41" };
@@ -335,7 +336,7 @@ public class TestWindowQuery extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", TajoDataTypes.Type.INT4);
     schema.addColumn("time", TajoDataTypes.Type.TIME);
     String[] data = new String[]{ "1|12:11:12", "2|10:11:13", "2|05:42:41" };
@@ -384,7 +385,7 @@ public class TestWindowQuery extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", TajoDataTypes.Type.INT4);
     schema.addColumn("time", TajoDataTypes.Type.TIME);
     String[] data = new String[]{ "1|12:11:12", "2|10:11:13", "2|05:42:41" };
@@ -440,7 +441,7 @@ public class TestWindowQuery extends QueryTestCaseBase {
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", TajoDataTypes.Type.INT4);
     schema.addColumn("time", TajoDataTypes.Type.TIME);
     schema.addColumn("name", TajoDataTypes.Type.TEXT);

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/engine/util/TestTupleUtil.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/util/TestTupleUtil.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/util/TestTupleUtil.java
index 4a3565e..5683c7a 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/util/TestTupleUtil.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/util/TestTupleUtil.java
@@ -20,6 +20,7 @@ package org.apache.tajo.engine.util;
 
 import org.apache.hadoop.fs.Path;
 import org.apache.tajo.catalog.Schema;
+import org.apache.tajo.catalog.SchemaFactory;
 import org.apache.tajo.catalog.SortSpec;
 import org.apache.tajo.common.TajoDataTypes.Type;
 import org.apache.tajo.datum.Datum;
@@ -38,7 +39,7 @@ import static org.junit.Assert.*;
 public class TestTupleUtil {
   @Test
   public final void testFixedSizeChar() {
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("col1", Type.CHAR, 5);
 
     Tuple tuple = new VTuple(1);
@@ -56,7 +57,7 @@ public class TestTupleUtil {
 
   @Test
   public final void testToBytesAndToTuple() {
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("col1", Type.BOOLEAN);
     schema.addColumn("col2", Type.BIT);
     schema.addColumn("col3", Type.CHAR);
@@ -97,7 +98,7 @@ public class TestTupleUtil {
     VTuple sTuple = new VTuple(7);
     VTuple eTuple = new VTuple(7);
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
 
     schema.addColumn("numByte", Type.BIT);
     schema.addColumn("numChar", Type.CHAR);
@@ -141,7 +142,7 @@ public class TestTupleUtil {
   @Test
   public void testBuildTupleFromPartitionPath() {
 
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("key1", Type.INT8);
     schema.addColumn("key2", Type.TEXT);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/storage/TestRowFile.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/storage/TestRowFile.java b/tajo-core-tests/src/test/java/org/apache/tajo/storage/TestRowFile.java
index 01ae39c..25f0e61 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/storage/TestRowFile.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/storage/TestRowFile.java
@@ -28,6 +28,7 @@ import org.apache.tajo.TajoTestingCluster;
 import org.apache.tajo.TpchTestBase;
 import org.apache.tajo.catalog.CatalogUtil;
 import org.apache.tajo.catalog.Schema;
+import org.apache.tajo.catalog.SchemaFactory;
 import org.apache.tajo.catalog.TableMeta;
 import org.apache.tajo.catalog.statistics.TableStats;
 import org.apache.tajo.common.TajoDataTypes.Type;
@@ -62,7 +63,7 @@ public class TestRowFile {
 
   @Test
   public void test() throws IOException {
-    Schema schema = new Schema();
+    Schema schema = SchemaFactory.newV1();
     schema.addColumn("id", Type.INT4);
     schema.addColumn("age", Type.INT8);
     schema.addColumn("description", Type.TEXT);

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/RestTestUtils.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/RestTestUtils.java b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/RestTestUtils.java
deleted file mode 100644
index 7a5b38d..0000000
--- a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/RestTestUtils.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tajo.ws.rs.resources;
-
-import java.lang.reflect.Type;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.TimeZone;
-
-import org.apache.hadoop.fs.Path;
-import org.apache.tajo.catalog.TableMeta;
-import org.apache.tajo.catalog.json.FunctionAdapter;
-import org.apache.tajo.catalog.json.TableMetaAdapter;
-import org.apache.tajo.common.TajoDataTypes.DataType;
-import org.apache.tajo.datum.Datum;
-import org.apache.tajo.function.Function;
-import org.apache.tajo.json.ClassNameSerializer;
-import org.apache.tajo.json.DataTypeAdapter;
-import org.apache.tajo.json.DatumAdapter;
-import org.apache.tajo.json.GsonSerDerAdapter;
-import org.apache.tajo.json.PathSerializer;
-import org.apache.tajo.json.TimeZoneGsonSerdeAdapter;
-import org.apache.tajo.plan.expr.EvalNode;
-import org.apache.tajo.plan.function.AggFunction;
-import org.apache.tajo.plan.function.GeneralFunction;
-import org.apache.tajo.plan.logical.LogicalNode;
-import org.apache.tajo.plan.serder.EvalNodeAdapter;
-import org.apache.tajo.plan.serder.LogicalNodeAdapter;
-
-public class RestTestUtils {
-  
-  public static Map<Type, GsonSerDerAdapter<?>> registerTypeAdapterMap() {
-    Map<Type, GsonSerDerAdapter<?>> adapters = new HashMap<>();
-    adapters.put(Path.class, new PathSerializer());
-    adapters.put(Class.class, new ClassNameSerializer());
-    adapters.put(LogicalNode.class, new LogicalNodeAdapter());
-    adapters.put(EvalNode.class, new EvalNodeAdapter());
-    adapters.put(TableMeta.class, new TableMetaAdapter());
-    adapters.put(Function.class, new FunctionAdapter());
-    adapters.put(GeneralFunction.class, new FunctionAdapter());
-    adapters.put(AggFunction.class, new FunctionAdapter());
-    adapters.put(Datum.class, new DatumAdapter());
-    adapters.put(DataType.class, new DataTypeAdapter());
-    adapters.put(TimeZone.class, new TimeZoneGsonSerdeAdapter());
-
-    return adapters;
-  }
-}

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestClusterResource.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestClusterResource.java b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestClusterResource.java
index 52e586b..de0c5ba 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestClusterResource.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestClusterResource.java
@@ -30,6 +30,7 @@ import javax.ws.rs.core.GenericType;
 import org.apache.tajo.QueryTestCaseBase;
 import org.apache.tajo.TajoConstants;
 import org.apache.tajo.conf.TajoConf.ConfVars;
+import org.apache.tajo.plan.serder.PlanGsonHelper;
 import org.apache.tajo.ws.rs.netty.gson.GsonFeature;
 import org.glassfish.jersey.client.ClientProperties;
 import org.glassfish.jersey.filter.LoggingFilter;
@@ -55,7 +56,7 @@ public class TestClusterResource extends QueryTestCaseBase {
     restServiceURI = new URI("http", null, address.getHostName(), address.getPort(), "/rest", null, null);
     clusterURI = new URI(restServiceURI + "/cluster");
     restClient = ClientBuilder.newBuilder()
-        .register(new GsonFeature(RestTestUtils.registerTypeAdapterMap()))
+        .register(new GsonFeature(PlanGsonHelper.registerAdapters()))
         .register(LoggingFilter.class)
         .property(ClientProperties.FEATURE_AUTO_DISCOVERY_DISABLE, true)
         .property(ClientProperties.METAINF_SERVICES_LOOKUP_DISABLE, true)

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestDatabasesResource.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestDatabasesResource.java b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestDatabasesResource.java
index 6ea95f8..614dc73 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestDatabasesResource.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestDatabasesResource.java
@@ -34,6 +34,7 @@ import javax.ws.rs.core.Response.Status;
 import org.apache.tajo.QueryTestCaseBase;
 import org.apache.tajo.TajoConstants;
 import org.apache.tajo.conf.TajoConf.ConfVars;
+import org.apache.tajo.plan.serder.PlanGsonHelper;
 import org.apache.tajo.ws.rs.netty.gson.GsonFeature;
 import org.apache.tajo.ws.rs.requests.NewDatabaseRequest;
 import org.apache.tajo.ws.rs.responses.DatabaseInfoResponse;
@@ -61,7 +62,7 @@ public class TestDatabasesResource extends QueryTestCaseBase {
     restServiceURI = new URI("http", null, address.getHostName(), address.getPort(), "/rest", null, null);
     databasesURI = new URI(restServiceURI + "/databases");
     restClient = ClientBuilder.newBuilder()
-        .register(new GsonFeature(RestTestUtils.registerTypeAdapterMap()))
+        .register(new GsonFeature(PlanGsonHelper.registerAdapters()))
         .register(LoggingFilter.class)
         .property(ClientProperties.FEATURE_AUTO_DISCOVERY_DISABLE, true)
         .property(ClientProperties.METAINF_SERVICES_LOOKUP_DISABLE, true)

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestFunctionsResource.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestFunctionsResource.java b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestFunctionsResource.java
index db7b836..fb2d1d7 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestFunctionsResource.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestFunctionsResource.java
@@ -22,6 +22,7 @@ import org.apache.tajo.QueryTestCaseBase;
 import org.apache.tajo.TajoConstants;
 import org.apache.tajo.conf.TajoConf.ConfVars;
 import org.apache.tajo.function.FunctionSignature;
+import org.apache.tajo.plan.serder.PlanGsonHelper;
 import org.apache.tajo.ws.rs.netty.gson.GsonFeature;
 import org.glassfish.jersey.client.ClientProperties;
 import org.glassfish.jersey.filter.LoggingFilter;
@@ -56,7 +57,7 @@ public class TestFunctionsResource extends QueryTestCaseBase {
     restServiceURI = new URI("http", null, address.getHostName(), address.getPort(), "/rest", null, null);
     functionsURI = new URI(restServiceURI + "/functions");
     restClient = ClientBuilder.newBuilder()
-        .register(new GsonFeature(RestTestUtils.registerTypeAdapterMap()))
+        .register(new GsonFeature(PlanGsonHelper.registerAdapters()))
         .register(LoggingFilter.class)
         .property(ClientProperties.FEATURE_AUTO_DISCOVERY_DISABLE, true)
         .property(ClientProperties.METAINF_SERVICES_LOOKUP_DISABLE, true)

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResource.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResource.java b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResource.java
index 7fcb640..4638a8c 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResource.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResource.java
@@ -25,6 +25,7 @@ import org.apache.tajo.conf.TajoConf.ConfVars;
 import org.apache.tajo.error.Errors.ResultCode;
 import org.apache.tajo.exception.ErrorUtil;
 import org.apache.tajo.master.QueryInfo;
+import org.apache.tajo.plan.serder.PlanGsonHelper;
 import org.apache.tajo.ws.rs.netty.gson.GsonFeature;
 import org.apache.tajo.ws.rs.requests.NewSessionRequest;
 import org.apache.tajo.ws.rs.requests.SubmitQueryRequest;
@@ -69,7 +70,7 @@ public class TestQueryResource extends QueryTestCaseBase {
     sessionsURI = new URI(restServiceURI + "/sessions");
     queriesURI = new URI(restServiceURI + "/queries");
     restClient = ClientBuilder.newBuilder()
-        .register(new GsonFeature(RestTestUtils.registerTypeAdapterMap()))
+        .register(new GsonFeature(PlanGsonHelper.registerAdapters()))
         .register(LoggingFilter.class)
         .property(ClientProperties.FEATURE_AUTO_DISCOVERY_DISABLE, true)
         .property(ClientProperties.METAINF_SERVICES_LOOKUP_DISABLE, true)

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResultResource.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResultResource.java b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResultResource.java
index 331fed7..8b9c93d 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResultResource.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResultResource.java
@@ -23,6 +23,7 @@ import org.apache.tajo.TajoConstants;
 import org.apache.tajo.conf.TajoConf.ConfVars;
 import org.apache.tajo.error.Errors.ResultCode;
 import org.apache.tajo.exception.ErrorUtil;
+import org.apache.tajo.plan.serder.PlanGsonHelper;
 import org.apache.tajo.storage.RowStoreUtil;
 import org.apache.tajo.storage.Tuple;
 import org.apache.tajo.ws.rs.netty.gson.GsonFeature;
@@ -80,7 +81,7 @@ public class TestQueryResultResource extends QueryTestCaseBase {
     sessionsURI = new URI(restServiceURI + "/sessions");
     queriesURI = new URI(restServiceURI + "/queries");
     restClient = ClientBuilder.newBuilder()
-        .register(new GsonFeature(RestTestUtils.registerTypeAdapterMap()))
+        .register(new GsonFeature(PlanGsonHelper.registerAdapters()))
         .register(LoggingFilter.class)
         .property(ClientProperties.FEATURE_AUTO_DISCOVERY_DISABLE, true)
         .property(ClientProperties.METAINF_SERVICES_LOOKUP_DISABLE, true)

http://git-wip-us.apache.org/repos/asf/tajo/blob/8dad551e/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestSessionsResource.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestSessionsResource.java b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestSessionsResource.java
index 83da87b..3ddeb95 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestSessionsResource.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestSessionsResource.java
@@ -34,6 +34,7 @@ import javax.ws.rs.core.Response.Status;
 import org.apache.tajo.QueryTestCaseBase;
 import org.apache.tajo.TajoConstants;
 import org.apache.tajo.conf.TajoConf.ConfVars;
+import org.apache.tajo.plan.serder.PlanGsonHelper;
 import org.apache.tajo.ws.rs.netty.gson.GsonFeature;
 import org.apache.tajo.ws.rs.requests.NewSessionRequest;
 import org.apache.tajo.ws.rs.responses.NewSessionResponse;
@@ -61,7 +62,7 @@ public class TestSessionsResource extends QueryTestCaseBase {
     restServiceURI = new URI("http", null, address.getHostName(), address.getPort(), "/rest", null, null);
     sessionsURI = new URI(restServiceURI + "/sessions");
     restClient = ClientBuilder.newBuilder()
-        .register(new GsonFeature(RestTestUtils.registerTypeAdapterMap()))
+        .register(new GsonFeature(PlanGsonHelper.registerAdapters()))
         .register(LoggingFilter.class)
         .property(ClientProperties.FEATURE_AUTO_DISCOVERY_DISABLE, true)
         .property(ClientProperties.METAINF_SERVICES_LOOKUP_DISABLE, true)


Mime
View raw message