tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject [7/8] tajo git commit: TAJO-2135: Invalid join result when join key columns contain nulls.
Date Wed, 04 May 2016 10:38:23 GMT
http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/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 ffa48aa..7a53eeb 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
@@ -19,16 +19,10 @@
 package org.apache.tajo.engine.query;
 
 import com.google.common.base.Optional;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.MiniHBaseCluster;
-import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.*;
 import org.apache.hadoop.hbase.client.*;
 import org.apache.hadoop.hbase.filter.Filter;
 import org.apache.hadoop.hbase.filter.InclusiveStopFilter;
@@ -47,13 +41,11 @@ import org.apache.tajo.exception.TajoException;
 import org.apache.tajo.exception.UnavailableTableLocationException;
 import org.apache.tajo.plan.expr.*;
 import org.apache.tajo.plan.logical.ScanNode;
-import org.apache.tajo.storage.StorageConstants;
 import org.apache.tajo.storage.Tablespace;
 import org.apache.tajo.storage.TablespaceManager;
 import org.apache.tajo.storage.fragment.Fragment;
 import org.apache.tajo.storage.hbase.*;
 import org.apache.tajo.util.Bytes;
-import org.apache.tajo.util.KeyValueSet;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -70,8 +62,6 @@ import static org.junit.Assert.*;
 
 @Category(IntegrationTest.class)
 public class TestHBaseTable extends QueryTestCaseBase {
-  private static final Log LOG = LogFactory.getLog(TestHBaseTable.class);
-
   private static String tableSpaceUri;
   private static String hostName,zkPort;
 
@@ -829,10 +819,6 @@ public class TestHBaseTable extends QueryTestCaseBase {
     TableDesc tableDesc = catalog.getTableDesc(getCurrentDatabase(), "hbase_mapped_table");
 
     // create test table
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     schema.addColumn("id", Type.TEXT);
     schema.addColumn("name", Type.TEXT);
@@ -841,8 +827,8 @@ public class TestHBaseTable extends QueryTestCaseBase {
     for (int i = 99; i >= 0; i--) {
       datas.add(df.format(i) + "|value" + i);
     }
-    TajoTestingCluster.createTable(getCurrentDatabase() + ".base_table",
-        schema, tableOptions, datas.toArray(new String[datas.size()]), 2);
+    TajoTestingCluster.createTable(conf, getCurrentDatabase() + ".base_table",
+        schema, datas.toArray(new String[datas.size()]), 2);
 
     executeString("insert into hbase_mapped_table " +
         "select id, name from base_table ").close();
@@ -885,10 +871,6 @@ public class TestHBaseTable extends QueryTestCaseBase {
     TableDesc tableDesc = catalog.getTableDesc(getCurrentDatabase(), "hbase_mapped_table");
 
     // create test table
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     schema.addColumn("id", Type.TEXT);
     schema.addColumn("name", Type.TEXT);
@@ -896,8 +878,8 @@ public class TestHBaseTable extends QueryTestCaseBase {
     for (int i = 99; i >= 0; i--) {
       datas.add(i + "|value" + i);
     }
-    TajoTestingCluster.createTable(getCurrentDatabase() + ".base_table",
-        schema, tableOptions, datas.toArray(new String[datas.size()]), 2);
+    TajoTestingCluster.createTable(conf, getCurrentDatabase() + ".base_table",
+        schema, datas.toArray(new String[datas.size()]), 2);
 
     executeString("insert into hbase_mapped_table " +
         "select id, name from base_table ").close();
@@ -943,10 +925,6 @@ public class TestHBaseTable extends QueryTestCaseBase {
     TableDesc tableDesc = catalog.getTableDesc(getCurrentDatabase(), "hbase_mapped_table");
 
     // create test table
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     schema.addColumn("id", Type.TEXT);
     schema.addColumn("name", Type.TEXT);
@@ -955,8 +933,8 @@ public class TestHBaseTable extends QueryTestCaseBase {
     for (int i = 99; i >= 0; i--) {
       datas.add(df.format(i) + "|value" + i);
     }
-    TajoTestingCluster.createTable(getCurrentDatabase() + ".base_table",
-        schema, tableOptions, datas.toArray(new String[datas.size()]), 2);
+    TajoTestingCluster.createTable(conf, getCurrentDatabase() + ".base_table",
+        schema, datas.toArray(new String[datas.size()]), 2);
 
     executeString("insert into hbase_mapped_table " +
         "select id, name from base_table ").close();
@@ -1001,10 +979,6 @@ public class TestHBaseTable extends QueryTestCaseBase {
     TableDesc tableDesc = catalog.getTableDesc(getCurrentDatabase(), "hbase_mapped_table");
 
     // create test table
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     schema.addColumn("id1", Type.TEXT);
     schema.addColumn("id2", Type.TEXT);
@@ -1014,8 +988,8 @@ public class TestHBaseTable extends QueryTestCaseBase {
     for (int i = 99; i >= 0; i--) {
       datas.add(df.format(i) + "|" + (i + 100) + "|value" + i);
     }
-    TajoTestingCluster.createTable(getCurrentDatabase() + ".base_table",
-        schema, tableOptions, datas.toArray(new String[datas.size()]), 2);
+    TajoTestingCluster.createTable(conf, getCurrentDatabase() + ".base_table",
+        schema, datas.toArray(new String[datas.size()]), 2);
 
     executeString("insert into hbase_mapped_table " +
         "select id1, id2, name from base_table ").close();
@@ -1058,10 +1032,6 @@ public class TestHBaseTable extends QueryTestCaseBase {
     TableDesc tableDesc = catalog.getTableDesc(getCurrentDatabase(), "hbase_mapped_table");
 
     // create test table
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     schema.addColumn("id", Type.INT4);
     schema.addColumn("name", Type.TEXT);
@@ -1069,8 +1039,8 @@ public class TestHBaseTable extends QueryTestCaseBase {
     for (int i = 99; i >= 0; i--) {
       datas.add(i + "|value" + i);
     }
-    TajoTestingCluster.createTable(getCurrentDatabase() + ".base_table",
-        schema, tableOptions, datas.toArray(new String[datas.size()]), 2);
+    TajoTestingCluster.createTable(conf, getCurrentDatabase() + ".base_table",
+        schema, datas.toArray(new String[datas.size()]), 2);
 
     executeString("insert into hbase_mapped_table " +
         "select id, name from base_table ").close();
@@ -1114,10 +1084,6 @@ public class TestHBaseTable extends QueryTestCaseBase {
     TableDesc tableDesc = catalog.getTableDesc(getCurrentDatabase(), "hbase_mapped_table");
 
     // create test table
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     schema.addColumn("rk", Type.TEXT);
     schema.addColumn("col2_key", Type.TEXT);
@@ -1129,8 +1095,8 @@ public class TestHBaseTable extends QueryTestCaseBase {
         datas.add(i + "|ck-" + j + "|value-" + j + "|col3-" + i);
       }
     }
-    TajoTestingCluster.createTable(getCurrentDatabase() + ".base_table",
-        schema, tableOptions, datas.toArray(new String[datas.size()]), 2);
+    TajoTestingCluster.createTable(conf, getCurrentDatabase() + ".base_table",
+        schema, datas.toArray(new String[datas.size()]), 2);
 
     executeString("insert into hbase_mapped_table " +
         "select rk, col2_key, col2_value, col3 from base_table ").close();
@@ -1203,10 +1169,6 @@ public class TestHBaseTable extends QueryTestCaseBase {
     assertTableExists("hbase_mapped_table");
 
     // create test table
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     schema.addColumn("id", Type.INT4);
     schema.addColumn("name", Type.TEXT);
@@ -1214,8 +1176,8 @@ public class TestHBaseTable extends QueryTestCaseBase {
     for (int i = 99; i >= 0; i--) {
       datas.add(i + "|value" + i);
     }
-    TajoTestingCluster.createTable(getCurrentDatabase() + ".base_table",
-        schema, tableOptions, datas.toArray(new String[datas.size()]), 2);
+    TajoTestingCluster.createTable(conf, getCurrentDatabase() + ".base_table",
+        schema, datas.toArray(new String[datas.size()]), 2);
 
     try {
       executeString("insert into hbase_mapped_table " +
@@ -1275,10 +1237,6 @@ public class TestHBaseTable extends QueryTestCaseBase {
   @Test
   public void testCTAS() throws Exception {
     // create test table
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     schema.addColumn("id", Type.TEXT);
     schema.addColumn("name", Type.TEXT);
@@ -1287,8 +1245,8 @@ public class TestHBaseTable extends QueryTestCaseBase {
     for (int i = 99; i >= 0; i--) {
       datas.add(df.format(i) + "|value" + i);
     }
-    TajoTestingCluster.createTable(getCurrentDatabase() + ".base_table",
-        schema, tableOptions, datas.toArray(new String[datas.size()]), 2);
+    TajoTestingCluster.createTable(conf, getCurrentDatabase() + ".base_table",
+        schema, datas.toArray(new String[datas.size()]), 2);
 
     executeString(
         "CREATE TABLE hbase_mapped_table (rk text, col1 text) TABLESPACE cluster1 " +
@@ -1396,10 +1354,6 @@ public class TestHBaseTable extends QueryTestCaseBase {
 
     try {
       // create test table
-      KeyValueSet tableOptions = new KeyValueSet();
-      tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-      tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
       Schema schema = new Schema();
       schema.addColumn("id", Type.TEXT);
       schema.addColumn("name", Type.TEXT);
@@ -1409,8 +1363,8 @@ public class TestHBaseTable extends QueryTestCaseBase {
       for (int i = 99; i >= 0; i--) {
         datas.add(df.format(i) + "|value" + i + "|comment-" + i);
       }
-      TajoTestingCluster.createTable(getCurrentDatabase() + ".base_table",
-          schema, tableOptions, datas.toArray(new String[datas.size()]), 2);
+      TajoTestingCluster.createTable(conf, getCurrentDatabase() + ".base_table",
+          schema, datas.toArray(new String[datas.size()]), 2);
 
       executeString("insert into location '/tmp/hfile_test' " +
           "select id, name, comment from base_table ").close();

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestInSubquery.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestInSubquery.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestInSubquery.java
index 3d7152a..fc64e40 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestInSubquery.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestInSubquery.java
@@ -103,35 +103,40 @@ public class TestInSubquery extends TestJoinQuery {
     runSimpleTests();
   }
 
-  @Test
+  // TODO: enable after TAJO-2141
+//  @Test
   @Option(withExplain = false, withExplainGlobal = false, parameterized = true, sort = true)
   @SimpleTest()
   public final void testNotInSubQuery() throws Exception {
     runSimpleTests();
   }
 
-  @Test
+  // TODO: enable after TAJO-2141
+//  @Test
   @Option(withExplain = false, withExplainGlobal = false, parameterized = true, sort = true)
   @SimpleTest()
   public final void testMultipleNotInSubQuery() throws Exception {
     runSimpleTests();
   }
 
-  @Test
+  // TODO: enable after TAJO-2141
+//  @Test
   @Option(withExplain = false, withExplainGlobal = false, parameterized = true, sort = true)
   @SimpleTest()
   public final void testNestedNotInSubQuery() throws Exception {
     runSimpleTests();
   }
 
-  @Test
+  // TODO: enable after TAJO-2141
+//  @Test
   @Option(withExplain = false, withExplainGlobal = false, parameterized = true, sort = true)
   @SimpleTest()
   public final void testInAndNotInSubQuery() throws Exception {
     runSimpleTests();
   }
 
-  @Test
+  // TODO: enable after TAJO-2141
+//  @Test
   @Option(withExplain = false, withExplainGlobal = false, parameterized = true, sort = true)
   @SimpleTest()
   public final void testNestedInAndNotInSubQuery() throws Exception {

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestInsertQuery.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestInsertQuery.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestInsertQuery.java
index d0088a5..235732e 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestInsertQuery.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestInsertQuery.java
@@ -56,7 +56,7 @@ public class TestInsertQuery extends QueryTestCaseBase {
 
     TableDesc desc = catalog.getTableDesc(getCurrentDatabase(), "table1");
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
 
     executeString("DROP TABLE table1 PURGE");
@@ -76,7 +76,7 @@ public class TestInsertQuery extends QueryTestCaseBase {
 
     TableDesc desc = catalog.getTableDesc(getCurrentDatabase(), "table1");
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
 
     res = executeFile("testInsertInto.sql");
@@ -100,11 +100,17 @@ public class TestInsertQuery extends QueryTestCaseBase {
         "2|2|38.0\n" +
         "3|2|45.0\n" +
         "3|3|49.0\n" +
+        "||\n" +
+        "||\n" +
+        "||\n" +
         "1|1|17.0\n" +
         "1|1|36.0\n" +
         "2|2|38.0\n" +
         "3|2|45.0\n" +
-        "3|3|49.0\n";
+        "3|3|49.0\n" +
+        "||\n" +
+        "||\n" +
+        "||\n";
 
     assertNotNull(tableDatas);
     assertEquals(expected, tableDatas);
@@ -135,7 +141,10 @@ public class TestInsertQuery extends QueryTestCaseBase {
           "1|1|2\n" +
           "2|2|1\n" +
           "3|2|1\n" +
-          "3|3|2\n";
+          "3|3|2\n" +
+          "||\n" +
+          "||\n" +
+          "||\n";
 
       assertEquals(expected, resultFileData);
 
@@ -156,7 +165,10 @@ public class TestInsertQuery extends QueryTestCaseBase {
           "1|1|2\n" +
           "2|2|1\n" +
           "3|2|1\n" +
-          "3|3|2\n";
+          "3|3|2\n" +
+          "||\n" +
+          "||\n" +
+          "||\n";
 
       assertEquals(expected + expected, resultFileData);
 
@@ -212,7 +224,10 @@ public class TestInsertQuery extends QueryTestCaseBase {
           "FRANCE,3,6\n" +
           "GERMANY,3,7\n" +
           "INDIA,2,8\n" +
-          "INDONESIA,2,9\n";
+          "INDONESIA,2,9\n" +
+          "null,null,null\n" +
+          "null,null,null\n" +
+          "null,null,null\n";
 
       assertEquals(expected, resultSetToString(res));
       res.close();
@@ -270,7 +285,13 @@ public class TestInsertQuery extends QueryTestCaseBase {
           "INDIA,2,8\n" +
           "INDIA,2,8\n" +
           "INDONESIA,2,9\n" +
-          "INDONESIA,2,9\n";
+          "INDONESIA,2,9\n" +
+          "null,null,null\n" +
+          "null,null,null\n" +
+          "null,null,null\n" +
+          "null,null,null\n" +
+          "null,null,null\n" +
+          "null,null,null\n";
 
       assertEquals(expected, resultSetToString(res));
 
@@ -282,7 +303,7 @@ public class TestInsertQuery extends QueryTestCaseBase {
 
       FileStatus[] files = fs.listStatus(path);
       assertNotNull(files);
-      assertEquals(25, files.length);
+      assertEquals(26, files.length);
 
       for (FileStatus eachFileStatus: files) {
         assertTrue(eachFileStatus.getPath().getName().indexOf("n_nationkey=") == 0);
@@ -311,7 +332,7 @@ public class TestInsertQuery extends QueryTestCaseBase {
     res.close();
     TableDesc desc = catalog.getTableDesc(getCurrentDatabase(), "table1");
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
     assertEquals(originalDesc.getSchema(), desc.getSchema());
 
@@ -331,7 +352,7 @@ public class TestInsertQuery extends QueryTestCaseBase {
     res.close();
     TableDesc desc = catalog.getTableDesc(getCurrentDatabase(), "table1");
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
 
     res = executeString("select * from " + CatalogUtil.denormalizeIdentifier(getCurrentDatabase()) + ".table1");
@@ -365,6 +386,21 @@ public class TestInsertQuery extends QueryTestCaseBase {
     assertTrue(res.wasNull());
     assertTrue(49.0 == res.getFloat(3));
 
+    assertTrue(res.next());
+    assertEquals(0, res.getLong(1));
+    assertEquals(0.0, 0.0, res.getFloat(2));
+    assertEquals(0.0, 0.0, res.getFloat(3));
+
+    assertTrue(res.next());
+    assertEquals(0, res.getLong(1));
+    assertEquals(0.0, 0.0, res.getFloat(2));
+    assertEquals(0.0, 0.0, res.getFloat(3));
+
+    assertTrue(res.next());
+    assertEquals(0, res.getLong(1));
+    assertEquals(0.0, 0.0, res.getFloat(2));
+    assertEquals(0.0, 0.0, res.getFloat(3));
+
     assertFalse(res.next());
     res.close();
 
@@ -402,7 +438,7 @@ public class TestInsertQuery extends QueryTestCaseBase {
     res.close();
     TableDesc desc = catalog.getTableDesc(getCurrentDatabase(), "lineitem_year_month");
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
 
     res = executeQuery();
@@ -424,7 +460,7 @@ public class TestInsertQuery extends QueryTestCaseBase {
     assertTrue(catalog.existsTable(getCurrentDatabase(), tableName));
     TableDesc orderKeys = catalog.getTableDesc(getCurrentDatabase(), tableName);
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, orderKeys.getStats().getNumRows().intValue());
+      assertEquals(8, orderKeys.getStats().getNumRows().intValue());
     }
 
     // this query will result in the two rows.
@@ -554,7 +590,7 @@ public class TestInsertQuery extends QueryTestCaseBase {
 
       TableDesc desc = catalog.getTableDesc(getCurrentDatabase(), "parquet_table");
       if (!testingCluster.isHiveCatalogStoreRunning()) {
-        assertEquals(5, desc.getStats().getNumRows().intValue());
+        assertEquals(8, desc.getStats().getNumRows().intValue());
       }
 
       ResultSet res = executeString("select l_orderkey, l_shipdate, l_shipdate_function " +
@@ -566,7 +602,10 @@ public class TestInsertQuery extends QueryTestCaseBase {
           "1,1996-04-12,1996-04-12\n" +
           "2,1997-01-28,1997-01-28\n" +
           "3,1994-02-02,1994-02-02\n" +
-          "3,1993-11-09,1993-11-09\n";
+          "3,1993-11-09,1993-11-09\n" +
+          "null,null,null\n" +
+          "null,null,null\n" +
+          "null,null,null\n";
 
       assertEquals(expected, resultSetToString(res));
 
@@ -589,7 +628,7 @@ public class TestInsertQuery extends QueryTestCaseBase {
 
       TableDesc desc = catalog.getTableDesc(getCurrentDatabase(), "parquet_table");
       if (!testingCluster.isHiveCatalogStoreRunning()) {
-        assertEquals(5, desc.getStats().getNumRows().intValue());
+        assertEquals(8, desc.getStats().getNumRows().intValue());
       }
 
       ResultSet res = executeString("select l_orderkey, l_shipdate, l_shipdate_function " +
@@ -601,7 +640,10 @@ public class TestInsertQuery extends QueryTestCaseBase {
           "3,1994-02-02,1994-02-02\n" +
           "1,1996-03-13,1996-03-13\n" +
           "1,1996-04-12,1996-04-12\n" +
-          "2,1997-01-28,1997-01-28\n";
+          "2,1997-01-28,1997-01-28\n" +
+          "null,null,null\n" +
+          "null,null,null\n" +
+          "null,null,null\n";
 
       assertEquals(expected, resultSetToString(res));
 
@@ -622,7 +664,7 @@ public class TestInsertQuery extends QueryTestCaseBase {
 
     TableDesc desc = catalog.getTableDesc(getCurrentDatabase(), "table1");
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
     executeString("DROP TABLE table1 PURGE");
   }
@@ -739,9 +781,15 @@ public class TestInsertQuery extends QueryTestCaseBase {
         "2|2|38.0\n" +
         "3|2|45.0\n" +
         "3|3|49.0\n" +
+        "||\n" +
+        "||\n" +
+        "||\n" +
         "1|3|173665.47\n" +
         "2|4|46929.18\n" +
-        "3|2|193846.25\n";
+        "3|2|193846.25\n" +
+        "||\n" +
+        "||\n" +
+        "||\n";
 
     assertNotNull(tableDatas);
     assertEquals(expected, tableDatas);
@@ -767,9 +815,15 @@ public class TestInsertQuery extends QueryTestCaseBase {
         "2|2|38.0\n" +
         "3|2|45.0\n" +
         "3|3|49.0\n" +
+        "||\n" +
+        "||\n" +
+        "||\n" +
         "1|3|173665.47\n" +
         "2|4|46929.18\n" +
-        "3|2|193846.25\n";
+        "3|2|193846.25\n" +
+        "||\n" +
+        "||\n" +
+        "||\n";
 
     assertNotNull(tableDatas);
     assertEquals(expected, tableDatas);
@@ -789,9 +843,15 @@ public class TestInsertQuery extends QueryTestCaseBase {
         "2|2|38.0\n" +
         "3|2|45.0\n" +
         "3|3|49.0\n" +
+        "||\n" +
+        "||\n" +
+        "||\n" +
         "1|3|173665.47\n" +
         "2|4|46929.18\n" +
-        "3|2|193846.25\n";
+        "3|2|193846.25\n" +
+        "||\n" +
+        "||\n" +
+        "||\n";
 
     assertNotNull(resultDatas);
     assertEquals(expected, resultDatas);
@@ -809,9 +869,15 @@ public class TestInsertQuery extends QueryTestCaseBase {
         "2|2|38.0\n" +
         "3|2|45.0\n" +
         "3|3|49.0\n" +
+        "||\n" +
+        "||\n" +
+        "||\n" +
         "1|3|173665.47\n" +
         "2|4|46929.18\n" +
-        "3|2|193846.25\n";
+        "3|2|193846.25\n" +
+        "||\n" +
+        "||\n" +
+        "||\n";
 
     assertNotNull(resultDatas);
     assertEquals(expected, resultDatas);

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestJoinOnPartitionedTables.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestJoinOnPartitionedTables.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestJoinOnPartitionedTables.java
index 0d110d1..496d112 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestJoinOnPartitionedTables.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestJoinOnPartitionedTables.java
@@ -170,7 +170,7 @@ public class TestJoinOnPartitionedTables extends TestJoinQuery {
           " select l_partkey, l_suppkey, l_linenumber, \n" +
           " l_quantity, l_extendedprice, l_discount, l_tax, \n" +
           " l_returnflag, l_linestatus, l_shipdate, l_commitdate, \n" +
-          " l_receiptdate, l_shipinstruct, l_shipmode, l_comment, l_orderkey from lineitem");
+          " l_receiptdate, l_shipinstruct, l_shipmode, l_comment, l_orderkey from lineitem").close();
 
       ResultSet res = executeString(
           "select a.l_orderkey as key1, b.l_orderkey as key2 from lineitem as a " +
@@ -184,7 +184,10 @@ public class TestJoinOnPartitionedTables extends TestJoinQuery {
           "1,null\n" +
           "2,null\n" +
           "3,null\n" +
-          "3,null\n";
+          "3,null\n" +
+          "null,null\n" +
+          "null,null\n" +
+          "null,null\n";
       assertEquals(expected, resultSetToString(res));
       cleanupQuery(res);
     } finally {

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/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 e9dbedf..1ef1726 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
@@ -34,11 +34,11 @@ import org.apache.tajo.common.TajoDataTypes;
 import org.apache.tajo.conf.TajoConf.ConfVars;
 import org.apache.tajo.datum.Datum;
 import org.apache.tajo.datum.Int4Datum;
+import org.apache.tajo.datum.NullDatum;
 import org.apache.tajo.datum.TextDatum;
 import org.apache.tajo.exception.TajoException;
 import org.apache.tajo.storage.*;
 import org.apache.tajo.util.JavaResourceUtil;
-import org.apache.tajo.util.KeyValueSet;
 import org.junit.runners.Parameterized.Parameters;
 
 import java.io.OutputStream;
@@ -145,61 +145,57 @@ public class TestJoinQuery extends QueryTestCaseBase {
   protected static void createCommonTables() throws Exception {
     LOG.info("Create common tables for join tests");
 
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     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);
+    TajoTestingCluster.createTable(conf, "jointable11", schema, data, 2);
 
     schema = new Schema();
     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);
+    TajoTestingCluster.createTable(conf, "jointable12", schema, data, 2);
 
     schema = new Schema();
     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);
+    TajoTestingCluster.createTable(conf, "jointable13", schema, data);
 
     schema = new Schema();
     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);
+    TajoTestingCluster.createTable(conf, "jointable14", schema, data);
 
     schema = new Schema();
     schema.addColumn("id", TajoDataTypes.Type.INT4);
     schema.addColumn("name", TajoDataTypes.Type.TEXT);
     data = new String[]{};
-    TajoTestingCluster.createTable("jointable15", schema, tableOptions, data);
+    TajoTestingCluster.createTable(conf, "jointable15", schema, data);
 
     schema = new Schema();
     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"};
-    TajoTestingCluster.createTable("jointable1", schema, tableOptions, data, 1);
+    TajoTestingCluster.createTable(conf, "jointable1", schema, data, 1);
 
     data = new String[10000];
     for (int i = 0; i < data.length; i++) {
       data[i] = i + "|" + "this is testLeftOuterJoinLeftSideSmallTabletestLeftOuterJoinLeftSideSmallTable" + i;
     }
-    TajoTestingCluster.createTable("jointable_large", schema, tableOptions, data, 2);
+    TajoTestingCluster.createTable(conf, "jointable_large", schema, data, 2);
 
     // According to node type(leaf or non-leaf) Broadcast join is determined differently by Repartitioner.
     // testMultipleBroadcastDataFileWithZeroLength testcase is for the leaf node
     createMultiFile("nation", 2, new TupleCreator() {
       public Tuple createTuple(String[] columnDatas) {
         return new VTuple(new Datum[]{
-            new Int4Datum(Integer.parseInt(columnDatas[0])),
-            new TextDatum(columnDatas[1]),
-            new Int4Datum(Integer.parseInt(columnDatas[2])),
-            new TextDatum(columnDatas[3])
+            columnDatas[0].equals("") ? NullDatum.get() : new Int4Datum(Integer.parseInt(columnDatas[0])),
+            columnDatas[1].equals("") ? NullDatum.get() : new TextDatum(columnDatas[1]),
+            columnDatas[2].equals("") ? NullDatum.get() : new Int4Datum(Integer.parseInt(columnDatas[2])),
+            columnDatas[3].equals("") ? NullDatum.get() : new TextDatum(columnDatas[3])
         });
       }
     });

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/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 66848e6..37cd1b6 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
@@ -24,8 +24,6 @@ import org.apache.tajo.TpchTestBase;
 import org.apache.tajo.catalog.Schema;
 import org.apache.tajo.client.TajoClient;
 import org.apache.tajo.common.TajoDataTypes.Type;
-import org.apache.tajo.storage.StorageConstants;
-import org.apache.tajo.util.KeyValueSet;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -68,10 +66,8 @@ public class TestNullValues {
         "2||",
         "3|filled|0.2"
     };
-    KeyValueSet opts = new KeyValueSet();
-    opts.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     ResultSet res = TajoTestingCluster
-        .run(table, schemas, opts, new String[][]{data},
+        .run(table, schemas, new String[][]{data},
             "select * from nulltable1 where col3 is null", client);
 
     try {
@@ -95,10 +91,8 @@ public class TestNullValues {
         "||",
         "3|filled|"
     };
-    KeyValueSet opts = new KeyValueSet();
-    opts.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
     ResultSet res = TajoTestingCluster
-        .run(table, schemas, opts, new String[][]{data},
+        .run(table, schemas, new String[][]{data},
             "select * from nulltable2 where col1 is not null", client);
     try {
       assertTrue(res.next());
@@ -127,13 +121,11 @@ public class TestNullValues {
     schema.addColumn("col10", Type.INT8);
     Schema [] schemas = new Schema[] {schema};
     String [] data = {
-        ",,,,672287821,1301460,1,313895860387,126288907,1024",
-        ",,,43578,19,13,6,3581,2557,1024"
+        "||||672287821|1301460|1|313895860387|126288907|1024",
+        "|||43578|19|13|6|3581|2557|1024"
     };
-    KeyValueSet opts = new KeyValueSet();
-    opts.set(StorageConstants.TEXT_DELIMITER, ",");
     ResultSet res = TajoTestingCluster
-        .run(table, schemas, opts, new String[][]{data},
+        .run(table, schemas, new String[][]{data},
             "select * from nulltable3 where col1 is null and col2 is null and col3 is null and col4 = 43578", client);
     try {
       assertTrue(res.next());
@@ -160,14 +152,11 @@ public class TestNullValues {
     schema.addColumn("col10", Type.INT8);
     Schema [] schemas = new Schema[] {schema};
     String [] data = {
-        "\\N,,,,672287821,",
-        ",\\N,,43578"
+        "\\N||||672287821|",
+        "|\\N||43578"
     };
-    KeyValueSet opts = new KeyValueSet();
-    opts.set(StorageConstants.TEXT_DELIMITER, ",");
-    opts.set(StorageConstants.TEXT_NULL, "\\\\N");
     ResultSet res = TajoTestingCluster
-        .run(table, schemas, opts, new String[][]{data},
+        .run(table, schemas, new String[][]{data},
             "select * from nulltable4 where col1 is null and col2 is null and col3 is null and col5 is null and col4 = 43578"
             , client);
     try {
@@ -275,14 +264,11 @@ public class TestNullValues {
         "3|c|\\N|t",
         "4|d|4.0|\\N"
     };
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
     if (client == null) {
-      return TajoTestingCluster.run(table, schemas, tableOptions, new String[][]{data}, query);
+      return TajoTestingCluster.run(table, schemas, new String[][]{data}, query);
     } else {
-      return TajoTestingCluster.run(table, schemas, tableOptions, new String[][]{data}, query, client);
+      return TajoTestingCluster.run(table, schemas, new String[][]{data}, query, client);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/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 90fa2b4..f979aaf 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
@@ -31,8 +31,6 @@ import org.apache.tajo.conf.TajoConf.ConfVars;
 import org.apache.tajo.ipc.ClientProtos;
 import org.apache.tajo.plan.rewrite.BaseLogicalPlanRewriteRuleProvider;
 import org.apache.tajo.plan.rewrite.LogicalPlanRewriteRule;
-import org.apache.tajo.storage.StorageConstants;
-import org.apache.tajo.util.KeyValueSet;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -379,7 +377,7 @@ public class TestSelectQuery extends QueryTestCaseBase {
     assertTrue(catalog.existsTable(DEFAULT_DATABASE_NAME, "orderkeys"));
     TableDesc orderKeys = catalog.getTableDesc(DEFAULT_DATABASE_NAME, "orderkeys");
     if (!cluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, orderKeys.getStats().getNumRows().intValue());
+      assertEquals(8, orderKeys.getStats().getNumRows().intValue());
     }
   }
 
@@ -494,15 +492,11 @@ public class TestSelectQuery extends QueryTestCaseBase {
 
   @Test
   public final void testNowInMultipleTasks() throws Exception {
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     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" };
-    TajoTestingCluster.createTable("testNowInMultipleTasks".toLowerCase(), schema, tableOptions, data, 2);
+    TajoTestingCluster.createTable(conf, "testNowInMultipleTasks".toLowerCase(), schema, data, 2);
 
     try {
       testingCluster.setAllTajoDaemonConfValue(ConfVars.$TEST_MIN_TASK_NUM.varname, "2");

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/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..7d31319 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
@@ -22,8 +22,6 @@ import org.apache.tajo.*;
 import org.apache.tajo.catalog.Schema;
 import org.apache.tajo.common.TajoDataTypes.Type;
 import org.apache.tajo.conf.TajoConf.ConfVars;
-import org.apache.tajo.storage.StorageConstants;
-import org.apache.tajo.util.KeyValueSet;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -107,9 +105,6 @@ public class TestSortQuery extends QueryTestCaseBase {
   public final void testSortFirstDesc() throws Exception {
     try {
       testingCluster.setAllTajoDaemonConfValue(ConfVars.$TEST_MIN_TASK_NUM.varname, "2");
-      KeyValueSet tableOptions = new KeyValueSet();
-      tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-      tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
       Schema schema = new Schema();
       schema.addColumn("col1", Type.INT4);
@@ -124,7 +119,7 @@ public class TestSortQuery extends QueryTestCaseBase {
           "3|dat",
           "1|abe"
       };
-      TajoTestingCluster.createTable("sortfirstdesc", schema, tableOptions, data, 2);
+      TajoTestingCluster.createTable(conf, "sortfirstdesc", schema, data, 2);
 
       ResultSet res = executeQuery();
       assertResultSet(res);
@@ -199,7 +194,7 @@ public class TestSortQuery extends QueryTestCaseBase {
 
   @Test
   public final void testTopkWithJson() throws Exception {
-    // select l_orderkey, l_linenumber from lineitem order by l_orderkey desc limit 3;
+    // select l_orderkey, l_linenumber from lineitem order by l_orderkey desc limit 5;
     ResultSet res = executeJsonQuery();
     assertResultSet(res);
     cleanupQuery(res);
@@ -209,9 +204,6 @@ public class TestSortQuery extends QueryTestCaseBase {
   public final void testSortOnNullColumn() throws Exception {
     try {
       testingCluster.setAllTajoDaemonConfValue(ConfVars.$TEST_MIN_TASK_NUM.varname, "2");
-      KeyValueSet tableOptions = new KeyValueSet();
-      tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-      tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
       Schema schema = new Schema();
       schema.addColumn("id", Type.INT4);
@@ -222,7 +214,7 @@ public class TestSortQuery extends QueryTestCaseBase {
           "3|ARGENTINA",
           "4|CANADA"
       };
-      TajoTestingCluster.createTable("nullsort", schema, tableOptions, data, 2);
+      TajoTestingCluster.createTable(conf, "nullsort", schema, data, 2);
 
       ResultSet res = executeQuery();
       assertResultSet(res);
@@ -235,15 +227,11 @@ public class TestSortQuery extends QueryTestCaseBase {
 
   @Test
   public final void testSortOnNullColumn2() throws Exception {
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     schema.addColumn("id", Type.INT4);
     schema.addColumn("name", Type.TEXT);
     String[] data = new String[]{ "1|111", "2|\\N", "3|333" };
-    TajoTestingCluster.createTable("testSortOnNullColumn2".toLowerCase(), schema, tableOptions, data, 1);
+    TajoTestingCluster.createTable(conf, "testSortOnNullColumn2".toLowerCase(), schema, data, 1);
 
     try {
       ResultSet res = executeString("select * from testSortOnNullColumn2 order by name asc");
@@ -272,15 +260,11 @@ public class TestSortQuery extends QueryTestCaseBase {
 
   @Test
   public final void testSortOnNullColumn3() throws Exception {
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     schema.addColumn("id", Type.INT4);
     schema.addColumn("name", Type.TEXT);
     String[] data = new String[]{ "1|111", "2|\\N", "3|333" };
-    TajoTestingCluster.createTable("testSortOnNullColumn3".toLowerCase(), schema, tableOptions, data, 1);
+    TajoTestingCluster.createTable(conf, "testSortOnNullColumn3".toLowerCase(), schema, data, 1);
 
     try {
       ResultSet res = executeString("select * from testSortOnNullColumn3 order by name nulls first");
@@ -300,15 +284,11 @@ public class TestSortQuery extends QueryTestCaseBase {
 
   @Test
   public final void testSortOnNullColumn4() throws Exception {
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     schema.addColumn("id", Type.INT4);
     schema.addColumn("name", Type.TEXT);
     String[] data = new String[]{ "1|111", "2|\\N", "3|333" };
-    TajoTestingCluster.createTable("testSortOnNullColumn4".toLowerCase(), schema, tableOptions, data, 1);
+    TajoTestingCluster.createTable(conf, "testSortOnNullColumn4".toLowerCase(), schema, data, 1);
 
     try {
       ResultSet res = executeString("select * from testSortOnNullColumn4 order by name desc nulls last");
@@ -328,15 +308,11 @@ public class TestSortQuery extends QueryTestCaseBase {
 
   @Test
   public final void testSortOnNullColumn5() throws Exception {
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     schema.addColumn("id", Type.INT4);
     schema.addColumn("name", Type.TEXT);
     String[] data = new String[]{ "1|111", "2|\\N", "3|333" };
-    TajoTestingCluster.createTable("testSortOnNullColumn5".toLowerCase(), schema, tableOptions, data, 1);
+    TajoTestingCluster.createTable(conf, "testSortOnNullColumn5".toLowerCase(), schema, data, 1);
 
     try {
       ResultSet res = executeString("select * from testSortOnNullColumn5 order by name asc nulls first");
@@ -358,9 +334,6 @@ public class TestSortQuery extends QueryTestCaseBase {
   public final void testSortOnUnicodeTextAsc() throws Exception {
     try {
       testingCluster.setAllTajoDaemonConfValue(ConfVars.$TEST_MIN_TASK_NUM.varname, "2");
-      KeyValueSet tableOptions = new KeyValueSet();
-      tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-      tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
       Schema schema = new Schema();
       schema.addColumn("col1", Type.INT4);
@@ -371,7 +344,7 @@ public class TestSortQuery extends QueryTestCaseBase {
           "3|가가가",
           "4|냐하하"
       };
-      TajoTestingCluster.createTable("unicode_sort1", schema, tableOptions, data, 2);
+      TajoTestingCluster.createTable(conf, "unicode_sort1", schema, data, 2);
 
       ResultSet res = executeQuery();
       assertResultSet(res);
@@ -386,9 +359,6 @@ public class TestSortQuery extends QueryTestCaseBase {
   public final void testSortOnUnicodeTextDesc() throws Exception {
     try {
       testingCluster.setAllTajoDaemonConfValue(ConfVars.$TEST_MIN_TASK_NUM.varname, "2");
-      KeyValueSet tableOptions = new KeyValueSet();
-      tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-      tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
 
       Schema schema = new Schema();
       schema.addColumn("col1", Type.INT4);
@@ -399,7 +369,7 @@ public class TestSortQuery extends QueryTestCaseBase {
           "3|가가가",
           "4|냐하하"
       };
-      TajoTestingCluster.createTable("unicode_sort2", schema, tableOptions, data, 2);
+      TajoTestingCluster.createTable(conf, "unicode_sort2", schema, data, 2);
 
       ResultSet res = executeQuery();
       assertResultSet(res);

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/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 569d2a7..4824932 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
@@ -19,29 +19,34 @@
 package org.apache.tajo.engine.query;
 
 import com.google.common.collect.Maps;
-import org.apache.hadoop.fs.*;
+import org.apache.hadoop.fs.FSDataOutputStream;
+import org.apache.hadoop.fs.FileStatus;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
 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.QueryId;
+import org.apache.tajo.QueryTestCaseBase;
+import org.apache.tajo.TajoConstants;
+import org.apache.tajo.TajoTestingCluster;
 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.client.TajoClientUtil;
-import org.apache.tajo.exception.ReturnStateUtil;
 import org.apache.tajo.catalog.proto.CatalogProtos.PartitionDescProto;
+import org.apache.tajo.client.TajoClientUtil;
 import org.apache.tajo.common.TajoDataTypes;
 import org.apache.tajo.conf.TajoConf;
 import org.apache.tajo.engine.planner.global.DataChannel;
 import org.apache.tajo.engine.planner.global.ExecutionBlock;
 import org.apache.tajo.engine.planner.global.MasterPlan;
+import org.apache.tajo.exception.ReturnStateUtil;
 import org.apache.tajo.ipc.ClientProtos;
 import org.apache.tajo.plan.logical.NodeType;
 import org.apache.tajo.querymaster.QueryMasterTask;
 import org.apache.tajo.storage.StorageConstants;
 import org.apache.tajo.util.CommonTestingUtil;
-import org.apache.tajo.util.KeyValueSet;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -267,7 +272,7 @@ public class TestTablePartitions extends QueryTestCaseBase {
     assertTrue(fs.isDirectory(new Path(path.toUri() + "/key=45.0")));
     assertTrue(fs.isDirectory(new Path(path.toUri() + "/key=49.0")));
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
   }
 
@@ -403,7 +408,7 @@ public class TestTablePartitions extends QueryTestCaseBase {
     assertTrue(fs.isDirectory(new Path(path.toUri() + "/col1=3/col2=2/col3=45.0")));
     assertTrue(fs.isDirectory(new Path(path.toUri() + "/col1=3/col2=3/col3=49.0")));
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
 
     res = executeString("select * from " + tableName + " where col2 = 2");
@@ -459,7 +464,7 @@ public class TestTablePartitions extends QueryTestCaseBase {
       res = executeString("insert into " + tableName
         + " select l_returnflag, l_orderkey, l_partkey, l_quantity from lineitem");
     } else {
-      res = executeString( "create table " + tableName + " (col4 text) "
+      res = executeString( "create table " + tableName + " (col4 text)"
         + " partition by column(col1 int4, col2 int4, col3 float8) as select l_returnflag, l_orderkey, l_partkey, " +
         "l_quantity from lineitem");
     }
@@ -475,7 +480,7 @@ public class TestTablePartitions extends QueryTestCaseBase {
     FileSystem fs = FileSystem.get(conf);
     verifyDirectoriesForThreeColumns(fs, path, 1);
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
 
     res = executeString("select * from " + tableName + " where col2 = 2");
@@ -520,7 +525,7 @@ public class TestTablePartitions extends QueryTestCaseBase {
 
     verifyDirectoriesForThreeColumns(fs, path, 2);
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
 
     String expected = "N\n" +
@@ -532,7 +537,13 @@ public class TestTablePartitions extends QueryTestCaseBase {
         "R\n" +
         "R\n" +
         "R\n" +
-        "R\n";
+        "R\n" +
+        "\\N\n" +
+        "\\N\n" +
+        "\\N\n" +
+        "\\N\n" +
+        "\\N\n" +
+        "\\N\n";
 
     String tableData = getTableFileContents(new Path(desc.getUri()));
     assertEquals(expected, tableData);
@@ -649,7 +660,7 @@ public class TestTablePartitions extends QueryTestCaseBase {
 
     TableDesc desc = catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName);
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
 
     FileSystem fs = FileSystem.get(conf);
@@ -701,7 +712,7 @@ public class TestTablePartitions extends QueryTestCaseBase {
 
     TableDesc desc = catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName);
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
 
     FileSystem fs = FileSystem.get(conf);
@@ -761,7 +772,7 @@ public class TestTablePartitions extends QueryTestCaseBase {
 
     TableDesc desc = catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName);
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
 
     FileSystem fs = FileSystem.get(conf);
@@ -859,7 +870,7 @@ public class TestTablePartitions extends QueryTestCaseBase {
 
     TableDesc desc = catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName);
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
 
     FileSystem fs = FileSystem.get(conf);
@@ -993,7 +1004,7 @@ public class TestTablePartitions extends QueryTestCaseBase {
 
     TableDesc desc = catalog.getTableDesc("testinsertquery1", "table1");
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
 
     if (nodeType == NodeType.INSERT) {
@@ -1007,7 +1018,7 @@ public class TestTablePartitions extends QueryTestCaseBase {
     }
     desc = catalog.getTableDesc("testinsertquery2", "table1");
     if (!testingCluster.isHiveCatalogStoreRunning()) {
-      assertEquals(5, desc.getStats().getNumRows().intValue());
+      assertEquals(8, desc.getStats().getNumRows().intValue());
     }
 
     executeString("DROP TABLE testinsertquery1.table1 PURGE").close();
@@ -1082,10 +1093,6 @@ public class TestTablePartitions extends QueryTestCaseBase {
     testingCluster.setAllTajoDaemonConfValue(TajoConf.ConfVars.$DIST_QUERY_TABLE_PARTITION_VOLUME.varname, "2");
     testingCluster.setAllTajoDaemonConfValue(TajoConf.ConfVars.SHUFFLE_HASH_APPENDER_PAGE_VOLUME.varname, "1");
     try {
-      KeyValueSet tableOptions = new KeyValueSet();
-      tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-      tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
       Schema schema = new Schema();
       schema.addColumn("col1", TajoDataTypes.Type.TEXT);
       schema.addColumn("col2", TajoDataTypes.Type.TEXT);
@@ -1111,7 +1118,7 @@ public class TestTablePartitions extends QueryTestCaseBase {
         index++;
       }
 
-      TajoTestingCluster.createTable("testscatteredhashshuffle", schema, tableOptions, data.toArray(new String[]{}), 3);
+      TajoTestingCluster.createTable(conf, "testscatteredhashshuffle", schema, data.toArray(new String[]{}), 3);
       CatalogService catalog = testingCluster.getMaster().getCatalog();
       assertTrue(catalog.existsTable("default", "testscatteredhashshuffle"));
 
@@ -1267,7 +1274,11 @@ public class TestTablePartitions extends QueryTestCaseBase {
         if (i > 0) {
           partitionName.append("/");
         }
-        partitionName.append(partitionColumn).append("=").append(res.getString(partitionColumn));
+        String partitionValue = res.getString(partitionColumn);
+        if (partitionValue == null) {
+          partitionValue = StorageConstants.DEFAULT_PARTITION_NAME;
+        }
+        partitionName.append(partitionColumn).append("=").append(partitionValue);
       }
       partitionDescProto = catalog.getPartition(databaseName, tableName, partitionName.toString());
       assertNotNull(partitionDescProto);
@@ -1313,7 +1324,7 @@ public class TestTablePartitions extends QueryTestCaseBase {
       // partition. In previous Query and Stage, duplicated partitions were not deleted because they had been in List.
       // If you want to verify duplicated partitions, you need to use List instead of Set with DerbyStore.
       List<PartitionDescProto> partitions = catalog.getPartitions(DEFAULT_DATABASE_NAME, tableName);
-      assertEquals(2, partitions.size());
+      assertEquals(3, partitions.size());
 
       PartitionDescProto firstPartition = catalog.getPartition(DEFAULT_DATABASE_NAME, tableName, "key=N");
       assertNotNull(firstPartition);

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestTruncateTable.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestTruncateTable.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestTruncateTable.java
index 3ae0c60..24e6547 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestTruncateTable.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestTruncateTable.java
@@ -44,7 +44,7 @@ public class TestTruncateTable extends QueryTestCaseBase {
       while (res.next()) {
         numRows++;
       }
-      assertEquals(5, numRows);
+      assertEquals(8, numRows);
       res.close();
 
       executeString("truncate table truncate_table1");
@@ -58,7 +58,7 @@ public class TestTruncateTable extends QueryTestCaseBase {
       assertEquals(0, numRows);
       res.close();
     } finally {
-      executeString("DROP TABLE truncate_table1 PURGE");
+      executeString("DROP TABLE truncate_table1");
     }
   }
 
@@ -90,7 +90,7 @@ public class TestTruncateTable extends QueryTestCaseBase {
       assertEquals(4, numRows);
       res.close();
     } finally {
-      executeString("DROP TABLE truncate_table2 PURGE");
+      executeString("DROP TABLE truncate_table2");
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestUnionQuery.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestUnionQuery.java b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestUnionQuery.java
index 3a87ca3..5028903 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestUnionQuery.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestUnionQuery.java
@@ -63,7 +63,7 @@ public class TestUnionQuery extends QueryTestCaseBase {
   @SimpleTest
   public final void testUnionAll1() throws Exception {
     Optional<TajoResultSetBase[]> existing = runSimpleTests();
-    verifyResultStats(existing, 8L);
+    verifyResultStats(existing, 14L);
   }
 
   /**
@@ -73,7 +73,7 @@ public class TestUnionQuery extends QueryTestCaseBase {
   @SimpleTest
   public final void testUnionAll2() throws Exception {
     Optional<TajoResultSetBase[]> existing = runSimpleTests();
-    verifyResultStats(existing, 10L);
+    verifyResultStats(existing, 16L);
   }
 
   /**
@@ -123,7 +123,7 @@ public class TestUnionQuery extends QueryTestCaseBase {
   @SimpleTest
   public final void testUnionAll7() throws Exception {
     Optional<TajoResultSetBase[]> existing = runSimpleTests();
-    verifyResultStats(existing, 10L);
+    verifyResultStats(existing, 16L);
   }
 
   @Test
@@ -170,7 +170,7 @@ public class TestUnionQuery extends QueryTestCaseBase {
     // test filter pushdown
     // with stage in union query
     Optional<TajoResultSetBase[]> existing = runSimpleTests();
-    verifyResultStats(existing, 5L);
+    verifyResultStats(existing, 8L);
   }
 
   @Test
@@ -179,7 +179,7 @@ public class TestUnionQuery extends QueryTestCaseBase {
     // test filter pushdown
     // with group by stage in union query
     Optional<TajoResultSetBase[]> existing = runSimpleTests();
-    verifyResultStats(existing, 7L);
+    verifyResultStats(existing, 9L);
   }
 
   @Test
@@ -207,7 +207,7 @@ public class TestUnionQuery extends QueryTestCaseBase {
   @SimpleTest
   public final void testUnion1() throws Exception {
     Optional<TajoResultSetBase[]> existing = runSimpleTests();
-    verifyResultStats(existing, 5L);
+    verifyResultStats(existing, 6L);
   }
 
   /**
@@ -217,7 +217,7 @@ public class TestUnionQuery extends QueryTestCaseBase {
   @SimpleTest
   public final void testUnion2() throws Exception {
     Optional<TajoResultSetBase[]> existing = runSimpleTests();
-    verifyResultStats(existing, 3L);
+    verifyResultStats(existing, 4L);
   }
 
   /**
@@ -267,7 +267,7 @@ public class TestUnionQuery extends QueryTestCaseBase {
   @SimpleTest
   public final void testUnion7() throws Exception {
     Optional<TajoResultSetBase[]> existing = runSimpleTests();
-    verifyResultStats(existing, 3L);
+    verifyResultStats(existing, 4L);
   }
 
   @Test
@@ -314,7 +314,7 @@ public class TestUnionQuery extends QueryTestCaseBase {
     // test filter pushdown
     // with stage in union query
     Optional<TajoResultSetBase[]> existing = runSimpleTests();
-    verifyResultStats(existing, 5L);
+    verifyResultStats(existing, 6L);
   }
 
   @Test
@@ -323,7 +323,7 @@ public class TestUnionQuery extends QueryTestCaseBase {
     // test filter pushdown
     // with group by stage in union query
     Optional<TajoResultSetBase[]> existing = runSimpleTests();
-    verifyResultStats(existing, 7L);
+    verifyResultStats(existing, 8L);
   }
 
   @Test
@@ -348,7 +348,7 @@ public class TestUnionQuery extends QueryTestCaseBase {
   @SimpleTest
   public final void testUnionAllWithSameAliasNames() throws Exception {
     Optional<TajoResultSetBase[]> existing = runSimpleTests();
-    verifyResultStats(existing, 10L);
+    verifyResultStats(existing, 16L);
   }
 
   @Test
@@ -369,7 +369,7 @@ public class TestUnionQuery extends QueryTestCaseBase {
   @SimpleTest
   public final void testUnionWithSameAliasNames() throws Exception {
     Optional<TajoResultSetBase[]> existing = runSimpleTests();
-    verifyResultStats(existing, 3L);
+    verifyResultStats(existing, 4L);
   }
 
   @Test
@@ -415,7 +415,7 @@ public class TestUnionQuery extends QueryTestCaseBase {
   public final void testUnionWithCrossJoin() throws Exception {
     // https://issues.apache.org/jira/browse/TAJO-881
     Optional<TajoResultSetBase[]> existing = runSimpleTests();
-    verifyResultStats(existing, 40L);
+    verifyResultStats(existing, 112L);
   }
 
   @Test
@@ -423,7 +423,7 @@ public class TestUnionQuery extends QueryTestCaseBase {
   public final void testThreeJoinInUnion() throws Exception {
     // https://issues.apache.org/jira/browse/TAJO-881
     Optional<TajoResultSetBase[]> existing = runSimpleTests();
-    verifyResultStats(existing, 30L);
+    verifyResultStats(existing, 33L);
   }
 
   @Test
@@ -444,7 +444,7 @@ public class TestUnionQuery extends QueryTestCaseBase {
   @SimpleTest
   public void testTajo1368Case2() throws Exception {
     Optional<TajoResultSetBase[]> existing = runSimpleTests();
-    verifyResultStats(existing, 10L);
+    verifyResultStats(existing, 16L);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/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..6c38210 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
@@ -24,8 +24,6 @@ import org.apache.tajo.TajoConstants;
 import org.apache.tajo.TajoTestingCluster;
 import org.apache.tajo.catalog.Schema;
 import org.apache.tajo.common.TajoDataTypes;
-import org.apache.tajo.storage.StorageConstants;
-import org.apache.tajo.util.KeyValueSet;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -261,15 +259,11 @@ public class TestWindowQuery extends QueryTestCaseBase {
 
   @Test
   public final void testFirstValueTime() throws Exception {
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     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" };
-    TajoTestingCluster.createTable("firstvaluetime", schema, tableOptions, data, 1);
+    TajoTestingCluster.createTable(conf, "firstvaluetime", schema, data, 1);
 
     try {
       ResultSet res = executeString(
@@ -296,15 +290,11 @@ public class TestWindowQuery extends QueryTestCaseBase {
 
   @Test
   public final void testLastValueTime() throws Exception {
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     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" };
-    TajoTestingCluster.createTable("lastvaluetime", schema, tableOptions, data, 1);
+    TajoTestingCluster.createTable(conf, "lastvaluetime", schema, data, 1);
 
     try {
       ResultSet res = executeString(
@@ -331,15 +321,11 @@ public class TestWindowQuery extends QueryTestCaseBase {
 
   @Test
   public final void testLagTime() throws Exception {
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     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" };
-    TajoTestingCluster.createTable("lagtime", schema, tableOptions, data, 1);
+    TajoTestingCluster.createTable(conf, "lagtime", schema, data, 1);
 
     try {
       ResultSet res = executeString(
@@ -380,15 +366,11 @@ public class TestWindowQuery extends QueryTestCaseBase {
 
   @Test
   public final void testLeadTime() throws Exception {
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     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" };
-    TajoTestingCluster.createTable("leadtime", schema, tableOptions, data, 1);
+    TajoTestingCluster.createTable(conf, "leadtime", schema, data, 1);
 
     try {
       ResultSet res = executeString(
@@ -436,16 +418,12 @@ public class TestWindowQuery extends QueryTestCaseBase {
 
   @Test
   public final void testMultipleWindow() throws Exception {
-    KeyValueSet tableOptions = new KeyValueSet();
-    tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    tableOptions.set(StorageConstants.TEXT_NULL, "\\\\N");
-
     Schema schema = new Schema();
     schema.addColumn("id", TajoDataTypes.Type.INT4);
     schema.addColumn("time", TajoDataTypes.Type.TIME);
     schema.addColumn("name", TajoDataTypes.Type.TEXT);
     String[] data = new String[]{ "1|12:11:12|abc", "2|10:11:13|def", "2|05:42:41|ghi" };
-    TajoTestingCluster.createTable("multiwindow", schema, tableOptions, data, 1);
+    TajoTestingCluster.createTable(conf, "multiwindow", schema, data, 1);
 
     try {
       ResultSet res = executeString(

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/java/org/apache/tajo/querymaster/TestTaskStatusUpdate.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/querymaster/TestTaskStatusUpdate.java b/tajo-core-tests/src/test/java/org/apache/tajo/querymaster/TestTaskStatusUpdate.java
index 425a7d6..34eefda 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/querymaster/TestTaskStatusUpdate.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/querymaster/TestTaskStatusUpdate.java
@@ -58,9 +58,9 @@ public class TestTaskStatusUpdate extends QueryTestCaseBase {
       res = executeQuery();
 
       // tpch/lineitem.tbl
-      long[] expectedNumRows = new long[]{5, 2, 2, 2};
-      long[] expectedNumBytes = new long[]{604, 18, 18, 48};
-      long[] expectedReadBytes = new long[]{604, 604, 18, 0};
+      long[] expectedNumRows = new long[]{8, 3, 3, 3};
+      long[] expectedNumBytes = new long[]{737, 26, 26, 68};
+      long[] expectedReadBytes = new long[]{737, 0, 26, 0};
       QueryId queryId = getQueryId(res);
 
       assertStatus(queryId, 2, expectedNumRows, expectedNumBytes, expectedReadBytes);
@@ -77,9 +77,9 @@ public class TestTaskStatusUpdate extends QueryTestCaseBase {
       res = executeQuery();
 
       // tpch/lineitem.tbl
-      long[] expectedNumRows = new long[]{5, 2, 2, 2, 2, 2};
-      long[] expectedNumBytes = new long[]{604, 162, 162, 138, 138, 236};
-      long[] expectedReadBytes = new long[]{604, 604, 236, 0, 138, 0};
+      long[] expectedNumRows = new long[]{8, 3, 3, 3, 3, 3};
+      long[] expectedNumBytes = new long[]{737, 171, 171, 147, 147, 288};
+      long[] expectedReadBytes = new long[]{737, 0, 288, 0, 147, 0};
 
       QueryId queryId = getQueryId(res);
       assertStatus(queryId, 3, expectedNumRows, expectedNumBytes, expectedReadBytes);
@@ -106,9 +106,9 @@ public class TestTaskStatusUpdate extends QueryTestCaseBase {
       res = executeQuery();
 
       // in/out * stage(4)
-      long[] expectedNumRows = new long[]{5, 5, 2, 2, 2, 2, 2, 2};
-      long[] expectedNumBytes = new long[]{20, 75, 8, 34, 109, 34, 34, 64};
-      long[] expectedReadBytes = new long[]{20, 20, 8, 8, 64, 0, 34, 0};
+      long[] expectedNumRows   = new long[]{8,  8,  2, 2,  2,   2,  2,  2};
+      long[] expectedNumBytes  = new long[]{26, 96, 8, 34, 130, 34, 34, 64};
+      long[] expectedReadBytes = new long[]{26, 0,  8, 0,  64,  0,  34, 0};
 
       QueryId queryId = getQueryId(res);
       assertStatus(queryId, 4, expectedNumRows, expectedNumBytes, expectedReadBytes);
@@ -140,34 +140,42 @@ public class TestTaskStatusUpdate extends QueryTestCaseBase {
                             long[] expectedReadBytes) throws Exception {
 
 
-      QueryHistory queryHistory  = testingCluster.getQueryHistory(queryId);
+    QueryHistory queryHistory  = testingCluster.getQueryHistory(queryId);
 
-      assertNotNull(queryHistory);
+    assertNotNull(queryHistory);
 
-      List<StageHistory> stages = queryHistory.getStageHistories();
-      assertEquals(numStages, stages.size());
+    List<StageHistory> stages = queryHistory.getStageHistories();
+    assertEquals(numStages, stages.size());
 
-      Collections.sort(stages, new Comparator<StageHistory>() {
-        @Override
-        public int compare(StageHistory o1, StageHistory o2) {
-          return o1.getExecutionBlockId().compareTo(o2.getExecutionBlockId());
-        }
-      });
+    Collections.sort(stages, new Comparator<StageHistory>() {
+      @Override
+      public int compare(StageHistory o1, StageHistory o2) {
+        return o1.getExecutionBlockId().compareTo(o2.getExecutionBlockId());
+      }
+    });
 
-      int index = 0;
-      for (StageHistory eachStage : stages) {
+    int index = 0;
+    StringBuilder expectedString = new StringBuilder();
+    StringBuilder actualString = new StringBuilder();
 
-        assertEquals(expectedNumRows[index], eachStage.getTotalReadRows());
-        assertEquals(expectedNumBytes[index], eachStage.getTotalInputBytes());
-        assertEquals(expectedReadBytes[index], eachStage.getTotalReadBytes());
+    for (StageHistory eachStage : stages) {
+      expectedString.append(expectedNumRows[index]).append(",")
+          .append(expectedNumBytes[index]).append(",")
+          .append(expectedReadBytes[index]).append(",");
+      actualString.append(eachStage.getTotalReadRows()).append(",")
+          .append(eachStage.getTotalInputBytes()).append(",")
+          .append(eachStage.getTotalReadBytes()).append(",");
 
-        index++;
+      index++;
 
-        assertEquals(expectedNumRows[index], eachStage.getTotalWriteRows());
-        assertEquals(expectedNumBytes[index],eachStage.getTotalWriteBytes());
+      expectedString.append(expectedNumRows[index]).append(",")
+          .append(expectedNumBytes[index]).append("\n");
+      actualString.append(eachStage.getTotalWriteRows()).append(",")
+          .append(eachStage.getTotalWriteBytes()).append("\n");
 
-        index++;
-      }
+      index++;
+    }
 
+    assertEquals(expectedString.toString(), actualString.toString());
   }
 }

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/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 7d2f5f4..06349e0 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
@@ -219,12 +219,13 @@ public class TestQueryResultResource extends QueryTestCaseBase {
       }
     }
 
-    assertEquals(5, tupleList.size());
+    assertEquals(8, tupleList.size());
     assertEquals(tajoDigest, Base64.encodeBase64String(messageDigest.digest()));
 
-    for (Tuple aTuple: tupleList) {
-      assertTrue(aTuple.getInt4(response.getSchema().getColumnId("l_orderkey")) > 0);
+    for (int i = 0; i < 5; i++) {
+      assertTrue(tupleList.get(i).getInt4(response.getSchema().getColumnId("l_orderkey")) > 0);
     }
+    assertEquals(0, tupleList.get(5).getInt4(response.getSchema().getColumnId("l_orderkey")));
   }
 
   @Test
@@ -261,7 +262,7 @@ public class TestQueryResultResource extends QueryTestCaseBase {
     assertTrue(tajoDigest != null && !tajoDigest.isEmpty());
     assertTrue(eos);
     assertEquals(0, offset);
-    assertEquals(5, count);
+    assertEquals(8, count);
 
     DataInputStream queryResultSetInputStream =
         new DataInputStream(new BufferedInputStream(queryResultSetResponse.readEntity(InputStream.class)));
@@ -287,11 +288,12 @@ public class TestQueryResultResource extends QueryTestCaseBase {
       }
     }
 
-    assertEquals(5, tupleList.size());
+    assertEquals(8, tupleList.size());
     assertEquals(tajoDigest, Base64.encodeBase64String(messageDigest.digest()));
 
-    for (Tuple aTuple: tupleList) {
-      assertTrue(aTuple.getInt4(response.getSchema().getColumnId("l_orderkey")) > 0);
+    for (int i = 0; i < 5; i++) {
+      assertTrue(tupleList.get(i).getInt4(response.getSchema().getColumnId("l_orderkey")) > 0);
     }
+    assertEquals(0, tupleList.get(5).getInt4(response.getSchema().getColumnId("l_orderkey")));
   }
 }

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/python/test_funcs.py
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/python/test_funcs.py b/tajo-core-tests/src/test/resources/python/test_funcs.py
index 1167afd..df3371c 100644
--- a/tajo-core-tests/src/test/resources/python/test_funcs.py
+++ b/tajo-core-tests/src/test/resources/python/test_funcs.py
@@ -30,4 +30,7 @@ def concat_py(str):
 
 @output_type('int4')
 def add_py(a,b):
-    return a+b
+    if a != None and b != None:
+        return a+b
+    else:
+        return None

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/python/test_udaf.py
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/python/test_udaf.py b/tajo-core-tests/src/test/resources/python/test_udaf.py
index da5a3fd..4e7b34d 100644
--- a/tajo-core-tests/src/test/resources/python/test_udaf.py
+++ b/tajo-core-tests/src/test/resources/python/test_udaf.py
@@ -30,22 +30,30 @@ class AvgPy:
 
     # eval at the first stage
     def eval(self, item):
-        self.sum += item
-        self.cnt += 1
+        if item != None: # null checking
+            self.sum += item
+            self.cnt += 1
 
     # get intermediate result
     def get_partial_result(self):
-        return [self.sum, self.cnt]
+        if self.cnt == 0:
+            return None
+        else:
+            return [self.sum, self.cnt]
 
     # merge intermediate results
     def merge(self, list):
-        self.sum += list[0]
-        self.cnt += list[1]
+        if list: # null checking
+            self.sum += list[0]
+            self.cnt += list[1]
 
     # get final result
     @output_type('float8')
     def get_final_result(self):
-        return self.sum / float(self.cnt)
+        if self.cnt == 0:
+            return None
+        else:
+            return self.sum / float(self.cnt)
 
 
 class CountPy:

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/queries/TestOuterJoinQuery/testMultipleBroadcastDataFileWithZeroLength.sql
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/queries/TestOuterJoinQuery/testMultipleBroadcastDataFileWithZeroLength.sql b/tajo-core-tests/src/test/resources/queries/TestOuterJoinQuery/testMultipleBroadcastDataFileWithZeroLength.sql
index 6ae6c09..1dcfd77 100644
--- a/tajo-core-tests/src/test/resources/queries/TestOuterJoinQuery/testMultipleBroadcastDataFileWithZeroLength.sql
+++ b/tajo-core-tests/src/test/resources/queries/TestOuterJoinQuery/testMultipleBroadcastDataFileWithZeroLength.sql
@@ -1,3 +1,3 @@
 select * from customer a
  left outer join nation_multifile b on a.c_nationkey = b.n_nationkey
- where b.n_nationkey is null
\ No newline at end of file
+ where b.n_nationkey = 100;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/queries/TestSortQuery/testTopK.sql
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/queries/TestSortQuery/testTopK.sql b/tajo-core-tests/src/test/resources/queries/TestSortQuery/testTopK.sql
index 331f3b4..7aa0c7e 100644
--- a/tajo-core-tests/src/test/resources/queries/TestSortQuery/testTopK.sql
+++ b/tajo-core-tests/src/test/resources/queries/TestSortQuery/testTopK.sql
@@ -1 +1 @@
-select l_orderkey, l_linenumber from lineitem order by l_orderkey desc limit 3;
\ No newline at end of file
+select l_orderkey, l_linenumber from lineitem order by l_orderkey desc limit 5;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/queries/TestSortQuery/testTopkWithJson.json
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/queries/TestSortQuery/testTopkWithJson.json b/tajo-core-tests/src/test/resources/queries/TestSortQuery/testTopkWithJson.json
index e3a264f..44c4294 100644
--- a/tajo-core-tests/src/test/resources/queries/TestSortQuery/testTopkWithJson.json
+++ b/tajo-core-tests/src/test/resources/queries/TestSortQuery/testTopkWithJson.json
@@ -19,7 +19,7 @@
     ],
     "Expr": {
         "Num": {
-            "Value": "3",
+            "Value": "5",
             "ValueType": "Unsigned_Integer",
             "OpType": "Literal"
         },

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testAvgDouble.result
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testAvgDouble.result b/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testAvgDouble.result
index bd2a69f..2755056 100644
--- a/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testAvgDouble.result
+++ b/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testAvgDouble.result
@@ -2,4 +2,5 @@ l_orderkey,revenue
 -------------------------------
 1,0.065
 2,0.0
-3,0.08
\ No newline at end of file
+3,0.08
+null,null
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testCount.result
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testCount.result b/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testCount.result
index 381cded..2956ff0 100644
--- a/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testCount.result
+++ b/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testCount.result
@@ -1,3 +1,3 @@
 rownum
 -------------------------------
-5
\ No newline at end of file
+8
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testSplitPart.result
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testSplitPart.result b/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testSplitPart.result
index d22cd68..b2a7d91 100644
--- a/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testSplitPart.result
+++ b/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testSplitPart.result
@@ -4,4 +4,7 @@ DELIVER
 TAKE
 TAKE
 NONE
-TAKE
\ No newline at end of file
+TAKE
+null
+null
+null
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testSplitPartByString.result
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testSplitPartByString.result b/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testSplitPartByString.result
index ac8119d..f12988e 100644
--- a/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testSplitPartByString.result
+++ b/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testSplitPartByString.result
@@ -4,4 +4,7 @@ DELIVER IN PERSON
 TA
 TA
 NONE
-TA
\ No newline at end of file
+TA
+null
+null
+null
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testSplitPartNested.result
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testSplitPartNested.result b/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testSplitPartNested.result
index ec0f07b..0200187 100644
--- a/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testSplitPartNested.result
+++ b/tajo-core-tests/src/test/resources/results/TestBuiltinFunctions/testSplitPartNested.result
@@ -4,4 +4,7 @@ null
 KE
 KE
 null
-KE
\ No newline at end of file
+KE
+null
+null
+null
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/results/TestCTASQuery/testCtasWithGroupby.result
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestCTASQuery/testCtasWithGroupby.result b/tajo-core-tests/src/test/resources/results/TestCTASQuery/testCtasWithGroupby.result
index 048902f..21b7a2a 100644
--- a/tajo-core-tests/src/test/resources/results/TestCTASQuery/testCtasWithGroupby.result
+++ b/tajo-core-tests/src/test/resources/results/TestCTASQuery/testCtasWithGroupby.result
@@ -4,4 +4,5 @@ col1,col2,key
 1.0,1.0,36.0
 2.0,2.0,38.0
 3.0,2.0,45.0
-3.0,3.0,49.0
\ No newline at end of file
+3.0,3.0,49.0
+null,null,null
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/results/TestCTASQuery/testCtasWithOrderby.result
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestCTASQuery/testCtasWithOrderby.result b/tajo-core-tests/src/test/resources/results/TestCTASQuery/testCtasWithOrderby.result
index 048902f..21b7a2a 100644
--- a/tajo-core-tests/src/test/resources/results/TestCTASQuery/testCtasWithOrderby.result
+++ b/tajo-core-tests/src/test/resources/results/TestCTASQuery/testCtasWithOrderby.result
@@ -4,4 +4,5 @@ col1,col2,key
 1.0,1.0,36.0
 2.0,2.0,38.0
 3.0,2.0,45.0
-3.0,3.0,49.0
\ No newline at end of file
+3.0,3.0,49.0
+null,null,null
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO1224Case1.result
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO1224Case1.result b/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO1224Case1.result
index 19336a7..8ed0390 100644
--- a/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO1224Case1.result
+++ b/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO1224Case1.result
@@ -1,3 +1,3 @@
 ?count
 -------------------------------
-5
\ No newline at end of file
+8
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO415Case.result
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO415Case.result b/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO415Case.result
index 6c527af..839a4e5 100644
--- a/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO415Case.result
+++ b/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO415Case.result
@@ -4,4 +4,5 @@ c_custkey,o_orderkey,cnt
 2,2,1
 3,3,1
 4,null,1
-5,null,1
\ No newline at end of file
+5,null,1
+null,null,3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO718Case.result
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO718Case.result b/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO718Case.result
index 86c4d57..ddee757 100644
--- a/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO718Case.result
+++ b/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO718Case.result
@@ -2,4 +2,5 @@ l_orderkey,l_orderkey1,t57801e5322bc50
 -------------------------------
 1,1,2
 2,2,1
-3,3,2
\ No newline at end of file
+3,3,2
+null,null,0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tajo/blob/14affa59/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO_1600.result
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO_1600.result b/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO_1600.result
index 7cb5166..b4ef88a 100644
--- a/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO_1600.result
+++ b/tajo-core-tests/src/test/resources/results/TestCaseByCases/testTAJO_1600.result
@@ -5,3 +5,4 @@ c_custkey,o_orderkey,o_orderstatus,o_orderdate
 3,3,F,1993-10-14
 4,null,null,null
 5,null,null,null
+null,null,null,null


Mime
View raw message