You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by dj...@apache.org on 2018/05/08 18:42:34 UTC

[29/58] [abbrv] hive git commit: HIVE-18910 : Migrate to Murmur hash for shuffle and bucketing (Deepak Jaiswal, reviewed by Jasone Dere)

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/vectorization_0.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vectorization_0.q.out b/ql/src/test/results/clientpositive/llap/vectorization_0.q.out
index b2db5a5..80da5a9 100644
--- a/ql/src/test/results/clientpositive/llap/vectorization_0.q.out
+++ b/ql/src/test/results/clientpositive/llap/vectorization_0.q.out
@@ -1839,6 +1839,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
                     columns.comments 
@@ -1860,6 +1861,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
                       columns.comments 
@@ -30660,6 +30662,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
                     columns.comments 
@@ -30681,6 +30684,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
                       columns.comments 
@@ -30775,6 +30779,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
                     columns.comments 
@@ -30796,6 +30801,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
                       columns.comments 
@@ -30890,6 +30896,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
                     columns.comments 
@@ -30911,6 +30918,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
                       columns.comments 
@@ -30996,6 +31004,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
                     columns.comments 
@@ -31017,6 +31026,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/vectorized_distinct_gby.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vectorized_distinct_gby.q.out b/ql/src/test/results/clientpositive/llap/vectorized_distinct_gby.q.out
index f19e2ca..9198ac2 100644
--- a/ql/src/test/results/clientpositive/llap/vectorized_distinct_gby.q.out
+++ b/ql/src/test/results/clientpositive/llap/vectorized_distinct_gby.q.out
@@ -359,4 +359,4 @@ POSTHOOK: query: select sum(distinct cint), count(distinct cint), avg(distinct c
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc
 #### A masked pattern was here ####
--3482841611	6082	-572647.4204209142	6.153814687328984E8
+-3482841611	6082	-572647.4204209142	6.153814687328981E8

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/vectorized_dynamic_partition_pruning.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vectorized_dynamic_partition_pruning.q.out b/ql/src/test/results/clientpositive/llap/vectorized_dynamic_partition_pruning.q.out
index 15b62c9..e6b1b55 100644
--- a/ql/src/test/results/clientpositive/llap/vectorized_dynamic_partition_pruning.q.out
+++ b/ql/src/test/results/clientpositive/llap/vectorized_dynamic_partition_pruning.q.out
@@ -14,8 +14,8 @@ POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11
 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12
 #### A masked pattern was here ####
-2008-04-08
 2008-04-09
+2008-04-08
 PREHOOK: query: select distinct hr from srcpart
 PREHOOK: type: QUERY
 PREHOOK: Input: default@srcpart
@@ -4199,8 +4199,8 @@ POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11
 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12
 #### A masked pattern was here ####
-2008-04-08
 2008-04-09
+2008-04-08
 PREHOOK: query: EXPLAIN VECTORIZATION select ds from (select distinct(ds) as ds from srcpart union all select distinct(ds) as ds from srcpart) s where s.ds in (select max(srcpart.ds) from srcpart union all select min(srcpart.ds) from srcpart)
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN VECTORIZATION select ds from (select distinct(ds) as ds from srcpart union all select distinct(ds) as ds from srcpart) s where s.ds in (select max(srcpart.ds) from srcpart union all select min(srcpart.ds) from srcpart)
@@ -6729,8 +6729,8 @@ POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11
 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12
 #### A masked pattern was here ####
-2008-04-08
 2008-04-09
+2008-04-08
 PREHOOK: query: create table srcpart_orc (key int, value string) partitioned by (ds string, hr int) stored as orc
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/vectorized_insert_into_bucketed_table.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vectorized_insert_into_bucketed_table.q.out b/ql/src/test/results/clientpositive/llap/vectorized_insert_into_bucketed_table.q.out
index c002ad7..dee02c9 100644
--- a/ql/src/test/results/clientpositive/llap/vectorized_insert_into_bucketed_table.q.out
+++ b/ql/src/test/results/clientpositive/llap/vectorized_insert_into_bucketed_table.q.out
@@ -127,11 +127,11 @@ POSTHOOK: query: select *, regexp_extract(INPUT__FILE__NAME, '.*/(.*)', 1) from
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@foo
 #### A masked pattern was here ####
-4	000000_0
+2	000000_0
 9	000001_0
+4	000001_0
 1	000001_0
-2	000002_0
-3	000003_0
+3	000002_0
 PREHOOK: query: drop table foo
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@foo

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/llap/vectorized_parquet.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vectorized_parquet.q.out b/ql/src/test/results/clientpositive/llap/vectorized_parquet.q.out
index fed8f91..ab30d6e 100644
--- a/ql/src/test/results/clientpositive/llap/vectorized_parquet.q.out
+++ b/ql/src/test/results/clientpositive/llap/vectorized_parquet.q.out
@@ -224,134 +224,134 @@ POSTHOOK: query: select ctinyint,
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypes_parquet
 #### A masked pattern was here ####
--59	626923679	-15789	28	-59.0	9829.790704244735
--58	626923679	-15169	20	-58.0	9549.096672008196
--54	626923679	-14815	23	-54.0	9614.154026896624
+-64	626923679	-15920	21	-64.0	9254.456539277186
+-52	626923679	-16369	30	-52.0	8625.06871423408
 -50	626923679	-14320	27	-50.0	8548.827748002343
--41	626923679	-12606	21	-41.0	9034.40949481481
--38	626923679	-14914	28	-38.0	8767.375358291503
--37	626923679	-14780	17	-37.0	10368.905538788269
--36	626923679	-16208	23	-36.0	8773.54768443692
--34	626923679	-15450	29	-34.0	8708.243526705026
--26	626923679	-15686	15	-26.0	10874.52390040532
--24	626923679	-16311	26	-24.0	9386.736402961187
--22	626923679	-14701	22	-22.0	8809.230165774987
--18	626923679	-14863	24	-18.0	9638.430684071413
--12	626923679	-16373	22	-12.0	10173.157075411711
--10	626923679	-15384	28	-10.0	8850.451610567823
+-39	626923679	-15612	19	-39.0	9765.551806305297
+-35	626923679	-16059	23	-35.0	10136.580492864763
+-27	626923679	-14984	20	-27.0	8465.29660255097
+-19	626923679	-15935	25	-19.0	9967.22240685782
+-16	626923679	-15154	21	-16.0	8884.207393686478
 -9	626923679	-15329	31	-9.0	8999.391457373968
--2	626923679	-16277	20	-2.0	10800.090249507177
-14	626923679	-13367	28	14.0	9074.674998750581
-17	626923679	-16109	22	16.73235294865627	1353416.3383574807
-19	626923679	-16049	21	19.0	9423.560227007669
-20	626923679	-15149	21	20.0	11161.893298093504
+-5	626923679	-15780	24	-5.0	10599.227726422314
+4	626923679	-15999	29	4.0	9516.189702058044
+8	1070764888	-15778	1034	8.0	9562.355155774725
+9	626923679	-13629	25	9.0	10157.21794880862
+12	626923679	-14642	18	12.0	9696.038286378725
+16	626923679	-14001	26	16.0	10130.883606275338
 21	626923679	-15931	23	21.0	9683.044864861204
-26	626923679	-14516	29	26.0	9123.125508880434
 27	626923679	-14965	24	27.0	9802.871860196343
 30	626923679	-14111	27	30.0	10066.520234676529
-34	626923679	-15059	28	34.0	8756.731536033674
-36	626923679	-15912	20	36.0	9475.257975138164
 38	626923679	-15248	29	38.0	9900.256257785535
-40	626923679	-15861	22	40.0	9283.318678549174
-44	626923679	-11185	16	44.0	9425.076634933797
 45	626923679	-15228	18	45.0	9459.968668643687
-49	626923679	-15923	27	49.0	9850.111848934683
-53	626923679	-16217	30	53.0	9895.247408969733
-58	626923679	-13627	20	58.0	9083.529665947459
+52	626923679	-15450	20	52.0	9261.723648435052
+55	626923679	-15887	21	55.0	9826.385691928082
+59	626923679	-16076	17	59.0	10117.449670779672
+62	626923679	-14307	17	62.0	9491.752726667324
 NULL	1073418988	-16379	3115	NULL	305051.4870777435
--60	626923679	-15792	24	-60.0	9892.656196775464
+-57	626923679	-14893	32	-57.0	8572.083461570479
 -56	626923679	-11999	33	-56.0	9490.84215267234
 -49	626923679	-14831	23	-49.0	9894.429191738676
--46	626923679	-12427	21	-46.0	9182.943188188632
--45	626923679	-15027	21	-45.0	8567.489593562543
--42	626923679	-16025	14	-42.0	9692.646755759979
--32	626923679	-15866	25	-32.0	9535.546396775917
+-44	626923679	-15667	21	-44.0	10334.01810499552
+-40	626923679	-14678	23	-40.0	9883.334986561835
+-37	626923679	-14780	17	-37.0	10368.905538788269
 -28	626923679	-15813	20	-28.0	9616.869413270924
--27	626923679	-14984	20	-27.0	8465.29660255097
--21	626923679	-16017	27	-21.0	9480.349236669877
--20	626923679	-16126	24	-20.0	9868.922680801063
--19	626923679	-15935	25	-19.0	9967.22240685782
+-26	626923679	-15686	15	-26.0	10874.52390040532
+-25	626923679	-15862	24	-25.0	9778.25672472702
+-24	626923679	-16311	26	-24.0	9386.736402961187
 -17	626923679	-15922	19	-17.0	9944.104273894172
--14	626923679	-13884	22	-14.0	10125.818731386042
+-12	626923679	-16373	22	-12.0	10173.157075411711
 -8	626923679	-14678	18	-8.0	9976.831992670686
--6	626923679	-15980	30	-6.0	10262.829252317424
-0	626923679	-14254	24	0.0	10057.5018088718
-9	626923679	-13629	25	9.0	10157.21794880862
-10	626923679	-15887	26	10.0	9104.82052013511
-28	626923679	-14455	20	28.0	9283.289383115296
-37	626923679	-12081	24	37.0	9017.860034890362
-41	626923679	-13480	21	41.0	9016.291129937848
-48	626923679	-16372	29	48.0	10079.286173063345
-52	626923679	-15450	20	52.0	9261.723648435052
-59	626923679	-16076	17	59.0	10117.449670779672
--64	626923679	-15920	21	-64.0	9254.456539277186
--63	626923679	-12516	16	-63.0	9263.605837223322
--62	626923679	-15992	24	-62.0	9004.593091474137
--61	626923679	-15142	22	-61.0	9357.23618787085
--55	626923679	-13381	26	-55.0	9157.562103946742
--53	626923679	-15445	19	-53.0	9387.7393254998
--52	626923679	-16369	30	-52.0	8625.06871423408
--51	1073680599	-15734	1028	-51.0	9531.569305177045
--29	626923679	-14747	26	-29.0	9052.945656011723
--15	626923679	-16036	24	-15.0	9450.506254395026
--13	626923679	-15446	30	-13.0	8907.942987576691
--7	626923679	-14584	23	-7.0	9946.605446407748
--5	626923679	-15780	24	-5.0	10599.227726422314
--4	626923679	-16207	21	-4.0	9682.726604102581
--3	626923679	-13632	16	-3.0	8836.215573422822
--1	626923679	-15441	36	-1.0486250072717667	8786.246963933323
-4	626923679	-15999	29	4.0	9516.189702058044
-6	626923679	-15948	30	6.0	9644.247255286115
-16	626923679	-14001	26	16.0	10130.883606275338
+1	626923679	-14610	30	1.0	10016.486277900645
+2	626923679	-16227	25	2.0	10083.276127543355
+3	626923679	-16339	30	3.0	10483.526375885147
+5	626923679	-16169	31	5.0	11114.001902469323
+11	1072654057	-14696	1035	11.0	9531.018991371746
 18	626923679	-15779	21	18.0	10820.004053788869
-31	626923679	-15960	24	31.0	10427.970184550613
-33	626923679	-14642	29	40.61776386607777	1304429.593903763
+20	626923679	-15149	21	20.0	11161.893298093504
+23	626923679	-15514	24	23.0	8542.419116415425
+24	626923679	-15086	24	24.0	9661.203790645088
+25	626923679	-11349	23	25.0	8888.959012093468
+29	626923679	-15892	16	29.0	9874.046501817154
+32	626923679	-14044	24	32.0	8376.464579403413
 39	626923679	-14887	28	39.0	10513.343644635233
+41	626923679	-13480	21	41.0	9016.291129937848
 43	626923679	-15703	28	43.0	8757.796089055722
 46	626923679	-15187	22	46.0	9685.908173160062
 47	626923679	-16324	22	47.0	9822.220821743611
-50	626923679	-16236	21	50.0	9398.176197406601
+48	626923679	-16372	29	48.0	10079.286173063345
+53	626923679	-16217	30	53.0	9895.247408969733
 56	626923679	-12631	21	56.0	8860.917133763547
 57	626923679	-15620	25	57.0	9413.99393840875
-60	626923679	-13606	23	60.0	8346.267436552042
--57	626923679	-14893	32	-57.0	8572.083461570479
+-62	626923679	-15992	24	-62.0	9004.593091474137
+-61	626923679	-15142	22	-61.0	9357.23618787085
+-60	626923679	-15792	24	-60.0	9892.656196775464
+-58	626923679	-15169	20	-58.0	9549.096672008196
+-54	626923679	-14815	23	-54.0	9614.154026896624
+-53	626923679	-15445	19	-53.0	9387.7393254998
 -48	626923679	-15462	26	-48.0	9913.883371354863
--47	626923679	-16096	19	-47.0	9011.009178780589
--44	626923679	-15667	21	-44.0	10334.01810499552
+-45	626923679	-15027	21	-45.0	8567.489593562543
 -43	626923679	-15607	27	-43.0	8715.255026265124
--40	626923679	-14678	23	-40.0	9883.334986561835
--39	626923679	-15612	19	-39.0	9765.551806305297
--35	626923679	-16059	23	-35.0	10136.580492864763
+-42	626923679	-16025	14	-42.0	9692.646755759979
 -33	626923679	-12779	21	-33.0	8854.331159704514
--31	626923679	-15915	22	-31.0	9187.596784112568
--30	626923679	-14863	23	-30.0	9193.941914019651
--25	626923679	-15862	24	-25.0	9778.25672472702
+-32	626923679	-15866	25	-32.0	9535.546396775917
 -23	626923679	-16355	36	-23.345263230173213	9401.831290253447
--16	626923679	-15154	21	-16.0	8884.207393686478
 -11	626923679	-15659	32	-11.0	10453.73856740804
-1	626923679	-14610	30	1.0	10016.486277900645
-2	626923679	-16227	25	2.0	10083.276127543355
-3	626923679	-16339	30	3.0	10483.526375885147
-5	626923679	-16169	31	5.0	11114.001902469323
+-10	626923679	-15384	28	-10.0	8850.451610567823
+-6	626923679	-15980	30	-6.0	10262.829252317424
+-4	626923679	-16207	21	-4.0	9682.726604102581
+-2	626923679	-16277	20	-2.0	10800.090249507177
+0	626923679	-14254	24	0.0	10057.5018088718
+6	626923679	-15948	30	6.0	9644.247255286115
 7	626923679	-15839	25	7.0	10077.151640330823
-8	1070764888	-15778	1034	8.0	9562.355155774725
-11	1072654057	-14696	1035	11.0	9531.018991371746
-12	626923679	-14642	18	12.0	9696.038286378725
+10	626923679	-15887	26	10.0	9104.82052013511
+14	626923679	-13367	28	14.0	9074.674998750581
+17	626923679	-16109	22	16.73235294865627	1353416.3383574807
+26	626923679	-14516	29	26.0	9123.125508880434
+28	626923679	-14455	20	28.0	9283.289383115296
+34	626923679	-15059	28	34.0	8756.731536033674
+35	626923679	-16153	27	35.0	10351.008404963042
+40	626923679	-15861	22	40.0	9283.318678549174
+44	626923679	-11185	16	44.0	9425.076634933797
+49	626923679	-15923	27	49.0	9850.111848934683
+50	626923679	-16236	21	50.0	9398.176197406601
+-63	626923679	-12516	16	-63.0	9263.605837223322
+-59	626923679	-15789	28	-59.0	9829.790704244735
+-55	626923679	-13381	26	-55.0	9157.562103946742
+-51	1073680599	-15734	1028	-51.0	9531.569305177045
+-47	626923679	-16096	19	-47.0	9011.009178780589
+-46	626923679	-12427	21	-46.0	9182.943188188632
+-41	626923679	-12606	21	-41.0	9034.40949481481
+-38	626923679	-14914	28	-38.0	8767.375358291503
+-36	626923679	-16208	23	-36.0	8773.54768443692
+-34	626923679	-15450	29	-34.0	8708.243526705026
+-31	626923679	-15915	22	-31.0	9187.596784112568
+-30	626923679	-14863	23	-30.0	9193.941914019651
+-29	626923679	-14747	26	-29.0	9052.945656011723
+-22	626923679	-14701	22	-22.0	8809.230165774987
+-21	626923679	-16017	27	-21.0	9480.349236669877
+-20	626923679	-16126	24	-20.0	9868.922680801063
+-18	626923679	-14863	24	-18.0	9638.430684071413
+-15	626923679	-16036	24	-15.0	9450.506254395026
+-14	626923679	-13884	22	-14.0	10125.818731386042
+-13	626923679	-15446	30	-13.0	8907.942987576691
+-7	626923679	-14584	23	-7.0	9946.605446407748
+-3	626923679	-13632	16	-3.0	8836.215573422822
+-1	626923679	-15441	36	-1.0486250072717667	8786.246963933323
 13	626923679	-14771	26	13.0	8128.265919972384
 15	626923679	-16339	28	15.0	9770.473400901918
+19	626923679	-16049	21	19.0	9423.560227007669
 22	626923679	-16280	26	22.0	9693.155720861765
-23	626923679	-15514	24	23.0	8542.419116415425
-24	626923679	-15086	24	24.0	9661.203790645088
-25	626923679	-11349	23	25.0	8888.959012093468
-29	626923679	-15892	16	29.0	9874.046501817154
-32	626923679	-14044	24	32.0	8376.464579403413
-35	626923679	-16153	27	35.0	10351.008404963042
+31	626923679	-15960	24	31.0	10427.970184550613
+33	626923679	-14642	29	40.61776386607777	1304429.593903763
+36	626923679	-15912	20	36.0	9475.257975138164
+37	626923679	-12081	24	37.0	9017.860034890362
 42	626923679	-15834	28	42.0	10318.01399719996
 51	626923679	-15790	17	51.0	9220.075799194028
 54	626923679	-15245	16	54.0	9789.50878424882
-55	626923679	-15887	21	55.0	9826.385691928082
+58	626923679	-13627	20	58.0	9083.529665947459
+60	626923679	-13606	23	60.0	8346.267436552042
 61	626923679	-15894	29	61.0	8785.7149509872
-62	626923679	-14307	17	62.0	9491.752726667324
 PREHOOK: query: CREATE TABLE empty_parquet(x int) PARTITIONED BY (y int) stored as parquet
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/load_dyn_part8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/load_dyn_part8.q.out b/ql/src/test/results/clientpositive/load_dyn_part8.q.out
index 1d7e966..2162c3a 100644
--- a/ql/src/test/results/clientpositive/load_dyn_part8.q.out
+++ b/ql/src/test/results/clientpositive/load_dyn_part8.q.out
@@ -217,6 +217,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -265,6 +266,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -313,6 +315,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -361,6 +364,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/louter_join_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/louter_join_ppr.q.out b/ql/src/test/results/clientpositive/louter_join_ppr.q.out
index 95a5c1a..ba1fb0e 100644
--- a/ql/src/test/results/clientpositive/louter_join_ppr.q.out
+++ b/ql/src/test/results/clientpositive/louter_join_ppr.q.out
@@ -77,6 +77,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 'default','default'
@@ -98,6 +99,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -148,6 +150,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -196,6 +199,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -371,6 +375,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 'default','default'
@@ -392,6 +397,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -442,6 +448,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -490,6 +497,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -669,6 +677,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 'default','default'
@@ -690,6 +699,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -740,6 +750,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -788,6 +799,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -963,6 +975,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 'default','default'
@@ -984,6 +997,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -1034,6 +1048,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -1082,6 +1097,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out b/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out
index c2c514f..3edd187 100644
--- a/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out
+++ b/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out
@@ -123,6 +123,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 'default','default'
@@ -144,6 +145,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -169,6 +171,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 'default','default'
@@ -190,6 +193,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -240,6 +244,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -288,6 +293,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -336,6 +342,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -384,6 +391,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/masking_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/masking_5.q.out b/ql/src/test/results/clientpositive/masking_5.q.out
index acb6471..016ab97 100644
--- a/ql/src/test/results/clientpositive/masking_5.q.out
+++ b/ql/src/test/results/clientpositive/masking_5.q.out
@@ -182,8 +182,3 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@masking_test
 #### A masked pattern was here ####
 2	2_lav
-0	0_lav
-0	0_lav
-8	8_lav
-4	4_lav
-0	0_lav

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/merge3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/merge3.q.out b/ql/src/test/results/clientpositive/merge3.q.out
index 11e7043..0d8e91b 100644
--- a/ql/src/test/results/clientpositive/merge3.q.out
+++ b/ql/src/test/results/clientpositive/merge3.q.out
@@ -112,6 +112,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -133,6 +134,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -2336,6 +2338,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	2000                
 	rawDataSize         	21248               
@@ -2475,6 +2478,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -2522,6 +2526,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -4916,6 +4921,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -4963,6 +4969,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/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 a0cbdb5..f1f4b79 100644
--- a/ql/src/test/results/clientpositive/mm_all.q.out
+++ b/ql/src/test/results/clientpositive/mm_all.q.out
@@ -1829,6 +1829,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	6                   
 	rawDataSize         	13                  
@@ -1878,6 +1879,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	12                  
 	rawDataSize         	26                  
@@ -1936,6 +1938,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{}                  
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	5312                

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/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
index fa25be7..2b2c959 100644
--- a/ql/src/test/results/clientpositive/mm_buckets.q.out
+++ b/ql/src/test/results/clientpositive/mm_buckets.q.out
@@ -91,10 +91,9 @@ 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
+97	97
 PREHOOK: query: select * from bucket0_mm tablesample (bucket 2 out of 2) s
 PREHOOK: type: QUERY
 PREHOOK: Input: default@bucket0_mm
@@ -103,8 +102,9 @@ 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 ####
+100	100
+0	0
 103	103
-97	97
 PREHOOK: query: insert into table bucket0_mm select key, key from intermediate
 PREHOOK: type: QUERY
 PREHOOK: Input: default@intermediate
@@ -149,14 +149,12 @@ 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
+97	97
+97	97
 PREHOOK: query: select * from bucket0_mm tablesample (bucket 2 out of 2) s
 PREHOOK: type: QUERY
 PREHOOK: Input: default@bucket0_mm
@@ -165,10 +163,12 @@ 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 ####
+100	100
+0	0
+100	100
+0	0
 103	103
-97	97
 103	103
-97	97
 PREHOOK: query: drop table bucket0_mm
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@bucket0_mm
@@ -318,9 +318,11 @@ POSTHOOK: Input: default@bucket1_mm@key2=98
 POSTHOOK: Input: default@bucket1_mm@key2=99
 #### A masked pattern was here ####
 96	97	98
+97	98	99
 98	97	96
-102	103	104
-104	103	102
+99	98	97
+99	100	101
+101	100	99
 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
@@ -355,10 +357,8 @@ POSTHOOK: Input: default@bucket1_mm@key2=99
 1	0	-1
 9	10	11
 11	10	9
-97	98	99
-99	98	97
-99	100	101
-101	100	99
+102	103	104
+104	103	102
 PREHOOK: query: drop table bucket1_mm
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@bucket1_mm
@@ -416,7 +416,6 @@ POSTHOOK: query: select * from bucket2_mm tablesample (bucket 1 out of 10) s ord
 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
@@ -460,8 +459,6 @@ POSTHOOK: query: select * from bucket2_mm tablesample (bucket 1 out of 10) s ord
 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
@@ -470,7 +467,6 @@ POSTHOOK: query: select * from bucket2_mm tablesample (bucket 4 out of 10) s ord
 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

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/mm_default.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/mm_default.q.out b/ql/src/test/results/clientpositive/mm_default.q.out
index f5341ed..e08ec5f 100644
--- a/ql/src/test/results/clientpositive/mm_default.q.out
+++ b/ql/src/test/results/clientpositive/mm_default.q.out
@@ -181,6 +181,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{}                  
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1                   
 	rawDataSize         	3                   
@@ -216,6 +217,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -251,6 +253,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1                   
 	rawDataSize         	3                   
@@ -319,6 +322,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/multi_insert_partitioned.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/multi_insert_partitioned.q.out b/ql/src/test/results/clientpositive/multi_insert_partitioned.q.out
index bc68f05..76b4f74 100644
--- a/ql/src/test/results/clientpositive/multi_insert_partitioned.q.out
+++ b/ql/src/test/results/clientpositive/multi_insert_partitioned.q.out
@@ -119,6 +119,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	12                  
@@ -206,6 +207,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	12                  
@@ -299,6 +301,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	3                   
 	numPartitions       	2                   
 	numRows             	18                  
@@ -416,6 +419,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	7                   
 	numPartitions       	5                   
 	numRows             	30                  
@@ -538,6 +542,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	9                   
 	numPartitions       	5                   
 	numRows             	42                  

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/named_column_join.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/named_column_join.q.out b/ql/src/test/results/clientpositive/named_column_join.q.out
index 9a3f271..d32dc20 100644
--- a/ql/src/test/results/clientpositive/named_column_join.q.out
+++ b/ql/src/test/results/clientpositive/named_column_join.q.out
@@ -287,6 +287,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -353,6 +354,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -463,6 +465,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	13                  
 	rawDataSize         	41                  

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/nonmr_fetch.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/nonmr_fetch.q.out b/ql/src/test/results/clientpositive/nonmr_fetch.q.out
index 4c7716c..b53a391 100644
--- a/ql/src/test/results/clientpositive/nonmr_fetch.q.out
+++ b/ql/src/test/results/clientpositive/nonmr_fetch.q.out
@@ -600,13 +600,20 @@ POSTHOOK: query: select *, BLOCK__OFFSET__INSIDE__FILE from src TABLESAMPLE (BUC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
-484	val_484	102
-286	val_286	1404
-187	val_187	1416
-187	val_187	2492
-77	val_77	2622
-187	val_187	4516
-448	val_448	5636
+66	val_66	198
+406	val_406	244
+219	val_219	478
+280	val_280	1226
+67	val_67	1754
+306	val_306	2880
+458	val_458	3356
+219	val_219	3710
+280	val_280	3992
+406	val_406	4220
+406	val_406	4256
+406	val_406	5152
+67	val_67	5306
+458	val_458	5442
 PREHOOK: query: explain select *, BLOCK__OFFSET__INSIDE__FILE from srcpart TABLESAMPLE (BUCKET 1 OUT OF 40 ON key)
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select *, BLOCK__OFFSET__INSIDE__FILE from srcpart TABLESAMPLE (BUCKET 1 OUT OF 40 ON key)
@@ -647,34 +654,62 @@ POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11
 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12
 #### A masked pattern was here ####
-484	val_484	2008-04-08	11	102
-286	val_286	2008-04-08	11	1404
-187	val_187	2008-04-08	11	1416
-187	val_187	2008-04-08	11	2492
-77	val_77	2008-04-08	11	2622
-187	val_187	2008-04-08	11	4516
-448	val_448	2008-04-08	11	5636
-484	val_484	2008-04-08	12	102
-286	val_286	2008-04-08	12	1404
-187	val_187	2008-04-08	12	1416
-187	val_187	2008-04-08	12	2492
-77	val_77	2008-04-08	12	2622
-187	val_187	2008-04-08	12	4516
-448	val_448	2008-04-08	12	5636
-484	val_484	2008-04-09	11	102
-286	val_286	2008-04-09	11	1404
-187	val_187	2008-04-09	11	1416
-187	val_187	2008-04-09	11	2492
-77	val_77	2008-04-09	11	2622
-187	val_187	2008-04-09	11	4516
-448	val_448	2008-04-09	11	5636
-484	val_484	2008-04-09	12	102
-286	val_286	2008-04-09	12	1404
-187	val_187	2008-04-09	12	1416
-187	val_187	2008-04-09	12	2492
-77	val_77	2008-04-09	12	2622
-187	val_187	2008-04-09	12	4516
-448	val_448	2008-04-09	12	5636
+66	val_66	2008-04-08	11	198
+406	val_406	2008-04-08	11	244
+219	val_219	2008-04-08	11	478
+280	val_280	2008-04-08	11	1226
+67	val_67	2008-04-08	11	1754
+306	val_306	2008-04-08	11	2880
+458	val_458	2008-04-08	11	3356
+219	val_219	2008-04-08	11	3710
+280	val_280	2008-04-08	11	3992
+406	val_406	2008-04-08	11	4220
+406	val_406	2008-04-08	11	4256
+406	val_406	2008-04-08	11	5152
+67	val_67	2008-04-08	11	5306
+458	val_458	2008-04-08	11	5442
+66	val_66	2008-04-08	12	198
+406	val_406	2008-04-08	12	244
+219	val_219	2008-04-08	12	478
+280	val_280	2008-04-08	12	1226
+67	val_67	2008-04-08	12	1754
+306	val_306	2008-04-08	12	2880
+458	val_458	2008-04-08	12	3356
+219	val_219	2008-04-08	12	3710
+280	val_280	2008-04-08	12	3992
+406	val_406	2008-04-08	12	4220
+406	val_406	2008-04-08	12	4256
+406	val_406	2008-04-08	12	5152
+67	val_67	2008-04-08	12	5306
+458	val_458	2008-04-08	12	5442
+66	val_66	2008-04-09	11	198
+406	val_406	2008-04-09	11	244
+219	val_219	2008-04-09	11	478
+280	val_280	2008-04-09	11	1226
+67	val_67	2008-04-09	11	1754
+306	val_306	2008-04-09	11	2880
+458	val_458	2008-04-09	11	3356
+219	val_219	2008-04-09	11	3710
+280	val_280	2008-04-09	11	3992
+406	val_406	2008-04-09	11	4220
+406	val_406	2008-04-09	11	4256
+406	val_406	2008-04-09	11	5152
+67	val_67	2008-04-09	11	5306
+458	val_458	2008-04-09	11	5442
+66	val_66	2008-04-09	12	198
+406	val_406	2008-04-09	12	244
+219	val_219	2008-04-09	12	478
+280	val_280	2008-04-09	12	1226
+67	val_67	2008-04-09	12	1754
+306	val_306	2008-04-09	12	2880
+458	val_458	2008-04-09	12	3356
+219	val_219	2008-04-09	12	3710
+280	val_280	2008-04-09	12	3992
+406	val_406	2008-04-09	12	4220
+406	val_406	2008-04-09	12	4256
+406	val_406	2008-04-09	12	5152
+67	val_67	2008-04-09	12	5306
+458	val_458	2008-04-09	12	5442
 PREHOOK: query: explain select * from src TABLESAMPLE (0.25 PERCENT)
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select * from src TABLESAMPLE (0.25 PERCENT)

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/nullformat.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/nullformat.q.out b/ql/src/test/results/clientpositive/nullformat.q.out
index b5821b7..49a840b 100644
--- a/ql/src/test/results/clientpositive/nullformat.q.out
+++ b/ql/src/test/results/clientpositive/nullformat.q.out
@@ -89,6 +89,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: INSERT OVERWRITE TABLE null_tab1 SELECT a,b FROM base_tab
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/nullformatCTAS.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/nullformatCTAS.q.out b/ql/src/test/results/clientpositive/nullformatCTAS.q.out
index 109047e..498c5b9 100644
--- a/ql/src/test/results/clientpositive/nullformatCTAS.q.out
+++ b/ql/src/test/results/clientpositive/nullformatCTAS.q.out
@@ -173,6 +173,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 1.01
 1.01

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/offset_limit_global_optimizer.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/offset_limit_global_optimizer.q.out b/ql/src/test/results/clientpositive/offset_limit_global_optimizer.q.out
index 4334762..154666c 100644
--- a/ql/src/test/results/clientpositive/offset_limit_global_optimizer.q.out
+++ b/ql/src/test/results/clientpositive/offset_limit_global_optimizer.q.out
@@ -65,6 +65,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -113,6 +114,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -161,6 +163,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -209,6 +212,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -361,6 +365,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -409,6 +414,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -457,6 +463,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -505,6 +512,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -657,6 +665,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -705,6 +714,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -753,6 +763,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -801,6 +812,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -963,6 +975,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -1011,6 +1024,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -1059,6 +1073,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -1107,6 +1122,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -1849,6 +1865,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -1897,6 +1914,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -1945,6 +1963,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -1993,6 +2012,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -2145,6 +2165,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -2193,6 +2214,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -2241,6 +2263,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -2289,6 +2312,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -2441,6 +2465,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -2489,6 +2514,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -2537,6 +2563,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -2585,6 +2612,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -2747,6 +2775,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -2795,6 +2824,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -2843,6 +2873,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -2891,6 +2922,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/outer_join_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/outer_join_ppr.q.out b/ql/src/test/results/clientpositive/outer_join_ppr.q.out
index e087ac5..f785f75 100644
--- a/ql/src/test/results/clientpositive/outer_join_ppr.q.out
+++ b/ql/src/test/results/clientpositive/outer_join_ppr.q.out
@@ -77,6 +77,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 'default','default'
@@ -98,6 +99,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -148,6 +150,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -196,6 +199,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -371,6 +375,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 'default','default'
@@ -392,6 +397,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -442,6 +448,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'
@@ -490,6 +497,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 'default','default'

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/outer_reference_windowed.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/outer_reference_windowed.q.out b/ql/src/test/results/clientpositive/outer_reference_windowed.q.out
index 3d918b7..eb30ab0 100644
--- a/ql/src/test/results/clientpositive/outer_reference_windowed.q.out
+++ b/ql/src/test/results/clientpositive/outer_reference_windowed.q.out
@@ -138,6 +138,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c1\":\"true\",\"c2\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	4                   
 	rawDataSize         	12                  

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/parallel_orderby.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/parallel_orderby.q.out b/ql/src/test/results/clientpositive/parallel_orderby.q.out
index 571362d..ad24378 100644
--- a/ql/src/test/results/clientpositive/parallel_orderby.q.out
+++ b/ql/src/test/results/clientpositive/parallel_orderby.q.out
@@ -49,6 +49,7 @@ STAGE PLANS:
                 key expressions: _col0 (type: string), _col1 (type: string)
                 sort order: ++
                 Statistics: Num rows: 1 Data size: 5600 Basic stats: COMPLETE Column stats: NONE
+      Execution mode: vectorized
       Reduce Operator Tree:
         Select Operator
           expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string)
@@ -87,6 +88,7 @@ PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@src5
 PREHOOK: Output: database:default
 PREHOOK: Output: default@total_ordered
+java.lang.ClassCastException: org.apache.hadoop.hive.serde2.lazy.LazyStruct cannot be cast to org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch
 POSTHOOK: query: create table total_ordered as select * from src5 order by key, value
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src5
@@ -112,7 +114,8 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
-	numFiles            	4                   
+	bucketing_version   	2                   
+	numFiles            	1                   
 	numRows             	48                  
 	rawDataSize         	512                 
 	totalSize           	560                 
@@ -222,6 +225,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	48                  
 	rawDataSize         	512                 

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/parquet_analyze.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/parquet_analyze.q.out b/ql/src/test/results/clientpositive/parquet_analyze.q.out
index d07a093..7a024f9 100644
--- a/ql/src/test/results/clientpositive/parquet_analyze.q.out
+++ b/ql/src/test/results/clientpositive/parquet_analyze.q.out
@@ -90,6 +90,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"address\":\"true\",\"first_name\":\"true\",\"id\":\"true\",\"last_name\":\"true\",\"salary\":\"true\",\"start_date\":\"true\",\"state\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	100                 
 	rawDataSize         	700                 
@@ -137,6 +138,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"address\":\"true\",\"first_name\":\"true\",\"id\":\"true\",\"last_name\":\"true\",\"salary\":\"true\",\"start_date\":\"true\",\"state\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	100                 
 	rawDataSize         	5952                

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/parquet_array_null_element.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/parquet_array_null_element.q.out b/ql/src/test/results/clientpositive/parquet_array_null_element.q.out
index 142f1c3..94d8344 100644
--- a/ql/src/test/results/clientpositive/parquet_array_null_element.q.out
+++ b/ql/src/test/results/clientpositive/parquet_array_null_element.q.out
@@ -70,6 +70,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"id\":\"true\",\"lstint\":\"true\",\"lststr\":\"true\",\"mp\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/parquet_create.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/parquet_create.q.out b/ql/src/test/results/clientpositive/parquet_create.q.out
index fa76111..a37309e 100644
--- a/ql/src/test/results/clientpositive/parquet_create.q.out
+++ b/ql/src/test/results/clientpositive/parquet_create.q.out
@@ -73,6 +73,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"id\":\"true\",\"lst\":\"true\",\"mp\":\"true\",\"str\":\"true\",\"strct\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/parquet_mixed_partition_formats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/parquet_mixed_partition_formats.q.out b/ql/src/test/results/clientpositive/parquet_mixed_partition_formats.q.out
index e931aaa..97c69e9 100644
--- a/ql/src/test/results/clientpositive/parquet_mixed_partition_formats.q.out
+++ b/ql/src/test/results/clientpositive/parquet_mixed_partition_formats.q.out
@@ -189,6 +189,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numPartitions       	1                   

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/parquet_partitioned.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/parquet_partitioned.q.out b/ql/src/test/results/clientpositive/parquet_partitioned.q.out
index 8e13834..c74b52e 100644
--- a/ql/src/test/results/clientpositive/parquet_partitioned.q.out
+++ b/ql/src/test/results/clientpositive/parquet_partitioned.q.out
@@ -62,6 +62,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/parquet_serde.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/parquet_serde.q.out b/ql/src/test/results/clientpositive/parquet_serde.q.out
index 90dc6a5..7d0ca32 100644
--- a/ql/src/test/results/clientpositive/parquet_serde.q.out
+++ b/ql/src/test/results/clientpositive/parquet_serde.q.out
@@ -126,6 +126,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numPartitions       	1                   

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/parquet_vectorization_0.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/parquet_vectorization_0.q.out b/ql/src/test/results/clientpositive/parquet_vectorization_0.q.out
index fbb78b1..35253a8 100644
--- a/ql/src/test/results/clientpositive/parquet_vectorization_0.q.out
+++ b/ql/src/test/results/clientpositive/parquet_vectorization_0.q.out
@@ -1726,6 +1726,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
               columns.comments 
@@ -1747,6 +1748,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
                 columns.comments 
@@ -30541,6 +30543,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
               columns.comments 
@@ -30562,6 +30565,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
                 columns.comments 
@@ -30651,6 +30655,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
               columns.comments 
@@ -30672,6 +30677,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
                 columns.comments 
@@ -30762,6 +30768,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
               columns.comments 
@@ -30783,6 +30790,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
                 columns.comments 
@@ -30861,6 +30869,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
               columns.comments 
@@ -30882,6 +30891,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cbigint":"true","cboolean1":"true","cboolean2":"true","cdouble":"true","cfloat":"true","cint":"true","csmallint":"true","cstring1":"true","cstring2":"true","ctimestamp1":"true","ctimestamp2":"true","ctinyint":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/091fd962/ql/src/test/results/clientpositive/part_inherit_tbl_props_with_star.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/part_inherit_tbl_props_with_star.q.out b/ql/src/test/results/clientpositive/part_inherit_tbl_props_with_star.q.out
index dbbfd00..dae8e0e 100644
--- a/ql/src/test/results/clientpositive/part_inherit_tbl_props_with_star.q.out
+++ b/ql/src/test/results/clientpositive/part_inherit_tbl_props_with_star.q.out
@@ -35,6 +35,7 @@ Partition Parameters:
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c1\":\"true\"}}
 	a                   	myval               
 	b                   	yourval             
+	bucketing_version   	2                   
 	c                   	noval               
 	numFiles            	0                   
 	numRows             	0