PREHOOK: query: create table tmp_smb_bucket_10(userid int, pageid int, postid int, type string) partitioned by (ds string) CLUSTERED BY (userid) SORTED BY (pageid, postid, type, userid) INTO 2 BUCKETS STORED AS RCFILE PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@tmp_smb_bucket_10 POSTHOOK: query: create table tmp_smb_bucket_10(userid int, pageid int, postid int, type string) partitioned by (ds string) CLUSTERED BY (userid) SORTED BY (pageid, postid, type, userid) INTO 2 BUCKETS STORED AS RCFILE POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@tmp_smb_bucket_10 PREHOOK: query: alter table tmp_smb_bucket_10 add partition (ds = '1') PREHOOK: type: ALTERTABLE_ADDPARTS PREHOOK: Output: default@tmp_smb_bucket_10 POSTHOOK: query: alter table tmp_smb_bucket_10 add partition (ds = '1') POSTHOOK: type: ALTERTABLE_ADDPARTS POSTHOOK: Output: default@tmp_smb_bucket_10 POSTHOOK: Output: default@tmp_smb_bucket_10@ds=1 PREHOOK: query: alter table tmp_smb_bucket_10 add partition (ds = '2') PREHOOK: type: ALTERTABLE_ADDPARTS PREHOOK: Output: default@tmp_smb_bucket_10 POSTHOOK: query: alter table tmp_smb_bucket_10 add partition (ds = '2') POSTHOOK: type: ALTERTABLE_ADDPARTS POSTHOOK: Output: default@tmp_smb_bucket_10 POSTHOOK: Output: default@tmp_smb_bucket_10@ds=2 PREHOOK: query: -- add dummy files to make sure that the number of files in each partition is same as number of buckets load data local inpath '../../data/files/smbbucket_1.rc' INTO TABLE tmp_smb_bucket_10 partition(ds='1') PREHOOK: type: LOAD #### A masked pattern was here #### PREHOOK: Output: default@tmp_smb_bucket_10@ds=1 POSTHOOK: query: -- add dummy files to make sure that the number of files in each partition is same as number of buckets load data local inpath '../../data/files/smbbucket_1.rc' INTO TABLE tmp_smb_bucket_10 partition(ds='1') POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@tmp_smb_bucket_10@ds=1 PREHOOK: query: load data local inpath '../../data/files/smbbucket_2.rc' INTO TABLE tmp_smb_bucket_10 partition(ds='1') PREHOOK: type: LOAD #### A masked pattern was here #### PREHOOK: Output: default@tmp_smb_bucket_10@ds=1 POSTHOOK: query: load data local inpath '../../data/files/smbbucket_2.rc' INTO TABLE tmp_smb_bucket_10 partition(ds='1') POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@tmp_smb_bucket_10@ds=1 PREHOOK: query: load data local inpath '../../data/files/smbbucket_1.rc' INTO TABLE tmp_smb_bucket_10 partition(ds='2') PREHOOK: type: LOAD #### A masked pattern was here #### PREHOOK: Output: default@tmp_smb_bucket_10@ds=2 POSTHOOK: query: load data local inpath '../../data/files/smbbucket_1.rc' INTO TABLE tmp_smb_bucket_10 partition(ds='2') POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@tmp_smb_bucket_10@ds=2 PREHOOK: query: load data local inpath '../../data/files/smbbucket_2.rc' INTO TABLE tmp_smb_bucket_10 partition(ds='2') PREHOOK: type: LOAD #### A masked pattern was here #### PREHOOK: Output: default@tmp_smb_bucket_10@ds=2 POSTHOOK: query: load data local inpath '../../data/files/smbbucket_2.rc' INTO TABLE tmp_smb_bucket_10 partition(ds='2') POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@tmp_smb_bucket_10@ds=2 PREHOOK: query: explain select /*+mapjoin(a)*/ * from tmp_smb_bucket_10 a join tmp_smb_bucket_10 b on (a.ds = '1' and b.ds = '2' and a.userid = b.userid and a.pageid = b.pageid and a.postid = b.postid and a.type = b.type) PREHOOK: type: QUERY POSTHOOK: query: explain select /*+mapjoin(a)*/ * from tmp_smb_bucket_10 a join tmp_smb_bucket_10 b on (a.ds = '1' and b.ds = '2' and a.userid = b.userid and a.pageid = b.pageid and a.postid = b.postid and a.type = b.type) POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 STAGE PLANS: Stage: Stage-1 Map Reduce Map Operator Tree: TableScan alias: b Statistics: Num rows: 3 Data size: 414 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (((userid is not null and pageid is not null) and postid is not null) and type is not null) (type: boolean) Statistics: Num rows: 1 Data size: 138 Basic stats: COMPLETE Column stats: NONE Sorted Merge Bucket Map Join Operator condition map: Inner Join 0 to 1 keys: 0 userid (type: int), pageid (type: int), postid (type: int), type (type: string) 1 userid (type: int), pageid (type: int), postid (type: int), type (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col8, _col9, _col10, _col11 Select Operator expressions: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string), '1' (type: string), _col8 (type: int), _col9 (type: int), _col10 (type: int), _col11 (type: string), '2' (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9 File Output Operator compressed: false 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-0 Fetch Operator limit: -1 Processor Tree: ListSink