hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From athu...@apache.org
Subject svn commit: r740572 - in /hadoop/hive/branches/branch-0.2: ./ ql/src/java/org/apache/hadoop/hive/ql/exec/ ql/src/java/org/apache/hadoop/hive/ql/parse/ ql/src/test/queries/clientpositive/ ql/src/test/results/clientpositive/ ql/src/test/results/compiler/...
Date Wed, 04 Feb 2009 01:35:39 GMT
Author: athusoo
Date: Wed Feb  4 01:35:38 2009
New Revision: 740572

URL: http://svn.apache.org/viewvc?rev=740572&view=rev
Log:
HIVE-262. Fix for joins wherein a merged join having and outer or
right outer join gave spurious rows in join. (Namit Jain via athusoo)


Added:
    hadoop/hive/branches/branch-0.2/ql/src/test/queries/clientpositive/join20.q
    hadoop/hive/branches/branch-0.2/ql/src/test/queries/clientpositive/join21.q
    hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join20.q.out
    hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join21.q.out
Modified:
    hadoop/hive/branches/branch-0.2/CHANGES.txt
    hadoop/hive/branches/branch-0.2/ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java
    hadoop/hive/branches/branch-0.2/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
    hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join12.q.out
    hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join19.q.out
    hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join3.q.out
    hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join7.q.out
    hadoop/hive/branches/branch-0.2/ql/src/test/results/compiler/plan/join3.q.xml
    hadoop/hive/branches/branch-0.2/ql/src/test/results/compiler/plan/join7.q.xml

Modified: hadoop/hive/branches/branch-0.2/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.2/CHANGES.txt?rev=740572&r1=740571&r2=740572&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.2/CHANGES.txt (original)
+++ hadoop/hive/branches/branch-0.2/CHANGES.txt Wed Feb  4 01:35:38 2009
@@ -1,17 +1,5 @@
 Hive Change Log
 
-Trunk (unreleased changes)
-
-  INCOMPATIBLE CHANGES
-
-  NEW FEATURES
-
-  IMPROVEMENTS
-
-  OPTIMIZATIONS
-
-  BUG FIXES
-
 Release 0.2.0 - Unreleased
 
   INCOMPATIBLE CHANGES
@@ -278,3 +266,6 @@
     private members of the records in calculating the avg size of the
     rows and we were also not estimating variable length columns 
     properly. (Namit Jain via athusoo)
+
+    HIVE-262. Fix for joins wherein a merged join having and outer or
+    right outer join gave spurious rows in join. (Namit Jain via athusoo)

Modified: hadoop/hive/branches/branch-0.2/ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.2/ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java?rev=740572&r1=740571&r2=740572&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.2/ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java
(original)
+++ hadoop/hive/branches/branch-0.2/ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java
Wed Feb  4 01:35:38 2009
@@ -305,10 +305,20 @@
   private Vector<boolean[]> joinObjectsRightOuterJoin(
       Vector<boolean[]> resNulls, Vector<boolean[]> inputNulls,
       ArrayList<Object> newObj, IntermediateObject intObj, int left,
-      boolean newObjNull) {
+      boolean newObjNull, boolean firstRow) {
     if (newObjNull)
       return resNulls;
-    boolean allOldObjsNull = true;
+
+    if (inputNulls.isEmpty() && firstRow) {
+      boolean[] newNulls = new boolean[intObj.getCurSize()];
+      for (int i = 0; i < intObj.getCurSize() - 1; i++)
+        newNulls[i] = true;
+      newNulls[intObj.getCurSize()-1] = newObjNull;
+      resNulls.add(newNulls);
+      return resNulls;
+    }
+
+    boolean allOldObjsNull = firstRow;
 
     Iterator<boolean[]> nullsIter = inputNulls.iterator();
     while (nullsIter.hasNext()) {
@@ -334,6 +344,7 @@
         for (int i = 0; i < intObj.getCurSize() - 1; i++)
           newNulls[i] = true;
         newNulls[oldNulls.length] = newObjNull;
+        resNulls.add(newNulls);
         return resNulls;
       }
     }
