tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject git commit: TAJO-567: Expression projection bugs.
Date Wed, 29 Jan 2014 05:22:59 GMT
Updated Branches:
  refs/heads/master b0d81a590 -> 179a707fc


TAJO-567: Expression projection bugs.


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

Branch: refs/heads/master
Commit: 179a707fc4ba58425ebd92ccd5d64c6cba78d512
Parents: b0d81a5
Author: Hyunsik Choi <hyunsik@apache.org>
Authored: Wed Jan 29 14:22:28 2014 +0900
Committer: Hyunsik Choi <hyunsik@apache.org>
Committed: Wed Jan 29 14:22:28 2014 +0900

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 ++
 .../org/apache/tajo/algebra/Aggregation.java    |  6 ++---
 .../org/apache/tajo/algebra/CreateTable.java    | 10 ++++----
 .../org/apache/tajo/algebra/FunctionExpr.java   |  2 +-
 .../java/org/apache/tajo/algebra/Insert.java    |  6 ++++-
 .../main/java/org/apache/tajo/algebra/Join.java |  2 +-
 .../org/apache/tajo/algebra/Projection.java     |  2 +-
 .../tajo/algebra/TablePrimarySubQuery.java      |  2 +-
 .../org/apache/tajo/catalog/FunctionDesc.java   |  2 +-
 .../org/apache/tajo/catalog/CatalogServer.java  |  3 ++-
 .../tajo/engine/planner/NamedExprsManager.java  | 15 +++++++++---
 .../planner/rewrite/ProjectionPushDownRule.java |  1 +
 .../tajo/engine/query/TestGroupByQuery.java     | 25 ++++++++++++++++++++
 .../apache/tajo/engine/query/TestJoinQuery.java | 22 +++++++++++++++++
 .../testGroupByWithConstantKeys1.sql            |  1 +
 .../testGroupByWithExpressionKeys1.sql          |  1 +
 .../testGroupByWithExpressionKeys2.sql          |  1 +
 .../testLeftOuterJoinWithConstantExpr1.sql      |  1 +
 .../testLeftOuterJoinWithConstantExpr2.sql      |  1 +
 .../testGroupByWithExpressionKeys1.result       |  5 ++++
 .../testGroupByWithExpressionKeys2.result       |  5 ++++
 .../testLeftOuterJoinWithConstantExpr1.result   |  7 ++++++
 .../testLeftOuterJoinWithConstantExpr2.result   |  7 ++++++
 23 files changed, 112 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 1f78565..333740d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -233,6 +233,8 @@ Release 0.8.0 - unreleased
 
   BUG FIXES
 
