hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1439946 [6/9] - in /hive/trunk: common/src/java/org/apache/hadoop/hive/conf/ conf/ ql/src/java/org/apache/hadoop/hive/ql/ ql/src/java/org/apache/hadoop/hive/ql/exec/ ql/src/java/org/apache/hadoop/hive/ql/optimizer/ ql/src/java/org/apache/h...
Date Tue, 29 Jan 2013 15:33:55 GMT
Modified: hive/trunk/ql/src/test/results/clientpositive/join38.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join38.q.out?rev=1439946&r1=1439945&r2=1439946&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join38.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join38.q.out Tue Jan 29 15:33:53 2013
@@ -73,13 +73,12 @@ ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src) a) (TOK_TABREF (TOK_TABNAME tmp) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) col11)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST a))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) col5)) (TOK_SELEXPR (TOK_FUNCTION count 1) count)) (TOK_WHERE (= (. (TOK_TABLE_OR_COL b) col11) 111)) (TOK_GROUPBY (. (TOK_TABLE_OR_COL a) value) (. (TOK_TABLE_OR_COL b) col5))))
 
 STAGE DEPENDENCIES:
-  Stage-4 is a root stage
-  Stage-1 depends on stages: Stage-4
-  Stage-2 depends on stages: Stage-1
+  Stage-3 is a root stage
+  Stage-1 depends on stages: Stage-3
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-4
+  Stage: Stage-3
     Map Reduce Local Work
       Alias -> Map Local Tables:
         a 
@@ -125,62 +124,51 @@ STAGE PLANS:
                   1 [Column[col11]]
                 outputColumnNames: _col1, _col9, _col15
                 Position of Big Table: 1
-                File Output Operator
-                  compressed: false
-                  GlobalTableId: 0
-                  table:
-                      input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-      Local Work:
-        Map Reduce Local Work
-
-  Stage: Stage-2
-    Map Reduce
-      Alias -> Map Operator Tree:
-#### A masked pattern was here ####
-          Select Operator
-            expressions:
-                  expr: _col1
-                  type: string
-                  expr: _col9
-                  type: string
-                  expr: _col15
-                  type: string
-            outputColumnNames: _col1, _col9, _col15
-            Select Operator
-              expressions:
-                    expr: _col1
-                    type: string
-                    expr: _col9
-                    type: string
-              outputColumnNames: _col1, _col9
-              Group By Operator
-                aggregations:
-                      expr: count(1)
-                bucketGroup: false
-                keys:
-                      expr: _col1
-                      type: string
-                      expr: _col9
-                      type: string
-                mode: hash
-                outputColumnNames: _col0, _col1, _col2
-                Reduce Output Operator
-                  key expressions:
-                        expr: _col0
-                        type: string
+                Select Operator
+                  expressions:
                         expr: _col1
                         type: string
-                  sort order: ++
-                  Map-reduce partition columns:
-                        expr: _col0
+                        expr: _col9
                         type: string
-                        expr: _col1
+                        expr: _col15
                         type: string
-                  tag: -1
-                  value expressions:
-                        expr: _col2
-                        type: bigint
+                  outputColumnNames: _col1, _col9, _col15
+                  Select Operator
+                    expressions:
+                          expr: _col1
+                          type: string
+                          expr: _col9
+                          type: string
+                    outputColumnNames: _col1, _col9
+                    Group By Operator
+                      aggregations:
+                            expr: count(1)
+                      bucketGroup: false
+                      keys:
+                            expr: _col1
+                            type: string
+                            expr: _col9
+                            type: string
+                      mode: hash
+                      outputColumnNames: _col0, _col1, _col2
+                      Reduce Output Operator
+                        key expressions:
+                              expr: _col0
+                              type: string
+                              expr: _col1
+                              type: string
+                        sort order: ++
+                        Map-reduce partition columns:
+                              expr: _col0
+                              type: string
+                              expr: _col1
+                              type: string
+                        tag: -1
+                        value expressions:
+                              expr: _col2
+                              type: bigint
+      Local Work:
+        Map Reduce Local Work
       Reduce Operator Tree:
         Group By Operator
           aggregations:

Modified: hive/trunk/ql/src/test/results/clientpositive/mapjoin_distinct.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/mapjoin_distinct.q.out?rev=1439946&r1=1439945&r2=1439946&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/mapjoin_distinct.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/mapjoin_distinct.q.out Tue Jan 29 15:33:53 2013
@@ -14,14 +14,13 @@ ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcpart) c) (TOK_TABREF (TOK_TABNAME srcpart) d) (AND (AND (= (. (TOK_TABLE_OR_COL c) key) (. (TOK_TABLE_OR_COL d) key)) (= (. (TOK_TABLE_OR_COL c) ds) '2008-04-08')) (= (. (TOK_TABLE_OR_COL d) ds) '2008-04-08')))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECTDI (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST d))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) value)))))
 
 STAGE DEPENDENCIES:
-  Stage-5 is a root stage
-  Stage-1 depends on stages: Stage-5
+  Stage-4 is a root stage
+  Stage-1 depends on stages: Stage-4
   Stage-2 depends on stages: Stage-1
-  Stage-3 depends on stages: Stage-2
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-5
+  Stage: Stage-4
     Map Reduce Local Work
       Alias -> Map Local Tables:
         d 
@@ -59,45 +58,34 @@ STAGE PLANS:
                 1 [Column[key]]
               outputColumnNames: _col1
               Position of Big Table: 0
-              File Output Operator
-                compressed: false
-                GlobalTableId: 0
-                table:
-                    input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                    output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-      Local Work:
-        Map Reduce Local Work
-
-  Stage: Stage-2
-    Map Reduce
-      Alias -> Map Operator Tree:
-#### A masked pattern was here ####
-          Select Operator
-            expressions:
-                  expr: _col1
-                  type: string
-            outputColumnNames: _col1
-            Select Operator
-              expressions:
-                    expr: _col1
-                    type: string
-              outputColumnNames: _col1
-              Group By Operator
-                bucketGroup: false
-                keys:
+              Select Operator
+                expressions:
                       expr: _col1
                       type: string
-                mode: hash
-                outputColumnNames: _col0
-                Reduce Output Operator
-                  key expressions:
-                        expr: _col0
+                outputColumnNames: _col1
+                Select Operator
+                  expressions:
+                        expr: _col1
                         type: string
-                  sort order: +
-                  Map-reduce partition columns:
-                        expr: rand()
-                        type: double
-                  tag: -1
+                  outputColumnNames: _col1
+                  Group By Operator
+                    bucketGroup: false
+                    keys:
+                          expr: _col1
+                          type: string
+                    mode: hash
+                    outputColumnNames: _col0
+                    Reduce Output Operator
+                      key expressions:
+                            expr: _col0
+                            type: string
+                      sort order: +
+                      Map-reduce partition columns:
+                            expr: rand()
+                            type: double
+                      tag: -1
+      Local Work:
+        Map Reduce Local Work
       Reduce Operator Tree:
         Group By Operator
           bucketGroup: false