@@ -343,7 +354,7 @@
   private Vector<boolean[]> joinObjectsFullOuterJoin(
       Vector<boolean[]> resNulls, Vector<boolean[]> inputNulls,
       ArrayList<Object> newObj, IntermediateObject intObj, int left,
-      boolean newObjNull) {
+      boolean newObjNull, boolean firstRow) {
     if (newObjNull) {
       Iterator<boolean[]> nullsIter = inputNulls.iterator();
       while (nullsIter.hasNext()) {
@@ -356,7 +367,16 @@
       return resNulls;
     }
 
-    boolean allOldObjsNull = true;
+    if (inputNulls.isEmpty() && firstRow) {
+      boolean[] newNulls = new boolean[intObj.getCurSize()];
+      for (int i = 0; i < intObj.getCurSize() - 1; i++)
+        newNulls[i] = true;
+      newNulls[intObj.getCurSize()-1] = newObjNull;
+      resNulls.add(newNulls);
+      return resNulls;
+    }
+
+    boolean allOldObjsNull = firstRow;
 
     Iterator<boolean[]> nullsIter = inputNulls.iterator();
     while (nullsIter.hasNext()) {
@@ -405,7 +425,8 @@
    * inner join. The outer joins are processed appropriately.
    */
   private Vector<boolean[]> joinObjects(Vector<boolean[]> inputNulls,
-      ArrayList<Object> newObj, IntermediateObject intObj, int joinPos) {
+                                        ArrayList<Object> newObj, IntermediateObject
intObj, 
+                                        int joinPos, boolean firstRow) {
     Vector<boolean[]> resNulls = new Vector<boolean[]>();
     boolean newObjNull = newObj == dummyObj[joinPos] ? true : false;
     if (joinPos == 0) {
@@ -422,7 +443,7 @@
 
     // process all nulls for RIGHT and FULL OUTER JOINS
     if (((type == joinDesc.RIGHT_OUTER_JOIN) || (type == joinDesc.FULL_OUTER_JOIN))
-        && !newObjNull && (inputNulls == null)) {
+        && !newObjNull && (inputNulls == null) && firstRow) {
       boolean[] newNulls = new boolean[intObj.getCurSize()];
       for (int i = 0; i < newNulls.length - 1; i++)
         newNulls[i] = true;
@@ -442,10 +463,10 @@
           left, newObjNull);
     else if (type == joinDesc.RIGHT_OUTER_JOIN)
       return joinObjectsRightOuterJoin(resNulls, inputNulls, newObj, intObj,
-          left, newObjNull);
+                                       left, newObjNull, firstRow);
     assert (type == joinDesc.FULL_OUTER_JOIN);
     return joinObjectsFullOuterJoin(resNulls, inputNulls, newObj, intObj, left,
-        newObjNull);
+                                    newObjNull, firstRow);
   }
 
   /*
@@ -456,7 +477,8 @@
    * are accounted for, the output is forwared appropriately.
    */
   private void genObject(Vector<boolean[]> inputNulls, int aliasNum,
-      IntermediateObject intObj) throws HiveException {
+                         IntermediateObject intObj, boolean firstRow) throws HiveException
{
+    boolean childFirstRow = firstRow;
     if (aliasNum < numValues) {
       Iterator<ArrayList<Object>> aliasRes = storage.get(order[aliasNum])
           .iterator();
@@ -465,9 +487,10 @@
         ArrayList<Object> newObj = aliasRes.next();
         intObj.pushObj(newObj);
         Vector<boolean[]> newNulls = joinObjects(inputNulls, newObj, intObj,
-            aliasNum);
-        genObject(newNulls, aliasNum + 1, intObj);
+                                                 aliasNum, childFirstRow);
+        genObject(newNulls, aliasNum + 1, intObj, firstRow);
         intObj.popObj();
+        firstRow = false;
       }
       iterators.pop();
     } else {
@@ -506,7 +529,7 @@
     }
 
     LOG.trace("calling genObject");
-    genObject(null, 0, new IntermediateObject(new ArrayList[numValues], 0));
+    genObject(null, 0, new IntermediateObject(new ArrayList[numValues], 0), true);
     LOG.trace("called genObject");
   }
 

Modified: hadoop/hive/branches/branch-0.2/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.2/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java?rev=740572&r1=740571&r2=740572&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.2/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
(original)
+++ hadoop/hive/branches/branch-0.2/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Wed Feb  4 01:35:38 2009
@@ -2618,8 +2618,8 @@
       if (nodeCondn.getLeft() == 0)
         nodeCondn.setLeft(pos);
       else
