You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by gu...@apache.org on 2017/02/03 21:50:41 UTC
[28/51] [partial] hive git commit: HIVE-15790: Remove unused beeline
golden files (Gunther Hagleitner, reviewed by Sergey Shelukhin)
http://git-wip-us.apache.org/repos/asf/hive/blob/3890ed65/ql/src/test/results/beelinepositive/bucketmapjoin5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/beelinepositive/bucketmapjoin5.q.out b/ql/src/test/results/beelinepositive/bucketmapjoin5.q.out
deleted file mode 100644
index 04ae695..0000000
--- a/ql/src/test/results/beelinepositive/bucketmapjoin5.q.out
+++ /dev/null
@@ -1,1008 +0,0 @@
-Saving all output to "!!{outputDirectory}!!/bucketmapjoin5.q.raw". Enter "record" with no arguments to stop it.
->>> !run !!{qFileDirectory}!!/bucketmapjoin5.q
->>> CREATE TABLE srcbucket_mapjoin(key int, value string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE;
-No rows affected
->>> load data local inpath '../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin;
-No rows affected
->>> load data local inpath '../data/files/srcbucket21.txt' INTO TABLE srcbucket_mapjoin;
-No rows affected
->>>
->>> CREATE TABLE srcbucket_mapjoin_part (key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE;
-No rows affected
->>> load data local inpath '../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08');
-No rows affected
->>> load data local inpath '../data/files/srcbucket21.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08');
-No rows affected
->>> load data local inpath '../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08');
-No rows affected
->>> load data local inpath '../data/files/srcbucket23.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08');
-No rows affected
->>> load data local inpath '../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-09');
-No rows affected
->>> load data local inpath '../data/files/srcbucket21.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-09');
-No rows affected
->>> load data local inpath '../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-09');
-No rows affected
->>> load data local inpath '../data/files/srcbucket23.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-09');
-No rows affected
->>>
->>> CREATE TABLE srcbucket_mapjoin_part_2 (key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE;
-No rows affected
->>> load data local inpath '../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin_part_2 partition(ds='2008-04-08');
-No rows affected
->>> load data local inpath '../data/files/srcbucket23.txt' INTO TABLE srcbucket_mapjoin_part_2 partition(ds='2008-04-08');
-No rows affected
->>> load data local inpath '../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin_part_2 partition(ds='2008-04-09');
-No rows affected
->>> load data local inpath '../data/files/srcbucket23.txt' INTO TABLE srcbucket_mapjoin_part_2 partition(ds='2008-04-09');
-No rows affected
->>>
->>> create table bucketmapjoin_hash_result_1 (key bigint , value1 bigint, value2 bigint);
-No rows affected
->>> create table bucketmapjoin_hash_result_2 (key bigint , value1 bigint, value2 bigint);
-No rows affected
->>>
->>> set hive.optimize.bucketmapjoin = true;
-No rows affected
->>> create table bucketmapjoin_tmp_result (key string , value1 string, value2 string);
-No rows affected
->>>
->>> explain extended
-insert overwrite table bucketmapjoin_tmp_result
-select /*+mapjoin(a)*/ a.key, a.value, b.value
-from srcbucket_mapjoin a join srcbucket_mapjoin_part b
-on a.key=b.key;
-'Explain'
-'ABSTRACT SYNTAX TREE:'
-' (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcbucket_mapjoin) a) (TOK_TABREF (TOK_TABNAME srcbucket_mapjoin_part) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME bucketmapjoin_tmp_result))) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST a))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) value)))))'
-''
-'STAGE DEPENDENCIES:'
-' Stage-9 is a root stage'
-' Stage-1 depends on stages: Stage-9'
-' Stage-7 depends on stages: Stage-1 , consists of Stage-4, Stage-3, Stage-5'
-' Stage-4'
-' Stage-0 depends on stages: Stage-4, Stage-3, Stage-6'
-' Stage-2 depends on stages: Stage-0'
-' Stage-3'
-' Stage-5'
-' Stage-6 depends on stages: Stage-5'
-''
-'STAGE PLANS:'
-' Stage: Stage-9'
-' Map Reduce Local Work'
-' Alias -> Map Local Tables:'
-' a '
-' Fetch Operator'
-' limit: -1'
-' Alias -> Map Local Operator Tree:'
-' a '
-' TableScan'
-' alias: a'
-' GatherStats: false'
-' HashTable Sink Operator'
-' condition expressions:'
-' 0 {key} {value}'
-' 1 {value}'
-' handleSkewJoin: false'
-' keys:'
-' 0 [Column[key]]'
-' 1 [Column[key]]'
-' Position of Big Table: 1'
-' Bucket Mapjoin Context:'
-' Alias Bucket Base File Name Mapping:'
-' a {ds=2008-04-08/srcbucket20.txt=[srcbucket20.txt], ds=2008-04-08/srcbucket21.txt=[srcbucket21.txt], ds=2008-04-08/srcbucket22.txt=[srcbucket20.txt], ds=2008-04-08/srcbucket23.txt=[srcbucket21.txt], ds=2008-04-09/srcbucket20.txt=[srcbucket20.txt], ds=2008-04-09/srcbucket21.txt=[srcbucket21.txt], ds=2008-04-09/srcbucket22.txt=[srcbucket20.txt], ds=2008-04-09/srcbucket23.txt=[srcbucket21.txt]}'
-' Alias Bucket File Name Mapping:'
-' a {!!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-08/srcbucket20.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin/srcbucket20.txt], !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-08/srcbucket21.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin/srcbucket21.txt], !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-08/srcbucket22.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin/srcbucket20.txt], !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-08/srcbucket23.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin/srcbucket21.txt], !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-09/srcbucket20.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin/srcbucket20.txt], !
!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-09/srcbucket21.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin/srcbucket21.txt], !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-09/srcbucket22.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin/srcbucket20.txt], !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-09/srcbucket23.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin/srcbucket21.txt]}'
-' Alias Bucket Output File Name Mapping:'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-08/srcbucket20.txt 0'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-08/srcbucket21.txt 1'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-08/srcbucket22.txt 2'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-08/srcbucket23.txt 3'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-09/srcbucket20.txt 0'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-09/srcbucket21.txt 1'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-09/srcbucket22.txt 2'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-09/srcbucket23.txt 3'
-''
-' Stage: Stage-1'
-' Map Reduce'
-' Alias -> Map Operator Tree:'
-' b '
-' TableScan'
-' alias: b'
-' GatherStats: false'
-' Map Join Operator'
-' condition map:'
-' Inner Join 0 to 1'
-' condition expressions:'
-' 0 {key} {value}'
-' 1 {value}'
-' handleSkewJoin: false'
-' keys:'
-' 0 [Column[key]]'
-' 1 [Column[key]]'
-' outputColumnNames: _col0, _col1, _col5'
-' Position of Big Table: 1'
-' Select Operator'
-' expressions:'
-' expr: _col0'
-' type: int'
-' expr: _col1'
-' type: string'
-' expr: _col5'
-' type: string'
-' outputColumnNames: _col0, _col1, _col5'
-' Select Operator'
-' expressions:'
-' expr: _col0'
-' type: int'
-' expr: _col1'
-' type: string'
-' expr: _col5'
-' type: string'
-' outputColumnNames: _col0, _col1, _col2'
-' File Output Operator'
-' compressed: false'
-' GlobalTableId: 1'
-' directory: pfile:!!{hive.exec.scratchdir}!!'
-' NumFilesPerFileSink: 1'
-' Stats Publishing Key Prefix: pfile:!!{hive.exec.scratchdir}!!'
-' table:'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-' TotalFiles: 1'
-' GatherStats: true'
-' MultiFileSpray: false'
-' Local Work:'
-' Map Reduce Local Work'
-' Needs Tagging: false'
-' Path -> Alias:'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-08 [b]'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-09 [b]'
-' Path -> Partition:'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-08 '
-' Partition'
-' base file name: ds=2008-04-08'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' partition values:'
-' ds 2008-04-08'
-' properties:'
-' bucket_count 4'
-' bucket_field_name key'
-' columns key,value'
-' columns.types int:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-08'
-' name bucketmapjoin5.srcbucket_mapjoin_part'
-' numFiles 4'
-' numPartitions 2'
-' numRows 0'
-' partition_columns ds'
-' rawDataSize 0'
-' serialization.ddl struct srcbucket_mapjoin_part { i32 key, string value}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 5812'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' '
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count 4'
-' bucket_field_name key'
-' columns key,value'
-' columns.types int:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part'
-' name bucketmapjoin5.srcbucket_mapjoin_part'
-' numFiles 8'
-' numPartitions 2'
-' numRows 0'
-' partition_columns ds'
-' rawDataSize 0'
-' serialization.ddl struct srcbucket_mapjoin_part { i32 key, string value}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 11624'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.srcbucket_mapjoin_part'
-' name: bucketmapjoin5.srcbucket_mapjoin_part'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-09 '
-' Partition'
-' base file name: ds=2008-04-09'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' partition values:'
-' ds 2008-04-09'
-' properties:'
-' bucket_count 4'
-' bucket_field_name key'
-' columns key,value'
-' columns.types int:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part/ds=2008-04-09'
-' name bucketmapjoin5.srcbucket_mapjoin_part'
-' numFiles 4'
-' numPartitions 2'
-' numRows 0'
-' partition_columns ds'
-' rawDataSize 0'
-' serialization.ddl struct srcbucket_mapjoin_part { i32 key, string value}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 5812'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' '
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count 4'
-' bucket_field_name key'
-' columns key,value'
-' columns.types int:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part'
-' name bucketmapjoin5.srcbucket_mapjoin_part'
-' numFiles 8'
-' numPartitions 2'
-' numRows 0'
-' partition_columns ds'
-' rawDataSize 0'
-' serialization.ddl struct srcbucket_mapjoin_part { i32 key, string value}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 11624'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.srcbucket_mapjoin_part'
-' name: bucketmapjoin5.srcbucket_mapjoin_part'
-''
-' Stage: Stage-7'
-' Conditional Operator'
-''
-' Stage: Stage-4'
-' Move Operator'
-' files:'
-' hdfs directory: true'
-' source: pfile:!!{hive.exec.scratchdir}!!'
-' destination: pfile:!!{hive.exec.scratchdir}!!'
-''
-' Stage: Stage-0'
-' Move Operator'
-' tables:'
-' replace: true'
-' source: pfile:!!{hive.exec.scratchdir}!!'
-' table:'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-' tmp directory: pfile:!!{hive.exec.scratchdir}!!'
-''
-' Stage: Stage-2'
-' Stats-Aggr Operator'
-' Stats Aggregation Key Prefix: pfile:!!{hive.exec.scratchdir}!!'
-''
-' Stage: Stage-3'
-' Map Reduce'
-' Alias -> Map Operator Tree:'
-' pfile:!!{hive.exec.scratchdir}!! '
-' File Output Operator'
-' compressed: false'
-' GlobalTableId: 0'
-' directory: pfile:!!{hive.exec.scratchdir}!!'
-' NumFilesPerFileSink: 1'
-' table:'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-' TotalFiles: 1'
-' GatherStats: false'
-' MultiFileSpray: false'
-' Needs Tagging: false'
-' Path -> Alias:'
-' pfile:!!{hive.exec.scratchdir}!! [pfile:!!{hive.exec.scratchdir}!!]'
-' Path -> Partition:'
-' pfile:!!{hive.exec.scratchdir}!! '
-' Partition'
-' base file name: -ext-10002'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' '
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-''
-' Stage: Stage-5'
-' Map Reduce'
-' Alias -> Map Operator Tree:'
-' pfile:!!{hive.exec.scratchdir}!! '
-' File Output Operator'
-' compressed: false'
-' GlobalTableId: 0'
-' directory: pfile:!!{hive.exec.scratchdir}!!'
-' NumFilesPerFileSink: 1'
-' table:'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-' TotalFiles: 1'
-' GatherStats: false'
-' MultiFileSpray: false'
-' Needs Tagging: false'
-' Path -> Alias:'
-' pfile:!!{hive.exec.scratchdir}!! [pfile:!!{hive.exec.scratchdir}!!]'
-' Path -> Partition:'
-' pfile:!!{hive.exec.scratchdir}!! '
-' Partition'
-' base file name: -ext-10002'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' '
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-''
-' Stage: Stage-6'
-' Move Operator'
-' files:'
-' hdfs directory: true'
-' source: pfile:!!{hive.exec.scratchdir}!!'
-' destination: pfile:!!{hive.exec.scratchdir}!!'
-''
-''
-411 rows selected
->>>
->>> insert overwrite table bucketmapjoin_tmp_result
-select /*+mapjoin(a)*/ a.key, a.value, b.value
-from srcbucket_mapjoin a join srcbucket_mapjoin_part b
-on a.key=b.key;
-'key','value','value'
-No rows selected
->>>
->>> select count(1) from bucketmapjoin_tmp_result;
-'_c0'
-'928'
-1 row selected
->>> insert overwrite table bucketmapjoin_hash_result_1
-select sum(hash(key)), sum(hash(value1)), sum(hash(value2)) from bucketmapjoin_tmp_result;
-'_c0','_c1','_c2'
-No rows selected
->>>
->>> set hive.optimize.bucketmapjoin = false;
-No rows affected
->>> insert overwrite table bucketmapjoin_tmp_result
-select /*+mapjoin(a)*/ a.key, a.value, b.value
-from srcbucket_mapjoin a join srcbucket_mapjoin_part b
-on a.key=b.key;
-'key','value','value'
-No rows selected
->>>
->>> select count(1) from bucketmapjoin_tmp_result;
-'_c0'
-'928'
-1 row selected
->>> insert overwrite table bucketmapjoin_hash_result_2
-select sum(hash(key)), sum(hash(value1)), sum(hash(value2)) from bucketmapjoin_tmp_result;
-'_c0','_c1','_c2'
-No rows selected
->>>
->>> select a.key-b.key, a.value1-b.value1, a.value2-b.value2
-from bucketmapjoin_hash_result_1 a left outer join bucketmapjoin_hash_result_2 b
-on a.key = b.key;
-'_c0','_c1','_c2'
-'0','0','0'
-1 row selected
->>>
->>>
->>> set hive.optimize.bucketmapjoin = true;
-No rows affected
->>> explain extended
-insert overwrite table bucketmapjoin_tmp_result
-select /*+mapjoin(a)*/ a.key, a.value, b.value
-from srcbucket_mapjoin a join srcbucket_mapjoin_part_2 b
-on a.key=b.key;
-'Explain'
-'ABSTRACT SYNTAX TREE:'
-' (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcbucket_mapjoin) a) (TOK_TABREF (TOK_TABNAME srcbucket_mapjoin_part_2) b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME bucketmapjoin_tmp_result))) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST a))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) value)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) value)))))'
-''
-'STAGE DEPENDENCIES:'
-' Stage-9 is a root stage'
-' Stage-1 depends on stages: Stage-9'
-' Stage-7 depends on stages: Stage-1 , consists of Stage-4, Stage-3, Stage-5'
-' Stage-4'
-' Stage-0 depends on stages: Stage-4, Stage-3, Stage-6'
-' Stage-2 depends on stages: Stage-0'
-' Stage-3'
-' Stage-5'
-' Stage-6 depends on stages: Stage-5'
-''
-'STAGE PLANS:'
-' Stage: Stage-9'
-' Map Reduce Local Work'
-' Alias -> Map Local Tables:'
-' a '
-' Fetch Operator'
-' limit: -1'
-' Alias -> Map Local Operator Tree:'
-' a '
-' TableScan'
-' alias: a'
-' GatherStats: false'
-' HashTable Sink Operator'
-' condition expressions:'
-' 0 {key} {value}'
-' 1 {value}'
-' handleSkewJoin: false'
-' keys:'
-' 0 [Column[key]]'
-' 1 [Column[key]]'
-' Position of Big Table: 1'
-' Bucket Mapjoin Context:'
-' Alias Bucket Base File Name Mapping:'
-' a {ds=2008-04-08/srcbucket22.txt=[srcbucket20.txt], ds=2008-04-08/srcbucket23.txt=[srcbucket21.txt], ds=2008-04-09/srcbucket22.txt=[srcbucket20.txt], ds=2008-04-09/srcbucket23.txt=[srcbucket21.txt]}'
-' Alias Bucket File Name Mapping:'
-' a {!!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2/ds=2008-04-08/srcbucket22.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin/srcbucket20.txt], !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2/ds=2008-04-08/srcbucket23.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin/srcbucket21.txt], !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2/ds=2008-04-09/srcbucket22.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin/srcbucket20.txt], !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2/ds=2008-04-09/srcbucket23.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin/srcbucket21.txt]}'
-' Alias Bucket Output File Name Mapping:'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2/ds=2008-04-08/srcbucket22.txt 0'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2/ds=2008-04-08/srcbucket23.txt 1'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2/ds=2008-04-09/srcbucket22.txt 0'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2/ds=2008-04-09/srcbucket23.txt 1'
-''
-' Stage: Stage-1'
-' Map Reduce'
-' Alias -> Map Operator Tree:'
-' b '
-' TableScan'
-' alias: b'
-' GatherStats: false'
-' Map Join Operator'
-' condition map:'
-' Inner Join 0 to 1'
-' condition expressions:'
-' 0 {key} {value}'
-' 1 {value}'
-' handleSkewJoin: false'
-' keys:'
-' 0 [Column[key]]'
-' 1 [Column[key]]'
-' outputColumnNames: _col0, _col1, _col5'
-' Position of Big Table: 1'
-' Select Operator'
-' expressions:'
-' expr: _col0'
-' type: int'
-' expr: _col1'
-' type: string'
-' expr: _col5'
-' type: string'
-' outputColumnNames: _col0, _col1, _col5'
-' Select Operator'
-' expressions:'
-' expr: _col0'
-' type: int'
-' expr: _col1'
-' type: string'
-' expr: _col5'
-' type: string'
-' outputColumnNames: _col0, _col1, _col2'
-' File Output Operator'
-' compressed: false'
-' GlobalTableId: 1'
-' directory: pfile:!!{hive.exec.scratchdir}!!'
-' NumFilesPerFileSink: 1'
-' Stats Publishing Key Prefix: pfile:!!{hive.exec.scratchdir}!!'
-' table:'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' numFiles 1'
-' numPartitions 0'
-' numRows 928'
-' rawDataSize 17038'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 17966'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-' TotalFiles: 1'
-' GatherStats: true'
-' MultiFileSpray: false'
-' Local Work:'
-' Map Reduce Local Work'
-' Needs Tagging: false'
-' Path -> Alias:'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2/ds=2008-04-08 [b]'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2/ds=2008-04-09 [b]'
-' Path -> Partition:'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2/ds=2008-04-08 '
-' Partition'
-' base file name: ds=2008-04-08'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' partition values:'
-' ds 2008-04-08'
-' properties:'
-' bucket_count 2'
-' bucket_field_name key'
-' columns key,value'
-' columns.types int:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2/ds=2008-04-08'
-' name bucketmapjoin5.srcbucket_mapjoin_part_2'
-' numFiles 2'
-' numPartitions 2'
-' numRows 0'
-' partition_columns ds'
-' rawDataSize 0'
-' serialization.ddl struct srcbucket_mapjoin_part_2 { i32 key, string value}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 3062'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' '
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count 2'
-' bucket_field_name key'
-' columns key,value'
-' columns.types int:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2'
-' name bucketmapjoin5.srcbucket_mapjoin_part_2'
-' numFiles 4'
-' numPartitions 2'
-' numRows 0'
-' partition_columns ds'
-' rawDataSize 0'
-' serialization.ddl struct srcbucket_mapjoin_part_2 { i32 key, string value}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 6124'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.srcbucket_mapjoin_part_2'
-' name: bucketmapjoin5.srcbucket_mapjoin_part_2'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2/ds=2008-04-09 '
-' Partition'
-' base file name: ds=2008-04-09'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' partition values:'
-' ds 2008-04-09'
-' properties:'
-' bucket_count 2'
-' bucket_field_name key'
-' columns key,value'
-' columns.types int:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2/ds=2008-04-09'
-' name bucketmapjoin5.srcbucket_mapjoin_part_2'
-' numFiles 2'
-' numPartitions 2'
-' numRows 0'
-' partition_columns ds'
-' rawDataSize 0'
-' serialization.ddl struct srcbucket_mapjoin_part_2 { i32 key, string value}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 3062'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' '
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count 2'
-' bucket_field_name key'
-' columns key,value'
-' columns.types int:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/srcbucket_mapjoin_part_2'
-' name bucketmapjoin5.srcbucket_mapjoin_part_2'
-' numFiles 4'
-' numPartitions 2'
-' numRows 0'
-' partition_columns ds'
-' rawDataSize 0'
-' serialization.ddl struct srcbucket_mapjoin_part_2 { i32 key, string value}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 6124'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.srcbucket_mapjoin_part_2'
-' name: bucketmapjoin5.srcbucket_mapjoin_part_2'
-''
-' Stage: Stage-7'
-' Conditional Operator'
-''
-' Stage: Stage-4'
-' Move Operator'
-' files:'
-' hdfs directory: true'
-' source: pfile:!!{hive.exec.scratchdir}!!'
-' destination: pfile:!!{hive.exec.scratchdir}!!'
-''
-' Stage: Stage-0'
-' Move Operator'
-' tables:'
-' replace: true'
-' source: pfile:!!{hive.exec.scratchdir}!!'
-' table:'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' numFiles 1'
-' numPartitions 0'
-' numRows 928'
-' rawDataSize 17038'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 17966'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-' tmp directory: pfile:!!{hive.exec.scratchdir}!!'
-''
-' Stage: Stage-2'
-' Stats-Aggr Operator'
-' Stats Aggregation Key Prefix: pfile:!!{hive.exec.scratchdir}!!'
-''
-' Stage: Stage-3'
-' Map Reduce'
-' Alias -> Map Operator Tree:'
-' pfile:!!{hive.exec.scratchdir}!! '
-' File Output Operator'
-' compressed: false'
-' GlobalTableId: 0'
-' directory: pfile:!!{hive.exec.scratchdir}!!'
-' NumFilesPerFileSink: 1'
-' table:'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' numFiles 1'
-' numPartitions 0'
-' numRows 928'
-' rawDataSize 17038'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 17966'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-' TotalFiles: 1'
-' GatherStats: false'
-' MultiFileSpray: false'
-' Needs Tagging: false'
-' Path -> Alias:'
-' pfile:!!{hive.exec.scratchdir}!! [pfile:!!{hive.exec.scratchdir}!!]'
-' Path -> Partition:'
-' pfile:!!{hive.exec.scratchdir}!! '
-' Partition'
-' base file name: -ext-10002'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' numFiles 1'
-' numPartitions 0'
-' numRows 928'
-' rawDataSize 17038'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 17966'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' '
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' numFiles 1'
-' numPartitions 0'
-' numRows 928'
-' rawDataSize 17038'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 17966'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-''
-' Stage: Stage-5'
-' Map Reduce'
-' Alias -> Map Operator Tree:'
-' pfile:!!{hive.exec.scratchdir}!! '
-' File Output Operator'
-' compressed: false'
-' GlobalTableId: 0'
-' directory: pfile:!!{hive.exec.scratchdir}!!'
-' NumFilesPerFileSink: 1'
-' table:'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' numFiles 1'
-' numPartitions 0'
-' numRows 928'
-' rawDataSize 17038'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 17966'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-' TotalFiles: 1'
-' GatherStats: false'
-' MultiFileSpray: false'
-' Needs Tagging: false'
-' Path -> Alias:'
-' pfile:!!{hive.exec.scratchdir}!! [pfile:!!{hive.exec.scratchdir}!!]'
-' Path -> Partition:'
-' pfile:!!{hive.exec.scratchdir}!! '
-' Partition'
-' base file name: -ext-10002'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' numFiles 1'
-' numPartitions 0'
-' numRows 928'
-' rawDataSize 17038'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 17966'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' '
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count -1'
-' columns key,value1,value2'
-' columns.types string:string:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin5.db/bucketmapjoin_tmp_result'
-' name bucketmapjoin5.bucketmapjoin_tmp_result'
-' numFiles 1'
-' numPartitions 0'
-' numRows 928'
-' rawDataSize 17038'
-' serialization.ddl struct bucketmapjoin_tmp_result { string key, string value1, string value2}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 17966'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-' name: bucketmapjoin5.bucketmapjoin_tmp_result'
-''
-' Stage: Stage-6'
-' Move Operator'
-' files:'
-' hdfs directory: true'
-' source: pfile:!!{hive.exec.scratchdir}!!'
-' destination: pfile:!!{hive.exec.scratchdir}!!'
-''
-''
-447 rows selected
->>>
->>> insert overwrite table bucketmapjoin_tmp_result
-select /*+mapjoin(a)*/ a.key, a.value, b.value
-from srcbucket_mapjoin a join srcbucket_mapjoin_part_2 b
-on a.key=b.key;
-'key','value','value'
-No rows selected
->>>
->>> select count(1) from bucketmapjoin_tmp_result;
-'_c0'
-'0'
-1 row selected
->>> insert overwrite table bucketmapjoin_hash_result_1
-select sum(hash(key)), sum(hash(value1)), sum(hash(value2)) from bucketmapjoin_tmp_result;
-'_c0','_c1','_c2'
-No rows selected
->>>
->>> set hive.optimize.bucketmapjoin = false;
-No rows affected
->>> insert overwrite table bucketmapjoin_tmp_result
-select /*+mapjoin(a)*/ a.key, a.value, b.value
-from srcbucket_mapjoin a join srcbucket_mapjoin_part_2 b
-on a.key=b.key;
-'key','value','value'
-No rows selected
->>>
->>> select count(1) from bucketmapjoin_tmp_result;
-'_c0'
-'0'
-1 row selected
->>> insert overwrite table bucketmapjoin_hash_result_2
-select sum(hash(key)), sum(hash(value1)), sum(hash(value2)) from bucketmapjoin_tmp_result;
-'_c0','_c1','_c2'
-No rows selected
->>>
->>> select a.key-b.key, a.value1-b.value1, a.value2-b.value2
-from bucketmapjoin_hash_result_1 a left outer join bucketmapjoin_hash_result_2 b
-on a.key = b.key;
-'_c0','_c1','_c2'
-'','',''
-1 row selected
->>> !record
http://git-wip-us.apache.org/repos/asf/hive/blob/3890ed65/ql/src/test/results/beelinepositive/bucketmapjoin6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/beelinepositive/bucketmapjoin6.q.out b/ql/src/test/results/beelinepositive/bucketmapjoin6.q.out
deleted file mode 100644
index 9a97a9f..0000000
--- a/ql/src/test/results/beelinepositive/bucketmapjoin6.q.out
+++ /dev/null
@@ -1,122 +0,0 @@
-Saving all output to "!!{outputDirectory}!!/bucketmapjoin6.q.raw". Enter "record" with no arguments to stop it.
->>> !run !!{qFileDirectory}!!/bucketmapjoin6.q
->>> set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-No rows affected
->>> create table tmp1 (a string, b string) clustered by (a) sorted by (a) into 10 buckets;
-No rows affected
->>>
->>> create table tmp2 (a string, b string) clustered by (a) sorted by (a) into 10 buckets;
-No rows affected
->>>
->>>
->>> set hive.enforce.bucketing = true;
-No rows affected
->>> set hive.enforce.sorting = true;
-No rows affected
->>> set hive.exec.reducers.max=1;
-No rows affected
->>>
->>>
->>> insert overwrite table tmp1 select * from src where key < 50;
-'key','value'
-No rows selected
->>> insert overwrite table tmp2 select * from src where key < 50;
-'key','value'
-No rows selected
->>>
->>> set hive.optimize.bucketmapjoin = true;
-No rows affected
->>> set hive.optimize.bucketmapjoin.sortedmerge = true;
-No rows affected
->>> set hive.merge.mapfiles=false;
-No rows affected
->>> set hive.input.format=org.apache.hadoop.hive.ql.io.BucketizedHiveInputFormat;
-No rows affected
->>>
->>> create table tmp3 (a string, b string, c string) clustered by (a) sorted by (a) into 10 buckets;
-No rows affected
->>>
->>>
->>> insert overwrite table tmp3
-select /*+ MAPJOIN(l) */ i.a, i.b, l.b
-from tmp1 i join tmp2 l ON i.a = l.a;
-'a','b','b'
-No rows selected
->>>
->>> select * from tmp3 order by a, b, c;
-'a','b','c'
-'0','val_0','val_0'
-'0','val_0','val_0'
-'0','val_0','val_0'
-'0','val_0','val_0'
-'0','val_0','val_0'
-'0','val_0','val_0'
-'0','val_0','val_0'
-'0','val_0','val_0'
-'0','val_0','val_0'
-'10','val_10','val_10'
-'11','val_11','val_11'
-'12','val_12','val_12'
-'12','val_12','val_12'
-'12','val_12','val_12'
-'12','val_12','val_12'
-'15','val_15','val_15'
-'15','val_15','val_15'
-'15','val_15','val_15'
-'15','val_15','val_15'
-'17','val_17','val_17'
-'18','val_18','val_18'
-'18','val_18','val_18'
-'18','val_18','val_18'
-'18','val_18','val_18'
-'19','val_19','val_19'
-'2','val_2','val_2'
-'20','val_20','val_20'
-'24','val_24','val_24'
-'24','val_24','val_24'
-'24','val_24','val_24'
-'24','val_24','val_24'
-'26','val_26','val_26'
-'26','val_26','val_26'
-'26','val_26','val_26'
-'26','val_26','val_26'
-'27','val_27','val_27'
-'28','val_28','val_28'
-'30','val_30','val_30'
-'33','val_33','val_33'
-'34','val_34','val_34'
-'35','val_35','val_35'
-'35','val_35','val_35'
-'35','val_35','val_35'
-'35','val_35','val_35'
-'35','val_35','val_35'
-'35','val_35','val_35'
-'35','val_35','val_35'
-'35','val_35','val_35'
-'35','val_35','val_35'
-'37','val_37','val_37'
-'37','val_37','val_37'
-'37','val_37','val_37'
-'37','val_37','val_37'
-'4','val_4','val_4'
-'41','val_41','val_41'
-'42','val_42','val_42'
-'42','val_42','val_42'
-'42','val_42','val_42'
-'42','val_42','val_42'
-'43','val_43','val_43'
-'44','val_44','val_44'
-'47','val_47','val_47'
-'5','val_5','val_5'
-'5','val_5','val_5'
-'5','val_5','val_5'
-'5','val_5','val_5'
-'5','val_5','val_5'
-'5','val_5','val_5'
-'5','val_5','val_5'
-'5','val_5','val_5'
-'5','val_5','val_5'
-'8','val_8','val_8'
-'9','val_9','val_9'
-73 rows selected
->>> !record
http://git-wip-us.apache.org/repos/asf/hive/blob/3890ed65/ql/src/test/results/beelinepositive/bucketmapjoin7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/beelinepositive/bucketmapjoin7.q.out b/ql/src/test/results/beelinepositive/bucketmapjoin7.q.out
deleted file mode 100644
index c54838d..0000000
--- a/ql/src/test/results/beelinepositive/bucketmapjoin7.q.out
+++ /dev/null
@@ -1,194 +0,0 @@
-Saving all output to "!!{outputDirectory}!!/bucketmapjoin7.q.raw". Enter "record" with no arguments to stop it.
->>> !run !!{qFileDirectory}!!/bucketmapjoin7.q
->>> set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-No rows affected
->>>
->>> CREATE TABLE srcbucket_mapjoin_part_1 (key INT, value STRING) PARTITIONED BY (ds STRING, hr STRING)
-CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE;
-No rows affected
->>> LOAD DATA LOCAL INPATH '../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin_part_1 PARTITION (ds='2008-04-08', hr='0');
-No rows affected
->>> LOAD DATA LOCAL INPATH '../data/files/srcbucket21.txt' INTO TABLE srcbucket_mapjoin_part_1 PARTITION (ds='2008-04-08', hr='0');
-No rows affected
->>>
->>> CREATE TABLE srcbucket_mapjoin_part_2 (key INT, value STRING) PARTITIONED BY (ds STRING, hr STRING)
-CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE;
-No rows affected
->>> LOAD DATA LOCAL INPATH '../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin_part_2 PARTITION (ds='2008-04-08', hr='0');
-No rows affected
->>> LOAD DATA LOCAL INPATH '../data/files/srcbucket21.txt' INTO TABLE srcbucket_mapjoin_part_2 PARTITION (ds='2008-04-08', hr='0');
-No rows affected
->>>
->>> set hive.optimize.bucketmapjoin=true;
-No rows affected
->>>
->>> -- Tests that bucket map join works with a table with more than one level of partitioning
->>>
->>> EXPLAIN EXTENDED
-SELECT /*+ MAPJOIN(b) */ a.key, b.value
-FROM srcbucket_mapjoin_part_1 a JOIN srcbucket_mapjoin_part_2 b
-ON a.key = b.key AND a.ds = '2008-04-08' AND b.ds = '2008-04-08' LIMIT 1;
-'Explain'
-'ABSTRACT SYNTAX TREE:'
-' (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcbucket_mapjoin_part_1) a) (TOK_TABREF (TOK_TABNAME srcbucket_mapjoin_part_2) b) (AND (AND (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)) (= (. (TOK_TABLE_OR_COL a) ds) '2008-04-08')) (= (. (TOK_TABLE_OR_COL b) ds) '2008-04-08')))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST b))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) value))) (TOK_LIMIT 1)))'
-''
-'STAGE DEPENDENCIES:'
-' Stage-3 is a root stage'
-' Stage-1 depends on stages: Stage-3'
-' Stage-0 is a root stage'
-''
-'STAGE PLANS:'
-' Stage: Stage-3'
-' Map Reduce Local Work'
-' Alias -> Map Local Tables:'
-' b '
-' Fetch Operator'
-' limit: -1'
-' Alias -> Map Local Operator Tree:'
-' b '
-' TableScan'
-' alias: b'
-' GatherStats: false'
-' HashTable Sink Operator'
-' condition expressions:'
-' 0 {key}'
-' 1 {value}'
-' handleSkewJoin: false'
-' keys:'
-' 0 [Column[key]]'
-' 1 [Column[key]]'
-' Position of Big Table: 0'
-' Bucket Mapjoin Context:'
-' Alias Bucket Base File Name Mapping:'
-' b {ds=2008-04-08/hr=0/srcbucket20.txt=[ds=2008-04-08/hr=0/srcbucket20.txt], ds=2008-04-08/hr=0/srcbucket21.txt=[ds=2008-04-08/hr=0/srcbucket21.txt]}'
-' Alias Bucket File Name Mapping:'
-' b {!!{hive.metastore.warehouse.dir}!!/bucketmapjoin7.db/srcbucket_mapjoin_part_1/ds=2008-04-08/hr=0/srcbucket20.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin7.db/srcbucket_mapjoin_part_2/ds=2008-04-08/hr=0/srcbucket20.txt], !!{hive.metastore.warehouse.dir}!!/bucketmapjoin7.db/srcbucket_mapjoin_part_1/ds=2008-04-08/hr=0/srcbucket21.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin7.db/srcbucket_mapjoin_part_2/ds=2008-04-08/hr=0/srcbucket21.txt]}'
-' Alias Bucket Output File Name Mapping:'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin7.db/srcbucket_mapjoin_part_1/ds=2008-04-08/hr=0/srcbucket20.txt 0'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin7.db/srcbucket_mapjoin_part_1/ds=2008-04-08/hr=0/srcbucket21.txt 1'
-''
-' Stage: Stage-1'
-' Map Reduce'
-' Alias -> Map Operator Tree:'
-' a '
-' TableScan'
-' alias: a'
-' GatherStats: false'
-' Map Join Operator'
-' condition map:'
-' Inner Join 0 to 1'
-' condition expressions:'
-' 0 {key}'
-' 1 {value}'
-' handleSkewJoin: false'
-' keys:'
-' 0 [Column[key]]'
-' 1 [Column[key]]'
-' outputColumnNames: _col0, _col7'
-' Position of Big Table: 0'
-' Select Operator'
-' expressions:'
-' expr: _col0'
-' type: int'
-' expr: _col7'
-' type: string'
-' outputColumnNames: _col0, _col7'
-' Select Operator'
-' expressions:'
-' expr: _col0'
-' type: int'
-' expr: _col7'
-' type: string'
-' outputColumnNames: _col0, _col1'
-' Limit'
-' File Output Operator'
-' compressed: false'
-' GlobalTableId: 0'
-' directory: file:!!{hive.exec.scratchdir}!!'
-' NumFilesPerFileSink: 1'
-' Stats Publishing Key Prefix: file:!!{hive.exec.scratchdir}!!'
-' table:'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' columns _col0,_col1'
-' columns.types int:string'
-' escape.delim \'
-' serialization.format 1'
-' TotalFiles: 1'
-' GatherStats: false'
-' MultiFileSpray: false'
-' Local Work:'
-' Map Reduce Local Work'
-' Needs Tagging: false'
-' Path -> Alias:'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin7.db/srcbucket_mapjoin_part_1/ds=2008-04-08/hr=0 [a]'
-' Path -> Partition:'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin7.db/srcbucket_mapjoin_part_1/ds=2008-04-08/hr=0 '
-' Partition'
-' base file name: hr=0'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' partition values:'
-' ds 2008-04-08'
-' hr 0'
-' properties:'
-' bucket_count 2'
-' bucket_field_name key'
-' columns key,value'
-' columns.types int:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin7.db/srcbucket_mapjoin_part_1/ds=2008-04-08/hr=0'
-' name bucketmapjoin7.srcbucket_mapjoin_part_1'
-' numFiles 2'
-' numPartitions 1'
-' numRows 0'
-' partition_columns ds/hr'
-' rawDataSize 0'
-' serialization.ddl struct srcbucket_mapjoin_part_1 { i32 key, string value}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 2750'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' '
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count 2'
-' bucket_field_name key'
-' columns key,value'
-' columns.types int:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin7.db/srcbucket_mapjoin_part_1'
-' name bucketmapjoin7.srcbucket_mapjoin_part_1'
-' numFiles 2'
-' numPartitions 1'
-' numRows 0'
-' partition_columns ds/hr'
-' rawDataSize 0'
-' serialization.ddl struct srcbucket_mapjoin_part_1 { i32 key, string value}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 2750'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin7.srcbucket_mapjoin_part_1'
-' name: bucketmapjoin7.srcbucket_mapjoin_part_1'
-''
-' Stage: Stage-0'
-' Fetch Operator'
-' limit: 1'
-''
-''
-154 rows selected
->>>
->>> SELECT /*+ MAPJOIN(b) */ a.key, b.value
-FROM srcbucket_mapjoin_part_1 a JOIN srcbucket_mapjoin_part_2 b
-ON a.key = b.key AND a.ds = '2008-04-08' AND b.ds = '2008-04-08' LIMIT 1;
-'key','value'
-'165','val_165'
-1 row selected
->>> !record
http://git-wip-us.apache.org/repos/asf/hive/blob/3890ed65/ql/src/test/results/beelinepositive/bucketmapjoin8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/beelinepositive/bucketmapjoin8.q.out b/ql/src/test/results/beelinepositive/bucketmapjoin8.q.out
deleted file mode 100644
index e4f105e..0000000
--- a/ql/src/test/results/beelinepositive/bucketmapjoin8.q.out
+++ /dev/null
@@ -1,470 +0,0 @@
-Saving all output to "!!{outputDirectory}!!/bucketmapjoin8.q.raw". Enter "record" with no arguments to stop it.
->>> !run !!{qFileDirectory}!!/bucketmapjoin8.q
->>> set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-No rows affected
->>>
->>> CREATE TABLE srcbucket_mapjoin_part_1 (key INT, value STRING) PARTITIONED BY (part STRING)
-CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE;
-No rows affected
->>> LOAD DATA LOCAL INPATH '../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin_part_1 PARTITION (part='1');
-No rows affected
->>> LOAD DATA LOCAL INPATH '../data/files/srcbucket21.txt' INTO TABLE srcbucket_mapjoin_part_1 PARTITION (part='1');
-No rows affected
->>>
->>> CREATE TABLE srcbucket_mapjoin_part_2 (key INT, value STRING) PARTITIONED BY (part STRING)
-CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE;
-No rows affected
->>> LOAD DATA LOCAL INPATH '../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin_part_2 PARTITION (part='1');
-No rows affected
->>> LOAD DATA LOCAL INPATH '../data/files/srcbucket21.txt' INTO TABLE srcbucket_mapjoin_part_2 PARTITION (part='1');
-No rows affected
->>>
->>> ALTER TABLE srcbucket_mapjoin_part_2 CLUSTERED BY (key) INTO 3 BUCKETS;
-No rows affected
->>>
->>> set hive.optimize.bucketmapjoin=true;
-No rows affected
->>>
->>> -- The partition bucketing metadata match but the tables have different numbers of buckets, bucket map join should still be used
->>>
->>> EXPLAIN EXTENDED
-SELECT /*+ MAPJOIN(b) */ count(*)
-FROM srcbucket_mapjoin_part_1 a JOIN srcbucket_mapjoin_part_2 b
-ON a.key = b.key AND a.part = '1' and b.part = '1';
-'Explain'
-'ABSTRACT SYNTAX TREE:'
-' (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcbucket_mapjoin_part_1) a) (TOK_TABREF (TOK_TABNAME srcbucket_mapjoin_part_2) b) (and (AND (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)) (= (. (TOK_TABLE_OR_COL a) part) '1')) (= (. (TOK_TABLE_OR_COL b) part) '1')))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST b))) (TOK_SELEXPR (TOK_FUNCTIONSTAR count)))))'
-''
-'STAGE DEPENDENCIES:'
-' Stage-4 is a root stage'
-' Stage-1 depends on stages: Stage-4'
-' Stage-2 depends on stages: Stage-1'
-' Stage-0 is a root stage'
-''
-'STAGE PLANS:'
-' Stage: Stage-4'
-' Map Reduce Local Work'
-' Alias -> Map Local Tables:'
-' b '
-' Fetch Operator'
-' limit: -1'
-' Alias -> Map Local Operator Tree:'
-' b '
-' TableScan'
-' alias: b'
-' GatherStats: false'
-' HashTable Sink Operator'
-' condition expressions:'
-' 0 '
-' 1 '
-' handleSkewJoin: false'
-' keys:'
-' 0 [Column[key]]'
-' 1 [Column[key]]'
-' Position of Big Table: 0'
-' Bucket Mapjoin Context:'
-' Alias Bucket Base File Name Mapping:'
-' b {part=1/srcbucket20.txt=[part=1/srcbucket20.txt], part=1/srcbucket21.txt=[part=1/srcbucket21.txt]}'
-' Alias Bucket File Name Mapping:'
-' b {!!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1/part=1/srcbucket20.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_2/part=1/srcbucket20.txt], !!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1/part=1/srcbucket21.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_2/part=1/srcbucket21.txt]}'
-' Alias Bucket Output File Name Mapping:'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1/part=1/srcbucket20.txt 0'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1/part=1/srcbucket21.txt 1'
-''
-' Stage: Stage-1'
-' Map Reduce'
-' Alias -> Map Operator Tree:'
-' a '
-' TableScan'
-' alias: a'
-' GatherStats: false'
-' Map Join Operator'
-' condition map:'
-' Inner Join 0 to 1'
-' condition expressions:'
-' 0 '
-' 1 '
-' handleSkewJoin: false'
-' keys:'
-' 0 [Column[key]]'
-' 1 [Column[key]]'
-' Position of Big Table: 0'
-' File Output Operator'
-' compressed: false'
-' GlobalTableId: 0'
-' directory: file:!!{hive.exec.scratchdir}!!'
-' NumFilesPerFileSink: 1'
-' table:'
-' input format: org.apache.hadoop.mapred.SequenceFileInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat'
-' properties:'
-' columns '
-' columns.types '
-' escape.delim \'
-' TotalFiles: 1'
-' GatherStats: false'
-' MultiFileSpray: false'
-' Local Work:'
-' Map Reduce Local Work'
-' Needs Tagging: false'
-' Path -> Alias:'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1/part=1 [a]'
-' Path -> Partition:'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1/part=1 '
-' Partition'
-' base file name: part=1'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' partition values:'
-' part 1'
-' properties:'
-' bucket_count 2'
-' bucket_field_name key'
-' columns key,value'
-' columns.types int:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1/part=1'
-' name bucketmapjoin8.srcbucket_mapjoin_part_1'
-' numFiles 2'
-' numPartitions 1'
-' numRows 0'
-' partition_columns part'
-' rawDataSize 0'
-' serialization.ddl struct srcbucket_mapjoin_part_1 { i32 key, string value}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 2750'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' '
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count 2'
-' bucket_field_name key'
-' columns key,value'
-' columns.types int:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1'
-' name bucketmapjoin8.srcbucket_mapjoin_part_1'
-' numFiles 2'
-' numPartitions 1'
-' numRows 0'
-' partition_columns part'
-' rawDataSize 0'
-' serialization.ddl struct srcbucket_mapjoin_part_1 { i32 key, string value}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 2750'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin8.srcbucket_mapjoin_part_1'
-' name: bucketmapjoin8.srcbucket_mapjoin_part_1'
-''
-' Stage: Stage-2'
-' Map Reduce'
-' Alias -> Map Operator Tree:'
-' file:!!{hive.exec.scratchdir}!! '
-' Select Operator'
-' Select Operator'
-' Group By Operator'
-' aggregations:'
-' expr: count()'
-' bucketGroup: false'
-' mode: hash'
-' outputColumnNames: _col0'
-' Reduce Output Operator'
-' sort order: '
-' tag: -1'
-' value expressions:'
-' expr: _col0'
-' type: bigint'
-' Needs Tagging: false'
-' Path -> Alias:'
-' file:!!{hive.exec.scratchdir}!! [file:!!{hive.exec.scratchdir}!!]'
-' Path -> Partition:'
-' file:!!{hive.exec.scratchdir}!! '
-' Partition'
-' base file name: -mr-10002'
-' input format: org.apache.hadoop.mapred.SequenceFileInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat'
-' properties:'
-' columns '
-' columns.types '
-' escape.delim \'
-' '
-' input format: org.apache.hadoop.mapred.SequenceFileInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat'
-' properties:'
-' columns '
-' columns.types '
-' escape.delim \'
-' Reduce Operator Tree:'
-' Group By Operator'
-' aggregations:'
-' expr: count(VALUE._col0)'
-' bucketGroup: false'
-' mode: mergepartial'
-' outputColumnNames: _col0'
-' Select Operator'
-' expressions:'
-' expr: _col0'
-' type: bigint'
-' outputColumnNames: _col0'
-' File Output Operator'
-' compressed: false'
-' GlobalTableId: 0'
-' directory: file:!!{hive.exec.scratchdir}!!'
-' NumFilesPerFileSink: 1'
-' Stats Publishing Key Prefix: file:!!{hive.exec.scratchdir}!!'
-' table:'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' columns _col0'
-' columns.types bigint'
-' escape.delim \'
-' serialization.format 1'
-' TotalFiles: 1'
-' GatherStats: false'
-' MultiFileSpray: false'
-''
-' Stage: Stage-0'
-' Fetch Operator'
-' limit: -1'
-''
-''
-204 rows selected
->>>
->>> SELECT /*+ MAPJOIN(b) */ count(*)
-FROM srcbucket_mapjoin_part_1 a JOIN srcbucket_mapjoin_part_2 b
-ON a.key = b.key AND a.part = '1' and b.part = '1';
-'_c1'
-'464'
-1 row selected
->>>
->>> ALTER TABLE srcbucket_mapjoin_part_2 CLUSTERED BY (value) INTO 2 BUCKETS;
-No rows affected
->>>
->>> -- The partition bucketing metadata match but the tables are bucketed on different columns, bucket map join should still be used
->>>
->>> EXPLAIN EXTENDED
-SELECT /*+ MAPJOIN(b) */ count(*)
-FROM srcbucket_mapjoin_part_1 a JOIN srcbucket_mapjoin_part_2 b
-ON a.key = b.key AND a.part = '1' and b.part = '1';
-'Explain'
-'ABSTRACT SYNTAX TREE:'
-' (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME srcbucket_mapjoin_part_1) a) (TOK_TABREF (TOK_TABNAME srcbucket_mapjoin_part_2) b) (and (AND (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)) (= (. (TOK_TABLE_OR_COL a) part) '1')) (= (. (TOK_TABLE_OR_COL b) part) '1')))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST b))) (TOK_SELEXPR (TOK_FUNCTIONSTAR count)))))'
-''
-'STAGE DEPENDENCIES:'
-' Stage-4 is a root stage'
-' Stage-1 depends on stages: Stage-4'
-' Stage-2 depends on stages: Stage-1'
-' Stage-0 is a root stage'
-''
-'STAGE PLANS:'
-' Stage: Stage-4'
-' Map Reduce Local Work'
-' Alias -> Map Local Tables:'
-' b '
-' Fetch Operator'
-' limit: -1'
-' Alias -> Map Local Operator Tree:'
-' b '
-' TableScan'
-' alias: b'
-' GatherStats: false'
-' HashTable Sink Operator'
-' condition expressions:'
-' 0 '
-' 1 '
-' handleSkewJoin: false'
-' keys:'
-' 0 [Column[key]]'
-' 1 [Column[key]]'
-' Position of Big Table: 0'
-' Bucket Mapjoin Context:'
-' Alias Bucket Base File Name Mapping:'
-' b {part=1/srcbucket20.txt=[part=1/srcbucket20.txt], part=1/srcbucket21.txt=[part=1/srcbucket21.txt]}'
-' Alias Bucket File Name Mapping:'
-' b {!!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1/part=1/srcbucket20.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_2/part=1/srcbucket20.txt], !!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1/part=1/srcbucket21.txt=[!!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_2/part=1/srcbucket21.txt]}'
-' Alias Bucket Output File Name Mapping:'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1/part=1/srcbucket20.txt 0'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1/part=1/srcbucket21.txt 1'
-''
-' Stage: Stage-1'
-' Map Reduce'
-' Alias -> Map Operator Tree:'
-' a '
-' TableScan'
-' alias: a'
-' GatherStats: false'
-' Map Join Operator'
-' condition map:'
-' Inner Join 0 to 1'
-' condition expressions:'
-' 0 '
-' 1 '
-' handleSkewJoin: false'
-' keys:'
-' 0 [Column[key]]'
-' 1 [Column[key]]'
-' Position of Big Table: 0'
-' File Output Operator'
-' compressed: false'
-' GlobalTableId: 0'
-' directory: file:!!{hive.exec.scratchdir}!!'
-' NumFilesPerFileSink: 1'
-' table:'
-' input format: org.apache.hadoop.mapred.SequenceFileInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat'
-' properties:'
-' columns '
-' columns.types '
-' escape.delim \'
-' TotalFiles: 1'
-' GatherStats: false'
-' MultiFileSpray: false'
-' Local Work:'
-' Map Reduce Local Work'
-' Needs Tagging: false'
-' Path -> Alias:'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1/part=1 [a]'
-' Path -> Partition:'
-' !!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1/part=1 '
-' Partition'
-' base file name: part=1'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' partition values:'
-' part 1'
-' properties:'
-' bucket_count 2'
-' bucket_field_name key'
-' columns key,value'
-' columns.types int:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1/part=1'
-' name bucketmapjoin8.srcbucket_mapjoin_part_1'
-' numFiles 2'
-' numPartitions 1'
-' numRows 0'
-' partition_columns part'
-' rawDataSize 0'
-' serialization.ddl struct srcbucket_mapjoin_part_1 { i32 key, string value}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 2750'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' '
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' bucket_count 2'
-' bucket_field_name key'
-' columns key,value'
-' columns.types int:string'
-' file.inputformat org.apache.hadoop.mapred.TextInputFormat'
-' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' location !!{hive.metastore.warehouse.dir}!!/bucketmapjoin8.db/srcbucket_mapjoin_part_1'
-' name bucketmapjoin8.srcbucket_mapjoin_part_1'
-' numFiles 2'
-' numPartitions 1'
-' numRows 0'
-' partition_columns part'
-' rawDataSize 0'
-' serialization.ddl struct srcbucket_mapjoin_part_1 { i32 key, string value}'
-' serialization.format 1'
-' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' totalSize 2750'
-' transient_lastDdlTime !!UNIXTIME!!'
-' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
-' name: bucketmapjoin8.srcbucket_mapjoin_part_1'
-' name: bucketmapjoin8.srcbucket_mapjoin_part_1'
-''
-' Stage: Stage-2'
-' Map Reduce'
-' Alias -> Map Operator Tree:'
-' file:!!{hive.exec.scratchdir}!! '
-' Select Operator'
-' Select Operator'
-' Group By Operator'
-' aggregations:'
-' expr: count()'
-' bucketGroup: false'
-' mode: hash'
-' outputColumnNames: _col0'
-' Reduce Output Operator'
-' sort order: '
-' tag: -1'
-' value expressions:'
-' expr: _col0'
-' type: bigint'
-' Needs Tagging: false'
-' Path -> Alias:'
-' file:!!{hive.exec.scratchdir}!! [file:!!{hive.exec.scratchdir}!!]'
-' Path -> Partition:'
-' file:!!{hive.exec.scratchdir}!! '
-' Partition'
-' base file name: -mr-10002'
-' input format: org.apache.hadoop.mapred.SequenceFileInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat'
-' properties:'
-' columns '
-' columns.types '
-' escape.delim \'
-' '
-' input format: org.apache.hadoop.mapred.SequenceFileInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat'
-' properties:'
-' columns '
-' columns.types '
-' escape.delim \'
-' Reduce Operator Tree:'
-' Group By Operator'
-' aggregations:'
-' expr: count(VALUE._col0)'
-' bucketGroup: false'
-' mode: mergepartial'
-' outputColumnNames: _col0'
-' Select Operator'
-' expressions:'
-' expr: _col0'
-' type: bigint'
-' outputColumnNames: _col0'
-' File Output Operator'
-' compressed: false'
-' GlobalTableId: 0'
-' directory: file:!!{hive.exec.scratchdir}!!'
-' NumFilesPerFileSink: 1'
-' Stats Publishing Key Prefix: file:!!{hive.exec.scratchdir}!!'
-' table:'
-' input format: org.apache.hadoop.mapred.TextInputFormat'
-' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
-' properties:'
-' columns _col0'
-' columns.types bigint'
-' escape.delim \'
-' serialization.format 1'
-' TotalFiles: 1'
-' GatherStats: false'
-' MultiFileSpray: false'
-''
-' Stage: Stage-0'
-' Fetch Operator'
-' limit: -1'
-''
-''
-204 rows selected
->>>
->>> SELECT /*+ MAPJOIN(b) */ count(*)
-FROM srcbucket_mapjoin_part_1 a JOIN srcbucket_mapjoin_part_2 b
-ON a.key = b.key AND a.part = '1' and b.part = '1';
-'_c1'
-'464'
-1 row selected
->>> !record