@@ -113,7 +101,7 @@ STAGE PLANS:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
 
-  Stage: Stage-3
+  Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
 #### A masked pattern was here ####
@@ -195,13 +183,12 @@ ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcpart) c) (TOK_TABREF (TOK_TABNAME srcpart) d) (AND (AND (= (. (TOK_TABLE_OR_COL c) key) (. (TOK_TABLE_OR_COL d) key)) (= (. (TOK_TABLE_OR_COL c) ds) '2008-04-08')) (= (. (TOK_TABLE_OR_COL d) ds) '2008-04-08')))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECTDI (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST d))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) value)))))
 
 STAGE DEPENDENCIES:
-  Stage-4 is a root stage
-  Stage-1 depends on stages: Stage-4
-  Stage-2 depends on stages: Stage-1
+  Stage-3 is a root stage
+  Stage-1 depends on stages: Stage-3
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-4
+  Stage: Stage-3
     Map Reduce Local Work
       Alias -> Map Local Tables:
         d 
@@ -239,45 +226,34 @@ STAGE PLANS:
                 1 [Column[key]]
               outputColumnNames: _col1
               Position of Big Table: 0
-              File Output Operator
-                compressed: false
-                GlobalTableId: 0
-                table:
-                    input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                    output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-      Local Work:
-        Map Reduce Local Work
-
-  Stage: Stage-2
-    Map Reduce
-      Alias -> Map Operator Tree:
-#### A masked pattern was here ####
-          Select Operator
-            expressions:
-                  expr: _col1
-                  type: string
-            outputColumnNames: _col1
-            Select Operator
-              expressions:
-                    expr: _col1
-                    type: string
-              outputColumnNames: _col1
-              Group By Operator
-                bucketGroup: false
-                keys:
+              Select Operator
+                expressions:
                       expr: _col1
                       type: string
-                mode: hash
-                outputColumnNames: _col0
-                Reduce Output Operator
-                  key expressions:
-                        expr: _col0
+                outputColumnNames: _col1
+                Select Operator
+                  expressions:
+                        expr: _col1
                         type: string
-                  sort order: +
-                  Map-reduce partition columns:
-                        expr: _col0
-                        type: string
-                  tag: -1
+                  outputColumnNames: _col1
+                  Group By Operator
+                    bucketGroup: false
+                    keys:
+                          expr: _col1
+                          type: string
+                    mode: hash
+                    outputColumnNames: _col0
+                    Reduce Output Operator
+                      key expressions:
+                            expr: _col0
+                            type: string
+                      sort order: +
+                      Map-reduce partition columns:
+                            expr: _col0
+                            type: string
+                      tag: -1
+      Local Work:
+        Map Reduce Local Work
       Reduce Operator Tree:
         Group By Operator
           bucketGroup: false
@@ -347,14 +323,13 @@ ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcpart) c) (TOK_TABREF (TOK_TABNAME srcpart) d) (AND (AND (= (. (TOK_TABLE_OR_COL c) key) (. (TOK_TABLE_OR_COL d) key)) (= (. (TOK_TABLE_OR_COL c) ds) '2008-04-08')) (= (. (TOK_TABLE_OR_COL d) ds) '2008-04-08')))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECTDI (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST d))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) value)))))
 
 STAGE DEPENDENCIES:
-  Stage-5 is a root stage
-  Stage-1 depends on stages: Stage-5
+  Stage-4 is a root stage
+  Stage-1 depends on stages: Stage-4
   Stage-2 depends on stages: Stage-1
-  Stage-3 depends on stages: Stage-2
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-5
+  Stage: Stage-4
     Map Reduce Local Work
       Alias -> Map Local Tables:
         d 
@@ -392,38 +367,27 @@ STAGE PLANS:
                 1 [Column[key]]
               outputColumnNames: _col1
               Position of Big Table: 0
-              File Output Operator
-                compressed: false
-                GlobalTableId: 0
-                table:
-                    input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                    output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-      Local Work:
-        Map Reduce Local Work
-
-  Stage: Stage-2
-    Map Reduce
-      Alias -> Map Operator Tree:
-#### A masked pattern was here ####
-          Select Operator
-            expressions:
-                  expr: _col1
-                  type: string
-            outputColumnNames: _col1
-            Select Operator
-              expressions:
-                    expr: _col1
-                    type: string
-              outputColumnNames: _col1
-              Reduce Output Operator
-                key expressions:
+              Select Operator
+                expressions:
                       expr: _col1
                       type: string
-                sort order: +
-                Map-reduce partition columns:
-                      expr: rand()
-                      type: double
-                tag: -1
+                outputColumnNames: _col1
+                Select Operator
+                  expressions:
+                        expr: _col1
+                        type: string
+                  outputColumnNames: _col1
+                  Reduce Output Operator
+                    key expressions:
+                          expr: _col1
+                          type: string
+                    sort order: +
+                    Map-reduce partition columns:
+                          expr: rand()
+                          type: double
+                    tag: -1
+      Local Work:
+        Map Reduce Local Work
       Reduce Operator Tree:
         Group By Operator
           bucketGroup: false
@@ -439,7 +403,7 @@ STAGE PLANS:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
 
-  Stage: Stage-3
+  Stage: Stage-2
     Map Reduce
       Alias -> Map Operator Tree:
 #### A masked pattern was here ####
@@ -521,13 +485,12 @@ ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcpart) c) (TOK_TABREF (TOK_TABNAME srcpart) d) (AND (AND (= (. (TOK_TABLE_OR_COL c) key) (. (TOK_TABLE_OR_COL d) key)) (= (. (TOK_TABLE_OR_COL c) ds) '2008-04-08')) (= (. (TOK_TABLE_OR_COL d) ds) '2008-04-08')))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECTDI (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST d))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL c) value)))))
 
 STAGE DEPENDENCIES:
-  Stage-4 is a root stage
-  Stage-1 depends on stages: Stage-4
-  Stage-2 depends on stages: Stage-1
+  Stage-3 is a root stage
+  Stage-1 depends on stages: Stage-3
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-4
+  Stage: Stage-3
     Map Reduce Local Work
       Alias -> Map Local Tables:
         d 
@@ -565,38 +528,27 @@ STAGE PLANS:
                 1 [Column[key]]
               outputColumnNames: _col1
               Position of Big Table: 0
