Repository: tajo Updated Branches: refs/heads/master c2477f416 -> 300fde0a6
http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java index 5b504b2..d971073 100644 --- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java +++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java @@ -34,6 +34,7 @@ import org.apache.tajo.engine.planner.enforce.Enforcer; 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.engine.query.QueryContext; import org.apache.tajo.master.session.Session; import org.apache.tajo.storage.*; import org.apache.tajo.storage.fragment.FileFragment; @@ -314,7 +315,7 @@ public class TestRightOuterMergeJoinExec { FileFragment[] merged = TUtil.concat(emp3Frags, dep3Frags); Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuterMergeJoin0"); - TaskAttemptContext ctx = new TaskAttemptContext(conf, + TaskAttemptContext ctx = new TaskAttemptContext(conf, new QueryContext(), LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir); ctx.setEnforcer(enforcer); @@ -351,7 +352,7 @@ public class TestRightOuterMergeJoinExec { FileFragment[] merged = TUtil.concat(job3Frags, emp3Frags); Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuterMergeJoin1"); - TaskAttemptContext ctx = new TaskAttemptContext(conf, + TaskAttemptContext ctx = new TaskAttemptContext(conf, new QueryContext(), LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir); ctx.setEnforcer(enforcer); @@ -387,7 +388,7 @@ public class TestRightOuterMergeJoinExec { FileFragment[] merged = TUtil.concat(job3Frags, emp3Frags); Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuterMergeJoin2"); - TaskAttemptContext ctx = new TaskAttemptContext(conf, + TaskAttemptContext ctx = new TaskAttemptContext(conf, new QueryContext(), LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir); ctx.setEnforcer(enforcer); @@ -423,7 +424,7 @@ public class TestRightOuterMergeJoinExec { FileFragment[] merged = TUtil.concat(emp3Frags, dep4Frags); Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuter_MergeJoin3"); - TaskAttemptContext ctx = new TaskAttemptContext(conf, + TaskAttemptContext ctx = new TaskAttemptContext(conf, new QueryContext(), LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir); ctx.setEnforcer(enforcer); @@ -461,7 +462,7 @@ public class TestRightOuterMergeJoinExec { FileFragment[] merged = TUtil.concat(emp3Frags, phone3Frags); Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuter_MergeJoin4"); - TaskAttemptContext ctx = new TaskAttemptContext(conf, + TaskAttemptContext ctx = new TaskAttemptContext(conf, new QueryContext(), LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir); ctx.setEnforcer(enforcer); @@ -498,7 +499,7 @@ public class TestRightOuterMergeJoinExec { Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuterMergeJoin5"); - TaskAttemptContext ctx = new TaskAttemptContext(conf, + TaskAttemptContext ctx = new TaskAttemptContext(conf, new QueryContext(), LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir); ctx.setEnforcer(enforcer); http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java index 87262e8..da6fb34 100644 --- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java +++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java @@ -34,6 +34,7 @@ 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.query.QueryContext; import org.apache.tajo.storage.*; import org.apache.tajo.storage.fragment.FileFragment; import org.apache.tajo.util.CommonTestingUtil; @@ -109,7 +110,8 @@ public class TestSortExec { public final void testNext() throws IOException, PlanningException { FileFragment[] frags = StorageManager.splitNG(conf, "default.employee", employeeMeta, tablePath, Integer.MAX_VALUE); Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestSortExec"); - TaskAttemptContext ctx = new TaskAttemptContext(conf, LocalTajoTestingUtility + TaskAttemptContext ctx = new TaskAttemptContext(conf, new QueryContext(), + LocalTajoTestingUtility .newQueryUnitAttemptId(), new FileFragment[] { frags[0] }, workDir); ctx.setEnforcer(new Enforcer()); Expr context = analyzer.parse(QUERIES[0]); http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/java/org/apache/tajo/engine/query/TestInsertQuery.java ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/java/org/apache/tajo/engine/query/TestInsertQuery.java b/tajo-core/src/test/java/org/apache/tajo/engine/query/TestInsertQuery.java index 8453488..3aacbff 100644 --- a/tajo-core/src/test/java/org/apache/tajo/engine/query/TestInsertQuery.java +++ b/tajo-core/src/test/java/org/apache/tajo/engine/query/TestInsertQuery.java @@ -342,7 +342,8 @@ public class TestInsertQuery extends QueryTestCaseBase { assertEquals(3, res.getMetaData().getColumnCount()); assertEquals(1, res.getInt(1)); - assertEquals("", res.getString(2)); + assertNull(res.getString(2)); + assertEquals(0.0, res.getDouble(2), 10); assertEquals("test", res.getString(3)); res.close(); http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/java/org/apache/tajo/engine/query/TestNullValues.java ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/java/org/apache/tajo/engine/query/TestNullValues.java b/tajo-core/src/test/java/org/apache/tajo/engine/query/TestNullValues.java index e288066..f41b0ab 100644 --- a/tajo-core/src/test/java/org/apache/tajo/engine/query/TestNullValues.java +++ b/tajo-core/src/test/java/org/apache/tajo/engine/query/TestNullValues.java @@ -20,14 +20,15 @@ package org.apache.tajo.engine.query; import org.apache.tajo.IntegrationTest; import org.apache.tajo.TajoTestingCluster; -import org.apache.tajo.util.KeyValueSet; import org.apache.tajo.catalog.Schema; import org.apache.tajo.common.TajoDataTypes.Type; import org.apache.tajo.storage.StorageConstants; +import org.apache.tajo.util.KeyValueSet; import org.junit.Test; import org.junit.experimental.categories.Category; import java.sql.ResultSet; +import java.sql.SQLException; import static org.junit.Assert.*; @@ -56,6 +57,7 @@ public class TestNullValues { ResultSet res = TajoTestingCluster .run(table, schemas, opts, new String[][]{data}, "select * from nulltable1 where col3 is null"); + try { assertTrue(res.next()); assertEquals(2, res.getInt(1)); @@ -159,4 +161,138 @@ public class TestNullValues { res.close(); } } + + @Test + public final void testResultSetNullSimpleQuery() throws Exception { + String tableName = "nulltable5"; + ResultSet res = runNullTableQuery(tableName, "select col1, col2, col3, col4 from " + tableName); + + try { + int numRows = 0; + + String expected = + "null|a|1.0|true\n" + + "2|null|2.0|false\n" + + "3|c|null|true\n" + + "4|d|4.0|null"; + + String result = ""; + + String prefix = ""; + while(res.next()) { + for (int i = 0; i < 4; i++) { + result += prefix + res.getObject(i + 1); + prefix = "|"; + } + prefix = "\n"; + + assertResultSetNull(res, numRows, false, new int[]{1,2,3,4}); + assertResultSetNull(res, numRows, true, new int[]{1,2,3,4}); + numRows++; + } + assertEquals(4, numRows); + assertEquals(expected, result); + } finally { + res.close(); + } + } + + @Test + public final void testResultSetNull() throws Exception { + String tableName = "nulltable6"; + String query = "select " + + "col1, coalesce(col1, 99999), " + + "col2, coalesce(col2, 'null_value'), " + + "col3, coalesce(col3, 99999.0)," + + "col4 " + + "from " + tableName; + + ResultSet res = runNullTableQuery(tableName, query); + + try { + int numRows = 0; + String expected = + "null|99999|a|a|1.0|1.0|true\n" + + "2|2|null|null_value|2.0|2.0|false\n" + + "3|3|c|c|null|99999.0|true\n" + + "4|4|d|d|4.0|4.0|null"; + + String result = ""; + + String prefix = ""; + while(res.next()) { + for (int i = 0; i < 7; i++) { + result += prefix + res.getObject(i + 1); + prefix = "|"; + } + prefix = "\n"; + + assertResultSetNull(res, numRows, false, new int[]{1,3,5,7}); + assertResultSetNull(res, numRows, true, new int[]{1,3,5,7}); + numRows++; + } + assertEquals(4, numRows); + assertEquals(expected, result); + } finally { + res.close(); + } + } + + private ResultSet runNullTableQuery(String tableName, String query) throws Exception { + String [] table = new String[] {tableName}; + Schema schema = new Schema(); + schema.addColumn("col1", Type.INT4); + schema.addColumn("col2", Type.TEXT); + schema.addColumn("col3", Type.FLOAT4); + schema.addColumn("col4", Type.BOOLEAN); + Schema [] schemas = new Schema[] {schema}; + String [] data = { + "\\N|a|1.0|t", + "2|\\N|2.0|f", + "3|c|\\N|t", + "4|d|4.0|\\N" + }; + KeyValueSet tableOptions = new KeyValueSet(); + tableOptions.put(StorageConstants.CSVFILE_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER); + tableOptions.put(StorageConstants.CSVFILE_NULL, "\\\\N"); + + ResultSet res = TajoTestingCluster + .run(table, schemas, tableOptions, new String[][]{data}, query); + + return res; + } + + private void assertResultSetNull(ResultSet res, int numRows, boolean useName, int[] nullIndex) throws SQLException { + if (numRows == 0) { + if (useName) { + assertEquals(0, res.getInt(res.getMetaData().getColumnName(nullIndex[numRows]))); + } else { + assertEquals(0, res.getInt(nullIndex[numRows])); + } + } + + if (numRows == 1) { + if (useName) { + assertNull(res.getString(res.getMetaData().getColumnName(nullIndex[numRows]))); + } else { + assertNull(res.getString(nullIndex[numRows])); + }; + } + + if (numRows == 2) { + if (useName) { + assertEquals(0.0, res.getDouble(res.getMetaData().getColumnName(nullIndex[numRows])), 10); + } else { + assertEquals(0.0, res.getDouble(nullIndex[numRows]), 10); + } + } + + if (numRows == 3) { + if (useName) { + assertEquals(false, res.getBoolean(res.getMetaData().getColumnName(nullIndex[numRows]))); + } else { + assertEquals(false, res.getBoolean(nullIndex[numRows])); + } + } + } } http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java b/tajo-core/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java index b904bb1..5375749 100644 --- a/tajo-core/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java +++ b/tajo-core/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java @@ -41,6 +41,7 @@ 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.engine.query.QueryContext; import org.apache.tajo.storage.*; import org.apache.tajo.storage.RowStoreUtil.RowStoreEncoder; import org.apache.tajo.storage.fragment.FileFragment; @@ -142,7 +143,8 @@ public class TestRangeRetrieverHandler { FileFragment[] frags = StorageManager.splitNG(conf, "default.employee", employeeMeta, tableDir, Integer.MAX_VALUE); - TaskAttemptContext ctx = new TaskAttemptContext(conf, LocalTajoTestingUtility.newQueryUnitAttemptId(), + TaskAttemptContext ctx = new TaskAttemptContext(conf, new QueryContext(), + LocalTajoTestingUtility.newQueryUnitAttemptId(), new FileFragment[] {frags[0]}, testDir); ctx.setEnforcer(new Enforcer()); Expr expr = analyzer.parse(SORT_QUERY[0]); @@ -265,7 +267,8 @@ public class TestRangeRetrieverHandler { FileFragment[] frags = sm.splitNG(conf, "default.employee", meta, tablePath, Integer.MAX_VALUE); TaskAttemptContext - ctx = new TaskAttemptContext(conf, LocalTajoTestingUtility.newQueryUnitAttemptId(), + ctx = new TaskAttemptContext(conf, new QueryContext(), + LocalTajoTestingUtility.newQueryUnitAttemptId(), new FileFragment[] {frags[0]}, testDir); ctx.setEnforcer(new Enforcer()); Expr expr = analyzer.parse(SORT_QUERY[1]); http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestBuiltinFunctions/testSplitPartNested.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestBuiltinFunctions/testSplitPartNested.result b/tajo-core/src/test/resources/results/TestBuiltinFunctions/testSplitPartNested.result index 5dd4193..ec0f07b 100644 --- a/tajo-core/src/test/resources/results/TestBuiltinFunctions/testSplitPartNested.result +++ b/tajo-core/src/test/resources/results/TestBuiltinFunctions/testSplitPartNested.result @@ -1,7 +1,7 @@ ?split_part ------------------------------- - +null KE KE - +null KE \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestCaseByCases/testTAJO415Case.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestCaseByCases/testTAJO415Case.result b/tajo-core/src/test/resources/results/TestCaseByCases/testTAJO415Case.result index 675037b..6c527af 100644 --- a/tajo-core/src/test/resources/results/TestCaseByCases/testTAJO415Case.result +++ b/tajo-core/src/test/resources/results/TestCaseByCases/testTAJO415Case.result @@ -3,5 +3,5 @@ c_custkey,o_orderkey,cnt 1,1,1 2,2,1 3,3,1 -4,0,1 -5,0,1 \ No newline at end of file +4,null,1 +5,null,1 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinBroadcast/testFullOuterJoin1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinBroadcast/testFullOuterJoin1.result b/tajo-core/src/test/resources/results/TestJoinBroadcast/testFullOuterJoin1.result index 81dc055..695a414 100644 --- a/tajo-core/src/test/resources/results/TestJoinBroadcast/testFullOuterJoin1.result +++ b/tajo-core/src/test/resources/results/TestJoinBroadcast/testFullOuterJoin1.result @@ -3,5 +3,5 @@ c_custkey,o_orderkey 1,1 2,2 3,3 -4,0 -5,0 \ No newline at end of file +4,null +5,null \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinBroadcast/testFullOuterJoinWithEmptyTable1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinBroadcast/testFullOuterJoinWithEmptyTable1.result b/tajo-core/src/test/resources/results/TestJoinBroadcast/testFullOuterJoinWithEmptyTable1.result index 9124c6c..5b849fc 100644 --- a/tajo-core/src/test/resources/results/TestJoinBroadcast/testFullOuterJoinWithEmptyTable1.result +++ b/tajo-core/src/test/resources/results/TestJoinBroadcast/testFullOuterJoinWithEmptyTable1.result @@ -1,7 +1,7 @@ c_custkey,o_orderkey ------------------------------- -1,0 -2,0 -3,0 -4,0 -5,0 \ No newline at end of file +1,null +2,null +3,null +4,null +5,null \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoin1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoin1.result b/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoin1.result index 8893e12..9e2a53a 100644 --- a/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoin1.result +++ b/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoin1.result @@ -3,5 +3,5 @@ c_custkey,o_orderkey,o_orderstatus,o_orderdate 1,1,O,1996-01-02 2,2,O,1996-12-01 3,3,F,1993-10-14 -4,0,, -5,0,, \ No newline at end of file +4,null,null,null +5,null,null,null \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoinWithConstantExpr1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoinWithConstantExpr1.result b/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoinWithConstantExpr1.result index ed28172..670a069 100644 --- a/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoinWithConstantExpr1.result +++ b/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoinWithConstantExpr1.result @@ -3,5 +3,5 @@ c_custkey,o_orderkey,val 1,1,val 2,2,val 3,3,val -4,0,val -5,0,val \ No newline at end of file +4,null,val +5,null,val \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoinWithConstantExpr2.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoinWithConstantExpr2.result b/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoinWithConstantExpr2.result index ed28172..670a069 100644 --- a/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoinWithConstantExpr2.result +++ b/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoinWithConstantExpr2.result @@ -3,5 +3,5 @@ c_custkey,o_orderkey,val 1,1,val 2,2,val 3,3,val -4,0,val -5,0,val \ No newline at end of file +4,null,val +5,null,val \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoinWithEmptyTable1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoinWithEmptyTable1.result b/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoinWithEmptyTable1.result index 5e85b28..e2f94f4 100644 --- a/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoinWithEmptyTable1.result +++ b/tajo-core/src/test/resources/results/TestJoinBroadcast/testLeftOuterJoinWithEmptyTable1.result @@ -1,7 +1,7 @@ c_custkey,o_orderkey,o_orderstatus,o_orderdate ------------------------------- -1,0,, -2,0,, -3,0,, -4,0,, -5,0,, \ No newline at end of file +1,null,null,null +2,null,null,null +3,null,null,null +4,null,null,null +5,null,null,null \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinBroadcast/testRightOuterJoin1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinBroadcast/testRightOuterJoin1.result b/tajo-core/src/test/resources/results/TestJoinBroadcast/testRightOuterJoin1.result index 81dc055..695a414 100644 --- a/tajo-core/src/test/resources/results/TestJoinBroadcast/testRightOuterJoin1.result +++ b/tajo-core/src/test/resources/results/TestJoinBroadcast/testRightOuterJoin1.result @@ -3,5 +3,5 @@ c_custkey,o_orderkey 1,1 2,2 3,3 -4,0 -5,0 \ No newline at end of file +4,null +5,null \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinBroadcast/testRightOuterJoinWithEmptyTable1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinBroadcast/testRightOuterJoinWithEmptyTable1.result b/tajo-core/src/test/resources/results/TestJoinBroadcast/testRightOuterJoinWithEmptyTable1.result index 9124c6c..5b849fc 100644 --- a/tajo-core/src/test/resources/results/TestJoinBroadcast/testRightOuterJoinWithEmptyTable1.result +++ b/tajo-core/src/test/resources/results/TestJoinBroadcast/testRightOuterJoinWithEmptyTable1.result @@ -1,7 +1,7 @@ c_custkey,o_orderkey ------------------------------- -1,0 -2,0 -3,0 -4,0 -5,0 \ No newline at end of file +1,null +2,null +3,null +4,null +5,null \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinQuery/testFullOuterJoin1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinQuery/testFullOuterJoin1.result b/tajo-core/src/test/resources/results/TestJoinQuery/testFullOuterJoin1.result index 81dc055..695a414 100644 --- a/tajo-core/src/test/resources/results/TestJoinQuery/testFullOuterJoin1.result +++ b/tajo-core/src/test/resources/results/TestJoinQuery/testFullOuterJoin1.result @@ -3,5 +3,5 @@ c_custkey,o_orderkey 1,1 2,2 3,3 -4,0 -5,0 \ No newline at end of file +4,null +5,null \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinQuery/testFullOuterJoinWithEmptyTable1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinQuery/testFullOuterJoinWithEmptyTable1.result b/tajo-core/src/test/resources/results/TestJoinQuery/testFullOuterJoinWithEmptyTable1.result index 9124c6c..5b849fc 100644 --- a/tajo-core/src/test/resources/results/TestJoinQuery/testFullOuterJoinWithEmptyTable1.result +++ b/tajo-core/src/test/resources/results/TestJoinQuery/testFullOuterJoinWithEmptyTable1.result @@ -1,7 +1,7 @@ c_custkey,o_orderkey ------------------------------- -1,0 -2,0 -3,0 -4,0 -5,0 \ No newline at end of file +1,null +2,null +3,null +4,null +5,null \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoin1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoin1.result b/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoin1.result index 8893e12..9e2a53a 100644 --- a/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoin1.result +++ b/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoin1.result @@ -3,5 +3,5 @@ c_custkey,o_orderkey,o_orderstatus,o_orderdate 1,1,O,1996-01-02 2,2,O,1996-12-01 3,3,F,1993-10-14 -4,0,, -5,0,, \ No newline at end of file +4,null,null,null +5,null,null,null \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.result b/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.result index ed28172..670a069 100644 --- a/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.result +++ b/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.result @@ -3,5 +3,5 @@ c_custkey,o_orderkey,val 1,1,val 2,2,val 3,3,val -4,0,val -5,0,val \ No newline at end of file +4,null,val +5,null,val \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.result b/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.result index ed28172..670a069 100644 --- a/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.result +++ b/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.result @@ -3,5 +3,5 @@ c_custkey,o_orderkey,val 1,1,val 2,2,val 3,3,val -4,0,val -5,0,val \ No newline at end of file +4,null,val +5,null,val \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithEmptyTable1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithEmptyTable1.result b/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithEmptyTable1.result index 5e85b28..e2f94f4 100644 --- a/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithEmptyTable1.result +++ b/tajo-core/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithEmptyTable1.result @@ -1,7 +1,7 @@ c_custkey,o_orderkey,o_orderstatus,o_orderdate ------------------------------- -1,0,, -2,0,, -3,0,, -4,0,, -5,0,, \ No newline at end of file +1,null,null,null +2,null,null,null +3,null,null,null +4,null,null,null +5,null,null,null \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinQuery/testOuterJoinAndCaseWhen1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinQuery/testOuterJoinAndCaseWhen1.result b/tajo-core/src/test/resources/results/TestJoinQuery/testOuterJoinAndCaseWhen1.result index f032d32..8f204fb 100644 --- a/tajo-core/src/test/resources/results/TestJoinQuery/testOuterJoinAndCaseWhen1.result +++ b/tajo-core/src/test/resources/results/TestJoinQuery/testOuterJoinAndCaseWhen1.result @@ -1,7 +1,7 @@ id,name,id2,name2,c1,c2 ------------------------------- -1,ooo,1,,9991231,ooo -2,ppp,2,,9991231,ppp -3,qqq,0,,9991231,9991231 -4,rrr,0,,9991231,9991231 -5,xxx,0,,9991231,9991231 \ No newline at end of file +1,ooo,1,null,9991231,ooo +2,ppp,2,null,9991231,ppp +3,qqq,null,null,9991231,9991231 +4,rrr,null,null,9991231,9991231 +5,xxx,null,null,9991231,9991231 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinQuery/testRightOuterJoin1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinQuery/testRightOuterJoin1.result b/tajo-core/src/test/resources/results/TestJoinQuery/testRightOuterJoin1.result index 81dc055..695a414 100644 --- a/tajo-core/src/test/resources/results/TestJoinQuery/testRightOuterJoin1.result +++ b/tajo-core/src/test/resources/results/TestJoinQuery/testRightOuterJoin1.result @@ -3,5 +3,5 @@ c_custkey,o_orderkey 1,1 2,2 3,3 -4,0 -5,0 \ No newline at end of file +4,null +5,null \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestJoinQuery/testRightOuterJoinWithEmptyTable1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestJoinQuery/testRightOuterJoinWithEmptyTable1.result b/tajo-core/src/test/resources/results/TestJoinQuery/testRightOuterJoinWithEmptyTable1.result index 9124c6c..5b849fc 100644 --- a/tajo-core/src/test/resources/results/TestJoinQuery/testRightOuterJoinWithEmptyTable1.result +++ b/tajo-core/src/test/resources/results/TestJoinQuery/testRightOuterJoinWithEmptyTable1.result @@ -1,7 +1,7 @@ c_custkey,o_orderkey ------------------------------- -1,0 -2,0 -3,0 -4,0 -5,0 \ No newline at end of file +1,null +2,null +3,null +4,null +5,null \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestNetTypes/testJoin.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestNetTypes/testJoin.result b/tajo-core/src/test/resources/results/TestNetTypes/testJoin.result index ea979ac..568b488 100644 --- a/tajo-core/src/test/resources/results/TestNetTypes/testJoin.result +++ b/tajo-core/src/test/resources/results/TestNetTypes/testJoin.result @@ -1,6 +1,6 @@ id,name,score,type,addr,id,name,score,type,addr ------------------------------- -1,ooo,1.1,a,127.0.0.1,0,,20.0,d,127.0.0.1 -3,qqq,3.4,c,127.0.0.8,1,,0.0,a,127.0.0.8 -3,qqq,3.4,c,127.0.0.8,2,,0.0,b,127.0.0.8 -4,rrr,4.5,d,127.0.0.1,0,,20.0,d,127.0.0.1 \ No newline at end of file +1,ooo,1.1,a,127.0.0.1,null,null,20.0,d,127.0.0.1 +3,qqq,3.4,c,127.0.0.8,1,null,null,a,127.0.0.8 +3,qqq,3.4,c,127.0.0.8,2,null,null,b,127.0.0.8 +4,rrr,4.5,d,127.0.0.1,null,null,20.0,d,127.0.0.1 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestNetTypes/testSort2.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestNetTypes/testSort2.result b/tajo-core/src/test/resources/results/TestNetTypes/testSort2.result index debbb98..9bd5038 100644 --- a/tajo-core/src/test/resources/results/TestNetTypes/testSort2.result +++ b/tajo-core/src/test/resources/results/TestNetTypes/testSort2.result @@ -3,4 +3,5 @@ addr 127.0.0.1 127.0.0.8 127.0.0.8 -255.255.255.255 \ No newline at end of file +255.255.255.255 +null \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestSelectQuery/testCaseWhenWithoutElse.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestSelectQuery/testCaseWhenWithoutElse.result b/tajo-core/src/test/resources/results/TestSelectQuery/testCaseWhenWithoutElse.result index 843b4e8..bde7df8 100644 --- a/tajo-core/src/test/resources/results/TestSelectQuery/testCaseWhenWithoutElse.result +++ b/tajo-core/src/test/resources/results/TestSelectQuery/testCaseWhenWithoutElse.result @@ -1,6 +1,6 @@ r_regionkey,cond ------------------------------- -0,0 +0,null 1,11 2,12 3,13 http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestTablePartitions/case1.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestTablePartitions/case1.result b/tajo-core/src/test/resources/results/TestTablePartitions/case1.result index 4bfe8a2..aece52e 100644 --- a/tajo-core/src/test/resources/results/TestTablePartitions/case1.result +++ b/tajo-core/src/test/resources/results/TestTablePartitions/case1.result @@ -1,4 +1,4 @@ col1,col2,null_col,key ------------------------------- -2,2,0,38.0 -3,2,0,45.0 \ No newline at end of file +2,2,null,38.0 +3,2,null,45.0 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestTablePartitions/case2.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestTablePartitions/case2.result b/tajo-core/src/test/resources/results/TestTablePartitions/case2.result index 45b1a44..af56618 100644 --- a/tajo-core/src/test/resources/results/TestTablePartitions/case2.result +++ b/tajo-core/src/test/resources/results/TestTablePartitions/case2.result @@ -1,6 +1,6 @@ col1,col2,null_col,key ------------------------------- -2,2,0,38.0 -2,2,0,38.0 -3,2,0,45.0 -3,2,0,45.0 \ No newline at end of file +2,2,null,38.0 +2,2,null,38.0 +3,2,null,45.0 +3,2,null,45.0 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestTajoCli/testSelectResultWithNullFalse.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestTajoCli/testSelectResultWithNullFalse.result b/tajo-core/src/test/resources/results/TestTajoCli/testSelectResultWithNullFalse.result new file mode 100644 index 0000000..a5a6039 --- /dev/null +++ b/tajo-core/src/test/resources/results/TestTajoCli/testSelectResultWithNullFalse.result @@ -0,0 +1,8 @@ +c_custkey, o_orderkey, o_orderstatus +------------------------------- +1, 1, O +2, 2, O +3, 3, F +4, , +5, , +(5 rows, , 30 B selected) http://git-wip-us.apache.org/repos/asf/tajo/blob/300fde0a/tajo-core/src/test/resources/results/TestTajoCli/testSelectResultWithNullTrue.result ---------------------------------------------------------------------- diff --git a/tajo-core/src/test/resources/results/TestTajoCli/testSelectResultWithNullTrue.result b/tajo-core/src/test/resources/results/TestTajoCli/testSelectResultWithNullTrue.result new file mode 100644 index 0000000..566262e --- /dev/null +++ b/tajo-core/src/test/resources/results/TestTajoCli/testSelectResultWithNullTrue.result @@ -0,0 +1,8 @@ +c_custkey, o_orderkey, o_orderstatus +------------------------------- +1, 1, O +2, 2, O +3, 3, F +4, testnull, testnull +5, testnull, testnull +(5 rows, , 30 B selected)