-        nodeCondn.setLeft(nodeCondn.getLeft() + targetCondnsSize - 1);
-      nodeCondn.setRight(nodeCondn.getRight() + targetCondnsSize - 1);
+        nodeCondn.setLeft(nodeCondn.getLeft() + targetCondnsSize);
+      nodeCondn.setRight(nodeCondn.getRight() + targetCondnsSize);
       newCondns[targetCondnsSize + i] = nodeCondn;
     }
 

Added: hadoop/hive/branches/branch-0.2/ql/src/test/queries/clientpositive/join20.q
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.2/ql/src/test/queries/clientpositive/join20.q?rev=740572&view=auto
==============================================================================
--- hadoop/hive/branches/branch-0.2/ql/src/test/queries/clientpositive/join20.q (added)
+++ hadoop/hive/branches/branch-0.2/ql/src/test/queries/clientpositive/join20.q Wed Feb  4
01:35:38 2009
@@ -0,0 +1,10 @@
+EXPLAIN
+SELECT * FROM src src1 JOIN src src2 ON (src1.key = src2.key AND src1.key < 10) RIGHT
OUTER JOIN src src3 ON (src1.key = src3.key AND src3.key < 20);
+
+SELECT * FROM src src1 JOIN src src2 ON (src1.key = src2.key AND src1.key < 10) RIGHT
OUTER JOIN src src3 ON (src1.key = src3.key AND src3.key < 20);
+
+
+EXPLAIN
+SELECT * FROM src src1 JOIN src src2 ON (src1.key = src2.key AND src1.key < 10 AND src2.key
< 15) RIGHT OUTER JOIN src src3 ON (src1.key = src3.key AND src3.key < 20);
+
+SELECT * FROM src src1 JOIN src src2 ON (src1.key = src2.key AND src1.key < 10 AND src2.key
< 15) RIGHT OUTER JOIN src src3 ON (src1.key = src3.key AND src3.key < 20);

Added: hadoop/hive/branches/branch-0.2/ql/src/test/queries/clientpositive/join21.q
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.2/ql/src/test/queries/clientpositive/join21.q?rev=740572&view=auto
==============================================================================
--- hadoop/hive/branches/branch-0.2/ql/src/test/queries/clientpositive/join21.q (added)
+++ hadoop/hive/branches/branch-0.2/ql/src/test/queries/clientpositive/join21.q Wed Feb  4
01:35:38 2009
@@ -0,0 +1,4 @@
+EXPLAIN
+SELECT * FROM src src1 LEFT OUTER JOIN src src2 ON (src1.key = src2.key AND src1.key <
10 AND src2.key > 10) RIGHT OUTER JOIN src src3 ON (src2.key = src3.key AND src3.key <
10);
+
+SELECT * FROM src src1 LEFT OUTER JOIN src src2 ON (src1.key = src2.key AND src1.key <
10 AND src2.key > 10) RIGHT OUTER JOIN src src3 ON (src2.key = src3.key AND src3.key <
10);

Modified: hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join12.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join12.q.out?rev=740572&r1=740571&r2=740572&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join12.q.out (original)
+++ hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join12.q.out Wed Feb
 4 01:35:38 2009
@@ -84,7 +84,7 @@
         Join Operator
           condition map:
                Inner Join 0 to 1
-               Inner Join 0 to 1
+               Inner Join 0 to 2
           condition expressions:
             0 {VALUE.0} {VALUE.1}
             1 {VALUE.0} {VALUE.1}

Modified: hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join19.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join19.q.out?rev=740572&r1=740571&r2=740572&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join19.q.out (original)
+++ hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join19.q.out Wed Feb
 4 01:35:38 2009
@@ -110,7 +110,7 @@
         Join Operator
           condition map:
                Inner Join 0 to 1
-               Inner Join 0 to 1
+               Inner Join 0 to 2
           condition expressions:
             0 {VALUE.0}
             1 {VALUE.0} {VALUE.1}
@@ -212,7 +212,7 @@
         Join Operator
           condition map:
                Inner Join 0 to 1
-               Inner Join 1 to 1
+               Inner Join 1 to 2
           condition expressions:
             0 {VALUE.0} {VALUE.1} {VALUE.2} {VALUE.3} {VALUE.4}
             1 {VALUE.0}

Added: hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join20.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join20.q.out?rev=740572&view=auto
==============================================================================
--- hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join20.q.out (added)
+++ hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join20.q.out Wed Feb
 4 01:35:38 2009