-              File Output Operator
-                compressed: false
-                GlobalTableId: 0
-                table:
-                    input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                    output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-      Local Work:
-        Map Reduce Local Work
-
-  Stage: Stage-2
-    Map Reduce
-      Alias -> Map Operator Tree:
-#### A masked pattern was here ####
-          Select Operator
-            expressions:
-                  expr: _col1
-                  type: string
-            outputColumnNames: _col1
-            Select Operator
-              expressions:
-                    expr: _col1
-                    type: string
-              outputColumnNames: _col1
-              Reduce Output Operator
-                key expressions:
+              Select Operator
+                expressions:
                       expr: _col1
                       type: string
-                sort order: +
-                Map-reduce partition columns:
-                      expr: _col1
-                      type: string
-                tag: -1
+                outputColumnNames: _col1
+                Select Operator
+                  expressions:
+                        expr: _col1
+                        type: string
+                  outputColumnNames: _col1
+                  Reduce Output Operator
+                    key expressions:
+                          expr: _col1
+                          type: string
+                    sort order: +
+                    Map-reduce partition columns:
+                          expr: _col1
+                          type: string
+                    tag: -1
+      Local Work:
+        Map Reduce Local Work
       Reduce Operator Tree:
         Group By Operator
           bucketGroup: false

Modified: hive/trunk/ql/src/test/results/clientpositive/mapjoin_filter_on_outerjoin.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/mapjoin_filter_on_outerjoin.q.out?rev=1439946&r1=1439945&r2=1439946&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/mapjoin_filter_on_outerjoin.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/mapjoin_filter_on_outerjoin.q.out Tue Jan 29 15:33:53 2013
@@ -56,13 +56,12 @@ ABSTRACT SYNTAX TREE:
   (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_RIGHTOUTERJOIN (TOK_TABREF (TOK_TABNAME src1)) (TOK_TABREF (TOK_TABNAME src1) src2) (AND (AND (= (. (TOK_TABLE_OR_COL src1) key) (. (TOK_TABLE_OR_COL src2) key)) (< (. (TOK_TABLE_OR_COL src1) key) 10)) (> (. (TOK_TABLE_OR_COL src2) key) 10))) (TOK_TABREF (TOK_TABNAME src) src3) (AND (= (. (TOK_TABLE_OR_COL src2) key) (. (TOK_TABLE_OR_COL src3) key)) (< (. (TOK_TABLE_OR_COL src3) key) 300)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST src1 src2))) (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src1) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src2) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL src3) key)))))
 
 STAGE DEPENDENCIES:
-  Stage-5 is a root stage
-  Stage-1 depends on stages: Stage-5
-  Stage-2 depends on stages: Stage-1
+  Stage-4 is a root stage
+  Stage-1 depends on stages: Stage-4
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-5
+  Stage: Stage-4
     Map Reduce Local Work
       Alias -> Map Local Tables:
         src1 
@@ -146,72 +145,61 @@ STAGE PLANS:
                   2 [Column[key]]
                 outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9
                 Position of Big Table: 2
-                File Output Operator
-                  compressed: false
-                  GlobalTableId: 0
-                  table:
-                      input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                Select Operator
+                  expressions:
+                        expr: _col0
+                        type: string
+                        expr: _col1
+                        type: string
+                        expr: _col4
+                        type: string
+                        expr: _col5
+                        type: string
+                        expr: _col8
+                        type: string
+                        expr: _col9
+                        type: string
+                  outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9
+                  Select Operator
+                    expressions:
+                          expr: _col0
+                          type: string
+                          expr: _col1
+                          type: string
+                          expr: _col4
+                          type: string
+                          expr: _col5
+                          type: string
+                          expr: _col8
+                          type: string
+                          expr: _col9
+                          type: string
+                    outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+                    Reduce Output Operator
+                      key expressions:
+                            expr: _col0
+                            type: string
+                            expr: _col2
+                            type: string
+                            expr: _col4
+                            type: string
+                      sort order: +++
+                      tag: -1
+                      value expressions:
+                            expr: _col0
+                            type: string
+                            expr: _col1
+                            type: string
+                            expr: _col2
+                            type: string
+                            expr: _col3
+                            type: string
+                            expr: _col4
+                            type: string
+                            expr: _col5
+                            type: string
       Local Work:
         Map Reduce Local Work
-
-  Stage: Stage-2
-    Map Reduce
-      Alias -> Map Operator Tree:
-#### A masked pattern was here ####
-          Select Operator
-            expressions:
-                  expr: _col0
-                  type: string
-                  expr: _col1
-                  type: string
-                  expr: _col4
-                  type: string
-                  expr: _col5
-                  type: string
-                  expr: _col8
-                  type: string
-                  expr: _col9
-                  type: string
-            outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9
-            Select Operator
-              expressions:
-                    expr: _col0
-                    type: string
-                    expr: _col1
-                    type: string
-                    expr: _col4
-                    type: string
-                    expr: _col5
-                    type: string
-                    expr: _col8
-                    type: string
-                    expr: _col9
-                    type: string
-              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-              Reduce Output Operator
-                key expressions:
-                      expr: _col0
-                      type: string
-                      expr: _col2
-                      type: string
-                      expr: _col4
-                      type: string
-                sort order: +++
-                tag: -1
-                value expressions:
-                      expr: _col0
-                      type: string
-                      expr: _col1
-                      type: string
-                      expr: _col2
-                      type: string
-                      expr: _col3
-                      type: string
-                      expr: _col4
-                      type: string
-                      expr: _col5
-                      type: string
       Reduce Operator Tree:
         Extract
           File Output Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out?rev=1439946&r1=1439945&r2=1439946&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out Tue Jan 29 15:33:53 2013
@@ -1,24 +1,29 @@
-PREHOOK: query: explain select /*+MAPJOIN(src, src1) */ srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key)
+PREHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+explain select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key)
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select /*+MAPJOIN(src, src1) */ srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key)
+POSTHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+explain select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcpart)) (TOK_TABREF (TOK_TABNAME src)) (= (. (TOK_TABLE_OR_COL srcpart) value) (. (TOK_TABLE_OR_COL src) value))) (TOK_TABREF (TOK_TABNAME src1)) (= (. (TOK_TABLE_OR_COL srcpart) key) (. (TOK_TABLE_OR_COL src1) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST src src1))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL srcpart) key)))))
+  (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcpart)) (TOK_TABREF (TOK_TABNAME src)) (= (. (TOK_TABLE_OR_COL srcpart) value) (. (TOK_TABLE_OR_COL src) value))) (TOK_TABREF (TOK_TABNAME src1)) (= (. (TOK_TABLE_OR_COL srcpart) key) (. (TOK_TABLE_OR_COL src1) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL srcpart) key)))))
 
 STAGE DEPENDENCIES:
