hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject [2/2] hive git commit: HIVE-15212 : merge branch into master - some test/out fixes (Sergey Shelukhin)
Date Mon, 13 Mar 2017 23:25:19 GMT
HIVE-15212 : merge branch into master - some test/out fixes (Sergey Shelukhin)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/57a48ce7
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/57a48ce7
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/57a48ce7

Branch: refs/heads/hive-14535
Commit: 57a48ce7801d28582a673b1401d8b0bdd868d31f
Parents: 53b9dfa
Author: Sergey Shelukhin <sershe@apache.org>
Authored: Mon Mar 13 16:24:47 2017 -0700
Committer: Sergey Shelukhin <sershe@apache.org>
Committed: Mon Mar 13 16:24:47 2017 -0700

----------------------------------------------------------------------
 itests/pom.xml                                  |  28 ++
 ql/src/test/queries/clientpositive/mm_all.q     |   8 +-
 ql/src/test/queries/clientpositive/mm_all2.q    |  66 ---
 ql/src/test/queries/clientpositive/mm_buckets.q |  66 +++
 ql/src/test/queries/clientpositive/mm_current.q |  36 --
 .../clientpositive/llap/mm_current.q.out        | 420 ----------------
 ql/src/test/results/clientpositive/mm_all.q.out |  40 +-
 .../test/results/clientpositive/mm_all2.q.out   | 495 -------------------
 .../results/clientpositive/mm_buckets.q.out     | 489 ++++++++++++++++++
 .../results/clientpositive/mm_current.q.out     | 125 -----
 .../clientpositive/mm_insertonly_acid.q.out     |  10 +-
 11 files changed, 612 insertions(+), 1171 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/57a48ce7/itests/pom.xml
----------------------------------------------------------------------
diff --git a/itests/pom.xml b/itests/pom.xml
index e039d92..e5b54bf 100644
--- a/itests/pom.xml
+++ b/itests/pom.xml
@@ -73,6 +73,34 @@
                   <target>
                     <echo file="target/download.sh">
                       set -x
+                      /bin/pwd
+                      BASE_DIR=./target
+                      HIVE_ROOT=$BASE_DIR/../../../
+                      DOWNLOAD_DIR=./../thirdparty
+                      download() {
+                        url=$1;
+                        finalName=$2
+                        tarName=$(basename $url)
+                        rm -rf $BASE_DIR/$finalName
+                        if [[ ! -f $DOWNLOAD_DIR/$tarName ]]
+                        then
+                         curl -Sso $DOWNLOAD_DIR/$tarName $url
+                        else
+                          local md5File="$tarName".md5sum
+                          curl -Sso $DOWNLOAD_DIR/$md5File "$url".md5sum
+                          cd $DOWNLOAD_DIR
+                          if ! md5sum -c $md5File; then
+                            curl -Sso $DOWNLOAD_DIR/$tarName $url || return 1
+                          fi
+
+                          cd -
+                        fi
+                        tar -zxf $DOWNLOAD_DIR/$tarName -C $BASE_DIR
+                        mv $BASE_DIR/spark-${spark.version}-bin-hadoop2-without-hive $BASE_DIR/$finalName
+                      }
+                      mkdir -p $DOWNLOAD_DIR
+                      download "http://d3jw87u4immizc.cloudfront.net/spark-tarball/spark-${spark.version}-bin-hadoop2-without-hive.tgz" "spark"
+                      cp -f $HIVE_ROOT/data/conf/spark/log4j2.properties $BASE_DIR/spark/conf/
                     </echo>
                   </target>
                 </configuration>