@@ -0,0 +1,336 @@
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_RIGHTOUTERJOIN (TOK_JOIN (TOK_TABREF src src1) (TOK_TABREF src
src2) (AND (= (TOK_COLREF src1 key) (TOK_COLREF src2 key)) (< (TOK_COLREF src1 key) 10)))
(TOK_TABREF src src3) (AND (= (TOK_COLREF src1 key) (TOK_COLREF src3 key)) (< (TOK_COLREF
src3 key) 20)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR
TOK_ALLCOLREF))))
+
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Alias -> Map Operator Tree:
+        src2 
+            Reduce Output Operator
+              key expressions:
+                    expr: key
+                    type: string
+              sort order: +
+              Map-reduce partition columns:
+                    expr: key
+                    type: string
+              tag: 1
+              value expressions:
+                    expr: key
+                    type: string
+                    expr: value
+                    type: string
+        src3 
+            Filter Operator
+              predicate:
+                  expr: (UDFToDouble(key) < UDFToDouble(20))
+                  type: boolean
+              Reduce Output Operator
+                key expressions:
+                      expr: key
+                      type: string
+                sort order: +
+                Map-reduce partition columns:
+                      expr: key
+                      type: string
+                tag: 2
+                value expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+        src1 
+            Filter Operator
+              predicate:
+                  expr: (UDFToDouble(key) < UDFToDouble(10))
+                  type: boolean
+              Reduce Output Operator
+                key expressions:
+                      expr: key
+                      type: string
+                sort order: +
+                Map-reduce partition columns:
+                      expr: key
+                      type: string
+                tag: 0
+                value expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+      Reduce Operator Tree:
+        Join Operator
+          condition map:
+               Inner Join 0 to 1
+               Right Outer Join0 to 2
+          condition expressions:
+            0 {VALUE.0} {VALUE.1}
+            1 {VALUE.0} {VALUE.1}
+            2 {VALUE.0} {VALUE.1}
+          Select Operator
+            expressions:
+                  expr: 0
+                  type: string
+                  expr: 1
+                  type: string
+                  expr: 2
+                  type: string
+                  expr: 3
+                  type: string
+                  expr: 4
+                  type: string
+                  expr: 5
+                  type: string
+            File Output Operator
+              compressed: false
+              table:
+                  input format: org.apache.hadoop.mapred.TextInputFormat
+                  output format: org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+
+
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+NULL	NULL	NULL	NULL	10	val_10
+NULL	NULL	NULL	NULL	11	val_11
+NULL	NULL	NULL	NULL	12	val_12
+NULL	NULL	NULL	NULL	12	val_12
+NULL	NULL	NULL	NULL	15	val_15
+NULL	NULL	NULL	NULL	15	val_15
+NULL	NULL	NULL	NULL	17	val_17
+NULL	NULL	NULL	NULL	18	val_18
+NULL	NULL	NULL	NULL	18	val_18
+NULL	NULL	NULL	NULL	19	val_19
+2	val_2	2	val_2	2	val_2
+4	val_4	4	val_4	4	val_4
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+8	val_8	8	val_8	8	val_8
+9	val_9	9	val_9	9	val_9
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_RIGHTOUTERJOIN (TOK_JOIN (TOK_TABREF src src1) (TOK_TABREF src
src2) (AND (AND (= (TOK_COLREF src1 key) (TOK_COLREF src2 key)) (< (TOK_COLREF src1 key)
10)) (< (TOK_COLREF src2 key) 15))) (TOK_TABREF src src3) (AND (= (TOK_COLREF src1 key)
(TOK_COLREF src3 key)) (< (TOK_COLREF src3 key) 20)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR
TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
+
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Alias -> Map Operator Tree:
+        src2 
+            Filter Operator
+              predicate:
+                  expr: (UDFToDouble(key) < UDFToDouble(15))
+                  type: boolean
+              Reduce Output Operator
+                key expressions:
+                      expr: key
+                      type: string
+                sort order: +
+                Map-reduce partition columns:
+                      expr: key
+                      type: string
+                tag: 1
+                value expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+        src3 
+            Filter Operator
+              predicate:
+                  expr: (UDFToDouble(key) < UDFToDouble(20))
+                  type: boolean
+              Reduce Output Operator
+                key expressions:
+                      expr: key
+                      type: string
+                sort order: +
+                Map-reduce partition columns:
+                      expr: key
+                      type: string
+                tag: 2
+                value expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+        src1 
+            Filter Operator
+              predicate:
+                  expr: (UDFToDouble(key) < UDFToDouble(10))
+                  type: boolean
+              Reduce Output Operator
+                key expressions:
+                      expr: key
+                      type: string
+                sort order: +
+                Map-reduce partition columns:
+                      expr: key
+                      type: string
+                tag: 0
+                value expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+      Reduce Operator Tree:
+        Join Operator
+          condition map:
+               Inner Join 0 to 1
+               Right Outer Join0 to 2
+          condition expressions:
+            0 {VALUE.0} {VALUE.1}
+            1 {VALUE.0} {VALUE.1}
+            2 {VALUE.0} {VALUE.1}
+          Select Operator
+            expressions:
+                  expr: 0
+                  type: string
+                  expr: 1
+                  type: string
+                  expr: 2
+                  type: string
+                  expr: 3
+                  type: string
+                  expr: 4
+                  type: string
+                  expr: 5
+                  type: string
+            File Output Operator
+              compressed: false
+              table:
+                  input format: org.apache.hadoop.mapred.TextInputFormat
+                  output format: org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+
+
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+0	val_0	0	val_0	0	val_0
+NULL	NULL	NULL	NULL	10	val_10
+NULL	NULL	NULL	NULL	11	val_11
+NULL	NULL	NULL	NULL	12	val_12
+NULL	NULL	NULL	NULL	12	val_12
+NULL	NULL	NULL	NULL	15	val_15
+NULL	NULL	NULL	NULL	15	val_15
+NULL	NULL	NULL	NULL	17	val_17
+NULL	NULL	NULL	NULL	18	val_18
+NULL	NULL	NULL	NULL	18	val_18
+NULL	NULL	NULL	NULL	19	val_19
+2	val_2	2	val_2	2	val_2
+4	val_4	4	val_4	4	val_4
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+5	val_5	5	val_5	5	val_5
+8	val_8	8	val_8	8	val_8
+9	val_9	9	val_9	9	val_9

Added: hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join21.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join21.q.out?rev=740572&view=auto
==============================================================================
--- hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join21.q.out (added)
+++ hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join21.q.out Wed Feb
 4 01:35:38 2009
@@ -0,0 +1,112 @@
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_RIGHTOUTERJOIN (TOK_LEFTOUTERJOIN (TOK_TABREF src src1) (TOK_TABREF
src src2) (AND (AND (= (TOK_COLREF src1 key) (TOK_COLREF src2 key)) (< (TOK_COLREF src1
key) 10)) (> (TOK_COLREF src2 key) 10))) (TOK_TABREF src src3) (AND (= (TOK_COLREF src2
key) (TOK_COLREF src3 key)) (< (TOK_COLREF src3 key) 10)))) (TOK_INSERT (TOK_DESTINATION
(TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
+
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Alias -> Map Operator Tree:
+        src2 
+            Filter Operator
+              predicate:
+                  expr: (UDFToDouble(key) > UDFToDouble(10))
+                  type: boolean
+              Reduce Output Operator
+                key expressions:
+                      expr: key
+                      type: string
+                sort order: +
+                Map-reduce partition columns:
+                      expr: key
+                      type: string
+                tag: 1
+                value expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+        src3 
+            Filter Operator
+              predicate:
+                  expr: (UDFToDouble(key) < UDFToDouble(10))
+                  type: boolean
+              Reduce Output Operator
+                key expressions:
+                      expr: key
+                      type: string
+                sort order: +
+                Map-reduce partition columns:
+                      expr: key
+                      type: string
+                tag: 2
+                value expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+        src1 
+            Filter Operator
+              predicate:
+                  expr: (UDFToDouble(key) < UDFToDouble(10))
+                  type: boolean
+              Reduce Output Operator
+                key expressions:
+                      expr: key
+                      type: string
+                sort order: +
+                Map-reduce partition columns:
+                      expr: key
+                      type: string
+                tag: 0
+                value expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+      Reduce Operator Tree:
+        Join Operator
+          condition map:
+               Left Outer Join0 to 1
+               Right Outer Join1 to 2
+          condition expressions:
+            0 {VALUE.0} {VALUE.1}
+            1 {VALUE.0} {VALUE.1}
+            2 {VALUE.0} {VALUE.1}
+          Select Operator
+            expressions:
+                  expr: 0
+                  type: string
+                  expr: 1
+                  type: string
+                  expr: 2
+                  type: string
+                  expr: 3
+                  type: string
+                  expr: 4
+                  type: string
+                  expr: 5
+                  type: string
+            File Output Operator
+              compressed: false
+              table:
+                  input format: org.apache.hadoop.mapred.TextInputFormat
+                  output format: org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+
+
+NULL	NULL	NULL	NULL	0	val_0
+NULL	NULL	NULL	NULL	0	val_0
+NULL	NULL	NULL	NULL	0	val_0
+NULL	NULL	NULL	NULL	2	val_2
+NULL	NULL	NULL	NULL	4	val_4
+NULL	NULL	NULL	NULL	5	val_5
+NULL	NULL	NULL	NULL	5	val_5
+NULL	NULL	NULL	NULL	5	val_5
+NULL	NULL	NULL	NULL	8	val_8
+NULL	NULL	NULL	NULL	9	val_9

Modified: hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join3.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join3.q.out?rev=740572&r1=740571&r2=740572&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join3.q.out (original)
+++ hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join3.q.out Wed Feb
 4 01:35:38 2009
@@ -62,7 +62,7 @@
         Join Operator
           condition map:
                Inner Join 0 to 1
-               Inner Join 0 to 1
+               Inner Join 0 to 2
           condition expressions:
             0 {VALUE.0}
             1 {VALUE.0}

Modified: hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join7.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join7.q.out?rev=740572&r1=740571&r2=740572&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join7.q.out (original)
+++ hadoop/hive/branches/branch-0.2/ql/src/test/results/clientpositive/join7.q.out Wed Feb
 4 01:35:38 2009
@@ -88,7 +88,7 @@
         Join Operator
           condition map:
                Outer Join 0 to 1
-               Left Outer Join0 to 1
+               Left Outer Join0 to 2
           condition expressions:
             0 {VALUE.0} {VALUE.1}
             1 {VALUE.0} {VALUE.1}

Modified: hadoop/hive/branches/branch-0.2/ql/src/test/results/compiler/plan/join3.q.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.2/ql/src/test/results/compiler/plan/join3.q.xml?rev=740572&r1=740571&r2=740572&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.2/ql/src/test/results/compiler/plan/join3.q.xml (original)
+++ hadoop/hive/branches/branch-0.2/ql/src/test/results/compiler/plan/join3.q.xml Wed Feb
 4 01:35:38 2009
@@ -31,7 +31,7 @@
              <boolean>true</boolean> 
             </void> 
             <void property="sourceDir"> 
-             <string>/data/users/zshao/sync/apache-trunk-HIVE-105/ql/../build/ql/tmp/474048901.10000.insclause-0</string>

+             <string>/data/users/njain/hive1/hive/ql/../build/ql/tmp/101117165.10000.insclause-0</string>

             </void> 
             <void property="table"> 
              <object id="tableDesc0" class="org.apache.hadoop.hive.ql.plan.tableDesc">

@@ -80,7 +80,7 @@
                 </void> 
                 <void method="put"> 
                  <string>location</string> 
-                 <string>file:/data/users/zshao/sync/apache-trunk-HIVE-105/build/ql/test/data/warehouse/dest1</string>

+                 <string>file:/data/users/njain/hive1/hive/build/ql/test/data/warehouse/dest1</string>

                 </void> 
                </object> 
               </void> 
@@ -750,7 +750,7 @@
     <void property="pathToAliases"> 
      <object class="java.util.LinkedHashMap"> 
       <void method="put"> 
-       <string>file:/data/users/zshao/sync/apache-trunk-HIVE-105/build/ql/test/data/warehouse/src</string>

+       <string>file:/data/users/njain/hive1/hive/build/ql/test/data/warehouse/src</string>

        <object class="java.util.ArrayList"> 
         <void method="add"> 
          <string>src2</string> 
@@ -768,7 +768,7 @@
     <void property="pathToPartitionInfo"> 
      <object class="java.util.LinkedHashMap"> 
       <void method="put"> 
-       <string>file:/data/users/zshao/sync/apache-trunk-HIVE-105/build/ql/test/data/warehouse/src</string>

+       <string>file:/data/users/njain/hive1/hive/build/ql/test/data/warehouse/src</string>

        <object class="org.apache.hadoop.hive.ql.plan.partitionDesc"> 
         <void property="partSpec"> 
          <object class="java.util.LinkedHashMap"/> 
@@ -820,7 +820,7 @@
             </void> 
             <void method="put"> 
              <string>location</string> 
-             <string>file:/data/users/zshao/sync/apache-trunk-HIVE-105/build/ql/test/data/warehouse/src</string>

+             <string>file:/data/users/njain/hive1/hive/build/ql/test/data/warehouse/src</string>

             </void> 
            </object> 
           </void> 
@@ -846,7 +846,7 @@
               <void property="conf"> 
                <object class="org.apache.hadoop.hive.ql.plan.fileSinkDesc"> 
                 <void property="dirName"> 
-                 <string>/data/users/zshao/sync/apache-trunk-HIVE-105/ql/../build/ql/tmp/474048901.10000.insclause-0</string>

+                 <string>/data/users/njain/hive1/hive/ql/../build/ql/tmp/101117165.10000.insclause-0</string>

                 </void> 
                 <void property="tableInfo"> 
                  <object idref="tableDesc0"/> 
@@ -952,7 +952,7 @@
           <void index="1"> 
            <object class="org.apache.hadoop.hive.ql.plan.joinCond"> 
             <void property="right"> 
-             <int>1</int> 
+             <int>2</int> 
             </void> 
            </object> 
           </void> 

Modified: hadoop/hive/branches/branch-0.2/ql/src/test/results/compiler/plan/join7.q.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.2/ql/src/test/results/compiler/plan/join7.q.xml?rev=740572&r1=740571&r2=740572&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.2/ql/src/test/results/compiler/plan/join7.q.xml (original)
+++ hadoop/hive/branches/branch-0.2/ql/src/test/results/compiler/plan/join7.q.xml Wed Feb
 4 01:35:38 2009
@@ -1544,7 +1544,7 @@
     <void property="pathToAliases"> 
      <object class="java.util.LinkedHashMap"> 
       <void method="put"> 
-       <string>file:/data/users/zshao/sync/apache-trunk-HIVE-105/build/ql/test/data/warehouse/src</string>

+       <string>file:/data/users/njain/hive1/hive/build/ql/test/data/warehouse/src</string>

        <object class="java.util.ArrayList"> 
         <void method="add"> 
          <string>c:a:src1</string> 
@@ -1562,7 +1562,7 @@
     <void property="pathToPartitionInfo"> 
      <object class="java.util.LinkedHashMap"> 
       <void method="put"> 
-       <string>file:/data/users/zshao/sync/apache-trunk-HIVE-105/build/ql/test/data/warehouse/src</string>

+       <string>file:/data/users/njain/hive1/hive/build/ql/test/data/warehouse/src</string>

        <object class="org.apache.hadoop.hive.ql.plan.partitionDesc"> 
         <void property="partSpec"> 
          <object class="java.util.LinkedHashMap"/> 
@@ -1614,7 +1614,7 @@
             </void> 
             <void method="put"> 
              <string>location</string> 
-             <string>file:/data/users/zshao/sync/apache-trunk-HIVE-105/build/ql/test/data/warehouse/src</string>

+             <string>file:/data/users/njain/hive1/hive/build/ql/test/data/warehouse/src</string>

             </void> 
            </object> 
           </void> 
@@ -1644,7 +1644,7 @@
                   <void property="conf"> 
                    <object class="org.apache.hadoop.hive.ql.plan.fileSinkDesc"> 
                     <void property="dirName"> 
-                     <string>/data/users/zshao/sync/apache-trunk-HIVE-105/ql/../build/ql/tmp/87762372/259536474.10001.insclause-0</string>

+                     <string>/data/users/njain/hive1/hive/ql/../build/ql/tmp/984290950/203044114.10001.insclause-0</string>

                     </void> 
                     <void property="tableInfo"> 
                      <object class="org.apache.hadoop.hive.ql.plan.tableDesc"> 
@@ -2002,7 +2002,7 @@
           <void index="1"> 
            <object class="org.apache.hadoop.hive.ql.plan.joinCond"> 
             <void property="right"> 
-             <int>1</int> 
+             <int>2</int> 
             </void> 
             <void property="type"> 
              <int>1</int> 



Mime
View raw message