-  Stage-6 is a root stage
-  Stage-1 depends on stages: Stage-6
-  Stage-5 depends on stages: Stage-1
-  Stage-2 depends on stages: Stage-5
+  Stage-7 is a root stage
+  Stage-6 depends on stages: Stage-7
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-6
+  Stage: Stage-7
     Map Reduce Local Work
       Alias -> Map Local Tables:
         src 
           Fetch Operator
             limit: -1
+        src1 
+          Fetch Operator
+            limit: -1
       Alias -> Map Local Operator Tree:
         src 
           TableScan
@@ -32,41 +37,6 @@ STAGE PLANS:
                 0 [Column[value]]
                 1 [Column[value]]
               Position of Big Table: 0
-
-  Stage: Stage-1
-    Map Reduce
-      Alias -> Map Operator Tree:
-        srcpart 
-          TableScan
-            alias: srcpart
-            Map Join Operator
-              condition map:
-                   Inner Join 0 to 1
-              condition expressions:
-                0 {key}
-                1 
-              handleSkewJoin: false
-              keys:
-                0 [Column[value]]
-                1 [Column[value]]
-              outputColumnNames: _col0
-              Position of Big Table: 0
-              File Output Operator
-                compressed: false
-                GlobalTableId: 0
-                table:
-                    input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                    output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-      Local Work:
-        Map Reduce Local Work
-
-  Stage: Stage-5
-    Map Reduce Local Work
-      Alias -> Map Local Tables:
-        src1 
-          Fetch Operator
-            limit: -1
-      Alias -> Map Local Operator Tree:
         src1 
           TableScan
             alias: src1
@@ -80,43 +50,47 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-2
+  Stage: Stage-6
     Map Reduce
       Alias -> Map Operator Tree:
-#### A masked pattern was here ####
-          Select Operator
-            expressions:
-                  expr: _col0
-                  type: string
-            outputColumnNames: _col0
+        srcpart 
+          TableScan
+            alias: srcpart
             Map Join Operator
               condition map:
                    Inner Join 0 to 1
               condition expressions:
-                0 {_col0}
+                0 {key}
                 1 
               handleSkewJoin: false
               keys:
-                0 [Column[_col0]]
-                1 [Column[key]]
+                0 [Column[value]]
+                1 [Column[value]]
               outputColumnNames: _col0
               Position of Big Table: 0
-              Select Operator
-                expressions:
-                      expr: _col0
-                      type: string
-                outputColumnNames: _col0
-                Select Operator
-                  expressions:
-                        expr: _col0
-                        type: string
+                Map Join Operator
+                  condition map:
+                       Inner Join 0 to 1
+                  condition expressions:
+                    0 {_col0}
+                    1 
+                  handleSkewJoin: false
+                  keys:
+                    0 [Column[_col0]]
+                    1 [Column[key]]
                   outputColumnNames: _col0
-                  File Output Operator
-                    compressed: false
-                    GlobalTableId: 0
-                    table:
-                        input format: org.apache.hadoop.mapred.TextInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                  Position of Big Table: 0
+                  Select Operator
+                    expressions:
+                          expr: _col0
+                          type: string
+                    outputColumnNames: _col0
+                    File Output Operator
+                      compressed: false
+                      GlobalTableId: 0
+                      table:
+                          input format: org.apache.hadoop.mapred.TextInputFormat
+                          output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
       Local Work:
         Map Reduce Local Work
 
@@ -125,28 +99,29 @@ STAGE PLANS:
       limit: -1
 
 
-PREHOOK: query: explain select /*+MAPJOIN(src, src1) */ count(*) from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key) group by ds
+PREHOOK: query: explain select count(*) from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key) group by ds
 PREHOOK: type: QUERY
-POSTHOOK: query: explain select /*+MAPJOIN(src, src1) */ count(*) from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key) group by ds
+POSTHOOK: query: explain select count(*) from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key) group by ds
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcpart)) (TOK_TABREF (TOK_TABNAME src)) (= (. (TOK_TABLE_OR_COL srcpart) value) (. (TOK_TABLE_OR_COL src) value))) (TOK_TABREF (TOK_TABNAME src1)) (= (. (TOK_TABLE_OR_COL srcpart) key) (. (TOK_TABLE_OR_COL src1) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST src src1))) (TOK_SELEXPR (TOK_FUNCTIONSTAR count))) (TOK_GROUPBY (TOK_TABLE_OR_COL ds))))
+  (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcpart)) (TOK_TABREF (TOK_TABNAME src)) (= (. (TOK_TABLE_OR_COL srcpart) value) (. (TOK_TABLE_OR_COL src) value))) (TOK_TABREF (TOK_TABNAME src1)) (= (. (TOK_TABLE_OR_COL srcpart) key) (. (TOK_TABLE_OR_COL src1) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTIONSTAR count))) (TOK_GROUPBY (TOK_TABLE_OR_COL ds))))
 
 STAGE DEPENDENCIES:
-  Stage-7 is a root stage
-  Stage-1 depends on stages: Stage-7
-  Stage-6 depends on stages: Stage-1
-  Stage-2 depends on stages: Stage-6
-  Stage-3 depends on stages: Stage-2
+  Stage-8 is a root stage
+  Stage-7 depends on stages: Stage-8
+  Stage-3 depends on stages: Stage-7
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-7
+  Stage: Stage-8
     Map Reduce Local Work
       Alias -> Map Local Tables:
         src 
           Fetch Operator
             limit: -1
+        src1 
+          Fetch Operator
+            limit: -1
       Alias -> Map Local Operator Tree:
         src 
           TableScan
@@ -160,41 +135,6 @@ STAGE PLANS:
                 0 [Column[value]]
                 1 [Column[value]]
               Position of Big Table: 0
-
-  Stage: Stage-1
-    Map Reduce
-      Alias -> Map Operator Tree:
-        srcpart 
-          TableScan
-            alias: srcpart
-            Map Join Operator
-              condition map:
-                   Inner Join 0 to 1
-              condition expressions:
-                0 {key} {ds}
-                1 
-              handleSkewJoin: false
-              keys:
-                0 [Column[value]]
-                1 [Column[value]]
-              outputColumnNames: _col0, _col2
-              Position of Big Table: 0
-              File Output Operator
-                compressed: false
-                GlobalTableId: 0
-                table:
-                    input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                    output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-      Local Work:
-        Map Reduce Local Work
-
-  Stage: Stage-6
-    Map Reduce Local Work
-      Alias -> Map Local Tables:
-        src1 
-          Fetch Operator
-            limit: -1
-      Alias -> Map Local Operator Tree:
         src1 
           TableScan
             alias: src1
