tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject [2/3] TAJO-610: Refactor Column class.
Date Thu, 20 Feb 2014 11:10:31 GMT
http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/MergeFullOuterJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/MergeFullOuterJoinExec.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/MergeFullOuterJoinExec.java
index 613e072..ff1f7b3 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/MergeFullOuterJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/MergeFullOuterJoinExec.java
@@ -92,10 +92,10 @@ public class MergeFullOuterJoinExec extends BinaryPhysicalExec {
 
     // for join
     frameTuple = new FrameTuple();
-    outTuple = new VTuple(outSchema.getColumnNum());
+    outTuple = new VTuple(outSchema.size());
 
-    leftNumCols = leftChild.getSchema().getColumnNum();
-    rightNumCols = rightChild.getSchema().getColumnNum();
+    leftNumCols = leftChild.getSchema().size();
+    rightNumCols = rightChild.getSchema().size();
   }
 
   public JoinNode getPlan(){

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/MergeJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/MergeJoinExec.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/MergeJoinExec.java
index f72e87e..470e1c9 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/MergeJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/MergeJoinExec.java
@@ -88,7 +88,7 @@ public class MergeJoinExec extends BinaryPhysicalExec {
 
     // for join
     frameTuple = new FrameTuple();
-    outTuple = new VTuple(outSchema.getColumnNum());
+    outTuple = new VTuple(outSchema.size());
   }
 
   public JoinNode getPlan(){

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/NLJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/NLJoinExec.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/NLJoinExec.java
index 961be93..6e5900e 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/NLJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/NLJoinExec.java
@@ -59,7 +59,7 @@ public class NLJoinExec extends BinaryPhysicalExec {
     // for join
     needNewOuter = true;
     frameTuple = new FrameTuple();
-    outTuple = new VTuple(outSchema.getColumnNum());
+    outTuple = new VTuple(outSchema.size());
   }
 
   public JoinNode getPlan() {

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/NLLeftOuterJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/NLLeftOuterJoinExec.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/NLLeftOuterJoinExec.java
index 4abe570..5c17c40 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/NLLeftOuterJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/NLLeftOuterJoinExec.java
@@ -62,10 +62,10 @@ public class NLLeftOuterJoinExec extends BinaryPhysicalExec {
     // for join
     needNextRightTuple = true;
     frameTuple = new FrameTuple();
-    outTuple = new VTuple(outSchema.getColumnNum());
+    outTuple = new VTuple(outSchema.size());
 
     foundAtLeastOneMatch = false;
-    rightNumCols = rightChild.getSchema().getColumnNum();
+    rightNumCols = rightChild.getSchema().size();
   }
 
   public JoinNode getPlan() {

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/PhysicalExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/PhysicalExec.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/PhysicalExec.java
index 033dcd9..0b9bc95 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/PhysicalExec.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/PhysicalExec.java
@@ -39,7 +39,7 @@ public abstract class PhysicalExec implements SchemaObject {
     this.context = context;
     this.inSchema = inSchema;
     this.outSchema = outSchema;
-    this.outColumnNum = outSchema.getColumnNum();
+    this.outColumnNum = outSchema.size();
   }
 
   public final Schema getSchema() {

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/ProjectionExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/ProjectionExec.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/ProjectionExec.java
index e205751..ee6ef1d 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/ProjectionExec.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/ProjectionExec.java
@@ -45,7 +45,7 @@ public class ProjectionExec extends UnaryPhysicalExec {
   public void init() throws IOException {
     super.init();
 
-    this.outTuple = new VTuple(outSchema.getColumnNum());
+    this.outTuple = new VTuple(outSchema.size());
     this.projector = new Projector(inSchema, outSchema, this.plan.getTargets());
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/RangeShuffleFileWriteExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/RangeShuffleFileWriteExec.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/RangeShuffleFileWriteExec.java
index 698e46e..68379d1 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/RangeShuffleFileWriteExec.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/RangeShuffleFileWriteExec.java
@@ -99,7 +99,7 @@ public class RangeShuffleFileWriteExec extends UnaryPhysicalExec {
     while((tuple = child.next()) != null) {
       offset = appender.getOffset();
       appender.addTuple(tuple);
-      keyTuple = new VTuple(keySchema.getColumnNum());
+      keyTuple = new VTuple(keySchema.size());
       RowStoreUtil.project(tuple, keyTuple, indexKeys);
       if (prevKeyTuple == null || !prevKeyTuple.equals(keyTuple)) {
         indexWriter.write(keyTuple, offset);

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/RightOuterMergeJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/RightOuterMergeJoinExec.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/RightOuterMergeJoinExec.java
index b494544..c70174a 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/RightOuterMergeJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/RightOuterMergeJoinExec.java
@@ -90,9 +90,9 @@ public class RightOuterMergeJoinExec extends BinaryPhysicalExec {
 
     // for join
     frameTuple = new FrameTuple();
-    outTuple = new VTuple(outSchema.getColumnNum());
+    outTuple = new VTuple(outSchema.size());
 
-    leftNumCols = outer.getSchema().getColumnNum();
+    leftNumCols = outer.getSchema().size();
   }
 
   public JoinNode getPlan() {

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/SortAggregateExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/SortAggregateExec.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/SortAggregateExec.java
index dbe45dc..629889d 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/SortAggregateExec.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/physical/SortAggregateExec.java
@@ -81,7 +81,7 @@ public class SortAggregateExec extends AggregationExec {
 
       } else { /** Finalization State */
         // finalize aggregate and return
-        outputTuple = new VTuple(outSchema.getColumnNum());
+        outputTuple = new VTuple(outSchema.size());
         int tupleIdx = 0;
 
         for(; tupleIdx < groupingKeyNum; tupleIdx++) {
@@ -102,7 +102,7 @@ public class SortAggregateExec extends AggregationExec {
     } // while loop
 
     if (!finished) {
-      outputTuple = new VTuple(outSchema.getColumnNum());
+      outputTuple = new VTuple(outSchema.size());
       int tupleIdx = 0;
       for(; tupleIdx < groupingKeyNum; tupleIdx++) {
         outputTuple.put(tupleIdx, lastKey.get(tupleIdx));

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/rewrite/PartitionedTableRewriter.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/rewrite/PartitionedTableRewriter.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/rewrite/PartitionedTableRewriter.java
index faef37d..d701935 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/rewrite/PartitionedTableRewriter.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/rewrite/PartitionedTableRewriter.java
@@ -145,7 +145,7 @@ public class PartitionedTableRewriter implements RewriteRule {
     // loop from one to the number of partition columns
     Path [] filteredPaths = toPathArray(fs.listStatus(tablePath, filters[0]));
 
-    for (int i = 1; i < partitionColumns.getColumnNum(); i++) {
+    for (int i = 1; i < partitionColumns.size(); i++) {
       // Get all file status matched to a ith level path filter.
       filteredPaths = toPathArray(fs.listStatus(filteredPaths, filters[i]));
     }
@@ -182,9 +182,9 @@ public class PartitionedTableRewriter implements RewriteRule {
                                                      EvalNode [] conjunctiveForms) {
     // Building partition path filters for all levels
     Column target;
-    PathFilter [] filters = new PathFilter[partitionColumns.getColumnNum()];
+    PathFilter [] filters = new PathFilter[partitionColumns.size()];
     List<EvalNode> accumulatedFilters = Lists.newArrayList();
-    for (int i = 0; i < partitionColumns.getColumnNum(); i++) { // loop from one to level
+    for (int i = 0; i < partitionColumns.size(); i++) { // loop from one to level
       target = partitionColumns.getColumn(i);
 
       for (EvalNode expr : conjunctiveForms) {
@@ -212,9 +212,9 @@ public class PartitionedTableRewriter implements RewriteRule {
    */
   private static PathFilter [] buildAllAcceptingPathFilters(Schema partitionColumns) {
     Column target;
-    PathFilter [] filters = new PathFilter[partitionColumns.getColumnNum()];
+    PathFilter [] filters = new PathFilter[partitionColumns.size()];
     List<EvalNode> accumulatedFilters = Lists.newArrayList();
-    for (int i = 0; i < partitionColumns.getColumnNum(); i++) { // loop from one to level
+    for (int i = 0; i < partitionColumns.size(); i++) { // loop from one to level
       target = partitionColumns.getColumn(i);
       accumulatedFilters.add(new IsNullEval(true, new FieldEval(target)));
 

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/query/QueryContext.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/query/QueryContext.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/query/QueryContext.java
index 4a3bf46..1db4c4b 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/query/QueryContext.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/query/QueryContext.java
@@ -19,10 +19,10 @@
 package org.apache.tajo.engine.query;
 
 import org.apache.hadoop.fs.Path;
+import org.apache.tajo.catalog.CatalogUtil;
 import org.apache.tajo.catalog.Options;
 import org.apache.tajo.catalog.partition.PartitionMethodDesc;
 import org.apache.tajo.conf.TajoConf;
-import org.apache.tajo.engine.planner.PlannerUtil;
 import org.apache.tajo.engine.planner.logical.NodeType;
 
 import static org.apache.tajo.catalog.proto.CatalogProtos.KeyValueSetProto;
@@ -103,7 +103,7 @@ public class QueryContext extends Options {
    * @param tableName The target table name
    */
   public void setOutputTable(String tableName) {
-    put(OUTPUT_TABLE_NAME, PlannerUtil.normalizeTableName(tableName));
+    put(OUTPUT_TABLE_NAME, CatalogUtil.normalizeIdentifier(tableName));
   }
 
   public String getOutputTable() {

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/utils/SchemaUtil.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/utils/SchemaUtil.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/utils/SchemaUtil.java
index c9ab823..c882607 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/utils/SchemaUtil.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/utils/SchemaUtil.java
@@ -45,8 +45,8 @@ public class SchemaUtil {
   public static Schema getNaturalJoinColumns(Schema left, Schema right) {
     Schema common = new Schema();
     for (Column outer : left.getColumns()) {
-      if (!common.containsByName(outer.getColumnName()) && right.containsByName(outer.getColumnName())) {
-        common.addColumn(new Column(outer.getColumnName(), outer.getDataType()));
+      if (!common.containsByName(outer.getSimpleName()) && right.containsByName(outer.getSimpleName())) {
+        common.addColumn(new Column(outer.getSimpleName(), outer.getDataType()));
       }
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/utils/TupleUtil.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/utils/TupleUtil.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/utils/TupleUtil.java
index b96b65e..6d801dd 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/utils/TupleUtil.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/utils/TupleUtil.java
@@ -80,8 +80,8 @@ public class TupleUtil {
           "ERROR: Invalid Column Stats (column stats: " + colStats + ", there exists not target " + col);
     }
 
-    Tuple startTuple = new VTuple(target.getColumnNum());
-    Tuple endTuple = new VTuple(target.getColumnNum());
+    Tuple startTuple = new VTuple(target.size());
+    Tuple endTuple = new VTuple(target.size());
     int i = 0;
     for (Column col : target.getColumns()) {
       if (sortSpecs[i].isAscending()) {
@@ -173,13 +173,13 @@ public class TupleUtil {
     String [] columnValues = columnValuesPart.split("/");
 
     // true means this is a file.
-    if (beNullIfFile && partitionColumnSchema.getColumnNum() < columnValues.length) {
+    if (beNullIfFile && partitionColumnSchema.size() < columnValues.length) {
       return null;
     }
 
-    Tuple tuple = new VTuple(partitionColumnSchema.getColumnNum());
+    Tuple tuple = new VTuple(partitionColumnSchema.size());
     int i = 0;
-    for (; i < columnValues.length && i < partitionColumnSchema.getColumnNum(); i++) {
+    for (; i < columnValues.length && i < partitionColumnSchema.size(); i++) {
       String [] parts = columnValues[i].split("=");
       if (parts.length != 2) {
         return null;
@@ -188,7 +188,7 @@ public class TupleUtil {
       Column keyColumn = partitionColumnSchema.getColumn(columnId);
       tuple.put(columnId, DatumFactory.createFromString(keyColumn.getDataType(), parts[1]));
     }
-    for (; i < partitionColumnSchema.getColumnNum(); i++) {
+    for (; i < partitionColumnSchema.size(); i++) {
       tuple.put(i, NullDatum.get());
     }
     return tuple;
@@ -203,7 +203,7 @@ public class TupleUtil {
    */
   private static String getColumnPartitionPathPrefix(Schema partitionColumn) {
     StringBuilder sb = new StringBuilder();
-    sb.append(partitionColumn.getColumn(0).getColumnName()).append("=");
+    sb.append(partitionColumn.getColumn(0).getSimpleName()).append("=");
     return sb.toString();
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/util/IndexUtil.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/util/IndexUtil.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/util/IndexUtil.java
index dc77700..8816f8f 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/util/IndexUtil.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/util/IndexUtil.java
@@ -40,7 +40,7 @@ public class IndexUtil {
     builder.append(fragment.getPath().getName() + "_");
     builder.append(fragment.getStartKey() + "_" + fragment.getEndKey() + "_");
     for(int i = 0 ; i < keys.length ; i ++) {
-      builder.append(keys[i].getSortKey().getColumnName()+"_");
+      builder.append(keys[i].getSortKey().getSimpleName()+"_");
     }
     builder.append("_index");
     return builder.toString();
@@ -51,7 +51,7 @@ public class IndexUtil {
     StringBuilder builder = new StringBuilder();
     builder.append(indexName + "_");
     for(int i = 0 ; i < keys.length ; i ++) {
-      builder.append(keys[i].getSortKey().getColumnName() + "_");
+      builder.append(keys[i].getSortKey().getSimpleName() + "_");
     }
     return builder.toString();
   }

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/main/resources/webapps/admin/catalogview.jsp
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/resources/webapps/admin/catalogview.jsp b/tajo-core/tajo-core-backend/src/main/resources/webapps/admin/catalogview.jsp
index 26212f0..397146a 100644
--- a/tajo-core/tajo-core-backend/src/main/resources/webapps/admin/catalogview.jsp
+++ b/tajo-core/tajo-core-backend/src/main/resources/webapps/admin/catalogview.jsp
@@ -19,11 +19,15 @@
 %>
 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 
-<%@ page import="java.util.*" %>
-<%@ page import="org.apache.tajo.webapp.StaticHttpServer" %>
-<%@ page import="org.apache.tajo.master.*" %>
-<%@ page import="org.apache.tajo.catalog.*" %>
+<%@ page import="org.apache.tajo.catalog.CatalogService" %>
+<%@ page import="org.apache.tajo.catalog.Column" %>
+<%@ page import="org.apache.tajo.catalog.TableDesc" %>
+<%@ page import="org.apache.tajo.master.TajoMaster" %>
 <%@ page import="org.apache.tajo.util.FileUtil" %>
+<%@ page import="org.apache.tajo.webapp.StaticHttpServer" %>
+<%@ page import="java.util.Collection" %>
+<%@ page import="java.util.List" %>
+<%@ page import="java.util.Map" %>
 <%
   TajoMaster master = (TajoMaster) StaticHttpServer.getInstance().getAttribute("tajo.info.server.object");
   CatalogService catalog = master.getCatalog();
@@ -119,7 +123,7 @@
       out.write("<table border='1' class='border_table'><tr><th>No</th><th>Column name</th><th>Type</th></tr>");
       int columnIndex = 1;
       for(Column eachColumn: columns) {
-        out.write("<tr><td width='30' align='right'>" + columnIndex + "</td><td width='320'>" + eachColumn.getColumnName() + "</td><td width='150'>" + eachColumn.getDataType().getType() + "</td></tr>");
+        out.write("<tr><td width='30' align='right'>" + columnIndex + "</td><td width='320'>" + eachColumn.getSimpleName() + "</td><td width='150'>" + eachColumn.getDataType().getType() + "</td></tr>");
         columnIndex++;
       }
 

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/eval/ExprTestBase.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/eval/ExprTestBase.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/eval/ExprTestBase.java
index dea4fc8..7e721c5 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/eval/ExprTestBase.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/eval/ExprTestBase.java
@@ -106,15 +106,15 @@ public class ExprTestBase {
       inputSchema = SchemaUtil.clone(schema);
       inputSchema.setQualifier(tableName);
 
-      int targetIdx [] = new int[inputSchema.getColumnNum()];
+      int targetIdx [] = new int[inputSchema.size()];
       for (int i = 0; i < targetIdx.length; i++) {
         targetIdx[i] = i;
       }
 
       lazyTuple =
           new LazyTuple(inputSchema, Bytes.splitPreserveAllTokens(csvTuple.getBytes(), delimiter, targetIdx),0);
-      vtuple = new VTuple(inputSchema.getColumnNum());
-      for (int i = 0; i < inputSchema.getColumnNum(); i++) {
+      vtuple = new VTuple(inputSchema.size());
+      for (int i = 0; i < inputSchema.size(); i++) {
         // If null value occurs, null datum is manually inserted to an input tuple.
         if (lazyTuple.get(i) instanceof TextDatum && lazyTuple.get(i).asChars().equals("")) {
           vtuple.put(i, NullDatum.get());

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/eval/TestEvalTreeUtil.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/eval/TestEvalTreeUtil.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/eval/TestEvalTreeUtil.java
index 6038124..f9c50ac 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/eval/TestEvalTreeUtil.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/eval/TestEvalTreeUtil.java
@@ -204,9 +204,9 @@ public class TestEvalTreeUtil {
     Schema schema = EvalTreeUtil.getSchemaByTargets(null, targets);
     Column col1 = schema.getColumn(0);
     Column col2 = schema.getColumn(1);
-    assertEquals("plus", col1.getColumnName());
+    assertEquals("plus", col1.getSimpleName());
     assertEquals(TajoDataTypes.Type.INT4, col1.getDataType().getType());
-    assertEquals("mul", col2.getColumnName());
+    assertEquals("mul", col2.getSimpleName());
     assertEquals(TajoDataTypes.Type.FLOAT8, col2.getDataType().getType());
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestLogicalOptimizer.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestLogicalOptimizer.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestLogicalOptimizer.java
index 92faec0..6107ca7 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestLogicalOptimizer.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestLogicalOptimizer.java
@@ -206,7 +206,7 @@ public class TestLogicalOptimizer {
     assertFalse(joinNode.hasJoinQual());
     
     // Test for Pushable
-    assertTrue(PlannerUtil.canBeEvaluated(selNode.getQual(), joinNode));
+    assertTrue(LogicalPlanner.checkIfBeEvaluatedAtJoin(newPlan.getRootBlock(), selNode.getQual(), joinNode, false));
     
     // Optimized plan
     LogicalNode optimized = optimizer.optimize(newPlan);
@@ -235,7 +235,7 @@ public class TestLogicalOptimizer {
     assertEquals(NodeType.SCAN, selNode.getChild().getType());
     ScanNode scanNode = selNode.getChild();
     // Test for Join Node
-    assertTrue(PlannerUtil.canBeEvaluated(selNode.getQual(), scanNode));
+    assertTrue(LogicalPlanner.checkIfBeEvaluatedAtRelation(newPlan.getRootBlock(), selNode.getQual(), scanNode));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestLogicalPlanner.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestLogicalPlanner.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestLogicalPlanner.java
index f9cbcf9..228d42d 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestLogicalPlanner.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestLogicalPlanner.java
@@ -154,10 +154,10 @@ public class TestLogicalPlanner {
   public static void assertSchema(Schema expected, Schema schema) {
     Column expectedColumn;
     Column column;
-    for (int i = 0; i < expected.getColumnNum(); i++) {
+    for (int i = 0; i < expected.size(); i++) {
       expectedColumn = expected.getColumn(i);
-      column = schema.getColumnByName(expectedColumn.getColumnName());
-      assertEquals(expectedColumn.getColumnName(), column.getColumnName());
+      column = schema.getColumn(expectedColumn.getSimpleName());
+      assertEquals(expectedColumn.getSimpleName(), column.getSimpleName());
       assertEquals(expectedColumn.getDataType(), column.getDataType());
     }
   }
@@ -179,9 +179,8 @@ public class TestLogicalPlanner {
     expectedSchema.addColumn("empid", Type.INT4);
     expectedSchema.addColumn("deptname", Type.TEXT);
     expectedSchema.addColumn("manager", Type.TEXT);
-    for (int i = 0; i < expectedSchema.getColumnNum(); i++) {
-      Column found = root.getOutSchema().getColumnByName(expectedSchema.getColumn(i).
-          getColumnName());
+    for (int i = 0; i < expectedSchema.size(); i++) {
+      Column found = root.getOutSchema().getColumn(expectedSchema.getColumn(i).getSimpleName());
       assertEquals(expectedSchema.getColumn(i).getDataType(), found.getDataType());
     }
 
@@ -562,11 +561,11 @@ public class TestLogicalPlanner {
 
     Iterator<Column> it = out.getColumns().iterator();
     Column col = it.next();
-    assertEquals("res1", col.getColumnName());
+    assertEquals("res1", col.getSimpleName());
     col = it.next();
-    assertEquals("res2", col.getColumnName());
+    assertEquals("res2", col.getSimpleName());
     col = it.next();
-    assertEquals("res3", col.getColumnName());
+    assertEquals("res3", col.getSimpleName());
   }
 
   @Test
@@ -581,7 +580,7 @@ public class TestLogicalPlanner {
 
     assertEquals(NodeType.PROJECTION, root.getChild().getType());
     ProjectionNode projNode = root.getChild();
-    assertEquals(6, projNode.getOutSchema().getColumnNum());
+    assertEquals(6, projNode.getOutSchema().size());
 
     assertEquals(NodeType.SELECTION, projNode.getChild().getType());
     SelectionNode selNode = projNode.getChild();
@@ -607,9 +606,9 @@ public class TestLogicalPlanner {
     Schema finalSchema = root.getOutSchema();
     Iterator<Column> it = finalSchema.getColumns().iterator();
     Column col = it.next();
-    assertEquals("deptname", col.getColumnName());
+    assertEquals("deptname", col.getSimpleName());
     col = it.next();
-    assertEquals("total", col.getColumnName());
+    assertEquals("total", col.getSimpleName());
 
     expr = sqlAnalyzer.parse(ALIAS[1]);
     plan = planner.createPlan(expr).getRootBlock().getRoot();
@@ -618,9 +617,9 @@ public class TestLogicalPlanner {
     finalSchema = root.getOutSchema();
     it = finalSchema.getColumns().iterator();
     col = it.next();
-    assertEquals("id", col.getColumnName());
+    assertEquals("id", col.getSimpleName());
     col = it.next();
-    assertEquals("total", col.getColumnName());
+    assertEquals("total", col.getSimpleName());
   }
 
   @Test
@@ -633,9 +632,9 @@ public class TestLogicalPlanner {
     Schema finalSchema = root.getOutSchema();
     Iterator<Column> it = finalSchema.getColumns().iterator();
     Column col = it.next();
-    assertEquals("id", col.getColumnName());
+    assertEquals("id", col.getSimpleName());
     col = it.next();
-    assertEquals("total", col.getColumnName());
+    assertEquals("total", col.getSimpleName());
   }
 
   static final String CREATE_TABLE [] = {
@@ -652,13 +651,13 @@ public class TestLogicalPlanner {
     CreateTableNode createTable = root.getChild();
 
     Schema def = createTable.getTableSchema();
-    assertEquals("name", def.getColumn(0).getColumnName());
+    assertEquals("name", def.getColumn(0).getSimpleName());
     assertEquals(Type.TEXT, def.getColumn(0).getDataType().getType());
-    assertEquals("age", def.getColumn(1).getColumnName());
+    assertEquals("age", def.getColumn(1).getSimpleName());
     assertEquals(Type.INT4, def.getColumn(1).getDataType().getType());
-    assertEquals("earn", def.getColumn(2).getColumnName());
+    assertEquals("earn", def.getColumn(2).getSimpleName());
     assertEquals(Type.INT8, def.getColumn(2).getDataType().getType());
-    assertEquals("score", def.getColumn(3).getColumnName());
+    assertEquals("score", def.getColumn(3).getSimpleName());
     assertEquals(Type.FLOAT4, def.getColumn(3).getDataType().getType());
     assertEquals(StoreType.CSV, createTable.getStorageType());
     assertEquals("/tmp/data", createTable.getPath().toString());
@@ -825,8 +824,8 @@ public class TestLogicalPlanner {
     assertFalse(insertNode.isOverwrite());
     assertEquals("employee", insertNode.getTableName());
     assertTrue(insertNode.hasTargetSchema());
-    assertEquals(insertNode.getTargetSchema().getColumn(0).getColumnName(), "name");
-    assertEquals(insertNode.getTargetSchema().getColumn(1).getColumnName(), "deptname");
+    assertEquals(insertNode.getTargetSchema().getColumn(0).getSimpleName(), "name");
+    assertEquals(insertNode.getTargetSchema().getColumn(1).getSimpleName(), "deptname");
   }
 
   @Test
@@ -849,8 +848,8 @@ public class TestLogicalPlanner {
     assertTrue(insertNode.hasTargetTable());
     assertEquals("employee", insertNode.getTableName());
     assertTrue(insertNode.hasTargetSchema());
-    assertEquals(insertNode.getTargetSchema().getColumn(0).getColumnName(), "name");
-    assertEquals(insertNode.getTargetSchema().getColumn(1).getColumnName(), "deptname");
+    assertEquals(insertNode.getTargetSchema().getColumn(0).getSimpleName(), "name");
+    assertEquals(insertNode.getTargetSchema().getColumn(1).getSimpleName(), "deptname");
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestPlannerUtil.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestPlannerUtil.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestPlannerUtil.java
index 00ce501..c113559 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestPlannerUtil.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestPlannerUtil.java
@@ -223,8 +223,8 @@ public class TestPlannerUtil {
     assertEquals(2, sortSpecs.length);
     assertEquals(1, sortSpecs[0].length);
     assertEquals(1, sortSpecs[1].length);
-    assertEquals(outerSchema.getColumnByName("id1"), sortSpecs[0][0].getSortKey());
-    assertEquals(innerSchema.getColumnByName("fid1"), sortSpecs[1][0].getSortKey());
+    assertEquals(outerSchema.getColumn("id1"), sortSpecs[0][0].getSortKey());
+    assertEquals(innerSchema.getColumn("fid1"), sortSpecs[1][0].getSortKey());
 
     // tests for composited join key
     EvalNode joinQual2 = new BinaryEval(EvalType.EQUAL, f3, f4);
@@ -234,10 +234,10 @@ public class TestPlannerUtil {
     assertEquals(2, sortSpecs.length);
     assertEquals(2, sortSpecs[0].length);
     assertEquals(2, sortSpecs[1].length);
-    assertEquals(outerSchema.getColumnByName("id1"), sortSpecs[0][0].getSortKey());
-    assertEquals(outerSchema.getColumnByName("id2"), sortSpecs[0][1].getSortKey());
-    assertEquals(innerSchema.getColumnByName("fid1"), sortSpecs[1][0].getSortKey());
-    assertEquals(innerSchema.getColumnByName("fid2"), sortSpecs[1][1].getSortKey());
+    assertEquals(outerSchema.getColumn("id1"), sortSpecs[0][0].getSortKey());
+    assertEquals(outerSchema.getColumn("id2"), sortSpecs[0][1].getSortKey());
+    assertEquals(innerSchema.getColumn("fid1"), sortSpecs[1][0].getSortKey());
+    assertEquals(innerSchema.getColumn("fid2"), sortSpecs[1][1].getSortKey());
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestBNLJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestBNLJoinExec.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestBNLJoinExec.java
index 235fbcf..572a60a 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestBNLJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestBNLJoinExec.java
@@ -21,8 +21,6 @@ package org.apache.tajo.engine.planner.physical;
 import org.apache.hadoop.fs.Path;
 import org.apache.tajo.LocalTajoTestingUtility;
 import org.apache.tajo.TajoTestingCluster;
-import org.apache.tajo.storage.fragment.FileFragment;
-import org.apache.tajo.worker.TaskAttemptContext;
 import org.apache.tajo.algebra.Expr;
 import org.apache.tajo.catalog.*;
 import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
@@ -37,8 +35,10 @@ import org.apache.tajo.engine.planner.logical.JoinNode;
 import org.apache.tajo.engine.planner.logical.LogicalNode;
 import org.apache.tajo.engine.planner.logical.NodeType;
 import org.apache.tajo.storage.*;
+import org.apache.tajo.storage.fragment.FileFragment;
 import org.apache.tajo.util.CommonTestingUtil;
 import org.apache.tajo.util.TUtil;
+import org.apache.tajo.worker.TaskAttemptContext;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -83,7 +83,7 @@ public class TestBNLJoinExec {
     Path employeePath = new Path(testDir, "employee.csv");
     Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(employeeMeta, schema, employeePath);
     appender.init();
-    Tuple tuple = new VTuple(schema.getColumnNum());
+    Tuple tuple = new VTuple(schema.size());
     for (int i = 0; i < OUTER_TUPLE_NUM; i++) {
       tuple.put(new Datum[] { DatumFactory.createInt4(i),
           DatumFactory.createInt4(i), DatumFactory.createInt4(10 + i),
@@ -104,7 +104,7 @@ public class TestBNLJoinExec {
     Path peoplePath = new Path(testDir, "people.csv");
     appender = StorageManagerFactory.getStorageManager(conf).getAppender(peopleMeta, peopleSchema, peoplePath);
     appender.init();
-    tuple = new VTuple(peopleSchema.getColumnNum());
+    tuple = new VTuple(peopleSchema.size());
     for (int i = 1; i < INNER_TUPLE_NUM; i += 2) {
       tuple.put(new Datum[] { DatumFactory.createInt4(i),
           DatumFactory.createInt4(10 + i),

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestBSTIndexExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestBSTIndexExec.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestBSTIndexExec.java
index 97932e7..4839451 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestBSTIndexExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestBSTIndexExec.java
@@ -23,9 +23,6 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.tajo.LocalTajoTestingUtility;
 import org.apache.tajo.TajoTestingCluster;
-import org.apache.tajo.storage.fragment.FileFragment;
-import org.apache.tajo.storage.fragment.FragmentConvertor;
-import org.apache.tajo.worker.TaskAttemptContext;
 import org.apache.tajo.algebra.Expr;
 import org.apache.tajo.catalog.*;
 import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
@@ -41,8 +38,11 @@ import org.apache.tajo.engine.planner.PhysicalPlannerImpl;
 import org.apache.tajo.engine.planner.logical.LogicalNode;
 import org.apache.tajo.engine.planner.logical.ScanNode;
 import org.apache.tajo.storage.*;
+import org.apache.tajo.storage.fragment.FileFragment;
+import org.apache.tajo.storage.fragment.FragmentConvertor;
 import org.apache.tajo.storage.index.bst.BSTIndex;
 import org.apache.tajo.util.CommonTestingUtil;
+import org.apache.tajo.worker.TaskAttemptContext;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -98,7 +98,7 @@ public class TestBSTIndexExec {
     this.idxSchema = new Schema();
     idxSchema.addColumn("managerId", Type.INT4);
     SortSpec[] sortKeys = new SortSpec[1];
-    sortKeys[0] = new SortSpec(idxSchema.getColumnByFQN("managerId"), true, false);
+    sortKeys[0] = new SortSpec(idxSchema.getColumn("managerId"), true, false);
     this.comp = new TupleComparator(idxSchema, sortKeys);
 
     this.writer = new BSTIndex(conf).getIndexWriter(idxPath,
@@ -115,10 +115,10 @@ public class TestBSTIndexExec {
     FileAppender appender = (FileAppender)StorageManagerFactory.getStorageManager(conf).getAppender(meta, schema,
         tablePath);
     appender.init();
-    Tuple tuple = new VTuple(schema.getColumnNum());
+    Tuple tuple = new VTuple(schema.size());
     for (int i = 0; i < 10000; i++) {
       
-      Tuple key = new VTuple(this.idxSchema.getColumnNum());
+      Tuple key = new VTuple(this.idxSchema.size());
       int rndKey = rnd.nextInt(250);
       if(this.randomValues.containsKey(rndKey)) {
         int t = this.randomValues.remove(rndKey) + 1;

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java
index a2a2b54..61d56fc 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java
@@ -80,7 +80,7 @@ public class TestExternalSortExec {
     Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(employeeMeta, schema, employeePath);
     appender.enableStats();
     appender.init();
-    Tuple tuple = new VTuple(schema.getColumnNum());
+    Tuple tuple = new VTuple(schema.size());
     for (int i = 0; i < numTuple; i++) {
       tuple.put(new Datum[] {
           DatumFactory.createInt4(rnd.nextInt(50)),

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java
index 63f14b7..e6ffac2 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java
@@ -21,8 +21,6 @@ package org.apache.tajo.engine.planner.physical;
 import org.apache.hadoop.fs.Path;
 import org.apache.tajo.LocalTajoTestingUtility;
 import org.apache.tajo.TajoTestingCluster;
-import org.apache.tajo.storage.fragment.FileFragment;
-import org.apache.tajo.worker.TaskAttemptContext;
 import org.apache.tajo.algebra.Expr;
 import org.apache.tajo.catalog.*;
 import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
@@ -37,8 +35,10 @@ import org.apache.tajo.engine.planner.logical.JoinNode;
 import org.apache.tajo.engine.planner.logical.LogicalNode;
 import org.apache.tajo.engine.planner.logical.NodeType;
 import org.apache.tajo.storage.*;
+import org.apache.tajo.storage.fragment.FileFragment;
 import org.apache.tajo.util.CommonTestingUtil;
 import org.apache.tajo.util.TUtil;
+import org.apache.tajo.worker.TaskAttemptContext;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -96,7 +96,7 @@ public class TestFullOuterHashJoinExec {
     Path dep3Path = new Path(testDir, "dep3.csv");
     Appender appender1 = StorageManagerFactory.getStorageManager(conf).getAppender(dep3Meta, dep3Schema, dep3Path);
     appender1.init();
-    Tuple tuple = new VTuple(dep3Schema.getColumnNum());
+    Tuple tuple = new VTuple(dep3Schema.size());
     for (int i = 0; i < 10; i++) {
       tuple.put(new Datum[] { DatumFactory.createInt4(i),
           DatumFactory.createText("dept_" + i),
@@ -125,7 +125,7 @@ public class TestFullOuterHashJoinExec {
     Path job3Path = new Path(testDir, "job3.csv");
     Appender appender2 = StorageManagerFactory.getStorageManager(conf).getAppender(job3Meta, job3Schema, job3Path);
     appender2.init();
-    Tuple tuple2 = new VTuple(job3Schema.getColumnNum());
+    Tuple tuple2 = new VTuple(job3Schema.size());
     for (int i = 1; i < 4; i++) {
       int x = 100 + i;
       tuple2.put(new Datum[] { DatumFactory.createInt4(100 + i),
@@ -164,7 +164,7 @@ public class TestFullOuterHashJoinExec {
     Path emp3Path = new Path(testDir, "emp3.csv");
     Appender appender3 = StorageManagerFactory.getStorageManager(conf).getAppender(emp3Meta, emp3Schema, emp3Path);
     appender3.init();
-    Tuple tuple3 = new VTuple(emp3Schema.getColumnNum());
+    Tuple tuple3 = new VTuple(emp3Schema.size());
 
     for (int i = 1; i < 4; i += 2) {
       int x = 10 + i;

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java
index c92d1c9..3519d1c 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java
@@ -21,8 +21,6 @@ package org.apache.tajo.engine.planner.physical;
 import org.apache.hadoop.fs.Path;
 import org.apache.tajo.LocalTajoTestingUtility;
 import org.apache.tajo.TajoTestingCluster;
-import org.apache.tajo.storage.fragment.FileFragment;
-import org.apache.tajo.worker.TaskAttemptContext;
 import org.apache.tajo.algebra.Expr;
 import org.apache.tajo.catalog.*;
 import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
@@ -37,8 +35,10 @@ import org.apache.tajo.engine.planner.logical.JoinNode;
 import org.apache.tajo.engine.planner.logical.LogicalNode;
 import org.apache.tajo.engine.planner.logical.NodeType;
 import org.apache.tajo.storage.*;
+import org.apache.tajo.storage.fragment.FileFragment;
 import org.apache.tajo.util.CommonTestingUtil;
 import org.apache.tajo.util.TUtil;
+import org.apache.tajo.worker.TaskAttemptContext;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -46,9 +46,7 @@ import org.junit.Test;
 import java.io.IOException;
 
 import static org.apache.tajo.ipc.TajoWorkerProtocol.JoinEnforce.JoinAlgorithm;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 public class TestFullOuterMergeJoinExec {
   private TajoConf conf;
@@ -99,7 +97,7 @@ public class TestFullOuterMergeJoinExec {
     Path dep3Path = new Path(testDir, "dep3.csv");
     Appender appender1 = StorageManagerFactory.getStorageManager(conf).getAppender(dep3Meta, dep3Schema, dep3Path);
     appender1.init();
-    Tuple tuple = new VTuple(dep3Schema.getColumnNum());
+    Tuple tuple = new VTuple(dep3Schema.size());
     for (int i = 0; i < 10; i++) {
       tuple.put(new Datum[] { DatumFactory.createInt4(i),
           DatumFactory.createText("dept_" + i),
@@ -137,7 +135,7 @@ public class TestFullOuterMergeJoinExec {
     Path dep4Path = new Path(testDir, "dep4.csv");
     Appender appender4 = StorageManagerFactory.getStorageManager(conf).getAppender(dep4Meta, dep4Schema, dep4Path);
     appender4.init();
-    Tuple tuple4 = new VTuple(dep4Schema.getColumnNum());
+    Tuple tuple4 = new VTuple(dep4Schema.size());
     for (int i = 0; i < 11; i++) {
       tuple4.put(new Datum[] { DatumFactory.createInt4(i),
           DatumFactory.createText("dept_" + i),
@@ -168,7 +166,7 @@ public class TestFullOuterMergeJoinExec {
     Path job3Path = new Path(testDir, "job3.csv");
     Appender appender2 = StorageManagerFactory.getStorageManager(conf).getAppender(job3Meta, job3Schema, job3Path);
     appender2.init();
-    Tuple tuple2 = new VTuple(job3Schema.getColumnNum());
+    Tuple tuple2 = new VTuple(job3Schema.size());
     for (int i = 1; i < 4; i++) {
       int x = 100 + i;
       tuple2.put(new Datum[] { DatumFactory.createInt4(100 + i),
@@ -207,7 +205,7 @@ public class TestFullOuterMergeJoinExec {
     Path emp3Path = new Path(testDir, "emp3.csv");
     Appender appender3 = StorageManagerFactory.getStorageManager(conf).getAppender(emp3Meta, emp3Schema, emp3Path);
     appender3.init();
-    Tuple tuple3 = new VTuple(emp3Schema.getColumnNum());
+    Tuple tuple3 = new VTuple(emp3Schema.size());
 
     for (int i = 1; i < 4; i += 2) {
       int x = 10 + i;

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java
index f4350fb..60d90d9 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java
@@ -21,8 +21,6 @@ package org.apache.tajo.engine.planner.physical;
 import org.apache.hadoop.fs.Path;
 import org.apache.tajo.LocalTajoTestingUtility;
 import org.apache.tajo.TajoTestingCluster;
-import org.apache.tajo.storage.fragment.FileFragment;
-import org.apache.tajo.worker.TaskAttemptContext;
 import org.apache.tajo.algebra.Expr;
 import org.apache.tajo.catalog.*;
 import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
@@ -35,8 +33,10 @@ import org.apache.tajo.engine.planner.*;
 import org.apache.tajo.engine.planner.enforce.Enforcer;
 import org.apache.tajo.engine.planner.logical.LogicalNode;
 import org.apache.tajo.storage.*;
+import org.apache.tajo.storage.fragment.FileFragment;
 import org.apache.tajo.util.CommonTestingUtil;
 import org.apache.tajo.util.TUtil;
+import org.apache.tajo.worker.TaskAttemptContext;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -80,7 +80,7 @@ public class TestHashAntiJoinExec {
     Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(employeeMeta, employeeSchema,
         employeePath);
     appender.init();
-    Tuple tuple = new VTuple(employeeSchema.getColumnNum());
+    Tuple tuple = new VTuple(employeeSchema.size());
 
     for (int i = 0; i < 10; i++) {
       tuple.put(new Datum[] {
@@ -105,7 +105,7 @@ public class TestHashAntiJoinExec {
     Path peoplePath = new Path(testDir, "people.csv");
     appender = StorageManagerFactory.getStorageManager(conf).getAppender(peopleMeta, peopleSchema, peoplePath);
     appender.init();
-    tuple = new VTuple(peopleSchema.getColumnNum());
+    tuple = new VTuple(peopleSchema.size());
     for (int i = 1; i < 10; i += 2) {
       tuple.put(new Datum[] {
           DatumFactory.createInt4(i), // empid [1, 3, 5, 7, 9]

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java
index 8d319ee..6f0b4e2 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java
@@ -81,7 +81,7 @@ public class TestHashJoinExec {
     Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(employeeMeta, employeeSchema,
         employeePath);
     appender.init();
-    Tuple tuple = new VTuple(employeeSchema.getColumnNum());
+    Tuple tuple = new VTuple(employeeSchema.size());
     for (int i = 0; i < 10; i++) {
       tuple.put(new Datum[] { DatumFactory.createInt4(i),
           DatumFactory.createInt4(i), DatumFactory.createInt4(10 + i),
@@ -103,7 +103,7 @@ public class TestHashJoinExec {
     Path peoplePath = new Path(testDir, "people.csv");
     appender = StorageManagerFactory.getStorageManager(conf).getAppender(peopleMeta, peopleSchema, peoplePath);
     appender.init();
-    tuple = new VTuple(peopleSchema.getColumnNum());
+    tuple = new VTuple(peopleSchema.size());
     for (int i = 1; i < 10; i += 2) {
       tuple.put(new Datum[] { DatumFactory.createInt4(i),
           DatumFactory.createInt4(10 + i),

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java
index 8eec324..ebc35d3 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java
@@ -21,8 +21,6 @@ package org.apache.tajo.engine.planner.physical;
 import org.apache.hadoop.fs.Path;
 import org.apache.tajo.LocalTajoTestingUtility;
 import org.apache.tajo.TajoTestingCluster;
-import org.apache.tajo.storage.fragment.FileFragment;
-import org.apache.tajo.worker.TaskAttemptContext;
 import org.apache.tajo.algebra.Expr;
 import org.apache.tajo.catalog.*;
 import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
@@ -35,8 +33,10 @@ import org.apache.tajo.engine.planner.*;
 import org.apache.tajo.engine.planner.enforce.Enforcer;
 import org.apache.tajo.engine.planner.logical.LogicalNode;
 import org.apache.tajo.storage.*;
+import org.apache.tajo.storage.fragment.FileFragment;
 import org.apache.tajo.util.CommonTestingUtil;
 import org.apache.tajo.util.TUtil;
+import org.apache.tajo.worker.TaskAttemptContext;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -80,7 +80,7 @@ public class TestHashSemiJoinExec {
     Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(employeeMeta, employeeSchema,
         employeePath);
     appender.init();
-    Tuple tuple = new VTuple(employeeSchema.getColumnNum());
+    Tuple tuple = new VTuple(employeeSchema.size());
 
     for (int i = 0; i < 10; i++) {
       tuple.put(new Datum[] {
@@ -105,7 +105,7 @@ public class TestHashSemiJoinExec {
     Path peoplePath = new Path(testDir, "people.csv");
     appender = StorageManagerFactory.getStorageManager(conf).getAppender(peopleMeta, peopleSchema, peoplePath);
     appender.init();
-    tuple = new VTuple(peopleSchema.getColumnNum());
+    tuple = new VTuple(peopleSchema.size());
     // make 27 tuples
     for (int i = 1; i < 10; i += 2) {
       // make three duplicated tuples for each tuples

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java
index e163a29..bee7547 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java
@@ -19,9 +19,8 @@
 package org.apache.tajo.engine.planner.physical;
 
 import org.apache.hadoop.fs.Path;
+import org.apache.tajo.LocalTajoTestingUtility;
 import org.apache.tajo.TajoTestingCluster;
-import org.apache.tajo.storage.fragment.FileFragment;
-import org.apache.tajo.worker.TaskAttemptContext;
 import org.apache.tajo.algebra.Expr;
 import org.apache.tajo.catalog.*;
 import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
@@ -36,12 +35,13 @@ import org.apache.tajo.engine.planner.logical.JoinNode;
 import org.apache.tajo.engine.planner.logical.LogicalNode;
 import org.apache.tajo.engine.planner.logical.NodeType;
 import org.apache.tajo.storage.*;
+import org.apache.tajo.storage.fragment.FileFragment;
 import org.apache.tajo.util.CommonTestingUtil;
 import org.apache.tajo.util.TUtil;
+import org.apache.tajo.worker.TaskAttemptContext;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.apache.tajo.LocalTajoTestingUtility;
 
 import java.io.IOException;
 
@@ -96,7 +96,7 @@ public class TestLeftOuterHashJoinExec {
     Path dep3Path = new Path(testDir, "dep3.csv");
     Appender appender1 = StorageManagerFactory.getStorageManager(conf).getAppender(dep3Meta, dep3Schema, dep3Path);
     appender1.init();
-    Tuple tuple = new VTuple(dep3Schema.getColumnNum());
+    Tuple tuple = new VTuple(dep3Schema.size());
     for (int i = 0; i < 10; i++) {
       tuple.put(new Datum[] { DatumFactory.createInt4(i),
                     DatumFactory.createText("dept_" + i),
@@ -125,7 +125,7 @@ public class TestLeftOuterHashJoinExec {
     Path job3Path = new Path(testDir, "job3.csv");
     Appender appender2 = StorageManagerFactory.getStorageManager(conf).getAppender(job3Meta, job3Schema, job3Path);
     appender2.init();
-    Tuple tuple2 = new VTuple(job3Schema.getColumnNum());
+    Tuple tuple2 = new VTuple(job3Schema.size());
     for (int i = 1; i < 4; i++) {
       int x = 100 + i;
       tuple2.put(new Datum[] { DatumFactory.createInt4(100 + i),
@@ -164,7 +164,7 @@ public class TestLeftOuterHashJoinExec {
     Path emp3Path = new Path(testDir, "emp3.csv");
     Appender appender3 = StorageManagerFactory.getStorageManager(conf).getAppender(emp3Meta, emp3Schema, emp3Path);
     appender3.init();
-    Tuple tuple3 = new VTuple(emp3Schema.getColumnNum());
+    Tuple tuple3 = new VTuple(emp3Schema.size());
 
     for (int i = 1; i < 4; i += 2) {
       int x = 10 + i;

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterNLJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterNLJoinExec.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterNLJoinExec.java
index 0540bc1..1ac202e 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterNLJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterNLJoinExec.java
@@ -95,7 +95,7 @@ public class TestLeftOuterNLJoinExec {
     Path dep3Path = new Path(testDir, "dep3.csv");
     Appender appender1 = StorageManagerFactory.getStorageManager(conf).getAppender(dep3Meta, dep3Schema, dep3Path);
     appender1.init();
-    Tuple tuple = new VTuple(dep3Schema.getColumnNum());
+    Tuple tuple = new VTuple(dep3Schema.size());
     for (int i = 0; i < 10; i++) {
       tuple.put(new Datum[] { DatumFactory.createInt4(i),
                     DatumFactory.createText("dept_" + i),
@@ -124,7 +124,7 @@ public class TestLeftOuterNLJoinExec {
     Path job3Path = new Path(testDir, "job3.csv");
     Appender appender2 = StorageManagerFactory.getStorageManager(conf).getAppender(job3Meta, job3Schema, job3Path);
     appender2.init();
-    Tuple tuple2 = new VTuple(job3Schema.getColumnNum());
+    Tuple tuple2 = new VTuple(job3Schema.size());
     for (int i = 1; i < 4; i++) {
       int x = 100 + i;
       tuple2.put(new Datum[] { DatumFactory.createInt4(100 + i),
@@ -163,7 +163,7 @@ public class TestLeftOuterNLJoinExec {
     Path emp3Path = new Path(testDir, "emp3.csv");
     Appender appender3 = StorageManagerFactory.getStorageManager(conf).getAppender(emp3Meta, emp3Schema, emp3Path);
     appender3.init();
-    Tuple tuple3 = new VTuple(emp3Schema.getColumnNum());
+    Tuple tuple3 = new VTuple(emp3Schema.size());
 
     for (int i = 1; i < 4; i += 2) {
       int x = 10 + i;

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
index af72541..5977c95 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
@@ -22,8 +22,6 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.tajo.LocalTajoTestingUtility;
 import org.apache.tajo.TajoTestingCluster;
-import org.apache.tajo.storage.fragment.FileFragment;
-import org.apache.tajo.worker.TaskAttemptContext;
 import org.apache.tajo.algebra.Expr;
 import org.apache.tajo.catalog.*;
 import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
@@ -38,8 +36,10 @@ import org.apache.tajo.engine.planner.logical.JoinNode;
 import org.apache.tajo.engine.planner.logical.LogicalNode;
 import org.apache.tajo.engine.planner.logical.NodeType;
 import org.apache.tajo.storage.*;
+import org.apache.tajo.storage.fragment.FileFragment;
 import org.apache.tajo.util.CommonTestingUtil;
 import org.apache.tajo.util.TUtil;
+import org.apache.tajo.worker.TaskAttemptContext;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -83,7 +83,7 @@ public class TestMergeJoinExec {
     Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(employeeMeta, employeeSchema,
         employeePath);
     appender.init();
-    Tuple tuple = new VTuple(employeeSchema.getColumnNum());
+    Tuple tuple = new VTuple(employeeSchema.size());
     for (int i = 0; i < 10; i++) {
       tuple.put(new Datum[] { DatumFactory.createInt4(i),
           DatumFactory.createInt4(i), DatumFactory.createInt4(10 + i),
@@ -111,7 +111,7 @@ public class TestMergeJoinExec {
     Path peoplePath = new Path(testDir, "people.csv");
     appender = StorageManagerFactory.getStorageManager(conf).getAppender(peopleMeta, peopleSchema, peoplePath);
     appender.init();
-    tuple = new VTuple(peopleSchema.getColumnNum());
+    tuple = new VTuple(peopleSchema.size());
     for (int i = 1; i < 10; i += 2) {
       tuple.put(new Datum[] { DatumFactory.createInt4(i),
           DatumFactory.createInt4(10 + i),

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestNLJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestNLJoinExec.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestNLJoinExec.java
index 004cb57..601621d 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestNLJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestNLJoinExec.java
@@ -21,8 +21,6 @@ package org.apache.tajo.engine.planner.physical;
 import org.apache.hadoop.fs.Path;
 import org.apache.tajo.LocalTajoTestingUtility;
 import org.apache.tajo.TajoTestingCluster;
-import org.apache.tajo.storage.fragment.FileFragment;
-import org.apache.tajo.worker.TaskAttemptContext;
 import org.apache.tajo.algebra.Expr;
 import org.apache.tajo.catalog.*;
 import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
@@ -39,8 +37,10 @@ import org.apache.tajo.engine.planner.enforce.Enforcer;
 import org.apache.tajo.engine.planner.global.MasterPlan;
 import org.apache.tajo.engine.planner.logical.LogicalNode;
 import org.apache.tajo.storage.*;
+import org.apache.tajo.storage.fragment.FileFragment;
 import org.apache.tajo.util.CommonTestingUtil;
 import org.apache.tajo.util.TUtil;
+import org.apache.tajo.worker.TaskAttemptContext;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -83,7 +83,7 @@ public class TestNLJoinExec {
     Path employeePath = new Path(testDir, "employee.csv");
     Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(employeeMeta, schema, employeePath);
     appender.init();
-    Tuple tuple = new VTuple(schema.getColumnNum());
+    Tuple tuple = new VTuple(schema.size());
     for (int i = 0; i < 50; i++) {
       tuple.put(new Datum[] {
           DatumFactory.createInt4(i),
@@ -106,7 +106,7 @@ public class TestNLJoinExec {
     Path peoplePath = new Path(testDir, "people.csv");
     appender = StorageManagerFactory.getStorageManager(conf).getAppender(peopleMeta, peopleSchema, peoplePath);
     appender.init();
-    tuple = new VTuple(peopleSchema.getColumnNum());
+    tuple = new VTuple(peopleSchema.size());
     for (int i = 1; i < 50; i += 2) {
       tuple.put(new Datum[] {
           DatumFactory.createInt4(i),

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
index 72462de..7e3bd2b 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
@@ -114,7 +114,7 @@ public class TestPhysicalPlanner {
     Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(employeeMeta, employeeSchema,
         employeePath);
     appender.init();
-    Tuple tuple = new VTuple(employeeSchema.getColumnNum());
+    Tuple tuple = new VTuple(employeeSchema.size());
     for (int i = 0; i < 100; i++) {
       tuple.put(new Datum[] {DatumFactory.createText("name_" + i),
           DatumFactory.createInt4(i), DatumFactory.createText("dept_" + i)});
@@ -131,7 +131,7 @@ public class TestPhysicalPlanner {
     appender = StorageManagerFactory.getStorageManager(conf).getAppender(scoreMeta, scoreSchema, scorePath);
     appender.init();
     score = new TableDesc("score", scoreSchema, scoreMeta, scorePath);
-    tuple = new VTuple(scoreSchema.getColumnNum());
+    tuple = new VTuple(scoreSchema.size());
     int m = 0;
     for (int i = 1; i <= 5; i++) {
       for (int k = 3; k < 5; k++) {

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java
index b52a37a..d2c29a3 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java
@@ -19,10 +19,8 @@
 package org.apache.tajo.engine.planner.physical;
 
 import org.apache.hadoop.fs.Path;
+import org.apache.tajo.LocalTajoTestingUtility;
 import org.apache.tajo.TajoTestingCluster;
-import org.apache.tajo.engine.planner.enforce.Enforcer;
-import org.apache.tajo.storage.fragment.FileFragment;
-import org.apache.tajo.worker.TaskAttemptContext;
 import org.apache.tajo.algebra.Expr;
 import org.apache.tajo.catalog.*;
 import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
@@ -35,14 +33,16 @@ import org.apache.tajo.engine.planner.LogicalPlanner;
 import org.apache.tajo.engine.planner.PhysicalPlanner;
 import org.apache.tajo.engine.planner.PhysicalPlannerImpl;
 import org.apache.tajo.engine.planner.PlanningException;
+import org.apache.tajo.engine.planner.enforce.Enforcer;
 import org.apache.tajo.engine.planner.logical.LogicalNode;
 import org.apache.tajo.storage.*;
+import org.apache.tajo.storage.fragment.FileFragment;
 import org.apache.tajo.util.CommonTestingUtil;
 import org.apache.tajo.util.TUtil;
+import org.apache.tajo.worker.TaskAttemptContext;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.apache.tajo.LocalTajoTestingUtility;
 
 import java.io.IOException;
 
@@ -96,7 +96,7 @@ public class TestRightOuterHashJoinExec {
     Path dep3Path = new Path(testDir, "dep3.csv");
     Appender appender1 = StorageManagerFactory.getStorageManager(conf).getAppender(dep3Meta, dep3Schema, dep3Path);
     appender1.init();
-    Tuple tuple = new VTuple(dep3Schema.getColumnNum());
+    Tuple tuple = new VTuple(dep3Schema.size());
     for (int i = 0; i < 10; i++) {
       tuple.put(new Datum[] { DatumFactory.createInt4(i),
                     DatumFactory.createText("dept_" + i),
@@ -125,7 +125,7 @@ public class TestRightOuterHashJoinExec {
     Path job3Path = new Path(testDir, "job3.csv");
     Appender appender2 = StorageManagerFactory.getStorageManager(conf).getAppender(job3Meta, job3Schema, job3Path);
     appender2.init();
-    Tuple tuple2 = new VTuple(job3Schema.getColumnNum());
+    Tuple tuple2 = new VTuple(job3Schema.size());
     for (int i = 1; i < 4; i++) {
       int x = 100 + i;
       tuple2.put(new Datum[] { DatumFactory.createInt4(100 + i),
@@ -164,7 +164,7 @@ public class TestRightOuterHashJoinExec {
     Path emp3Path = new Path(testDir, "emp3.csv");
     Appender appender3 = StorageManagerFactory.getStorageManager(conf).getAppender(emp3Meta, emp3Schema, emp3Path);
     appender3.init();
-    Tuple tuple3 = new VTuple(emp3Schema.getColumnNum());
+    Tuple tuple3 = new VTuple(emp3Schema.size());
 
     for (int i = 1; i < 4; i += 2) {
       int x = 10 + i;

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java
index 5bbb4aa..b4b588d 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java
@@ -21,8 +21,6 @@ package org.apache.tajo.engine.planner.physical;
 import org.apache.hadoop.fs.Path;
 import org.apache.tajo.LocalTajoTestingUtility;
 import org.apache.tajo.TajoTestingCluster;
-import org.apache.tajo.storage.fragment.FileFragment;
-import org.apache.tajo.worker.TaskAttemptContext;
 import org.apache.tajo.algebra.Expr;
 import org.apache.tajo.catalog.*;
 import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
@@ -37,8 +35,10 @@ import org.apache.tajo.engine.planner.logical.JoinNode;
 import org.apache.tajo.engine.planner.logical.LogicalNode;
 import org.apache.tajo.engine.planner.logical.NodeType;
 import org.apache.tajo.storage.*;
+import org.apache.tajo.storage.fragment.FileFragment;
 import org.apache.tajo.util.CommonTestingUtil;
 import org.apache.tajo.util.TUtil;
+import org.apache.tajo.worker.TaskAttemptContext;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -46,9 +46,7 @@ import org.junit.Test;
 import java.io.IOException;
 
 import static org.apache.tajo.ipc.TajoWorkerProtocol.JoinEnforce.JoinAlgorithm;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
 public class TestRightOuterMergeJoinExec {
   private TajoConf conf;
@@ -99,7 +97,7 @@ public class TestRightOuterMergeJoinExec {
     Path dep3Path = new Path(testDir, "dep3.csv");
     Appender appender1 = StorageManagerFactory.getStorageManager(conf).getAppender(dep3Meta, dep3Schema, dep3Path);
     appender1.init();
-    Tuple tuple = new VTuple(dep3Schema.getColumnNum());
+    Tuple tuple = new VTuple(dep3Schema.size());
     for (int i = 0; i < 10; i++) {
       tuple.put(new Datum[] { DatumFactory.createInt4(i),
           DatumFactory.createText("dept_" + i),
@@ -137,7 +135,7 @@ public class TestRightOuterMergeJoinExec {
     Path dep4Path = new Path(testDir, "dep4.csv");
     Appender appender4 = StorageManagerFactory.getStorageManager(conf).getAppender(dep4Meta, dep4Schema, dep4Path);
     appender4.init();
-    Tuple tuple4 = new VTuple(dep4Schema.getColumnNum());
+    Tuple tuple4 = new VTuple(dep4Schema.size());
     for (int i = 0; i < 11; i++) {
       tuple4.put(new Datum[] { DatumFactory.createInt4(i),
           DatumFactory.createText("dept_" + i),
@@ -168,7 +166,7 @@ public class TestRightOuterMergeJoinExec {
     Path job3Path = new Path(testDir, "job3.csv");
     Appender appender2 = StorageManagerFactory.getStorageManager(conf).getAppender(job3Meta, job3Schema, job3Path);
     appender2.init();
-    Tuple tuple2 = new VTuple(job3Schema.getColumnNum());
+    Tuple tuple2 = new VTuple(job3Schema.size());
     for (int i = 1; i < 4; i++) {
       int x = 100 + i;
       tuple2.put(new Datum[] { DatumFactory.createInt4(100 + i),
@@ -207,7 +205,7 @@ public class TestRightOuterMergeJoinExec {
     Path emp3Path = new Path(testDir, "emp3.csv");
     Appender appender3 = StorageManagerFactory.getStorageManager(conf).getAppender(emp3Meta, emp3Schema, emp3Path);
     appender3.init();
-    Tuple tuple3 = new VTuple(emp3Schema.getColumnNum());
+    Tuple tuple3 = new VTuple(emp3Schema.size());
 
     for (int i = 1; i < 4; i += 2) {
       int x = 10 + i;

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java
index 7e8c118..00fb386 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java
@@ -80,7 +80,7 @@ public class TestSortExec {
 
     Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(employeeMeta, schema, tablePath);
     appender.init();
-    Tuple tuple = new VTuple(schema.getColumnNum());
+    Tuple tuple = new VTuple(schema.size());
     for (int i = 0; i < 100; i++) {
       tuple.put(new Datum[] {
           DatumFactory.createInt4(rnd.nextInt(5)),

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestCTASQuery.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestCTASQuery.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestCTASQuery.java
index 9b940da..902a73a 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestCTASQuery.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestCTASQuery.java
@@ -56,7 +56,7 @@ public class TestCTASQuery extends QueryTestCaseBase {
     assertTrue(desc.getSchema().contains("testCtasWithoutTableDefinition.col1"));
     PartitionMethodDesc partitionDesc = desc.getPartitionMethod();
     assertEquals(partitionDesc.getPartitionType(), CatalogProtos.PartitionType.COLUMN);
-    assertEquals("key", partitionDesc.getExpressionSchema().getColumns().get(0).getColumnName());
+    assertEquals("key", partitionDesc.getExpressionSchema().getColumns().get(0).getSimpleName());
 
     FileSystem fs = FileSystem.get(testBase.getTestingCluster().getConfiguration());
     Path path = desc.getPath();
@@ -95,7 +95,7 @@ public class TestCTASQuery extends QueryTestCaseBase {
     assertTrue(catalog.existsTable("testCtasWithColumnedPartition"));
     PartitionMethodDesc partitionDesc = desc.getPartitionMethod();
     assertEquals(partitionDesc.getPartitionType(), CatalogProtos.PartitionType.COLUMN);
-    assertEquals("key", partitionDesc.getExpressionSchema().getColumns().get(0).getColumnName());
+    assertEquals("key", partitionDesc.getExpressionSchema().getColumns().get(0).getSimpleName());
 
     FileSystem fs = FileSystem.get(cluster.getConfiguration());
     Path path = desc.getPath();

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestTablePartitions.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestTablePartitions.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestTablePartitions.java
index f775acb..60c8497 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestTablePartitions.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestTablePartitions.java
@@ -36,7 +36,6 @@ import java.sql.ResultSet;
 import java.util.Map;
 
 import static org.junit.Assert.*;
-import static org.junit.Assert.assertEquals;
 
 public class TestTablePartitions extends QueryTestCaseBase {
 
@@ -53,8 +52,8 @@ public class TestTablePartitions extends QueryTestCaseBase {
     res.close();
 
     assertTrue(catalog.existsTable(tableName));
-    assertEquals(2, catalog.getTableDesc(tableName).getSchema().getColumnNum());
-    assertEquals(3, catalog.getTableDesc(tableName).getLogicalSchema().getColumnNum());
+    assertEquals(2, catalog.getTableDesc(tableName).getSchema().size());
+    assertEquals(3, catalog.getTableDesc(tableName).getLogicalSchema().size());
 
     res = testBase.execute(
         "insert overwrite into " + tableName + " select l_orderkey, l_partkey, l_quantity from lineitem");
@@ -69,8 +68,8 @@ public class TestTablePartitions extends QueryTestCaseBase {
     res.close();
 
     assertTrue(catalog.existsTable(tableName));
-    assertEquals(3, catalog.getTableDesc(tableName).getSchema().getColumnNum());
-    assertEquals(4, catalog.getTableDesc(tableName).getLogicalSchema().getColumnNum());
+    assertEquals(3, catalog.getTableDesc(tableName).getSchema().size());
+    assertEquals(4, catalog.getTableDesc(tableName).getLogicalSchema().size());
 
     res = executeString("insert overwrite into " + tableName + " (col1, col2, key) select l_orderkey, " +
         "l_partkey, l_quantity from lineitem");

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/jdbc/TestResultSet.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/jdbc/TestResultSet.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/jdbc/TestResultSet.java
index aff996b..3610382 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/jdbc/TestResultSet.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/jdbc/TestResultSet.java
@@ -25,7 +25,10 @@ import org.apache.hadoop.fs.Path;
 import org.apache.tajo.IntegrationTest;
 import org.apache.tajo.TajoTestingCluster;
 import org.apache.tajo.TpchTestBase;
-import org.apache.tajo.catalog.*;
+import org.apache.tajo.catalog.CatalogUtil;
+import org.apache.tajo.catalog.Schema;
+import org.apache.tajo.catalog.TableDesc;
+import org.apache.tajo.catalog.TableMeta;
 import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
 import org.apache.tajo.catalog.statistics.TableStats;
 import org.apache.tajo.common.TajoDataTypes.Type;
@@ -102,9 +105,9 @@ public class TestResultSet {
     ResultSetMetaData meta = rs.getMetaData();
     assertNotNull(meta);
     Schema schema = scoreSchema;
-    assertEquals(schema.getColumnNum(), meta.getColumnCount());
+    assertEquals(schema.size(), meta.getColumnCount());
     for (int i = 0; i < meta.getColumnCount(); i++) {
-      assertEquals(schema.getColumn(i).getColumnName(), meta.getColumnName(i + 1));
+      assertEquals(schema.getColumn(i).getSimpleName(), meta.getColumnName(i + 1));
       assertEquals(schema.getColumn(i).getQualifier(), meta.getTableName(i + 1));
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java
index 2313388..445cd69 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java
@@ -238,7 +238,7 @@ public class TestTajoJdbc {
 
       while(rs.next()) {
         assertEquals(tableName, rs.getString("TABLE_NAME"));
-        assertEquals(columns.get(numColumns).getColumnName(), rs.getString("COLUMN_NAME"));
+        assertEquals(columns.get(numColumns).getSimpleName(), rs.getString("COLUMN_NAME"));
         //TODO assert type
         numColumns++;
       }

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java
index b18f706..65b7d1e 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java
@@ -36,7 +36,10 @@ import org.apache.tajo.engine.parser.SQLAnalyzer;
 import org.apache.tajo.engine.planner.*;
 import org.apache.tajo.engine.planner.enforce.Enforcer;
 import org.apache.tajo.engine.planner.logical.LogicalNode;
-import org.apache.tajo.engine.planner.physical.*;
+import org.apache.tajo.engine.planner.physical.ExternalSortExec;
+import org.apache.tajo.engine.planner.physical.PhysicalExec;
+import org.apache.tajo.engine.planner.physical.ProjectionExec;
+import org.apache.tajo.engine.planner.physical.RangeShuffleFileWriteExec;
 import org.apache.tajo.storage.*;
 import org.apache.tajo.storage.fragment.FileFragment;
 import org.apache.tajo.storage.index.bst.BSTIndex;
@@ -52,7 +55,8 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 public class TestRangeRetrieverHandler {
   private TajoTestingCluster util;
@@ -108,7 +112,7 @@ public class TestRangeRetrieverHandler {
     Appender appender = sm.getAppender(employeeMeta, schema, tableDir);
     appender.init();
 
-    Tuple tuple = new VTuple(schema.getColumnNum());
+    Tuple tuple = new VTuple(schema.size());
     for (int i = 0; i < TEST_TUPLE; i++) {
       tuple.put(
           new Datum[] {
@@ -229,7 +233,7 @@ public class TestRangeRetrieverHandler {
     fs.mkdirs(tablePath.getParent());
     Appender appender = sm.getAppender(meta, schema, tablePath);
     appender.init();
-    Tuple tuple = new VTuple(schema.getColumnNum());
+    Tuple tuple = new VTuple(schema.size());
     for (int i = (TEST_TUPLE - 1); i >= 0 ; i--) {
       tuple.put(
           new Datum[] {

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoDatabaseMetaData.java
----------------------------------------------------------------------
diff --git a/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoDatabaseMetaData.java b/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoDatabaseMetaData.java
index 2637e6b..b3e67bc 100644
--- a/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoDatabaseMetaData.java
+++ b/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoDatabaseMetaData.java
@@ -494,14 +494,14 @@ public class TajoDatabaseMetaData implements DatabaseMetaData {
           TableDesc tableDesc = conn.getTajoClient().getTableDesc(table);
           int pos = 0;
           for (Column column: tableDesc.getSchema().getColumns()) {
-            if (column.getColumnName().matches(regcolumnNamePattern)) {
+            if (column.getSimpleName().matches(regcolumnNamePattern)) {
               MetaDataTuple tuple = new MetaDataTuple(22);
 
               int index = 0;
               tuple.put(index++, new TextDatum(catalog));  //TABLE_CAT
               tuple.put(index++, NullDatum.get());  //TABLE_SCHEM
               tuple.put(index++, new TextDatum(table));  //TABLE_NAME
-              tuple.put(index++, new TextDatum(column.getColumnName()));  //COLUMN_NAME
+              tuple.put(index++, new TextDatum(column.getSimpleName()));  //COLUMN_NAME
               // TODO - DATA_TYPE
               tuple.put(index++, new TextDatum("" + ResultSetUtil.tajoTypeToSqlType(column.getDataType())));
               tuple.put(index++, new TextDatum(ResultSetUtil.toSqlType(column.getDataType())));  //TYPE_NAME

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-storage/src/main/java/org/apache/tajo/storage/CSVFile.java
----------------------------------------------------------------------
diff --git a/tajo-storage/src/main/java/org/apache/tajo/storage/CSVFile.java b/tajo-storage/src/main/java/org/apache/tajo/storage/CSVFile.java
index 490787f..ed65af6 100644
--- a/tajo-storage/src/main/java/org/apache/tajo/storage/CSVFile.java
+++ b/tajo-storage/src/main/java/org/apache/tajo/storage/CSVFile.java
@@ -84,7 +84,7 @@ public class CSVFile {
       this.meta = meta;
       this.schema = schema;
       this.delimiter = StringEscapeUtils.unescapeJava(this.meta.getOption(DELIMITER, DELIMITER_DEFAULT)).charAt(0);
-      this.columnNum = schema.getColumnNum();
+      this.columnNum = schema.size();
       String nullCharacters = StringEscapeUtils.unescapeJava(this.meta.getOption(NULL));
       if (StringUtils.isEmpty(nullCharacters)) {
         nullChars = NullDatum.get().asTextBytes();

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-storage/src/main/java/org/apache/tajo/storage/FileScanner.java
----------------------------------------------------------------------
diff --git a/tajo-storage/src/main/java/org/apache/tajo/storage/FileScanner.java b/tajo-storage/src/main/java/org/apache/tajo/storage/FileScanner.java
index c831822..553fec9 100644
--- a/tajo-storage/src/main/java/org/apache/tajo/storage/FileScanner.java
+++ b/tajo-storage/src/main/java/org/apache/tajo/storage/FileScanner.java
@@ -48,7 +48,7 @@ public abstract class FileScanner implements Scanner {
     this.meta = meta;
     this.schema = schema;
     this.fragment = fragment;
-    this.columnNum = this.schema.getColumnNum();
+    this.columnNum = this.schema.size();
   }
 
   public void init() throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/e2f4798b/tajo-storage/src/main/java/org/apache/tajo/storage/LazyTuple.java
----------------------------------------------------------------------
diff --git a/tajo-storage/src/main/java/org/apache/tajo/storage/LazyTuple.java b/tajo-storage/src/main/java/org/apache/tajo/storage/LazyTuple.java
index 7878004..3e7ca5f 100644
--- a/tajo-storage/src/main/java/org/apache/tajo/storage/LazyTuple.java
+++ b/tajo-storage/src/main/java/org/apache/tajo/storage/LazyTuple.java
@@ -39,7 +39,7 @@ public class LazyTuple implements Tuple, Cloneable {
   public LazyTuple(Schema schema, byte[][] textBytes, long offset, byte[] nullBytes, SerializerDeserializer serde) {
     this.schema = schema;
     this.textBytes = textBytes;
-    this.values = new Datum[schema.getColumnNum()];
+    this.values = new Datum[schema.size()];
     this.offset = offset;
     this.nullBytes = nullBytes;
     this.serializeDeserialize = serde;


Mime
View raw message