Added: hive/trunk/ql/src/test/results/clientpositive/skewjoin_mapjoin7.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/skewjoin_mapjoin7.q.out?rev=1635630&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/skewjoin_mapjoin7.q.out 
(added)
+++ hive/trunk/ql/src/test/results/clientpositive/skewjoin_mapjoin7.q.out Thu 
Oct 30 22:23:40 2014
@@ -0,0 +1,363 @@
+PREHOOK: query: CREATE TABLE T1(key STRING, val STRING)        
+SKEWED BY (key) ON ((2)) STORED AS TEXTFILE
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@T1
+POSTHOOK: query: CREATE TABLE T1(key STRING, val STRING)       
+SKEWED BY (key) ON ((2)) STORED AS TEXTFILE
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@T1
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T1
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@t1
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T1
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@t1
+PREHOOK: query: CREATE TABLE T2(key STRING, val STRING) STORED AS TEXTFILE
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@T2
+POSTHOOK: query: CREATE TABLE T2(key STRING, val STRING) STORED AS TEXTFILE
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@T2
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T2.txt' INTO TABLE T2
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@t2
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T2.txt' INTO TABLE T2
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@t2
+PREHOOK: query: -- copy from skewjoinopt11
+-- test compile time skew join and auto map join        
+-- This test is to verify the skew join compile optimization when the join is 
followed
+-- by a union. Both sides of a union consist of a join, which should have used
+-- skew join compile time optimization.
+-- adding an order by at the end to make the results deterministic
+
+EXPLAIN         
+select * from  
+(      
+  select a.key, a.val as val1, b.val as val2 from T1 a join T2 b on a.key = 
b.key
+    union all  
+  select a.key, a.val as val1, b.val as val2 from T1 a join T2 b on a.key = 
b.key
+) subq1
+PREHOOK: type: QUERY
+POSTHOOK: query: -- copy from skewjoinopt11
+-- test compile time skew join and auto map join        
+-- This test is to verify the skew join compile optimization when the join is 
followed
+-- by a union. Both sides of a union consist of a join, which should have used
+-- skew join compile time optimization.
+-- adding an order by at the end to make the results deterministic
+
+EXPLAIN         
+select * from  
+(      
+  select a.key, a.val as val1, b.val as val2 from T1 a join T2 b on a.key = 
b.key
+    union all  
+  select a.key, a.val as val1, b.val as val2 from T1 a join T2 b on a.key = 
b.key
+) subq1
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-16 is a root stage
+  Stage-2 depends on stages: Stage-16
+  Stage-3 depends on stages: Stage-2, Stage-8
+  Stage-17 is a root stage
+  Stage-8 depends on stages: Stage-17
+  Stage-0 depends on stages: Stage-3
+
+STAGE PLANS:
+  Stage: Stage-16
+    Map Reduce Local Work
+      Alias -> Map Local Tables:
+        null-subquery2:subq1-subquery2:a 
+          Fetch Operator
+            limit: -1
+        subquery1:a 
+          Fetch Operator
+            limit: -1
+      Alias -> Map Local Operator Tree:
+        null-subquery2:subq1-subquery2:a 
+          TableScan
+            alias: a
+            Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: (key is not null and (key = '2')) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              HashTable Sink Operator
+                condition expressions:
+                  0 {val}
+                  1 {val}
+                keys:
+                  0 key (type: string)
+                  1 key (type: string)
+        subquery1:a 
+          TableScan
+            alias: a
+            Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: (key is not null and (not (key = '2'))) (type: 
boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              HashTable Sink Operator
+                condition expressions:
+                  0 {val}
+                  1 {val}
+                keys:
+                  0 key (type: string)
+                  1 key (type: string)
+
+  Stage: Stage-2
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: b
+            Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: (key is not null and (not (key = '2'))) (type: 
boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              Map Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 {key} {val}
+                  1 {val}
+                keys:
+                  0 key (type: string)
+                  1 key (type: string)
+                outputColumnNames: _col0, _col1, _col6
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                  Union
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Select Operator
+                      SELECT * : (no compute)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      File Output Operator
+                        compressed: false
+                        table:
+                            input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                            output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                            serde: 
org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+          TableScan
+            alias: b
+            Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: (key is not null and (key = '2')) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              Map Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 {key} {val}
+                  1 {val}
+                keys:
+                  0 key (type: string)
+                  1 key (type: string)
+                outputColumnNames: _col0, _col1, _col6
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                  Union
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Select Operator
+                      SELECT * : (no compute)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      File Output Operator
+                        compressed: false
+                        table:
+                            input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                            output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                            serde: 
org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+      Local Work:
+        Map Reduce Local Work
+
+  Stage: Stage-3
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            Union
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              Select Operator
+                expressions: _col0 (type: string), _col1 (type: string), _col2 
(type: string)
+                outputColumnNames: _col0, _col1, _col2
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+                File Output Operator
+                  compressed: false
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+          TableScan
+            Union
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              Select Operator
+                expressions: _col0 (type: string), _col1 (type: string), _col2 
(type: string)
+                outputColumnNames: _col0, _col1, _col2
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+                File Output Operator
+                  compressed: false
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-17
+    Map Reduce Local Work
+      Alias -> Map Local Tables:
+        null-subquery1:subq1-subquery1:a 
+          Fetch Operator
+            limit: -1
+        subquery2:a 
+          Fetch Operator
+            limit: -1
+      Alias -> Map Local Operator Tree:
+        null-subquery1:subq1-subquery1:a 
+          TableScan
+            alias: a
+            Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: (key is not null and (key = '2')) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              HashTable Sink Operator
+                condition expressions:
+                  0 {val}
+                  1 {val}
+                keys:
+                  0 key (type: string)
+                  1 key (type: string)
+        subquery2:a 
+          TableScan
+            alias: a
+            Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: (key is not null and (not (key = '2'))) (type: 
boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              HashTable Sink Operator
+                condition expressions:
+                  0 {val}
+                  1 {val}
+                keys:
+                  0 key (type: string)
+                  1 key (type: string)
+
+  Stage: Stage-8
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: b
+            Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: (key is not null and (key = '2')) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              Map Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 {key} {val}
+                  1 {val}
+                keys:
+                  0 key (type: string)
+                  1 key (type: string)
+                outputColumnNames: _col0, _col1, _col6
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                  Union
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Select Operator
+                      SELECT * : (no compute)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      File Output Operator
+                        compressed: false
+                        table:
+                            input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                            output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                            serde: 
org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+          TableScan
+            alias: b
+            Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: (key is not null and (not (key = '2'))) (type: 
boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              Map Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 {key} {val}
+                  1 {val}
+                keys:
+                  0 key (type: string)
+                  1 key (type: string)
+                outputColumnNames: _col0, _col1, _col6
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+                Select Operator
+                  expressions: _col0 (type: string), _col1 (type: string), 
_col6 (type: string)
+                  outputColumnNames: _col0, _col1, _col2
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                  Union
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Select Operator
+                      SELECT * : (no compute)
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      File Output Operator
+                        compressed: false
+                        table:
+                            input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                            output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                            serde: 
org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+      Local Work:
+        Map Reduce Local Work
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: select * from  
+(      
+  select a.key, a.val as val1, b.val as val2 from T1 a join T2 b on a.key = 
b.key
+    union all  
+  select a.key, a.val as val1, b.val as val2 from T1 a join T2 b on a.key = 
b.key
+) subq1
+ORDER BY key, val1, val2
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
+PREHOOK: Input: default@t2
+#### A masked pattern was here ####
+POSTHOOK: query: select * from 
+(      
+  select a.key, a.val as val1, b.val as val2 from T1 a join T2 b on a.key = 
b.key
+    union all  
+  select a.key, a.val as val1, b.val as val2 from T1 a join T2 b on a.key = 
b.key
+) subq1
+ORDER BY key, val1, val2
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
+POSTHOOK: Input: default@t2
+#### A masked pattern was here ####
+2      12      22
+2      12      22
+3      13      13
+3      13      13
+8      18      18
+8      18      18
+8      18      18
+8      18      18
+8      28      18
+8      28      18
+8      28      18
+8      28      18

Added: hive/trunk/ql/src/test/results/clientpositive/skewjoin_mapjoin8.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/skewjoin_mapjoin8.q.out?rev=1635630&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/skewjoin_mapjoin8.q.out 
(added)
+++ hive/trunk/ql/src/test/results/clientpositive/skewjoin_mapjoin8.q.out Thu 
Oct 30 22:23:40 2014
@@ -0,0 +1,197 @@
+PREHOOK: query: CREATE TABLE T1(key STRING, val STRING) STORED AS TEXTFILE
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@T1
+POSTHOOK: query: CREATE TABLE T1(key STRING, val STRING) STORED AS TEXTFILE
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@T1
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T1
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@t1
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T1
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@t1
+PREHOOK: query: CREATE TABLE T2(key STRING, val STRING) STORED AS TEXTFILE
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@T2
+POSTHOOK: query: CREATE TABLE T2(key STRING, val STRING) STORED AS TEXTFILE
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@T2
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T2.txt' INTO TABLE T2
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@t2
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T2.txt' INTO TABLE T2
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@t2
+PREHOOK: query: CREATE TABLE T3(key STRING, val STRING)
+SKEWED BY (val) ON ((12)) STORED AS TEXTFILE
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@T3
+POSTHOOK: query: CREATE TABLE T3(key STRING, val STRING)
+SKEWED BY (val) ON ((12)) STORED AS TEXTFILE
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@T3
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T3.txt' INTO TABLE T3
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@t3
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T3.txt' INTO TABLE T3
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@t3
+PREHOOK: query: -- copy from skewjoinopt13
+-- test compile time skew join and auto map join
+-- This test is for skewed join compile time optimization for more than 2 
tables.
+-- The join key for table 3 is different from the join key used for joining
+-- tables 1 and 2. Table 3 is skewed, but since one of the join sources for 
table
+-- 3 consist of a sub-query which contains a join, the compile time skew join 
+-- optimization is not performed
+-- adding a order by at the end to make the results deterministic
+
+EXPLAIN
+select *
+from 
+T1 a join T2 b on a.key = b.key 
+join T3 c on a.val = c.val
+PREHOOK: type: QUERY
+POSTHOOK: query: -- copy from skewjoinopt13
+-- test compile time skew join and auto map join
+-- This test is for skewed join compile time optimization for more than 2 
tables.
+-- The join key for table 3 is different from the join key used for joining
+-- tables 1 and 2. Table 3 is skewed, but since one of the join sources for 
table
+-- 3 consist of a sub-query which contains a join, the compile time skew join 
+-- optimization is not performed
+-- adding a order by at the end to make the results deterministic
+
+EXPLAIN
+select *
+from 
+T1 a join T2 b on a.key = b.key 
+join T3 c on a.val = c.val
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-7 is a root stage
+  Stage-5 depends on stages: Stage-7
+  Stage-0 depends on stages: Stage-5
+
+STAGE PLANS:
+  Stage: Stage-7
+    Map Reduce Local Work
+      Alias -> Map Local Tables:
+        a 
+          Fetch Operator
+            limit: -1
+        c 
+          Fetch Operator
+            limit: -1
+      Alias -> Map Local Operator Tree:
+        a 
+          TableScan
+            alias: a
+            Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: (key is not null and val is not null) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              HashTable Sink Operator
+                condition expressions:
+                  0 {val}
+                  1 {key} {val}
+                keys:
+                  0 key (type: string)
+                  1 key (type: string)
+        c 
+          TableScan
+            alias: c
+            Statistics: Num rows: 0 Data size: 20 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: val is not null (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              HashTable Sink Operator
+                condition expressions:
+                  0 {_col0} {_col1} {_col5} {_col6}
+                  1 {key}
+                keys:
+                  0 _col1 (type: string)
+                  1 val (type: string)
+
+  Stage: Stage-5
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: b
+            Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: key is not null (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              Map Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 {key} {val}
+                  1 {key} {val}
+                keys:
+                  0 key (type: string)
+                  1 key (type: string)
+                outputColumnNames: _col0, _col1, _col5, _col6
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+                Map Join Operator
+                  condition map:
+                       Inner Join 0 to 1
+                  condition expressions:
+                    0 {_col0} {_col1} {_col5} {_col6}
+                    1 {key} {val}
+                  keys:
+                    0 _col1 (type: string)
+                    1 val (type: string)
+                  outputColumnNames: _col0, _col1, _col5, _col6, _col10, _col11
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                  Select Operator
+                    expressions: _col0 (type: string), _col1 (type: string), 
_col5 (type: string), _col6 (type: string), _col10 (type: string), _col11 
(type: string)
+                    outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    File Output Operator
+                      compressed: false
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      table:
+                          input format: 
org.apache.hadoop.mapred.TextInputFormat
+                          output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                          serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+      Local Work:
+        Map Reduce Local Work
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: select *
+from 
+T1 a join T2 b on a.key = b.key 
+join T3 c on a.val = c.val
+order by a.key, b.key, c.key, a.val, b.val, c.val
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
+PREHOOK: Input: default@t2
+PREHOOK: Input: default@t3
+#### A masked pattern was here ####
+POSTHOOK: query: select *
+from 
+T1 a join T2 b on a.key = b.key 
+join T3 c on a.val = c.val
+order by a.key, b.key, c.key, a.val, b.val, c.val
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
+POSTHOOK: Input: default@t2
+POSTHOOK: Input: default@t3
+#### A masked pattern was here ####
+2      12      2       22      2       12

Added: hive/trunk/ql/src/test/results/clientpositive/skewjoin_mapjoin9.q.out
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/skewjoin_mapjoin9.q.out?rev=1635630&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/skewjoin_mapjoin9.q.out 
(added)
+++ hive/trunk/ql/src/test/results/clientpositive/skewjoin_mapjoin9.q.out Thu 
Oct 30 22:23:40 2014
@@ -0,0 +1,267 @@
+PREHOOK: query: CREATE TABLE T1(key STRING, val STRING)
+SKEWED BY (key) ON ((2)) STORED AS TEXTFILE
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@T1
+POSTHOOK: query: CREATE TABLE T1(key STRING, val STRING)
+SKEWED BY (key) ON ((2)) STORED AS TEXTFILE
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@T1
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T1
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@t1
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T1
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@t1
+PREHOOK: query: CREATE TABLE T2(key STRING, val STRING) STORED AS TEXTFILE
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@T2
+POSTHOOK: query: CREATE TABLE T2(key STRING, val STRING) STORED AS TEXTFILE
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@T2
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T2.txt' INTO TABLE T2
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@t2
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T2.txt' INTO TABLE T2
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@t2
+PREHOOK: query: CREATE TABLE T3(key STRING, val STRING)
+SKEWED BY (val) ON ((12)) STORED AS TEXTFILE
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@T3
+POSTHOOK: query: CREATE TABLE T3(key STRING, val STRING)
+SKEWED BY (val) ON ((12)) STORED AS TEXTFILE
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@T3
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T3.txt' INTO TABLE T3
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@t3
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T3.txt' INTO TABLE T3
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@t3
+PREHOOK: query: -- copy from skewjoinopt14
+-- test compile time skew join and auto map join
+-- This test is for skewed join compile time optimization for more than 2 
tables.
+-- The join key for table 3 is different from the join key used for joining
+-- tables 1 and 2. Tables 1 and 3 are skewed. Since one of the join sources 
for table
+-- 3 consist of a sub-query which contains a join, the compile time skew join 
+-- optimization is not enabled for table 3, but it is used for the first join 
between
+-- tables 1 and 2
+-- adding a order by at the end to make the results deterministic
+
+EXPLAIN
+select *
+from 
+T1 a join T2 b on a.key = b.key 
+join T3 c on a.val = c.val
+PREHOOK: type: QUERY
+POSTHOOK: query: -- copy from skewjoinopt14
+-- test compile time skew join and auto map join
+-- This test is for skewed join compile time optimization for more than 2 
tables.
+-- The join key for table 3 is different from the join key used for joining
+-- tables 1 and 2. Tables 1 and 3 are skewed. Since one of the join sources 
for table
+-- 3 consist of a sub-query which contains a join, the compile time skew join 
+-- optimization is not enabled for table 3, but it is used for the first join 
between
+-- tables 1 and 2
+-- adding a order by at the end to make the results deterministic
+
+EXPLAIN
+select *
+from 
+T1 a join T2 b on a.key = b.key 
+join T3 c on a.val = c.val
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-10 is a root stage
+  Stage-7 depends on stages: Stage-10
+  Stage-0 depends on stages: Stage-7
+
+STAGE PLANS:
+  Stage: Stage-10
+    Map Reduce Local Work
+      Alias -> Map Local Tables:
+        a 
+          Fetch Operator
+            limit: -1
+        c 
+          Fetch Operator
+            limit: -1
+        subquery1:a 
+          Fetch Operator
+            limit: -1
+      Alias -> Map Local Operator Tree:
+        a 
+          TableScan
+            alias: a
+            Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: ((key is not null and val is not null) and (key = 
'2')) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              HashTable Sink Operator
+                condition expressions:
+                  0 {val}
+                  1 {key} {val}
+                keys:
+                  0 key (type: string)
+                  1 key (type: string)
+        c 
+          TableScan
+            alias: c
+            Statistics: Num rows: 0 Data size: 20 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: val is not null (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              HashTable Sink Operator
+                condition expressions:
+                  0 {_col0} {_col1} {_col5} {_col6}
+                  1 {key}
+                keys:
+                  0 _col1 (type: string)
+                  1 val (type: string)
+        subquery1:a 
+          TableScan
+            alias: a
+            Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: ((key is not null and val is not null) and (not (key 
= '2'))) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              HashTable Sink Operator
+                condition expressions:
+                  0 {val}
+                  1 {key} {val}
+                keys:
+                  0 key (type: string)
+                  1 key (type: string)
+
+  Stage: Stage-7
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: b
+            Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: (key is not null and (not (key = '2'))) (type: 
boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              Map Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 {key} {val}
+                  1 {key} {val}
+                keys:
+                  0 key (type: string)
+                  1 key (type: string)
+                outputColumnNames: _col0, _col1, _col5, _col6
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+                Union
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                  Select Operator
+                    SELECT * : (no compute)
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Map Join Operator
+                      condition map:
+                           Inner Join 0 to 1
+                      condition expressions:
+                        0 {_col0} {_col1} {_col5} {_col6}
+                        1 {key} {val}
+                      keys:
+                        0 _col1 (type: string)
+                        1 val (type: string)
+                      outputColumnNames: _col0, _col1, _col5, _col6, _col10, 
_col11
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      Select Operator
+                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string), _col10 (type: string), 
_col11 (type: string)
+                        outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5
+                        Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                        File Output Operator
+                          compressed: false
+                          Statistics: Num rows: 0 Data size: 0 Basic stats: 
NONE Column stats: NONE
+                          table:
+                              input format: 
org.apache.hadoop.mapred.TextInputFormat
+                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+          TableScan
+            alias: b
+            Statistics: Num rows: 0 Data size: 30 Basic stats: PARTIAL Column 
stats: NONE
+            Filter Operator
+              predicate: (key is not null and (key = '2')) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+              Map Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 {key} {val}
+                  1 {key} {val}
+                keys:
+                  0 key (type: string)
+                  1 key (type: string)
+                outputColumnNames: _col0, _col1, _col5, _col6
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column 
stats: NONE
+                Union
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                  Select Operator
+                    SELECT * : (no compute)
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                    Map Join Operator
+                      condition map:
+                           Inner Join 0 to 1
+                      condition expressions:
+                        0 {_col0} {_col1} {_col5} {_col6}
+                        1 {key} {val}
+                      keys:
+                        0 _col1 (type: string)
+                        1 val (type: string)
+                      outputColumnNames: _col0, _col1, _col5, _col6, _col10, 
_col11
+                      Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                      Select Operator
+                        expressions: _col0 (type: string), _col1 (type: 
string), _col5 (type: string), _col6 (type: string), _col10 (type: string), 
_col11 (type: string)
+                        outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5
+                        Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 
Column stats: NONE
+                        File Output Operator
+                          compressed: false
+                          Statistics: Num rows: 0 Data size: 0 Basic stats: 
NONE Column stats: NONE
+                          table:
+                              input format: 
org.apache.hadoop.mapred.TextInputFormat
+                              output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                              serde: 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+      Local Work:
+        Map Reduce Local Work
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: select *
+from 
+T1 a join T2 b on a.key = b.key 
+join T3 c on a.val = c.val
+order by a.key, b.key, a.val, b.val
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
+PREHOOK: Input: default@t2
+PREHOOK: Input: default@t3
+#### A masked pattern was here ####
+POSTHOOK: query: select *
+from 
+T1 a join T2 b on a.key = b.key 
+join T3 c on a.val = c.val
+order by a.key, b.key, a.val, b.val
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
+POSTHOOK: Input: default@t2
+POSTHOOK: Input: default@t3
+#### A masked pattern was here ####
+2      12      2       22      2       12


Reply via email to