@@ -208,35 +148,56 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-2
+  Stage: Stage-7
     Map Reduce
       Alias -> Map Operator Tree:
-#### A masked pattern was here ####
-          Select Operator
-            expressions:
-                  expr: _col0
-                  type: string
-                  expr: _col2
-                  type: string
-            outputColumnNames: _col0, _col2
+        srcpart 
+          TableScan
+            alias: srcpart
             Map Join Operator
               condition map:
                    Inner Join 0 to 1
               condition expressions:
-                0 {_col2}
+                0 {key} {ds}
                 1 
               handleSkewJoin: false
               keys:
-                0 [Column[_col0]]
-                1 [Column[key]]
-              outputColumnNames: _col2
+                0 [Column[value]]
+                1 [Column[value]]
+              outputColumnNames: _col0, _col2
               Position of Big Table: 0
-              File Output Operator
-                compressed: false
-                GlobalTableId: 0
-                table:
-                    input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                    output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                Map Join Operator
+                  condition map:
+                       Inner Join 0 to 1
+                  condition expressions:
+                    0 {_col2}
+                    1 
+                  handleSkewJoin: false
+                  keys:
+                    0 [Column[_col0]]
+                    1 [Column[key]]
+                  outputColumnNames: _col2
+                  Position of Big Table: 0
+                  Select Operator
+                    expressions:
+                          expr: _col2
+                          type: string
+                    outputColumnNames: _col2
+                    Group By Operator
+                      aggregations:
+                            expr: count()
+                      bucketGroup: false
+                      keys:
+                            expr: _col2
+                            type: string
+                      mode: hash
+                      outputColumnNames: _col0, _col1
+                      File Output Operator
+                        compressed: false
+                        GlobalTableId: 0
+                        table:
+                            input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                            output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
       Local Work:
         Map Reduce Local Work
 
@@ -244,37 +205,18 @@ STAGE PLANS:
     Map Reduce
       Alias -> Map Operator Tree:
 #### A masked pattern was here ####
-          Select Operator
-            expressions:
-                  expr: _col2
-                  type: string
-            outputColumnNames: _col2
-            Select Operator
-              expressions:
-                    expr: _col2
+            Reduce Output Operator
+              key expressions:
+                    expr: _col0
+                    type: string
+              sort order: +
+              Map-reduce partition columns:
+                    expr: _col0
                     type: string
-              outputColumnNames: _col2
-              Group By Operator
-                aggregations:
-                      expr: count()
-                bucketGroup: false
-                keys:
-                      expr: _col2
-                      type: string
-                mode: hash
-                outputColumnNames: _col0, _col1
-                Reduce Output Operator
-                  key expressions:
-                        expr: _col0
-                        type: string
-                  sort order: +
-                  Map-reduce partition columns:
-                        expr: _col0
-                        type: string
-                  tag: -1
-                  value expressions:
-                        expr: _col1
-                        type: bigint
+              tag: -1
+              value expressions:
+                    expr: _col1
+                    type: bigint
       Reduce Operator Tree:
         Group By Operator
           aggregations:
@@ -302,7 +244,7 @@ STAGE PLANS:
       limit: -1
 
 
-PREHOOK: query: select /*+MAPJOIN(src, src1) */ count(*) from srcpart join src src on (srcpart.value=src.value) join src src1 on (srcpart.key=src1.key) group by ds
+PREHOOK: query: select count(*) from srcpart join src src on (srcpart.value=src.value) join src src1 on (srcpart.key=src1.key) group by ds
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Input: default@srcpart
@@ -311,7 +253,7 @@ PREHOOK: Input: default@srcpart@ds=2008-
 PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=11
 PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=12
 #### A masked pattern was here ####
-POSTHOOK: query: select /*+MAPJOIN(src, src1) */ count(*) from srcpart join src src on (srcpart.value=src.value) join src src1 on (srcpart.key=src1.key) group by ds
+POSTHOOK: query: select count(*) from srcpart join src src on (srcpart.value=src.value) join src src1 on (srcpart.key=src1.key) group by ds
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Input: default@srcpart

Modified: hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery.q.out?rev=1439946&r1=1439945&r2=1439946&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery.q.out Tue Jan 29 15:33:53 2013
@@ -1,27 +1,31 @@
-PREHOOK: query: EXPLAIN
-SELECT /*+ MAPJOIN(z) */ subq.key1, z.value
+PREHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN
+SELECT subq.key1, z.value
 FROM
-(SELECT /*+ MAPJOIN(x) */ x.key as key1, x.value as value1, y.key as key2, y.value as value2 
+(SELECT x.key as key1, x.value as value1, y.key as key2, y.value as value2 
  FROM src1 x JOIN src y ON (x.key = y.key)) subq
  JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11)
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN
-SELECT /*+ MAPJOIN(z) */ subq.key1, z.value
+POSTHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN
+SELECT subq.key1, z.value
 FROM
-(SELECT /*+ MAPJOIN(x) */ x.key as key1, x.value as value1, y.key as key2, y.value as value2 
+(SELECT x.key as key1, x.value as value1, y.key as key2, y.value as value2 
  FROM src1 x JOIN src y ON (x.key = y.key)) subq
  JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11)
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src1) x) (TOK_TABREF (TOK_TABNAME src) y) (= (. (TOK_TABLE_OR_COL x) key) (. (TOK_TABLE_OR_COL y) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST x))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) key) key1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) value) value1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL y) key) key2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL y) value) value2)))) subq) (TOK_TABREF (TOK_TABNAME srcpart) z) (and (and (= (. (TOK_TABLE_OR_COL subq) key1) (. (TOK_TABLE_OR_COL z) key)) (= (. (TOK_TABLE_OR_COL z) ds) '2008-04-08')) (= (. (TOK_TABLE_OR_COL z) hr) 11)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST z))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL subq) key1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL z) value)))))
+  (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src1) x) (TOK_TABREF (TOK_TABNAME src) y) (= (. (TOK_TABLE_OR_COL x) key) (. (TOK_TABLE_OR_COL y) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) key) key1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) value) value1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL y) key) key2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL y) value) value2)))) subq) (TOK_TABREF (TOK_TABNAME srcpart) z) (and (and (= (. (TOK_TABLE_OR_COL subq) key1) (. (TOK_TABLE_OR_COL z) key)) (= (. (TOK_TABLE_OR_COL z) ds) '2008-04-08')) (= (. (TOK_TABLE_OR_COL z) hr) 11)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL subq) key1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL z) value)))))
 
 STAGE DEPENDENCIES:
-  Stage-4 is a root stage
-  Stage-1 depends on stages: Stage-4
+  Stage-7 is a root stage
+  Stage-6 depends on stages: Stage-7
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-4
+  Stage: Stage-7
     Map Reduce Local Work
       Alias -> Map Local Tables:
         subq:x 