+    TAJO-567: Expression projection bugs. (hyunsik)
+
     TAJO-565: FilterPushDown rewrite rule does not push filters on
     partitioned scans. (hyunsik)
 

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-algebra/src/main/java/org/apache/tajo/algebra/Aggregation.java
----------------------------------------------------------------------
diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/Aggregation.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/Aggregation.java
index 376963f..d1a6bd3 100644
--- a/tajo-algebra/src/main/java/org/apache/tajo/algebra/Aggregation.java
+++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/Aggregation.java
@@ -51,7 +51,7 @@ public class Aggregation extends UnaryOperator {
 
   @Override
   public int hashCode() {
-    return Objects.hashCode(namedExprs, groups, getChild());
+    return Objects.hashCode(Objects.hashCode(namedExprs), Objects.hashCode(groups), getChild());
   }
 
   @Override
@@ -91,14 +91,14 @@ public class Aggregation extends UnaryOperator {
 
     @Override
     public int hashCode() {
-      return Objects.hashCode(group_type, grouping_sets);
+      return Objects.hashCode(group_type, Objects.hashCode(grouping_sets));
     }
 
     @Override
     public boolean equals(Object obj) {
       if (obj instanceof GroupElement) {
         GroupElement other = (GroupElement) obj;
-        return group_type.equals(other) &&
+        return group_type.equals(other.group_type) &&
             TUtil.checkEquals(grouping_sets, other.grouping_sets);
       }
 

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java
----------------------------------------------------------------------
diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java
index 1836f51..7ad802c 100644
--- a/tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java
+++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java
@@ -130,7 +130,9 @@ public class CreateTable extends Expr {
 
   @Override
   public int hashCode() {
-    return Objects.hashCode(external, tableName, tableElements, storageType, subquery, location,
params, partition);
+    return Objects.hashCode(
+        external, tableName, Objects.hashCode(tableElements),
+        storageType, subquery, location, params, partition);
   }
 
   @Override
@@ -225,7 +227,7 @@ public class CreateTable extends Expr {
     }
 
     public int hashCode() {
-      return Objects.hashCode(type, columns, specifiers);
+      return Objects.hashCode(type, Objects.hashCode(columns), specifiers);
     }
 
     public boolean equals(Object object) {
@@ -310,7 +312,7 @@ public class CreateTable extends Expr {
     }
 
     public int hashCode() {
-      return Objects.hashCode(columns, specifiers);
+      return Objects.hashCode(Objects.hashCode(columns), specifiers);
     }
 
     public boolean equals(Object object) {
@@ -343,7 +345,7 @@ public class CreateTable extends Expr {
     }
 
     public int hashCode() {
-      return Objects.hashCode(columns, isOmitValues);
+      return Objects.hashCode(Objects.hashCode(columns), isOmitValues);
     }
 
     public boolean equals(Object object) {

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-algebra/src/main/java/org/apache/tajo/algebra/FunctionExpr.java
----------------------------------------------------------------------
diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/FunctionExpr.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/FunctionExpr.java
index 7f1dcd3..b007362 100644
--- a/tajo-algebra/src/main/java/org/apache/tajo/algebra/FunctionExpr.java
+++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/FunctionExpr.java
@@ -65,7 +65,7 @@ public class FunctionExpr extends Expr {
 
   @Override
   public int hashCode() {
-    return Objects.hashCode(signature, params);
+    return Objects.hashCode(signature, Objects.hashCode(params));
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-algebra/src/main/java/org/apache/tajo/algebra/Insert.java
----------------------------------------------------------------------
diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/Insert.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/Insert.java
index c58c040..c427a39 100644
--- a/tajo-algebra/src/main/java/org/apache/tajo/algebra/Insert.java
+++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/Insert.java
@@ -114,7 +114,10 @@ public class Insert extends Expr {
 
   @Override
   public int hashCode() {
-    return Objects.hashCode(overwrite, tableName, subquery, storageType, location, params);
+    return Objects.hashCode(
+        overwrite, tableName, Objects.hashCode(targetColumns),
+        subquery, storageType, location,
+        params);
   }
 
   @Override
@@ -122,6 +125,7 @@ public class Insert extends Expr {
     Insert another = (Insert) expr;
     return overwrite == another.overwrite &&
         TUtil.checkEquals(tableName, another.tableName) &&
+        TUtil.checkEquals(targetColumns, another.targetColumns) &&
         TUtil.checkEquals(subquery, another.subquery) &&
         TUtil.checkEquals(storageType, another.storageType) &&
         TUtil.checkEquals(location, another.location) &&

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-algebra/src/main/java/org/apache/tajo/algebra/Join.java
----------------------------------------------------------------------
diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/Join.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/Join.java
index da2b153..258f750 100644
--- a/tajo-algebra/src/main/java/org/apache/tajo/algebra/Join.java
+++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/Join.java
@@ -70,7 +70,7 @@ public class Join extends BinaryOperator {
 
   @Override
   public int hashCode() {
-    return Objects.hashCode(joinType, joinQual, joinColumns, natural);
+    return Objects.hashCode(joinType, joinQual, Objects.hashCode(joinColumns), natural);
   }
 
   boolean equalsTo(Expr expr) {

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-algebra/src/main/java/org/apache/tajo/algebra/Projection.java
----------------------------------------------------------------------
diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/Projection.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/Projection.java
index bcb6253..3d9f8a6 100644
--- a/tajo-algebra/src/main/java/org/apache/tajo/algebra/Projection.java
+++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/Projection.java
@@ -60,7 +60,7 @@ public class Projection extends UnaryOperator implements Cloneable {
   }
 
   public int hashCode() {
-    return Objects.hashCode(all, distinct, targets, getChild());
+    return Objects.hashCode(all, distinct, Objects.hashCode(targets), getChild());
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-algebra/src/main/java/org/apache/tajo/algebra/TablePrimarySubQuery.java
----------------------------------------------------------------------
diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/TablePrimarySubQuery.java
b/tajo-algebra/src/main/java/org/apache/tajo/algebra/TablePrimarySubQuery.java
index 90d89a4..2af90b6 100644
--- a/tajo-algebra/src/main/java/org/apache/tajo/algebra/TablePrimarySubQuery.java
+++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/TablePrimarySubQuery.java
@@ -47,7 +47,7 @@ public class TablePrimarySubQuery extends Relation {
   }
 
   public int hashCode() {
-    return Objects.hashCode(subquery, columnNames);
+    return Objects.hashCode(subquery, Objects.hashCode(columnNames));
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/FunctionDesc.java
----------------------------------------------------------------------
diff --git a/tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/FunctionDesc.java
b/tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/FunctionDesc.java
index 00a687c..084d97c 100644
--- a/tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/FunctionDesc.java
+++ b/tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/FunctionDesc.java
@@ -140,7 +140,7 @@ public class FunctionDesc implements ProtoObject<FunctionDescProto>,
Cloneable,
 
   @Override
   public int hashCode() {
-    return Objects.hashCode(signature, params);
+    return Objects.hashCode(signature, Objects.hashCode(params));
   }
   
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java
----------------------------------------------------------------------
diff --git a/tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java
b/tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java
index abc3832..69e0248 100644
--- a/tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java
+++ b/tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java
@@ -18,6 +18,7 @@
 
 package org.apache.tajo.catalog;
 
+import com.google.common.base.Objects;
 import com.google.protobuf.RpcController;
 import com.google.protobuf.ServiceException;
 import org.apache.commons.logging.Log;
@@ -640,7 +641,7 @@ public class CatalogServer extends AbstractService {
 
     @Override
     public int hashCode() {
-      return com.google.common.base.Objects.hashCode(signature, type, arguments);
+      return Objects.hashCode(signature, type, Objects.hashCode(arguments));
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/NamedExprsManager.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/NamedExprsManager.java
b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/NamedExprsManager.java
index 893fbe1..6ce7bdf 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/NamedExprsManager.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/NamedExprsManager.java
@@ -171,10 +171,12 @@ public class NamedExprsManager {
   }
 
   public void resolveExpr(String name, EvalNode evalNode) throws PlanningException {
+    String normalized = name.toLowerCase();
+
     if (evalNode.getType() == EvalType.CONST) {
-      return;
+      resolvedFlags.put(normalized, true);
     }
-    String normalized = name.toLowerCase();
+
     nameToEvalMap.put(normalized, evalNode);
     evalToNameMap.put(evalNode, normalized);
     resolvedFlags.put(normalized, true);
@@ -212,7 +214,14 @@ public class NamedExprsManager {
   public Target getTarget(String name, boolean unresolved) {
     String normalized = name;
     if (!unresolved && resolvedFlags.containsKey(normalized) && resolvedFlags.get(normalized))
{
-      return new Target(new FieldEval(normalized, nameToEvalMap.get(normalized).getValueType()));
+      EvalNode evalNode = nameToEvalMap.get(normalized);
+      EvalNode referredEval;
+      if (evalNode.getType() == EvalType.CONST) {
+        referredEval = evalNode;
+      } else {
+        referredEval = new FieldEval(normalized, evalNode.getValueType());
+      }
+      return new Target(referredEval, name);
     } else {
       if (nameToEvalMap.containsKey(normalized)) {
         return new Target(nameToEvalMap.get(normalized), name);

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/rewrite/ProjectionPushDownRule.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/rewrite/ProjectionPushDownRule.java
b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/rewrite/ProjectionPushDownRule.java
index 4e60448..c589910 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/rewrite/ProjectionPushDownRule.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/rewrite/ProjectionPushDownRule.java
@@ -174,6 +174,7 @@ public class ProjectionPushDownRule extends
     public void resolve(Target target) {
       EvalNode evalNode = target.getEvalTree();
       if (evalNode.getType() == EvalType.CONST) { // if constant value
+        resolvedFlags.put(name, true);
         return; // keep it raw always
       }
       if (!evalToNameMap.containsKey(evalNode)) {

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
index 8bb2c28..25f61f5 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
@@ -84,6 +84,31 @@ public class TestGroupByQuery extends QueryTestCaseBase {
   }
 
   @Test
+  public final void testGroupByWithExpressionKeys1() throws Exception {
+    // select upper(lower(l_orderkey::text)) as key, count(1) as total from lineitem
+    // group by key order by upper(lower(l_orderkey::text)), total;
+    ResultSet res = executeQuery();
+    assertResultSet(res);
+    cleanupQuery(res);
+  }
+
+  @Test
+  public final void testGroupByWithExpressionKeys2() throws Exception {
+    // select upper(lower(l_orderkey::text)) as key, count(1) as total from lineitem
+    // group by upper(lower(l_orderkey::text)) order by upper(l_orderkey::text), total;
+    ResultSet res = executeQuery();
+    assertResultSet(res);
+    cleanupQuery(res);
+  }
+
+  @Test
+  public final void testGroupByWithConstantKeys1() throws Exception {
+    ResultSet res = executeQuery();
+    System.out.println(resultSetToString(res));
+    cleanupQuery(res);
+  }
+
+  @Test
   public final void testCountDistinct() throws Exception {
     // select l_orderkey, max(l_orderkey) as maximum, count(distinct l_linenumber) as unique_key
from lineitem
     // group by l_orderkey;

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java
b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java
index a9f7849..fbb7fba 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java
@@ -91,6 +91,28 @@ public class TestJoinQuery extends QueryTestCaseBase {
   }
 
   @Test
+  public final void testLeftOuterJoinWithConstantExpr1() throws Exception {
+    // outer join with constant projections
+    //
+    // select c_custkey, orders.o_orderkey, 'val' as val from customer
+    // left outer join orders on c_custkey = o_orderkey;
+    ResultSet res = executeQuery();
+    assertResultSet(res);
+    cleanupQuery(res);
+  }
+
+  @Test
+  public final void testLeftOuterJoinWithConstantExpr2() throws Exception {
+    // outer join with constant projections
+    //
+    // select c_custkey, o.o_orderkey, 'val' as val from customer left outer join
+    // (select * from orders) o on c_custkey = o.o_orderkey
+    ResultSet res = executeQuery();
+    assertResultSet(res);
+    cleanupQuery(res);
+  }
+
+  @Test
   public final void testRightOuterJoin1() throws Exception {
     ResultSet res = executeQuery();
     assertResultSet(res);

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithConstantKeys1.sql
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithConstantKeys1.sql
b/tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithConstantKeys1.sql
new file mode 100644
index 0000000..52541aa
--- /dev/null
+++ b/tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithConstantKeys1.sql
@@ -0,0 +1 @@
+select 123 as key, count(1) as total from lineitem group by key order by key, total;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithExpressionKeys1.sql
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithExpressionKeys1.sql
b/tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithExpressionKeys1.sql
new file mode 100644
index 0000000..4dbc2ce
--- /dev/null
+++ b/tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithExpressionKeys1.sql
@@ -0,0 +1 @@
+select upper(lower(l_orderkey::text)) as key, count(1) as total from lineitem group by key
order by upper(lower(l_orderkey::text)), total;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithExpressionKeys2.sql
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithExpressionKeys2.sql
b/tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithExpressionKeys2.sql
new file mode 100644
index 0000000..c98c121
--- /dev/null
+++ b/tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithExpressionKeys2.sql
@@ -0,0 +1 @@
+select upper(lower(l_orderkey::text)) as key, count(1) as total from lineitem group by upper(lower(l_orderkey::text))
order by upper(lower(l_orderkey::text)), total;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.sql
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.sql
b/tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.sql
new file mode 100644
index 0000000..334c161
--- /dev/null
+++ b/tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.sql
@@ -0,0 +1 @@
+select c_custkey, orders.o_orderkey, 'val' as val from customer left outer join orders on
c_custkey = o_orderkey;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.sql
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.sql
b/tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.sql
new file mode 100644
index 0000000..3256e28
--- /dev/null
+++ b/tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.sql
@@ -0,0 +1 @@
+select c_custkey, o.o_orderkey, 'val' as val from customer left outer join (select * from
orders) o on c_custkey = o.o_orderkey
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-core/tajo-core-backend/src/test/resources/results/TestGroupByQuery/testGroupByWithExpressionKeys1.result
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/resources/results/TestGroupByQuery/testGroupByWithExpressionKeys1.result
b/tajo-core/tajo-core-backend/src/test/resources/results/TestGroupByQuery/testGroupByWithExpressionKeys1.result
new file mode 100644
index 0000000..d1f1282
--- /dev/null
+++ b/tajo-core/tajo-core-backend/src/test/resources/results/TestGroupByQuery/testGroupByWithExpressionKeys1.result
@@ -0,0 +1,5 @@
+key,total
+-------------------------------
+1,2
+2,1
+3,2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-core/tajo-core-backend/src/test/resources/results/TestGroupByQuery/testGroupByWithExpressionKeys2.result
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/resources/results/TestGroupByQuery/testGroupByWithExpressionKeys2.result
b/tajo-core/tajo-core-backend/src/test/resources/results/TestGroupByQuery/testGroupByWithExpressionKeys2.result
new file mode 100644
index 0000000..d1f1282
--- /dev/null
+++ b/tajo-core/tajo-core-backend/src/test/resources/results/TestGroupByQuery/testGroupByWithExpressionKeys2.result
@@ -0,0 +1,5 @@
+key,total
+-------------------------------
+1,2
+2,1
+3,2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-core/tajo-core-backend/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.result
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.result
b/tajo-core/tajo-core-backend/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.result
new file mode 100644
index 0000000..ed28172
--- /dev/null
+++ b/tajo-core/tajo-core-backend/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.result
@@ -0,0 +1,7 @@
+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

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/179a707f/tajo-core/tajo-core-backend/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.result
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.result
b/tajo-core/tajo-core-backend/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.result
new file mode 100644
index 0000000..ed28172
--- /dev/null
+++ b/tajo-core/tajo-core-backend/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.result
@@ -0,0 +1,7 @@
+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


Mime
View raw message