http://git-wip-us.apache.org/repos/asf/hive/blob/57a48ce7/ql/src/test/queries/clientpositive/mm_all.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/mm_all.q b/ql/src/test/queries/clientpositive/mm_all.q
index a79d917..a6a7c8f 100644
--- a/ql/src/test/queries/clientpositive/mm_all.q
+++ b/ql/src/test/queries/clientpositive/mm_all.q
@@ -124,7 +124,7 @@ create table skew_mm(k1 int, k2 int, k4 int) skewed by (k1, k4) on ((0,0),(1,1),
 insert into table skew_mm 
 select key, key, key from intermediate;
 
-select * from skew_mm order by k2;
+select * from skew_mm order by k2, k1, k4;
 drop table skew_mm;
 
 
@@ -137,7 +137,7 @@ union all
 select key +1 as i, key +2 as j, key +3 as k, key +4 as l from intermediate;
 
 
-select * from skew_dp_union_mm order by k2;
+select * from skew_dp_union_mm order by k2, k1, k4;
 drop table skew_dp_union_mm;
 
 
@@ -177,12 +177,12 @@ drop table merge2_mm;
 create table merge1_mm (id int) partitioned by (key int) stored as orc tblproperties("transactional"="true", "transactional_properties"="insert_only");
 
 insert into table merge1_mm partition (key) select key, key from intermediate;
-select * from merge1_mm;
+select * from merge1_mm order by id, key;
 
 set tez.grouping.split-count=1;
 insert into table merge1_mm partition (key) select key, key from intermediate;
 set tez.grouping.split-count=0;
-select * from merge1_mm;
+select * from merge1_mm order by id, key;
 
 drop table merge1_mm;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/57a48ce7/ql/src/test/queries/clientpositive/mm_all2.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/mm_all2.q b/ql/src/test/queries/clientpositive/mm_all2.q
deleted file mode 100644
index f3d0f07..0000000
--- a/ql/src/test/queries/clientpositive/mm_all2.q
+++ /dev/null
@@ -1,66 +0,0 @@
-set hive.mapred.mode=nonstrict;
-set hive.explain.user=false;
-set hive.fetch.task.conversion=none;
-set tez.grouping.min-size=1;
-set tez.grouping.max-size=2;
-set hive.exec.dynamic.partition.mode=nonstrict;
-set hive.support.concurrency=true;
-set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
-
-
--- Bucketing tests are slow and some tablesample ones don't work w/o MM
-
--- Force multiple writers when reading
-drop table intermediate;
-create table intermediate(key int) partitioned by (p int) stored as orc;
-insert into table intermediate partition(p='455') select distinct key from src where key >= 0 order by key desc limit 2;
-insert into table intermediate partition(p='456') select distinct key from src where key is not null order by key asc limit 2;
-insert into table intermediate partition(p='457') select distinct key from src where key >= 100 order by key asc limit 2;
-
-
-
-drop table bucket0_mm;
-create table bucket0_mm(key int, id int)
-clustered by (key) into 2 buckets
-tblproperties("transactional"="true", "transactional_properties"="insert_only");
-insert into table bucket0_mm select key, key from intermediate;
-select * from bucket0_mm;
-select * from bucket0_mm tablesample (bucket 1 out of 2) s;
-select * from bucket0_mm tablesample (bucket 2 out of 2) s;
-insert into table bucket0_mm select key, key from intermediate;
-select * from bucket0_mm;
-select * from bucket0_mm tablesample (bucket 1 out of 2) s;
-select * from bucket0_mm tablesample (bucket 2 out of 2) s;
-drop table bucket0_mm;
-
-
-drop table bucket1_mm;
-create table bucket1_mm(key int, id int) partitioned by (key2 int)
-clustered by (key) sorted by (key) into 2 buckets
-tblproperties("transactional"="true", "transactional_properties"="insert_only");
-insert into table bucket1_mm partition (key2)
-select key + 1, key, key - 1 from intermediate
-union all 
-select key - 1, key, key + 1 from intermediate;
-select * from bucket1_mm;
-select * from bucket1_mm tablesample (bucket 1 out of 2) s;
-select * from bucket1_mm tablesample (bucket 2 out of 2) s;
-drop table bucket1_mm;
-
-
-
-drop table bucket2_mm;
-create table bucket2_mm(key int, id int)
-clustered by (key) into 10 buckets
-tblproperties("transactional"="true", "transactional_properties"="insert_only");
-insert into table bucket2_mm select key, key from intermediate where key == 0;
-select * from bucket2_mm;
-select * from bucket2_mm tablesample (bucket 1 out of 10) s;
-select * from bucket2_mm tablesample (bucket 4 out of 10) s;
-insert into table bucket2_mm select key, key from intermediate where key in (0, 103);
-select * from bucket2_mm;
-select * from bucket2_mm tablesample (bucket 1 out of 10) s;
-select * from bucket2_mm tablesample (bucket 4 out of 10) s;
-drop table bucket2_mm;
-
-drop table intermediate;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hive/blob/57a48ce7/ql/src/test/queries/clientpositive/mm_buckets.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/mm_buckets.q b/ql/src/test/queries/clientpositive/mm_buckets.q
new file mode 100644
index 0000000..d5a047a
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/mm_buckets.q
@@ -0,0 +1,66 @@
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+set hive.fetch.task.conversion=none;
+set tez.grouping.min-size=1;
+set tez.grouping.max-size=2;
+set hive.exec.dynamic.partition.mode=nonstrict;
+set hive.support.concurrency=true;
+set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
+
+
+-- Bucketing tests are slow and some tablesample ones don't work w/o MM
+
+-- Force multiple writers when reading
+drop table intermediate;
+create table intermediate(key int) partitioned by (p int) stored as orc;
+insert into table intermediate partition(p='455') select distinct key from src where key >= 0 order by key desc limit 2;
+insert into table intermediate partition(p='456') select distinct key from src where key is not null order by key asc limit 2;
+insert into table intermediate partition(p='457') select distinct key from src where key >= 100 order by key asc limit 2;
+
+
+
+drop table bucket0_mm;
+create table bucket0_mm(key int, id int)
+clustered by (key) into 2 buckets
+tblproperties("transactional"="true", "transactional_properties"="insert_only");
+insert into table bucket0_mm select key, key from intermediate;
+select * from bucket0_mm order by key, id;
+select * from bucket0_mm tablesample (bucket 1 out of 2) s;
+select * from bucket0_mm tablesample (bucket 2 out of 2) s;
+insert into table bucket0_mm select key, key from intermediate;
+select * from bucket0_mm order by key, id;
+select * from bucket0_mm tablesample (bucket 1 out of 2) s;
+select * from bucket0_mm tablesample (bucket 2 out of 2) s;
+drop table bucket0_mm;
+
+
+drop table bucket1_mm;
+create table bucket1_mm(key int, id int) partitioned by (key2 int)
+clustered by (key) sorted by (key) into 2 buckets
+tblproperties("transactional"="true", "transactional_properties"="insert_only");
+insert into table bucket1_mm partition (key2)
+select key + 1, key, key - 1 from intermediate
+union all 
+select key - 1, key, key + 1 from intermediate;
+select * from bucket1_mm order by key, id;
+select * from bucket1_mm tablesample (bucket 1 out of 2) s  order by key, id;
+select * from bucket1_mm tablesample (bucket 2 out of 2) s  order by key, id;
+drop table bucket1_mm;
+
+
+
+drop table bucket2_mm;
+create table bucket2_mm(key int, id int)
+clustered by (key) into 10 buckets
+tblproperties("transactional"="true", "transactional_properties"="insert_only");
+insert into table bucket2_mm select key, key from intermediate where key == 0;
+select * from bucket2_mm order by key, id;
+select * from bucket2_mm tablesample (bucket 1 out of 10) s order by key, id;
+select * from bucket2_mm tablesample (bucket 4 out of 10) s order by key, id;
+insert into table bucket2_mm select key, key from intermediate where key in (0, 103);
+select * from bucket2_mm;
+select * from bucket2_mm tablesample (bucket 1 out of 10) s order by key, id;
+select * from bucket2_mm tablesample (bucket 4 out of 10) s order by key, id;
+drop table bucket2_mm;
+
+drop table intermediate;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hive/blob/57a48ce7/ql/src/test/queries/clientpositive/mm_current.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/mm_current.q b/ql/src/test/queries/clientpositive/mm_current.q
deleted file mode 100644
index 291a81a..0000000
--- a/ql/src/test/queries/clientpositive/mm_current.q
+++ /dev/null
@@ -1,36 +0,0 @@
-set hive.mapred.mode=nonstrict;
-set hive.explain.user=false;
-set hive.exec.dynamic.partition.mode=nonstrict;
-set hive.fetch.task.conversion=none;
-set tez.grouping.min-size=1;
-set tez.grouping.max-size=2;
-set hive.tez.auto.reducer.parallelism=false;
-set hive.support.concurrency=true;
-set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
-
-drop table intermediate;
-create table intermediate(key int) partitioned by (p int) stored as orc;
-insert into table intermediate partition(p='455') select distinct key from src where key >= 0 order by key desc limit 2;
-insert into table intermediate partition(p='456') select distinct key from src where key is not null order by key asc limit 2;
-
-
-drop table intermmediate_nonpart;
-create table intermmediate_nonpart(key int, p int) tblproperties("transactional"="true", "transactional_properties"="insert_only");
-insert into intermmediate_nonpart select * from intermediate;
-
-set hive.exim.test.mode=true;
-
-export table intermmediate_nonpart to 'ql/test/data/exports/intermmediate_nonpart';
-drop table intermmediate_nonpart;
-
--- MM export into new MM table, non-part and part
-
-drop table import2_mm;
-import table import2_mm from 'ql/test/data/exports/intermmediate_nonpart';
-desc import2_mm;
-select * from import2_mm order by key, p;
-drop table import2_mm;
-
-drop table intermediate;
-
-

http://git-wip-us.apache.org/repos/asf/hive/blob/57a48ce7/ql/src/test/results/clientpositive/llap/mm_current.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/mm_current.q.out b/ql/src/test/results/clientpositive/llap/mm_current.q.out
deleted file mode 100644
index a00f935..0000000
--- a/ql/src/test/results/clientpositive/llap/mm_current.q.out
+++ /dev/null
@@ -1,420 +0,0 @@
-PREHOOK: query: drop table intermediate
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table intermediate
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table intermediate(key int) partitioned by (p int) stored as orc
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@intermediate
-POSTHOOK: query: create table intermediate(key int) partitioned by (p int) stored as orc
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@intermediate
-PREHOOK: query: insert into table intermediate partition(p='455') select distinct key from src where key >= 0 order by key desc limit 2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@intermediate@p=455
-POSTHOOK: query: insert into table intermediate partition(p='455') select distinct key from src where key >= 0 order by key desc limit 2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@intermediate@p=455
-POSTHOOK: Lineage: intermediate PARTITION(p=455).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-PREHOOK: query: insert into table intermediate partition(p='456') select distinct key from src where key is not null order by key asc limit 2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@intermediate@p=456
-POSTHOOK: query: insert into table intermediate partition(p='456') select distinct key from src where key is not null order by key asc limit 2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@intermediate@p=456
-POSTHOOK: Lineage: intermediate PARTITION(p=456).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-PREHOOK: query: drop table multi0_1_mm
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table multi0_1_mm
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: drop table multi0_2_mm
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table multi0_2_mm
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table multi0_1_mm (key int, key2 int)  tblproperties("transactional"="true", "transactional_properties"="insert_only")
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@multi0_1_mm
-POSTHOOK: query: create table multi0_1_mm (key int, key2 int)  tblproperties("transactional"="true", "transactional_properties"="insert_only")
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@multi0_1_mm
-PREHOOK: query: create table multi0_2_mm (key int, key2 int)  tblproperties("transactional"="true", "transactional_properties"="insert_only")
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@multi0_2_mm
-POSTHOOK: query: create table multi0_2_mm (key int, key2 int)  tblproperties("transactional"="true", "transactional_properties"="insert_only")
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@multi0_2_mm
-PREHOOK: query: from intermediate
-insert overwrite table multi0_1_mm select key, p
-insert overwrite table multi0_2_mm select p, key
-PREHOOK: type: QUERY
-PREHOOK: Input: default@intermediate
-PREHOOK: Input: default@intermediate@p=455
-PREHOOK: Input: default@intermediate@p=456
-PREHOOK: Output: default@multi0_1_mm
-PREHOOK: Output: default@multi0_2_mm
-POSTHOOK: query: from intermediate
-insert overwrite table multi0_1_mm select key, p
-insert overwrite table multi0_2_mm select p, key
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@intermediate
-POSTHOOK: Input: default@intermediate@p=455
-POSTHOOK: Input: default@intermediate@p=456
-POSTHOOK: Output: default@multi0_1_mm
-POSTHOOK: Output: default@multi0_2_mm
-POSTHOOK: Lineage: multi0_1_mm.key SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: multi0_1_mm.key2 SIMPLE [(intermediate)intermediate.FieldSchema(name:p, type:int, comment:null), ]
-POSTHOOK: Lineage: multi0_2_mm.key SIMPLE [(intermediate)intermediate.FieldSchema(name:p, type:int, comment:null), ]
-POSTHOOK: Lineage: multi0_2_mm.key2 SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-PREHOOK: query: select * from multi0_1_mm order by key, key2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@multi0_1_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from multi0_1_mm order by key, key2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@multi0_1_mm
-#### A masked pattern was here ####
-0	456
-10	456
-97	455
-98	455
-PREHOOK: query: select * from multi0_2_mm order by key, key2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@multi0_2_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from multi0_2_mm order by key, key2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@multi0_2_mm
-#### A masked pattern was here ####
-455	97
-455	98
-456	0
-456	10
-PREHOOK: query: from intermediate
-insert into table multi0_1_mm select p, key
-insert overwrite table multi0_2_mm select key, p
-PREHOOK: type: QUERY
-PREHOOK: Input: default@intermediate
-PREHOOK: Input: default@intermediate@p=455
-PREHOOK: Input: default@intermediate@p=456
-PREHOOK: Output: default@multi0_1_mm
-PREHOOK: Output: default@multi0_2_mm
-POSTHOOK: query: from intermediate
-insert into table multi0_1_mm select p, key
-insert overwrite table multi0_2_mm select key, p
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@intermediate
-POSTHOOK: Input: default@intermediate@p=455
-POSTHOOK: Input: default@intermediate@p=456
-POSTHOOK: Output: default@multi0_1_mm
-POSTHOOK: Output: default@multi0_2_mm
-POSTHOOK: Lineage: multi0_1_mm.key SIMPLE [(intermediate)intermediate.FieldSchema(name:p, type:int, comment:null), ]
-POSTHOOK: Lineage: multi0_1_mm.key2 SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: multi0_2_mm.key SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: multi0_2_mm.key2 SIMPLE [(intermediate)intermediate.FieldSchema(name:p, type:int, comment:null), ]
-PREHOOK: query: select * from multi0_1_mm order by key, key2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@multi0_1_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from multi0_1_mm order by key, key2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@multi0_1_mm
-#### A masked pattern was here ####
-0	456
-10	456
-97	455
-98	455
-455	97
-455	98
-456	0
-456	10
-PREHOOK: query: select * from multi0_2_mm order by key, key2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@multi0_2_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from multi0_2_mm order by key, key2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@multi0_2_mm
-#### A masked pattern was here ####
-0	456
-10	456
-97	455
-98	455
-PREHOOK: query: drop table multi0_1_mm
-PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@multi0_1_mm
-PREHOOK: Output: default@multi0_1_mm
-POSTHOOK: query: drop table multi0_1_mm
-POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@multi0_1_mm
-POSTHOOK: Output: default@multi0_1_mm
-PREHOOK: query: drop table multi0_2_mm
-PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@multi0_2_mm
-PREHOOK: Output: default@multi0_2_mm
-POSTHOOK: query: drop table multi0_2_mm
-POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@multi0_2_mm
-POSTHOOK: Output: default@multi0_2_mm
-PREHOOK: query: drop table multi1_mm
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table multi1_mm
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table multi1_mm (key int, key2 int) partitioned by (p int) tblproperties("transactional"="true", "transactional_properties"="insert_only")
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@multi1_mm
-POSTHOOK: query: create table multi1_mm (key int, key2 int) partitioned by (p int) tblproperties("transactional"="true", "transactional_properties"="insert_only")
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@multi1_mm
-PREHOOK: query: from intermediate
-insert into table multi1_mm partition(p=1) select p, key
-insert into table multi1_mm partition(p=2) select key, p
-PREHOOK: type: QUERY
-PREHOOK: Input: default@intermediate
-PREHOOK: Input: default@intermediate@p=455
-PREHOOK: Input: default@intermediate@p=456
-PREHOOK: Output: default@multi1_mm@p=1
-PREHOOK: Output: default@multi1_mm@p=2
-POSTHOOK: query: from intermediate
-insert into table multi1_mm partition(p=1) select p, key
-insert into table multi1_mm partition(p=2) select key, p
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@intermediate
-POSTHOOK: Input: default@intermediate@p=455
-POSTHOOK: Input: default@intermediate@p=456
-POSTHOOK: Output: default@multi1_mm@p=1
-POSTHOOK: Output: default@multi1_mm@p=2
-POSTHOOK: Lineage: multi1_mm PARTITION(p=1).key SIMPLE [(intermediate)intermediate.FieldSchema(name:p, type:int, comment:null), ]
-POSTHOOK: Lineage: multi1_mm PARTITION(p=1).key2 SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: multi1_mm PARTITION(p=2).key SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: multi1_mm PARTITION(p=2).key2 SIMPLE [(intermediate)intermediate.FieldSchema(name:p, type:int, comment:null), ]
-PREHOOK: query: select * from multi1_mm order by key, key2, p
-PREHOOK: type: QUERY
-PREHOOK: Input: default@multi1_mm
-PREHOOK: Input: default@multi1_mm@p=1
-PREHOOK: Input: default@multi1_mm@p=2
-#### A masked pattern was here ####
-POSTHOOK: query: select * from multi1_mm order by key, key2, p
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@multi1_mm
-POSTHOOK: Input: default@multi1_mm@p=1
-POSTHOOK: Input: default@multi1_mm@p=2
-#### A masked pattern was here ####
-0	456	2
-10	456	2
-97	455	2
-98	455	2
-455	97	1
-455	98	1
-456	0	1
-456	10	1
-PREHOOK: query: from intermediate
-insert into table multi1_mm partition(p=2) select p, key
-insert overwrite table multi1_mm partition(p=1) select key, p
-PREHOOK: type: QUERY
-PREHOOK: Input: default@intermediate
-PREHOOK: Input: default@intermediate@p=455
-PREHOOK: Input: default@intermediate@p=456
-PREHOOK: Output: default@multi1_mm@p=1
-PREHOOK: Output: default@multi1_mm@p=2
-POSTHOOK: query: from intermediate
-insert into table multi1_mm partition(p=2) select p, key
-insert overwrite table multi1_mm partition(p=1) select key, p
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@intermediate
-POSTHOOK: Input: default@intermediate@p=455
-POSTHOOK: Input: default@intermediate@p=456
-POSTHOOK: Output: default@multi1_mm@p=1
-POSTHOOK: Output: default@multi1_mm@p=2
-POSTHOOK: Lineage: multi1_mm PARTITION(p=1).key SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: multi1_mm PARTITION(p=1).key2 SIMPLE [(intermediate)intermediate.FieldSchema(name:p, type:int, comment:null), ]
-POSTHOOK: Lineage: multi1_mm PARTITION(p=2).key SIMPLE [(intermediate)intermediate.FieldSchema(name:p, type:int, comment:null), ]
-POSTHOOK: Lineage: multi1_mm PARTITION(p=2).key2 SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-PREHOOK: query: select * from multi1_mm order by key, key2, p
-PREHOOK: type: QUERY
-PREHOOK: Input: default@multi1_mm
-PREHOOK: Input: default@multi1_mm@p=1
-PREHOOK: Input: default@multi1_mm@p=2
-#### A masked pattern was here ####
-POSTHOOK: query: select * from multi1_mm order by key, key2, p
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@multi1_mm
-POSTHOOK: Input: default@multi1_mm@p=1
-POSTHOOK: Input: default@multi1_mm@p=2
-#### A masked pattern was here ####
-0	456	1
-0	456	2
-10	456	1
-10	456	2
-97	455	1
-97	455	2
-98	455	1
-98	455	2
-455	97	1
-455	97	2
-455	98	1
-455	98	2
-456	0	1
-456	0	2
-456	10	1
-456	10	2
-PREHOOK: query: from intermediate
-insert into table multi1_mm partition(p) select p, key, p
-insert into table multi1_mm partition(p=1) select key, p
-PREHOOK: type: QUERY
-PREHOOK: Input: default@intermediate
-PREHOOK: Input: default@intermediate@p=455
-PREHOOK: Input: default@intermediate@p=456
-PREHOOK: Output: default@multi1_mm
-PREHOOK: Output: default@multi1_mm@p=1
-POSTHOOK: query: from intermediate
-insert into table multi1_mm partition(p) select p, key, p
-insert into table multi1_mm partition(p=1) select key, p
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@intermediate
-POSTHOOK: Input: default@intermediate@p=455
-POSTHOOK: Input: default@intermediate@p=456
-POSTHOOK: Output: default@multi1_mm@p=1
-POSTHOOK: Output: default@multi1_mm@p=455
-POSTHOOK: Output: default@multi1_mm@p=456
-POSTHOOK: Lineage: multi1_mm PARTITION(p=1).key SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: multi1_mm PARTITION(p=1).key2 SIMPLE [(intermediate)intermediate.FieldSchema(name:p, type:int, comment:null), ]
-POSTHOOK: Lineage: multi1_mm PARTITION(p=455).key SIMPLE [(intermediate)intermediate.FieldSchema(name:p, type:int, comment:null), ]
-POSTHOOK: Lineage: multi1_mm PARTITION(p=455).key2 SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: multi1_mm PARTITION(p=456).key SIMPLE [(intermediate)intermediate.FieldSchema(name:p, type:int, comment:null), ]
-POSTHOOK: Lineage: multi1_mm PARTITION(p=456).key2 SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-PREHOOK: query: select key, key2, p from multi1_mm order by key, key2, p
-PREHOOK: type: QUERY
-PREHOOK: Input: default@multi1_mm
-PREHOOK: Input: default@multi1_mm@p=1
-PREHOOK: Input: default@multi1_mm@p=2
-PREHOOK: Input: default@multi1_mm@p=455
-PREHOOK: Input: default@multi1_mm@p=456
-#### A masked pattern was here ####
-POSTHOOK: query: select key, key2, p from multi1_mm order by key, key2, p
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@multi1_mm
-POSTHOOK: Input: default@multi1_mm@p=1
-POSTHOOK: Input: default@multi1_mm@p=2
-POSTHOOK: Input: default@multi1_mm@p=455
-POSTHOOK: Input: default@multi1_mm@p=456
-#### A masked pattern was here ####
-0	456	1
-0	456	1
-0	456	2
-10	456	1
-10	456	1
-10	456	2
-97	455	1
-97	455	1
-97	455	2
-98	455	1
-98	455	1
-98	455	2
-455	97	1
-455	97	2
-455	97	455
-455	98	1
-455	98	2
-455	98	455
-456	0	1
-456	0	2
-456	0	456
-456	10	1
-456	10	2
-456	10	456
-PREHOOK: query: from intermediate
-insert into table multi1_mm partition(p) select p, key, 1
-insert into table multi1_mm partition(p=1) select key, p
-PREHOOK: type: QUERY
-PREHOOK: Input: default@intermediate
-PREHOOK: Input: default@intermediate@p=455
-PREHOOK: Input: default@intermediate@p=456
-PREHOOK: Output: default@multi1_mm
-PREHOOK: Output: default@multi1_mm@p=1
-POSTHOOK: query: from intermediate
-insert into table multi1_mm partition(p) select p, key, 1
-insert into table multi1_mm partition(p=1) select key, p
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@intermediate
-POSTHOOK: Input: default@intermediate@p=455
-POSTHOOK: Input: default@intermediate@p=456
-POSTHOOK: Output: default@multi1_mm@p=1
-POSTHOOK: Lineage: multi1_mm PARTITION(p=1).key SIMPLE [(intermediate)intermediate.FieldSchema(name:p, type:int, comment:null), ]
-POSTHOOK: Lineage: multi1_mm PARTITION(p=1).key SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: multi1_mm PARTITION(p=1).key2 SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: multi1_mm PARTITION(p=1).key2 SIMPLE [(intermediate)intermediate.FieldSchema(name:p, type:int, comment:null), ]
-PREHOOK: query: select key, key2, p from multi1_mm order by key, key2, p
-PREHOOK: type: QUERY
-PREHOOK: Input: default@multi1_mm
-PREHOOK: Input: default@multi1_mm@p=1
-PREHOOK: Input: default@multi1_mm@p=2
-PREHOOK: Input: default@multi1_mm@p=455
-PREHOOK: Input: default@multi1_mm@p=456
-#### A masked pattern was here ####
-POSTHOOK: query: select key, key2, p from multi1_mm order by key, key2, p
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@multi1_mm
-POSTHOOK: Input: default@multi1_mm@p=1
-POSTHOOK: Input: default@multi1_mm@p=2
-POSTHOOK: Input: default@multi1_mm@p=455
-POSTHOOK: Input: default@multi1_mm@p=456
-#### A masked pattern was here ####
-0	456	1
-0	456	1
-0	456	1
-0	456	2
-10	456	1
-10	456	1
-10	456	1
-10	456	2
-97	455	1
-97	455	1
-97	455	1
-97	455	2
-98	455	1
-98	455	1
-98	455	1
-98	455	2
-455	97	1
-455	97	1
-455	97	2
-455	97	455
-455	98	1
-455	98	1
-455	98	2
-455	98	455
-456	0	1
-456	0	1
-456	0	2
-456	0	456
-456	10	1
-456	10	1
-456	10	2
-456	10	456
-PREHOOK: query: drop table multi1_mm
-PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@multi1_mm
-PREHOOK: Output: default@multi1_mm
-POSTHOOK: query: drop table multi1_mm
-POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@multi1_mm
-POSTHOOK: Output: default@multi1_mm
-PREHOOK: query: drop table intermediate
-PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@intermediate
-PREHOOK: Output: default@intermediate
-POSTHOOK: query: drop table intermediate
-POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@intermediate
-POSTHOOK: Output: default@intermediate

http://git-wip-us.apache.org/repos/asf/hive/blob/57a48ce7/ql/src/test/results/clientpositive/mm_all.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/mm_all.q.out b/ql/src/test/results/clientpositive/mm_all.q.out
index b418ea1..116f2b1 100644
--- a/ql/src/test/results/clientpositive/mm_all.q.out
+++ b/ql/src/test/results/clientpositive/mm_all.q.out
@@ -801,11 +801,11 @@ POSTHOOK: Output: default@skew_mm
 POSTHOOK: Lineage: skew_mm.k1 SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
 POSTHOOK: Lineage: skew_mm.k2 SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
 POSTHOOK: Lineage: skew_mm.k4 SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-PREHOOK: query: select * from skew_mm order by k2
+PREHOOK: query: select * from skew_mm order by k2, k1, k4
 PREHOOK: type: QUERY
 PREHOOK: Input: default@skew_mm
 #### A masked pattern was here ####
-POSTHOOK: query: select * from skew_mm order by k2
+POSTHOOK: query: select * from skew_mm order by k2, k1, k4
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@skew_mm
 #### A masked pattern was here ####
@@ -900,7 +900,7 @@ POSTHOOK: Lineage: skew_dp_union_mm PARTITION(k3=97).k4 EXPRESSION [(intermediat
 POSTHOOK: Lineage: skew_dp_union_mm PARTITION(k3=98).k1 EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
 POSTHOOK: Lineage: skew_dp_union_mm PARTITION(k3=98).k2 EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
 POSTHOOK: Lineage: skew_dp_union_mm PARTITION(k3=98).k4 EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-PREHOOK: query: select * from skew_dp_union_mm order by k2
+PREHOOK: query: select * from skew_dp_union_mm order by k2, k1, k4
 PREHOOK: type: QUERY
 PREHOOK: Input: default@skew_dp_union_mm
 PREHOOK: Input: default@skew_dp_union_mm@k3=0
@@ -916,7 +916,7 @@ PREHOOK: Input: default@skew_dp_union_mm@k3=4
 PREHOOK: Input: default@skew_dp_union_mm@k3=97
 PREHOOK: Input: default@skew_dp_union_mm@k3=98
 #### A masked pattern was here ####
-POSTHOOK: query: select * from skew_dp_union_mm order by k2
+POSTHOOK: query: select * from skew_dp_union_mm order by k2, k1, k4
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@skew_dp_union_mm
 POSTHOOK: Input: default@skew_dp_union_mm@k3=0
@@ -1145,7 +1145,7 @@ POSTHOOK: Lineage: merge1_mm PARTITION(key=103).id SIMPLE [(intermediate)interme
 POSTHOOK: Lineage: merge1_mm PARTITION(key=10).id SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
 POSTHOOK: Lineage: merge1_mm PARTITION(key=97).id SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
 POSTHOOK: Lineage: merge1_mm PARTITION(key=98).id SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-PREHOOK: query: select * from merge1_mm
+PREHOOK: query: select * from merge1_mm order by id, key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@merge1_mm
 PREHOOK: Input: default@merge1_mm@key=0
@@ -1155,7 +1155,7 @@ PREHOOK: Input: default@merge1_mm@key=103
 PREHOOK: Input: default@merge1_mm@key=97
 PREHOOK: Input: default@merge1_mm@key=98
 #### A masked pattern was here ####
-POSTHOOK: query: select * from merge1_mm
+POSTHOOK: query: select * from merge1_mm order by id, key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@merge1_mm
 POSTHOOK: Input: default@merge1_mm@key=0
@@ -1165,12 +1165,12 @@ POSTHOOK: Input: default@merge1_mm@key=103
 POSTHOOK: Input: default@merge1_mm@key=97
 POSTHOOK: Input: default@merge1_mm@key=98
 #### A masked pattern was here ####
-98	98
-103	103
-97	97
-100	100
 0	0
 10	10
+97	97
+98	98
+100	100
+103	103
 PREHOOK: query: insert into table merge1_mm partition (key) select key, key from intermediate
 PREHOOK: type: QUERY
 PREHOOK: Input: default@intermediate
@@ -1196,7 +1196,7 @@ POSTHOOK: Lineage: merge1_mm PARTITION(key=103).id SIMPLE [(intermediate)interme
 POSTHOOK: Lineage: merge1_mm PARTITION(key=10).id SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
 POSTHOOK: Lineage: merge1_mm PARTITION(key=97).id SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
 POSTHOOK: Lineage: merge1_mm PARTITION(key=98).id SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-PREHOOK: query: select * from merge1_mm
+PREHOOK: query: select * from merge1_mm order by id, key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@merge1_mm
 PREHOOK: Input: default@merge1_mm@key=0
@@ -1206,7 +1206,7 @@ PREHOOK: Input: default@merge1_mm@key=103
 PREHOOK: Input: default@merge1_mm@key=97
 PREHOOK: Input: default@merge1_mm@key=98
 #### A masked pattern was here ####
-POSTHOOK: query: select * from merge1_mm
+POSTHOOK: query: select * from merge1_mm order by id, key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@merge1_mm
 POSTHOOK: Input: default@merge1_mm@key=0
@@ -1216,18 +1216,18 @@ POSTHOOK: Input: default@merge1_mm@key=103
 POSTHOOK: Input: default@merge1_mm@key=97
 POSTHOOK: Input: default@merge1_mm@key=98
 #### A masked pattern was here ####
-100	100
-100	100
-103	103
+0	0
+0	0
+10	10
+10	10
 97	97
-103	103
 97	97
 98	98
 98	98
-0	0
-10	10
-0	0
-10	10
+100	100
+100	100
+103	103
+103	103
 PREHOOK: query: drop table merge1_mm
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@merge1_mm

http://git-wip-us.apache.org/repos/asf/hive/blob/57a48ce7/ql/src/test/results/clientpositive/mm_all2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/mm_all2.q.out b/ql/src/test/results/clientpositive/mm_all2.q.out
deleted file mode 100644
index 67c4052..0000000
--- a/ql/src/test/results/clientpositive/mm_all2.q.out
+++ /dev/null
@@ -1,495 +0,0 @@
-PREHOOK: query: -- Bucketing tests are slow and some tablesample ones don't work w/o MM
-
--- Force multiple writers when reading
-drop table intermediate
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: -- Bucketing tests are slow and some tablesample ones don't work w/o MM
-
--- Force multiple writers when reading
-drop table intermediate
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table intermediate(key int) partitioned by (p int) stored as orc
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@intermediate
-POSTHOOK: query: create table intermediate(key int) partitioned by (p int) stored as orc
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@intermediate
-PREHOOK: query: insert into table intermediate partition(p='455') select distinct key from src where key >= 0 order by key desc limit 2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@intermediate@p=455
-POSTHOOK: query: insert into table intermediate partition(p='455') select distinct key from src where key >= 0 order by key desc limit 2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@intermediate@p=455
-POSTHOOK: Lineage: intermediate PARTITION(p=455).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-PREHOOK: query: insert into table intermediate partition(p='456') select distinct key from src where key is not null order by key asc limit 2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@intermediate@p=456
-POSTHOOK: query: insert into table intermediate partition(p='456') select distinct key from src where key is not null order by key asc limit 2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@intermediate@p=456
-POSTHOOK: Lineage: intermediate PARTITION(p=456).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-PREHOOK: query: insert into table intermediate partition(p='457') select distinct key from src where key >= 100 order by key asc limit 2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@intermediate@p=457
-POSTHOOK: query: insert into table intermediate partition(p='457') select distinct key from src where key >= 100 order by key asc limit 2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@intermediate@p=457
-POSTHOOK: Lineage: intermediate PARTITION(p=457).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-PREHOOK: query: drop table bucket0_mm
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table bucket0_mm
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table bucket0_mm(key int, id int)
-clustered by (key) into 2 buckets
-tblproperties("transactional"="true", "transactional_properties"="insert_only")
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@bucket0_mm
-POSTHOOK: query: create table bucket0_mm(key int, id int)
-clustered by (key) into 2 buckets
-tblproperties("transactional"="true", "transactional_properties"="insert_only")
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@bucket0_mm
-PREHOOK: query: insert into table bucket0_mm select key, key from intermediate
-PREHOOK: type: QUERY
-PREHOOK: Input: default@intermediate
-PREHOOK: Input: default@intermediate@p=455
-PREHOOK: Input: default@intermediate@p=456
-PREHOOK: Input: default@intermediate@p=457
-PREHOOK: Output: default@bucket0_mm
-POSTHOOK: query: insert into table bucket0_mm select key, key from intermediate
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@intermediate
-POSTHOOK: Input: default@intermediate@p=455
-POSTHOOK: Input: default@intermediate@p=456
-POSTHOOK: Input: default@intermediate@p=457
-POSTHOOK: Output: default@bucket0_mm
-POSTHOOK: Lineage: bucket0_mm.id SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket0_mm.key SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-PREHOOK: query: select * from bucket0_mm
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket0_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from bucket0_mm
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@bucket0_mm
-#### A masked pattern was here ####
-100	100
-10	10
-0	0
-98	98
-103	103
-97	97
-PREHOOK: query: select * from bucket0_mm tablesample (bucket 1 out of 2) s
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket0_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from bucket0_mm tablesample (bucket 1 out of 2) s
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@bucket0_mm
-#### A masked pattern was here ####
-100	100
-10	10
-0	0
-98	98
-PREHOOK: query: select * from bucket0_mm tablesample (bucket 2 out of 2) s
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket0_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from bucket0_mm tablesample (bucket 2 out of 2) s
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@bucket0_mm
-#### A masked pattern was here ####
-103	103
-97	97
-PREHOOK: query: insert into table bucket0_mm select key, key from intermediate
-PREHOOK: type: QUERY
-PREHOOK: Input: default@intermediate
-PREHOOK: Input: default@intermediate@p=455
-PREHOOK: Input: default@intermediate@p=456
-PREHOOK: Input: default@intermediate@p=457
-PREHOOK: Output: default@bucket0_mm
-POSTHOOK: query: insert into table bucket0_mm select key, key from intermediate
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@intermediate
-POSTHOOK: Input: default@intermediate@p=455
-POSTHOOK: Input: default@intermediate@p=456
-POSTHOOK: Input: default@intermediate@p=457
-POSTHOOK: Output: default@bucket0_mm
-POSTHOOK: Lineage: bucket0_mm.id SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket0_mm.key SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-PREHOOK: query: select * from bucket0_mm
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket0_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from bucket0_mm
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@bucket0_mm
-#### A masked pattern was here ####
-100	100
-10	10
-0	0
-98	98
-98	98
-10	10
-0	0
-100	100
-103	103
-97	97
-97	97
-103	103
-PREHOOK: query: select * from bucket0_mm tablesample (bucket 1 out of 2) s
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket0_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from bucket0_mm tablesample (bucket 1 out of 2) s
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@bucket0_mm
-#### A masked pattern was here ####
-100	100
-10	10
-0	0
-98	98
-98	98
-10	10
-0	0
-100	100
-PREHOOK: query: select * from bucket0_mm tablesample (bucket 2 out of 2) s
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket0_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from bucket0_mm tablesample (bucket 2 out of 2) s
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@bucket0_mm
-#### A masked pattern was here ####
-103	103
-97	97
-97	97
-103	103
-PREHOOK: query: drop table bucket0_mm
-PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@bucket0_mm
-PREHOOK: Output: default@bucket0_mm
-POSTHOOK: query: drop table bucket0_mm
-POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@bucket0_mm
-POSTHOOK: Output: default@bucket0_mm
-PREHOOK: query: drop table bucket1_mm
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table bucket1_mm
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table bucket1_mm(key int, id int) partitioned by (key2 int)
-clustered by (key) sorted by (key) into 2 buckets
-tblproperties("transactional"="true", "transactional_properties"="insert_only")
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@bucket1_mm
-POSTHOOK: query: create table bucket1_mm(key int, id int) partitioned by (key2 int)
-clustered by (key) sorted by (key) into 2 buckets
-tblproperties("transactional"="true", "transactional_properties"="insert_only")
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@bucket1_mm
-PREHOOK: query: insert into table bucket1_mm partition (key2)
-select key + 1, key, key - 1 from intermediate
-union all 
-select key - 1, key, key + 1 from intermediate
-PREHOOK: type: QUERY
-PREHOOK: Input: default@intermediate
-PREHOOK: Input: default@intermediate@p=455
-PREHOOK: Input: default@intermediate@p=456
-PREHOOK: Input: default@intermediate@p=457
-PREHOOK: Output: default@bucket1_mm
-POSTHOOK: query: insert into table bucket1_mm partition (key2)
-select key + 1, key, key - 1 from intermediate
-union all 
-select key - 1, key, key + 1 from intermediate
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@intermediate
-POSTHOOK: Input: default@intermediate@p=455
-POSTHOOK: Input: default@intermediate@p=456
-POSTHOOK: Input: default@intermediate@p=457
-POSTHOOK: Output: default@bucket1_mm@key2=-1
-POSTHOOK: Output: default@bucket1_mm@key2=1
-POSTHOOK: Output: default@bucket1_mm@key2=101
-POSTHOOK: Output: default@bucket1_mm@key2=102
-POSTHOOK: Output: default@bucket1_mm@key2=104
-POSTHOOK: Output: default@bucket1_mm@key2=11
-POSTHOOK: Output: default@bucket1_mm@key2=9
-POSTHOOK: Output: default@bucket1_mm@key2=96
-POSTHOOK: Output: default@bucket1_mm@key2=97
-POSTHOOK: Output: default@bucket1_mm@key2=98
-POSTHOOK: Output: default@bucket1_mm@key2=99
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=-1).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=-1).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=101).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=101).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=102).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=102).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=104).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=104).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=11).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=11).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=1).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=1).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=96).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=96).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=97).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=97).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=98).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=98).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=99).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=99).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=9).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket1_mm PARTITION(key2=9).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-PREHOOK: query: select * from bucket1_mm
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket1_mm
-PREHOOK: Input: default@bucket1_mm@key2=-1
-PREHOOK: Input: default@bucket1_mm@key2=1
-PREHOOK: Input: default@bucket1_mm@key2=101
-PREHOOK: Input: default@bucket1_mm@key2=102
-PREHOOK: Input: default@bucket1_mm@key2=104
-PREHOOK: Input: default@bucket1_mm@key2=11
-PREHOOK: Input: default@bucket1_mm@key2=9
-PREHOOK: Input: default@bucket1_mm@key2=96
-PREHOOK: Input: default@bucket1_mm@key2=97
-PREHOOK: Input: default@bucket1_mm@key2=98
-PREHOOK: Input: default@bucket1_mm@key2=99
-#### A masked pattern was here ####
-POSTHOOK: query: select * from bucket1_mm
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@bucket1_mm
-POSTHOOK: Input: default@bucket1_mm@key2=-1
-POSTHOOK: Input: default@bucket1_mm@key2=1
-POSTHOOK: Input: default@bucket1_mm@key2=101
-POSTHOOK: Input: default@bucket1_mm@key2=102
-POSTHOOK: Input: default@bucket1_mm@key2=104
-POSTHOOK: Input: default@bucket1_mm@key2=11
-POSTHOOK: Input: default@bucket1_mm@key2=9
-POSTHOOK: Input: default@bucket1_mm@key2=96
-POSTHOOK: Input: default@bucket1_mm@key2=97
-POSTHOOK: Input: default@bucket1_mm@key2=98
-POSTHOOK: Input: default@bucket1_mm@key2=99
-#### A masked pattern was here ####
-97	98	99
-101	100	99
-104	103	102
-102	103	104
-99	100	101
-11	10	9
-98	97	96
-99	98	97
-96	97	98
--1	0	1
-9	10	11
-1	0	-1
-PREHOOK: query: select * from bucket1_mm tablesample (bucket 1 out of 2) s
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket1_mm
-PREHOOK: Input: default@bucket1_mm@key2=-1
-PREHOOK: Input: default@bucket1_mm@key2=1
-PREHOOK: Input: default@bucket1_mm@key2=101
-PREHOOK: Input: default@bucket1_mm@key2=102
-PREHOOK: Input: default@bucket1_mm@key2=104
-PREHOOK: Input: default@bucket1_mm@key2=11
-PREHOOK: Input: default@bucket1_mm@key2=9
-PREHOOK: Input: default@bucket1_mm@key2=96
-PREHOOK: Input: default@bucket1_mm@key2=97
-PREHOOK: Input: default@bucket1_mm@key2=98
-PREHOOK: Input: default@bucket1_mm@key2=99
-#### A masked pattern was here ####
-POSTHOOK: query: select * from bucket1_mm tablesample (bucket 1 out of 2) s
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@bucket1_mm
-POSTHOOK: Input: default@bucket1_mm@key2=-1
-POSTHOOK: Input: default@bucket1_mm@key2=1
-POSTHOOK: Input: default@bucket1_mm@key2=101
-POSTHOOK: Input: default@bucket1_mm@key2=102
-POSTHOOK: Input: default@bucket1_mm@key2=104
-POSTHOOK: Input: default@bucket1_mm@key2=11
-POSTHOOK: Input: default@bucket1_mm@key2=9
-POSTHOOK: Input: default@bucket1_mm@key2=96
-POSTHOOK: Input: default@bucket1_mm@key2=97
-POSTHOOK: Input: default@bucket1_mm@key2=98
-POSTHOOK: Input: default@bucket1_mm@key2=99
-#### A masked pattern was here ####
-104	103	102
-102	103	104
-98	97	96
-96	97	98
-PREHOOK: query: select * from bucket1_mm tablesample (bucket 2 out of 2) s
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket1_mm
-PREHOOK: Input: default@bucket1_mm@key2=-1
-PREHOOK: Input: default@bucket1_mm@key2=1
-PREHOOK: Input: default@bucket1_mm@key2=101
-PREHOOK: Input: default@bucket1_mm@key2=102
-PREHOOK: Input: default@bucket1_mm@key2=104
-PREHOOK: Input: default@bucket1_mm@key2=11
-PREHOOK: Input: default@bucket1_mm@key2=9
-PREHOOK: Input: default@bucket1_mm@key2=96
-PREHOOK: Input: default@bucket1_mm@key2=97
-PREHOOK: Input: default@bucket1_mm@key2=98
-PREHOOK: Input: default@bucket1_mm@key2=99
-#### A masked pattern was here ####
-POSTHOOK: query: select * from bucket1_mm tablesample (bucket 2 out of 2) s
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@bucket1_mm
-POSTHOOK: Input: default@bucket1_mm@key2=-1
-POSTHOOK: Input: default@bucket1_mm@key2=1
-POSTHOOK: Input: default@bucket1_mm@key2=101
-POSTHOOK: Input: default@bucket1_mm@key2=102
-POSTHOOK: Input: default@bucket1_mm@key2=104
-POSTHOOK: Input: default@bucket1_mm@key2=11
-POSTHOOK: Input: default@bucket1_mm@key2=9
-POSTHOOK: Input: default@bucket1_mm@key2=96
-POSTHOOK: Input: default@bucket1_mm@key2=97
-POSTHOOK: Input: default@bucket1_mm@key2=98
-POSTHOOK: Input: default@bucket1_mm@key2=99
-#### A masked pattern was here ####
-97	98	99
-101	100	99
-99	100	101
-11	10	9
-99	98	97
--1	0	1
-9	10	11
-1	0	-1
-PREHOOK: query: drop table bucket1_mm
-PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@bucket1_mm
-PREHOOK: Output: default@bucket1_mm
-POSTHOOK: query: drop table bucket1_mm
-POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@bucket1_mm
-POSTHOOK: Output: default@bucket1_mm
-PREHOOK: query: drop table bucket2_mm
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table bucket2_mm
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table bucket2_mm(key int, id int)
-clustered by (key) into 10 buckets
-tblproperties("transactional"="true", "transactional_properties"="insert_only")
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@bucket2_mm
-POSTHOOK: query: create table bucket2_mm(key int, id int)
-clustered by (key) into 10 buckets
-tblproperties("transactional"="true", "transactional_properties"="insert_only")
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@bucket2_mm
-PREHOOK: query: insert into table bucket2_mm select key, key from intermediate where key == 0
-PREHOOK: type: QUERY
-PREHOOK: Input: default@intermediate
-PREHOOK: Input: default@intermediate@p=455
-PREHOOK: Input: default@intermediate@p=456
-PREHOOK: Input: default@intermediate@p=457
-PREHOOK: Output: default@bucket2_mm
-POSTHOOK: query: insert into table bucket2_mm select key, key from intermediate where key == 0
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@intermediate
-POSTHOOK: Input: default@intermediate@p=455
-POSTHOOK: Input: default@intermediate@p=456
-POSTHOOK: Input: default@intermediate@p=457
-POSTHOOK: Output: default@bucket2_mm
-POSTHOOK: Lineage: bucket2_mm.id SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket2_mm.key SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-PREHOOK: query: select * from bucket2_mm
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket2_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from bucket2_mm
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@bucket2_mm
-#### A masked pattern was here ####
-0	0
-PREHOOK: query: select * from bucket2_mm tablesample (bucket 1 out of 10) s
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket2_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from bucket2_mm tablesample (bucket 1 out of 10) s
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@bucket2_mm
-#### A masked pattern was here ####
-0	0
-PREHOOK: query: select * from bucket2_mm tablesample (bucket 4 out of 10) s
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket2_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from bucket2_mm tablesample (bucket 4 out of 10) s
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@bucket2_mm
-#### A masked pattern was here ####
-PREHOOK: query: insert into table bucket2_mm select key, key from intermediate where key in (0, 103)
-PREHOOK: type: QUERY
-PREHOOK: Input: default@intermediate
-PREHOOK: Input: default@intermediate@p=455
-PREHOOK: Input: default@intermediate@p=456
-PREHOOK: Input: default@intermediate@p=457
-PREHOOK: Output: default@bucket2_mm
-POSTHOOK: query: insert into table bucket2_mm select key, key from intermediate where key in (0, 103)
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@intermediate
-POSTHOOK: Input: default@intermediate@p=455
-POSTHOOK: Input: default@intermediate@p=456
-POSTHOOK: Input: default@intermediate@p=457
-POSTHOOK: Output: default@bucket2_mm
-POSTHOOK: Lineage: bucket2_mm.id SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: bucket2_mm.key SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-PREHOOK: query: select * from bucket2_mm
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket2_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from bucket2_mm
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@bucket2_mm
-#### A masked pattern was here ####
-103	103
-0	0
-0	0
-PREHOOK: query: select * from bucket2_mm tablesample (bucket 1 out of 10) s
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket2_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from bucket2_mm tablesample (bucket 1 out of 10) s
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@bucket2_mm
-#### A masked pattern was here ####
-0	0
-0	0
-PREHOOK: query: select * from bucket2_mm tablesample (bucket 4 out of 10) s
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket2_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from bucket2_mm tablesample (bucket 4 out of 10) s
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@bucket2_mm
-#### A masked pattern was here ####
-103	103
-PREHOOK: query: drop table bucket2_mm
-PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@bucket2_mm
-PREHOOK: Output: default@bucket2_mm
-POSTHOOK: query: drop table bucket2_mm
-POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@bucket2_mm
-POSTHOOK: Output: default@bucket2_mm
-PREHOOK: query: drop table intermediate
-PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@intermediate
-PREHOOK: Output: default@intermediate
-POSTHOOK: query: drop table intermediate
-POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@intermediate
-POSTHOOK: Output: default@intermediate