@@ -56,7 +60,7 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-1
+  Stage: Stage-6
     Map Reduce
       Alias -> Map Operator Tree:
         subq:y 
@@ -79,11 +83,6 @@ STAGE PLANS:
                       expr: _col0
                       type: string
                 outputColumnNames: _col0
-                Select Operator
-                  expressions:
-                        expr: _col0
-                        type: string
-                  outputColumnNames: _col0
                   Map Join Operator
                     condition map:
                          Inner Join 0 to 1
@@ -102,20 +101,13 @@ STAGE PLANS:
                             type: string
                             expr: _col5
                             type: string
-                      outputColumnNames: _col0, _col5
-                      Select Operator
-                        expressions:
-                              expr: _col0
-                              type: string
-                              expr: _col5
-                              type: string
-                        outputColumnNames: _col0, _col1
-                        File Output Operator
-                          compressed: false
-                          GlobalTableId: 0
-                          table:
-                              input format: org.apache.hadoop.mapred.TextInputFormat
-                              output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      outputColumnNames: _col0, _col1
+                      File Output Operator
+                        compressed: false
+                        GlobalTableId: 0
+                        table:
+                            input format: org.apache.hadoop.mapred.TextInputFormat
+                            output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
       Local Work:
         Map Reduce Local Work
 
@@ -124,90 +116,88 @@ STAGE PLANS:
       limit: -1
 
 
-PREHOOK: query: SELECT /*+ MAPJOIN(z) */ subq.key1, z.value
+PREHOOK: query: SELECT subq.key1, z.value
 FROM
-(SELECT /*+ MAPJOIN(x) */ x.key as key1, x.value as value1, y.key as key2, y.value as value2 
+(SELECT x.key as key1, x.value as value1, y.key as key2, y.value as value2 
  FROM src1 x JOIN src y ON (x.key = y.key)) subq
  JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11)
+ORDER BY subq.key1, z.value
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Input: default@src1
 PREHOOK: Input: default@srcpart
 PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT /*+ MAPJOIN(z) */ subq.key1, z.value
+POSTHOOK: query: SELECT subq.key1, z.value
 FROM
-(SELECT /*+ MAPJOIN(x) */ x.key as key1, x.value as value1, y.key as key2, y.value as value2 
+(SELECT x.key as key1, x.value as value1, y.key as key2, y.value as value2 
  FROM src1 x JOIN src y ON (x.key = y.key)) subq
  JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11)
+ORDER BY subq.key1, z.value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Input: default@src1
 POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
 #### A masked pattern was here ####
-238	val_238
-238	val_238
-311	val_311
-311	val_311
-311	val_311
-255	val_255
-255	val_255
-278	val_278
-278	val_278
-98	val_98
-98	val_98
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-150	val_150
-273	val_273
-273	val_273
-273	val_273
-224	val_224
-224	val_224
-369	val_369
-369	val_369
-369	val_369
-66	val_66
 128	val_128
 128	val_128
 128	val_128
-213	val_213
-213	val_213
-146	val_146
-146	val_146
-406	val_406
-406	val_406
-406	val_406
-406	val_406
 128	val_128
 128	val_128
 128	val_128
-311	val_311
-311	val_311
-311	val_311
+128	val_128
+128	val_128
+128	val_128
+146	val_146
+146	val_146
+146	val_146
+146	val_146
+150	val_150
 213	val_213
 213	val_213
+213	val_213
+213	val_213
+224	val_224
+224	val_224
+224	val_224
+224	val_224
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+255	val_255
+255	val_255
+255	val_255
+255	val_255
+273	val_273
+273	val_273
+273	val_273
+273	val_273
+273	val_273
+273	val_273
+273	val_273
+273	val_273
+273	val_273
+278	val_278
+278	val_278
 278	val_278
 278	val_278
 311	val_311
 311	val_311
 311	val_311
-98	val_98
-98	val_98
+311	val_311
+311	val_311
+311	val_311
+311	val_311
+311	val_311
+311	val_311
+369	val_369
+369	val_369
+369	val_369
 369	val_369
 369	val_369
 369	val_369
-238	val_238
-238	val_238
-273	val_273
-273	val_273
-273	val_273
-224	val_224
-224	val_224
 369	val_369
 369	val_369
 369	val_369
@@ -221,9 +211,21 @@ POSTHOOK: Input: default@srcpart@ds=2008
 401	val_401
 401	val_401
 401	val_401
-128	val_128
-128	val_128
-128	val_128
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
 406	val_406
 406	val_406
 406	val_406
@@ -232,54 +234,46 @@ POSTHOOK: Input: default@srcpart@ds=2008
 406	val_406
 406	val_406
 406	val_406
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-255	val_255
-255	val_255
 406	val_406
 406	val_406
 406	val_406
 406	val_406
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-146	val_146
-146	val_146
-273	val_273
-273	val_273
-273	val_273
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+66	val_66
+98	val_98
+98	val_98
+98	val_98
+98	val_98
 PREHOOK: query: EXPLAIN 
-SELECT /*+ MAPJOIN(z) */ subq.key1, z.value
+SELECT subq.key1, z.value
 FROM
-(SELECT /*+ MAPJOIN(x) */ x.key as key1, x.value as value1, y.key as key2, y.value as value2 
+(SELECT x.key as key1, x.value as value1, y.key as key2, y.value as value2 
  FROM src1 x JOIN src y ON (x.key = y.key)) subq
  JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11) 
- order by subq.key1
+ order by subq.key1, z.value
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN 
-SELECT /*+ MAPJOIN(z) */ subq.key1, z.value
+SELECT subq.key1, z.value
 FROM
-(SELECT /*+ MAPJOIN(x) */ x.key as key1, x.value as value1, y.key as key2, y.value as value2 
+(SELECT x.key as key1, x.value as value1, y.key as key2, y.value as value2 
  FROM src1 x JOIN src y ON (x.key = y.key)) subq
  JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11) 
- order by subq.key1
+ order by subq.key1, z.value
 POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src1) x) (TOK_TABREF (TOK_TABNAME src) y) (= (. (TOK_TABLE_OR_COL x) key) (. (TOK_TABLE_OR_COL y) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST x))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) key) key1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) value) value1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL y) key) key2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL y) value) value2)))) subq) (TOK_TABREF (TOK_TABNAME srcpart) z) (and (and (= (. (TOK_TABLE_OR_COL subq) key1) (. (TOK_TABLE_OR_COL z) key)) (= (. (TOK_TABLE_OR_COL z) ds) '2008-04-08')) (= (. (TOK_TABLE_OR_COL z) hr) 11)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST z))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL subq) key1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL z) value))) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC
  (. (TOK_TABLE_OR_COL subq) key1)))))
+  (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src1) x) (TOK_TABREF (TOK_TABNAME src) y) (= (. (TOK_TABLE_OR_COL x) key) (. (TOK_TABLE_OR_COL y) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) key) key1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) value) value1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL y) key) key2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL y) value) value2)))) subq) (TOK_TABREF (TOK_TABNAME srcpart) z) (and (and (= (. (TOK_TABLE_OR_COL subq) key1) (. (TOK_TABLE_OR_COL z) key)) (= (. (TOK_TABLE_OR_COL z) ds) '2008-04-08')) (= (. (TOK_TABLE_OR_COL z) hr) 11)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL subq) key1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL z) value))) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL subq) key1)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL z) value)))))
 
 STAGE DEPENDENCIES:
-  Stage-5 is a root stage
-  Stage-1 depends on stages: Stage-5
-  Stage-2 depends on stages: Stage-1
+  Stage-8 is a root stage
+  Stage-7 depends on stages: Stage-8
+  Stage-3 depends on stages: Stage-7
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-5
+  Stage: Stage-8
     Map Reduce Local Work
       Alias -> Map Local Tables:
         subq:x 
@@ -314,7 +308,7 @@ STAGE PLANS:
                 1 [Column[key]]
               Position of Big Table: 0
 
-  Stage: Stage-1
+  Stage: Stage-7
     Map Reduce
       Alias -> Map Operator Tree:
         subq:y 
@@ -337,11 +331,6 @@ STAGE PLANS:
                       expr: _col0
                       type: string
                 outputColumnNames: _col0
-                Select Operator
-                  expressions:
-                        expr: _col0
-                        type: string
-                  outputColumnNames: _col0
                   Map Join Operator
                     condition map:
                          Inner Join 0 to 1
@@ -354,44 +343,39 @@ STAGE PLANS:
                       1 [Column[key]]
                     outputColumnNames: _col0, _col5
                     Position of Big Table: 0
-                    File Output Operator
-                      compressed: false
-                      GlobalTableId: 0
-                      table:
-                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                    Select Operator
+                      expressions:
+                            expr: _col0
+                            type: string
+                            expr: _col5
+                            type: string
+                      outputColumnNames: _col0, _col1
+                      File Output Operator
+                        compressed: false
+                        GlobalTableId: 0
+                        table:
+                            input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                            output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
       Local Work:
         Map Reduce Local Work
 
-  Stage: Stage-2
+  Stage: Stage-3
     Map Reduce
       Alias -> Map Operator Tree:
 #### A masked pattern was here ####
-          Select Operator
-            expressions:
-                  expr: _col0
-                  type: string
-                  expr: _col5
-                  type: string
-            outputColumnNames: _col0, _col5
-            Select Operator
-              expressions:
+            Reduce Output Operator
+              key expressions:
                     expr: _col0
                     type: string
-                    expr: _col5
+                    expr: _col1
+                    type: string
+              sort order: ++
+              tag: -1
+              value expressions:
+                    expr: _col0
+                    type: string
+                    expr: _col1
                     type: string
-              outputColumnNames: _col0, _col1
-              Reduce Output Operator
-                key expressions:
-                      expr: _col0
-                      type: string
-                sort order: +
-                tag: -1
-                value expressions:
-                      expr: _col0
-                      type: string
-                      expr: _col1
-                      type: string
       Reduce Operator Tree:
         Extract
           File Output Operator
@@ -406,24 +390,24 @@ STAGE PLANS:
       limit: -1
 
 
-PREHOOK: query: SELECT /*+ MAPJOIN(z) */ subq.key1, z.value
+PREHOOK: query: SELECT subq.key1, z.value
 FROM
-(SELECT /*+ MAPJOIN(x) */ x.key as key1, x.value as value1, y.key as key2, y.value as value2  
+(SELECT x.key as key1, x.value as value1, y.key as key2, y.value as value2  
  FROM src1 x JOIN src y ON (x.key = y.key)) subq 
  JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11)  
- order by subq.key1
+ order by subq.key1, z.value
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Input: default@src1
 PREHOOK: Input: default@srcpart
 PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT /*+ MAPJOIN(z) */ subq.key1, z.value
+POSTHOOK: query: SELECT subq.key1, z.value
 FROM
-(SELECT /*+ MAPJOIN(x) */ x.key as key1, x.value as value1, y.key as key2, y.value as value2  
+(SELECT x.key as key1, x.value as value1, y.key as key2, y.value as value2  
  FROM src1 x JOIN src y ON (x.key = y.key)) subq 
  JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11)  
- order by subq.key1
+ order by subq.key1, z.value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Input: default@src1

Modified: hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery2.q.out?rev=1439946&r1=1439945&r2=1439946&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/mapjoin_subquery2.q.out Tue Jan 29 15:33:53 2013
@@ -49,64 +49,46 @@ PREHOOK: Output: default@z
 POSTHOOK: query: load data local inpath '../data/files/z.txt' INTO TABLE z
 POSTHOOK: type: LOAD
 POSTHOOK: Output: default@z
-PREHOOK: query: SELECT subq.key1, subq.value1, subq.key2, subq.value2, z.id, z.name
+PREHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN
+SELECT subq.key1, subq.value1, subq.key2, subq.value2, z.id, z.name
 FROM
 (SELECT x.id as key1, x.name as value1, y.id as key2, y.name as value2 
  FROM y JOIN x ON (x.id = y.id)) subq
  JOIN z ON (subq.key1 = z.id)
 PREHOOK: type: QUERY
-PREHOOK: Input: default@x
-PREHOOK: Input: default@y
-PREHOOK: Input: default@z
-#### A masked pattern was here ####
-POSTHOOK: query: SELECT subq.key1, subq.value1, subq.key2, subq.value2, z.id, z.name
+POSTHOOK: query: -- Since the inputs are small, it should be automatically converted to mapjoin
+
+EXPLAIN
+SELECT subq.key1, subq.value1, subq.key2, subq.value2, z.id, z.name
 FROM
 (SELECT x.id as key1, x.name as value1, y.id as key2, y.name as value2 
  FROM y JOIN x ON (x.id = y.id)) subq
  JOIN z ON (subq.key1 = z.id)
 POSTHOOK: type: QUERY