http://git-wip-us.apache.org/repos/asf/hive/blob/57a48ce7/ql/src/test/results/clientpositive/mm_buckets.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/mm_buckets.q.out b/ql/src/test/results/clientpositive/mm_buckets.q.out
new file mode 100644
index 0000000..fa25be7
--- /dev/null
+++ b/ql/src/test/results/clientpositive/mm_buckets.q.out
@@ -0,0 +1,489 @@
+PREHOOK: query: drop table intermediate
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table intermediate
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table intermediate(key int) partitioned by (p int) stored as orc
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@intermediate
+POSTHOOK: query: create table intermediate(key int) partitioned by (p int) stored as orc
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@intermediate
+PREHOOK: query: insert into table intermediate partition(p='455') select distinct key from src where key >= 0 order by key desc limit 2
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@intermediate@p=455
+POSTHOOK: query: insert into table intermediate partition(p='455') select distinct key from src where key >= 0 order by key desc limit 2
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@intermediate@p=455
+POSTHOOK: Lineage: intermediate PARTITION(p=455).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+PREHOOK: query: insert into table intermediate partition(p='456') select distinct key from src where key is not null order by key asc limit 2
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@intermediate@p=456
+POSTHOOK: query: insert into table intermediate partition(p='456') select distinct key from src where key is not null order by key asc limit 2
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@intermediate@p=456
+POSTHOOK: Lineage: intermediate PARTITION(p=456).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+PREHOOK: query: insert into table intermediate partition(p='457') select distinct key from src where key >= 100 order by key asc limit 2
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@intermediate@p=457
+POSTHOOK: query: insert into table intermediate partition(p='457') select distinct key from src where key >= 100 order by key asc limit 2
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@intermediate@p=457
+POSTHOOK: Lineage: intermediate PARTITION(p=457).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+PREHOOK: query: drop table bucket0_mm
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table bucket0_mm
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table bucket0_mm(key int, id int)
+clustered by (key) into 2 buckets
+tblproperties("transactional"="true", "transactional_properties"="insert_only")
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@bucket0_mm
+POSTHOOK: query: create table bucket0_mm(key int, id int)
+clustered by (key) into 2 buckets
+tblproperties("transactional"="true", "transactional_properties"="insert_only")
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@bucket0_mm
+PREHOOK: query: insert into table bucket0_mm select key, key from intermediate
+PREHOOK: type: QUERY
+PREHOOK: Input: default@intermediate
+PREHOOK: Input: default@intermediate@p=455
+PREHOOK: Input: default@intermediate@p=456
+PREHOOK: Input: default@intermediate@p=457
+PREHOOK: Output: default@bucket0_mm
+POSTHOOK: query: insert into table bucket0_mm select key, key from intermediate
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@intermediate
+POSTHOOK: Input: default@intermediate@p=455
+POSTHOOK: Input: default@intermediate@p=456
+POSTHOOK: Input: default@intermediate@p=457
+POSTHOOK: Output: default@bucket0_mm
+POSTHOOK: Lineage: bucket0_mm.id SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket0_mm.key SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+PREHOOK: query: select * from bucket0_mm order by key, id
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket0_mm
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket0_mm order by key, id
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket0_mm
+#### A masked pattern was here ####
+0	0
+10	10
+97	97
+98	98
+100	100
+103	103
+PREHOOK: query: select * from bucket0_mm tablesample (bucket 1 out of 2) s
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket0_mm
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket0_mm tablesample (bucket 1 out of 2) s
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket0_mm
+#### A masked pattern was here ####
+100	100
+10	10
+0	0
+98	98
+PREHOOK: query: select * from bucket0_mm tablesample (bucket 2 out of 2) s
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket0_mm
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket0_mm tablesample (bucket 2 out of 2) s
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket0_mm
+#### A masked pattern was here ####
+103	103
+97	97
+PREHOOK: query: insert into table bucket0_mm select key, key from intermediate
+PREHOOK: type: QUERY
+PREHOOK: Input: default@intermediate
+PREHOOK: Input: default@intermediate@p=455
+PREHOOK: Input: default@intermediate@p=456
+PREHOOK: Input: default@intermediate@p=457
+PREHOOK: Output: default@bucket0_mm
+POSTHOOK: query: insert into table bucket0_mm select key, key from intermediate
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@intermediate
+POSTHOOK: Input: default@intermediate@p=455
+POSTHOOK: Input: default@intermediate@p=456
+POSTHOOK: Input: default@intermediate@p=457
+POSTHOOK: Output: default@bucket0_mm
+POSTHOOK: Lineage: bucket0_mm.id SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket0_mm.key SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+PREHOOK: query: select * from bucket0_mm order by key, id
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket0_mm
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket0_mm order by key, id
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket0_mm
+#### A masked pattern was here ####
+0	0
+0	0
+10	10
+10	10
+97	97
+97	97
+98	98
+98	98
+100	100
+100	100
+103	103
+103	103
+PREHOOK: query: select * from bucket0_mm tablesample (bucket 1 out of 2) s
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket0_mm
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket0_mm tablesample (bucket 1 out of 2) s
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket0_mm
+#### A masked pattern was here ####
+100	100
+10	10
+0	0
+98	98
+100	100
+10	10
+0	0
+98	98
+PREHOOK: query: select * from bucket0_mm tablesample (bucket 2 out of 2) s
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket0_mm
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket0_mm tablesample (bucket 2 out of 2) s
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket0_mm
+#### A masked pattern was here ####
+103	103
+97	97
+103	103
+97	97
+PREHOOK: query: drop table bucket0_mm
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@bucket0_mm
+PREHOOK: Output: default@bucket0_mm
+POSTHOOK: query: drop table bucket0_mm
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@bucket0_mm
+POSTHOOK: Output: default@bucket0_mm
+PREHOOK: query: drop table bucket1_mm
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table bucket1_mm
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table bucket1_mm(key int, id int) partitioned by (key2 int)
+clustered by (key) sorted by (key) into 2 buckets
+tblproperties("transactional"="true", "transactional_properties"="insert_only")
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@bucket1_mm
+POSTHOOK: query: create table bucket1_mm(key int, id int) partitioned by (key2 int)
+clustered by (key) sorted by (key) into 2 buckets
+tblproperties("transactional"="true", "transactional_properties"="insert_only")
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@bucket1_mm
+PREHOOK: query: insert into table bucket1_mm partition (key2)
+select key + 1, key, key - 1 from intermediate
+union all 
+select key - 1, key, key + 1 from intermediate
+PREHOOK: type: QUERY
+PREHOOK: Input: default@intermediate
+PREHOOK: Input: default@intermediate@p=455
+PREHOOK: Input: default@intermediate@p=456
+PREHOOK: Input: default@intermediate@p=457
+PREHOOK: Output: default@bucket1_mm
+POSTHOOK: query: insert into table bucket1_mm partition (key2)
+select key + 1, key, key - 1 from intermediate
+union all 
+select key - 1, key, key + 1 from intermediate
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@intermediate
+POSTHOOK: Input: default@intermediate@p=455
+POSTHOOK: Input: default@intermediate@p=456
+POSTHOOK: Input: default@intermediate@p=457
+POSTHOOK: Output: default@bucket1_mm@key2=-1
+POSTHOOK: Output: default@bucket1_mm@key2=1
+POSTHOOK: Output: default@bucket1_mm@key2=101
+POSTHOOK: Output: default@bucket1_mm@key2=102
+POSTHOOK: Output: default@bucket1_mm@key2=104
+POSTHOOK: Output: default@bucket1_mm@key2=11
+POSTHOOK: Output: default@bucket1_mm@key2=9
+POSTHOOK: Output: default@bucket1_mm@key2=96
+POSTHOOK: Output: default@bucket1_mm@key2=97
+POSTHOOK: Output: default@bucket1_mm@key2=98
+POSTHOOK: Output: default@bucket1_mm@key2=99
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=-1).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=-1).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=101).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=101).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=102).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=102).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=104).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=104).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=11).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=11).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=1).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=1).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=96).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=96).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=97).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=97).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=98).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=98).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=99).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=99).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=9).id EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket1_mm PARTITION(key2=9).key EXPRESSION [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+PREHOOK: query: select * from bucket1_mm order by key, id
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket1_mm
+PREHOOK: Input: default@bucket1_mm@key2=-1
+PREHOOK: Input: default@bucket1_mm@key2=1
+PREHOOK: Input: default@bucket1_mm@key2=101
+PREHOOK: Input: default@bucket1_mm@key2=102
+PREHOOK: Input: default@bucket1_mm@key2=104
+PREHOOK: Input: default@bucket1_mm@key2=11
+PREHOOK: Input: default@bucket1_mm@key2=9
+PREHOOK: Input: default@bucket1_mm@key2=96
+PREHOOK: Input: default@bucket1_mm@key2=97
+PREHOOK: Input: default@bucket1_mm@key2=98
+PREHOOK: Input: default@bucket1_mm@key2=99
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket1_mm order by key, id
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket1_mm
+POSTHOOK: Input: default@bucket1_mm@key2=-1
+POSTHOOK: Input: default@bucket1_mm@key2=1
+POSTHOOK: Input: default@bucket1_mm@key2=101
+POSTHOOK: Input: default@bucket1_mm@key2=102
+POSTHOOK: Input: default@bucket1_mm@key2=104
+POSTHOOK: Input: default@bucket1_mm@key2=11
+POSTHOOK: Input: default@bucket1_mm@key2=9
+POSTHOOK: Input: default@bucket1_mm@key2=96
+POSTHOOK: Input: default@bucket1_mm@key2=97
+POSTHOOK: Input: default@bucket1_mm@key2=98
+POSTHOOK: Input: default@bucket1_mm@key2=99
+#### A masked pattern was here ####
+-1	0	1
+1	0	-1
+9	10	11
+11	10	9
+96	97	98
+97	98	99
+98	97	96
+99	98	97
+99	100	101
+101	100	99
+102	103	104
+104	103	102
+PREHOOK: query: select * from bucket1_mm tablesample (bucket 1 out of 2) s  order by key, id
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket1_mm
+PREHOOK: Input: default@bucket1_mm@key2=-1
+PREHOOK: Input: default@bucket1_mm@key2=1
+PREHOOK: Input: default@bucket1_mm@key2=101
+PREHOOK: Input: default@bucket1_mm@key2=102
+PREHOOK: Input: default@bucket1_mm@key2=104
+PREHOOK: Input: default@bucket1_mm@key2=11
+PREHOOK: Input: default@bucket1_mm@key2=9
+PREHOOK: Input: default@bucket1_mm@key2=96
+PREHOOK: Input: default@bucket1_mm@key2=97
+PREHOOK: Input: default@bucket1_mm@key2=98
+PREHOOK: Input: default@bucket1_mm@key2=99
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket1_mm tablesample (bucket 1 out of 2) s  order by key, id
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket1_mm
+POSTHOOK: Input: default@bucket1_mm@key2=-1
+POSTHOOK: Input: default@bucket1_mm@key2=1
+POSTHOOK: Input: default@bucket1_mm@key2=101
+POSTHOOK: Input: default@bucket1_mm@key2=102
+POSTHOOK: Input: default@bucket1_mm@key2=104
+POSTHOOK: Input: default@bucket1_mm@key2=11
+POSTHOOK: Input: default@bucket1_mm@key2=9
+POSTHOOK: Input: default@bucket1_mm@key2=96
+POSTHOOK: Input: default@bucket1_mm@key2=97
+POSTHOOK: Input: default@bucket1_mm@key2=98
+POSTHOOK: Input: default@bucket1_mm@key2=99
+#### A masked pattern was here ####
+96	97	98
+98	97	96
+102	103	104
+104	103	102
+PREHOOK: query: select * from bucket1_mm tablesample (bucket 2 out of 2) s  order by key, id
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket1_mm
+PREHOOK: Input: default@bucket1_mm@key2=-1
+PREHOOK: Input: default@bucket1_mm@key2=1
+PREHOOK: Input: default@bucket1_mm@key2=101
+PREHOOK: Input: default@bucket1_mm@key2=102
+PREHOOK: Input: default@bucket1_mm@key2=104
+PREHOOK: Input: default@bucket1_mm@key2=11
+PREHOOK: Input: default@bucket1_mm@key2=9
+PREHOOK: Input: default@bucket1_mm@key2=96
+PREHOOK: Input: default@bucket1_mm@key2=97
+PREHOOK: Input: default@bucket1_mm@key2=98
+PREHOOK: Input: default@bucket1_mm@key2=99
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket1_mm tablesample (bucket 2 out of 2) s  order by key, id
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket1_mm
+POSTHOOK: Input: default@bucket1_mm@key2=-1
+POSTHOOK: Input: default@bucket1_mm@key2=1
+POSTHOOK: Input: default@bucket1_mm@key2=101
+POSTHOOK: Input: default@bucket1_mm@key2=102
+POSTHOOK: Input: default@bucket1_mm@key2=104
+POSTHOOK: Input: default@bucket1_mm@key2=11
+POSTHOOK: Input: default@bucket1_mm@key2=9
+POSTHOOK: Input: default@bucket1_mm@key2=96
+POSTHOOK: Input: default@bucket1_mm@key2=97
+POSTHOOK: Input: default@bucket1_mm@key2=98
+POSTHOOK: Input: default@bucket1_mm@key2=99
+#### A masked pattern was here ####
+-1	0	1
+1	0	-1
+9	10	11
+11	10	9
+97	98	99
+99	98	97
+99	100	101
+101	100	99
+PREHOOK: query: drop table bucket1_mm
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@bucket1_mm
+PREHOOK: Output: default@bucket1_mm
+POSTHOOK: query: drop table bucket1_mm
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@bucket1_mm
+POSTHOOK: Output: default@bucket1_mm
+PREHOOK: query: drop table bucket2_mm
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table bucket2_mm
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table bucket2_mm(key int, id int)
+clustered by (key) into 10 buckets
+tblproperties("transactional"="true", "transactional_properties"="insert_only")
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@bucket2_mm
+POSTHOOK: query: create table bucket2_mm(key int, id int)
+clustered by (key) into 10 buckets
+tblproperties("transactional"="true", "transactional_properties"="insert_only")
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@bucket2_mm
+PREHOOK: query: insert into table bucket2_mm select key, key from intermediate where key == 0
+PREHOOK: type: QUERY
+PREHOOK: Input: default@intermediate
+PREHOOK: Input: default@intermediate@p=455
+PREHOOK: Input: default@intermediate@p=456
+PREHOOK: Input: default@intermediate@p=457
+PREHOOK: Output: default@bucket2_mm
+POSTHOOK: query: insert into table bucket2_mm select key, key from intermediate where key == 0
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@intermediate
+POSTHOOK: Input: default@intermediate@p=455
+POSTHOOK: Input: default@intermediate@p=456
+POSTHOOK: Input: default@intermediate@p=457
+POSTHOOK: Output: default@bucket2_mm
+POSTHOOK: Lineage: bucket2_mm.id SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket2_mm.key SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+PREHOOK: query: select * from bucket2_mm order by key, id
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket2_mm
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket2_mm order by key, id
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket2_mm
+#### A masked pattern was here ####
+0	0
+PREHOOK: query: select * from bucket2_mm tablesample (bucket 1 out of 10) s order by key, id
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket2_mm
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket2_mm tablesample (bucket 1 out of 10) s order by key, id
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket2_mm
+#### A masked pattern was here ####
+0	0
+PREHOOK: query: select * from bucket2_mm tablesample (bucket 4 out of 10) s order by key, id
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket2_mm
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket2_mm tablesample (bucket 4 out of 10) s order by key, id
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket2_mm
+#### A masked pattern was here ####
+PREHOOK: query: insert into table bucket2_mm select key, key from intermediate where key in (0, 103)
+PREHOOK: type: QUERY
+PREHOOK: Input: default@intermediate
+PREHOOK: Input: default@intermediate@p=455
+PREHOOK: Input: default@intermediate@p=456
+PREHOOK: Input: default@intermediate@p=457
+PREHOOK: Output: default@bucket2_mm
+POSTHOOK: query: insert into table bucket2_mm select key, key from intermediate where key in (0, 103)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@intermediate
+POSTHOOK: Input: default@intermediate@p=455
+POSTHOOK: Input: default@intermediate@p=456
+POSTHOOK: Input: default@intermediate@p=457
+POSTHOOK: Output: default@bucket2_mm
+POSTHOOK: Lineage: bucket2_mm.id SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+POSTHOOK: Lineage: bucket2_mm.key SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
+PREHOOK: query: select * from bucket2_mm
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket2_mm
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket2_mm
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket2_mm
+#### A masked pattern was here ####
+103	103
+0	0
+0	0
+PREHOOK: query: select * from bucket2_mm tablesample (bucket 1 out of 10) s order by key, id
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket2_mm
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket2_mm tablesample (bucket 1 out of 10) s order by key, id
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket2_mm
+#### A masked pattern was here ####
+0	0
+0	0
+PREHOOK: query: select * from bucket2_mm tablesample (bucket 4 out of 10) s order by key, id
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket2_mm
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket2_mm tablesample (bucket 4 out of 10) s order by key, id
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket2_mm
+#### A masked pattern was here ####
+103	103
+PREHOOK: query: drop table bucket2_mm
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@bucket2_mm
+PREHOOK: Output: default@bucket2_mm
+POSTHOOK: query: drop table bucket2_mm
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@bucket2_mm
+POSTHOOK: Output: default@bucket2_mm
+PREHOOK: query: drop table intermediate
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@intermediate
+PREHOOK: Output: default@intermediate
+POSTHOOK: query: drop table intermediate
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@intermediate
+POSTHOOK: Output: default@intermediate

http://git-wip-us.apache.org/repos/asf/hive/blob/57a48ce7/ql/src/test/results/clientpositive/mm_current.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/mm_current.q.out b/ql/src/test/results/clientpositive/mm_current.q.out
deleted file mode 100644
index f931be1..0000000
--- a/ql/src/test/results/clientpositive/mm_current.q.out
+++ /dev/null
@@ -1,125 +0,0 @@
-PREHOOK: query: drop table intermediate
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table intermediate
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table intermediate(key int) partitioned by (p int) stored as orc
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@intermediate
-POSTHOOK: query: create table intermediate(key int) partitioned by (p int) stored as orc
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@intermediate
-PREHOOK: query: insert into table intermediate partition(p='455') select distinct key from src where key >= 0 order by key desc limit 2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@intermediate@p=455
-POSTHOOK: query: insert into table intermediate partition(p='455') select distinct key from src where key >= 0 order by key desc limit 2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@intermediate@p=455
-POSTHOOK: Lineage: intermediate PARTITION(p=455).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-PREHOOK: query: insert into table intermediate partition(p='456') select distinct key from src where key is not null order by key asc limit 2
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@intermediate@p=456
-POSTHOOK: query: insert into table intermediate partition(p='456') select distinct key from src where key is not null order by key asc limit 2
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@intermediate@p=456
-POSTHOOK: Lineage: intermediate PARTITION(p=456).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-PREHOOK: query: drop table intermmediate_nonpart
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table intermmediate_nonpart
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table intermmediate_nonpart(key int, p int) tblproperties("transactional"="true", "transactional_properties"="insert_only")
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@intermmediate_nonpart
-POSTHOOK: query: create table intermmediate_nonpart(key int, p int) tblproperties("transactional"="true", "transactional_properties"="insert_only")
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@intermmediate_nonpart
-PREHOOK: query: insert into intermmediate_nonpart select * from intermediate
-PREHOOK: type: QUERY
-PREHOOK: Input: default@intermediate
-PREHOOK: Input: default@intermediate@p=455
-PREHOOK: Input: default@intermediate@p=456
-PREHOOK: Output: default@intermmediate_nonpart
-POSTHOOK: query: insert into intermmediate_nonpart select * from intermediate
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@intermediate
-POSTHOOK: Input: default@intermediate@p=455
-POSTHOOK: Input: default@intermediate@p=456
-POSTHOOK: Output: default@intermmediate_nonpart
-POSTHOOK: Lineage: intermmediate_nonpart.key SIMPLE [(intermediate)intermediate.FieldSchema(name:key, type:int, comment:null), ]
-POSTHOOK: Lineage: intermmediate_nonpart.p SIMPLE [(intermediate)intermediate.FieldSchema(name:p, type:int, comment:null), ]
-PREHOOK: query: export table intermmediate_nonpart to 'ql/test/data/exports/intermmediate_nonpart'
-PREHOOK: type: EXPORT
-PREHOOK: Input: default@intermmediate_nonpart
-#### A masked pattern was here ####
-POSTHOOK: query: export table intermmediate_nonpart to 'ql/test/data/exports/intermmediate_nonpart'
-POSTHOOK: type: EXPORT
-POSTHOOK: Input: default@intermmediate_nonpart
-#### A masked pattern was here ####
-PREHOOK: query: drop table intermmediate_nonpart
-PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@intermmediate_nonpart
-PREHOOK: Output: default@intermmediate_nonpart
-POSTHOOK: query: drop table intermmediate_nonpart
-POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@intermmediate_nonpart
-POSTHOOK: Output: default@intermmediate_nonpart
-PREHOOK: query: -- MM export into new MM table, non-part and part
-
-drop table import2_mm
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: -- MM export into new MM table, non-part and part
-
-drop table import2_mm
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: import table import2_mm from 'ql/test/data/exports/intermmediate_nonpart'
-PREHOOK: type: IMPORT
-#### A masked pattern was here ####
-PREHOOK: Output: database:default
-POSTHOOK: query: import table import2_mm from 'ql/test/data/exports/intermmediate_nonpart'
-POSTHOOK: type: IMPORT
-#### A masked pattern was here ####
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@import2_mm
-PREHOOK: query: desc import2_mm
-PREHOOK: type: DESCTABLE
-PREHOOK: Input: default@import2_mm
-POSTHOOK: query: desc import2_mm
-POSTHOOK: type: DESCTABLE
-POSTHOOK: Input: default@import2_mm
-key                 	int                 	                    
-p                   	int                 	                    
-PREHOOK: query: select * from import2_mm order by key, p
-PREHOOK: type: QUERY
-PREHOOK: Input: default@import2_mm
-#### A masked pattern was here ####
-POSTHOOK: query: select * from import2_mm order by key, p
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@import2_mm
-#### A masked pattern was here ####
-0	456
-10	456
-97	455
-98	455
-PREHOOK: query: drop table import2_mm
-PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@import2_mm
-PREHOOK: Output: default@import2_mm
-POSTHOOK: query: drop table import2_mm
-POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@import2_mm
-POSTHOOK: Output: default@import2_mm
-PREHOOK: query: drop table intermediate
-PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@intermediate
-PREHOOK: Output: default@intermediate
-POSTHOOK: query: drop table intermediate
-POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: default@intermediate
-POSTHOOK: Output: default@intermediate


Mime
View raw message