-POSTHOOK: Input: default@x
-POSTHOOK: Input: default@y
-POSTHOOK: Input: default@z
-#### A masked pattern was here ####
-2	Joe	2	Tie	2	Tie
-2	Hank	2	Tie	2	Tie
-PREHOOK: query: EXPLAIN
-SELECT /*+ MAPJOIN(z) */ subq.key1, subq.value1, subq.key2, subq.value2, z.id, z.name
-FROM
-(SELECT /*+ MAPJOIN(x) */ x.id as key1, x.name as value1, y.id as key2, y.name as value2 
- FROM y JOIN x ON (x.id = y.id)) subq
- JOIN z ON (subq.key1 = z.id)
-PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN
-SELECT /*+ MAPJOIN(z) */ subq.key1, subq.value1, subq.key2, subq.value2, z.id, z.name
-FROM
-(SELECT /*+ MAPJOIN(x) */ x.id as key1, x.name as value1, y.id as key2, y.name as value2 
- FROM y JOIN x ON (x.id = y.id)) subq
- JOIN z ON (subq.key1 = z.id)
-POSTHOOK: type: QUERY
 ABSTRACT SYNTAX TREE:
-  (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME y)) (TOK_TABREF (TOK_TABNAME x)) (= (. (TOK_TABLE_OR_COL x) id) (. (TOK_TABLE_OR_COL y) id)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST x))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) id) key1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) name) value1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL y) id) key2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL y) name) value2)))) subq) (TOK_TABREF (TOK_TABNAME z)) (= (. (TOK_TABLE_OR_COL subq) key1) (. (TOK_TABLE_OR_COL z) id)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST z))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL subq) key1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL subq) value1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL subq) key2)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL subq) value2)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL z) id)) (TOK_SELEX
 PR (. (TOK_TABLE_OR_COL z) name)))))
+  (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME y)) (TOK_TABREF (TOK_TABNAME x)) (= (. (TOK_TABLE_OR_COL x) id) (. (TOK_TABLE_OR_COL y) id)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) id) key1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) name) value1) (TOK_SELEXPR (. (TOK_TABLE_OR_COL y) id) key2) (TOK_SELEXPR (. (TOK_TABLE_OR_COL y) name) value2)))) subq) (TOK_TABREF (TOK_TABNAME z)) (= (. (TOK_TABLE_OR_COL subq) key1) (. (TOK_TABLE_OR_COL z) id)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL subq) key1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL subq) value1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL subq) key2)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL subq) value2)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL z) id)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL z) name)))))
 
 STAGE DEPENDENCIES:
-  Stage-4 is a root stage
-  Stage-1 depends on stages: Stage-4
+  Stage-7 is a root stage
+  Stage-6 depends on stages: Stage-7
   Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-4
+  Stage: Stage-7
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        subq:x 
+        subq:y 
           Fetch Operator
             limit: -1
         z 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        subq:x 
+        subq:y 
           TableScan
-            alias: x
+            alias: y
             HashTable Sink Operator
               condition expressions:
                 0 {id} {name}
@@ -115,7 +97,7 @@ STAGE PLANS:
               keys:
                 0 [Column[id]]
                 1 [Column[id]]
-              Position of Big Table: 0
+              Position of Big Table: 1
         z 
           TableScan
             alias: z
@@ -129,12 +111,12 @@ STAGE PLANS:
                 1 [Column[id]]
               Position of Big Table: 0
 
-  Stage: Stage-1
+  Stage: Stage-6
     Map Reduce
       Alias -> Map Operator Tree:
-        subq:y 
+        subq:x 
           TableScan
-            alias: y
+            alias: x
             Map Join Operator
               condition map:
                    Inner Join 0 to 1
@@ -146,29 +128,18 @@ STAGE PLANS:
                 0 [Column[id]]
                 1 [Column[id]]
               outputColumnNames: _col0, _col1, _col4, _col5
-              Position of Big Table: 0
+              Position of Big Table: 1
               Select Operator
                 expressions:
-                      expr: _col0
+                      expr: _col5
                       type: int
-                      expr: _col1
-                      type: string
                       expr: _col4
                       type: string
-                      expr: _col5
+                      expr: _col0
                       type: int
-                outputColumnNames: _col0, _col1, _col4, _col5
-                Select Operator
-                  expressions:
-                        expr: _col5
-                        type: int
-                        expr: _col4
-                        type: string
-                        expr: _col0
-                        type: int
-                        expr: _col1
-                        type: string
-                  outputColumnNames: _col0, _col1, _col2, _col3
+                      expr: _col1
+                      type: string
+                outputColumnNames: _col0, _col1, _col2, _col3
                   Map Join Operator
                     condition map:
                          Inner Join 0 to 1
@@ -196,27 +167,12 @@ STAGE PLANS:
                             expr: _col5
                             type: string
                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                      Select Operator
-                        expressions:
-                              expr: _col0
-                              type: int
-                              expr: _col1
-                              type: string
-                              expr: _col2
-                              type: int
-                              expr: _col3
-                              type: string
-                              expr: _col4
-                              type: int
-                              expr: _col5
-                              type: string
-                        outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                        File Output Operator
-                          compressed: false
-                          GlobalTableId: 0
-                          table:
-                              input format: org.apache.hadoop.mapred.TextInputFormat
-                              output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      File Output Operator
+                        compressed: false
+                        GlobalTableId: 0
+                        table:
+                            input format: org.apache.hadoop.mapred.TextInputFormat
+                            output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
       Local Work:
         Map Reduce Local Work
 
@@ -225,9 +181,9 @@ STAGE PLANS:
       limit: -1
 
 
-PREHOOK: query: SELECT /*+ MAPJOIN(z) */ subq.key1, subq.value1, subq.key2, subq.value2, z.id, z.name
+PREHOOK: query: SELECT subq.key1, subq.value1, subq.key2, subq.value2, z.id, z.name
 FROM
-(SELECT /*+ MAPJOIN(x) */ x.id as key1, x.name as value1, y.id as key2, y.name as value2 
+(SELECT x.id as key1, x.name as value1, y.id as key2, y.name as value2 
  FROM y JOIN x ON (x.id = y.id)) subq
  JOIN z ON (subq.key1 = z.id)
 PREHOOK: type: QUERY
@@ -235,9 +191,9 @@ PREHOOK: Input: default@x
 PREHOOK: Input: default@y
 PREHOOK: Input: default@z
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT /*+ MAPJOIN(z) */ subq.key1, subq.value1, subq.key2, subq.value2, z.id, z.name
+POSTHOOK: query: SELECT subq.key1, subq.value1, subq.key2, subq.value2, z.id, z.name
 FROM
-(SELECT /*+ MAPJOIN(x) */ x.id as key1, x.name as value1, y.id as key2, y.name as value2 
+(SELECT x.id as key1, x.name as value1, y.id as key2, y.name as value2 
  FROM y JOIN x ON (x.id = y.id)) subq
  JOIN z ON (subq.key1 = z.id)
 POSTHOOK: type: QUERY



Mime
View raw message