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/04/30 05:25:13 UTC

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

Repository: hive
Updated Branches:
  refs/heads/master a095c3d93 -> ac6b2a3fb


http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_7.q.out b/ql/src/test/results/clientpositive/union_remove_7.q.out
index b60f7bb..437b08a 100644
--- a/ql/src/test/results/clientpositive/union_remove_7.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_7.q.out
@@ -173,6 +173,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	178                 
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_8.q.out b/ql/src/test/results/clientpositive/union_remove_8.q.out
index 0fbaa3c..4971a74 100644
--- a/ql/src/test/results/clientpositive/union_remove_8.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_8.q.out
@@ -183,6 +183,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	3                   
 	totalSize           	271                 
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_9.q.out b/ql/src/test/results/clientpositive/union_remove_9.q.out
index 2dadf0f..786a81f 100644
--- a/ql/src/test/results/clientpositive/union_remove_9.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_9.q.out
@@ -230,6 +230,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	192                 
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_stats.q.out b/ql/src/test/results/clientpositive/union_stats.q.out
index 5b6ada7..8bd3f44 100644
--- a/ql/src/test/results/clientpositive/union_stats.q.out
+++ b/ql/src/test/results/clientpositive/union_stats.q.out
@@ -90,6 +90,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'
@@ -111,6 +112,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'
@@ -313,6 +315,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1000                
 	rawDataSize         	10624               
@@ -361,6 +364,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1500                
 	rawDataSize         	15936               
@@ -417,6 +421,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1500                
 	rawDataSize         	15936               

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/unset_table_view_property.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/unset_table_view_property.q.out b/ql/src/test/results/clientpositive/unset_table_view_property.q.out
index 7097963..5887971 100644
--- a/ql/src/test/results/clientpositive/unset_table_view_property.q.out
+++ b/ql/src/test/results/clientpositive/unset_table_view_property.q.out
@@ -17,6 +17,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES vt.testTable
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"col1":"true","col2":"true"}}
+bucketing_version	2
 numFiles	0
 numRows	0
 rawDataSize	0
@@ -36,6 +37,7 @@ POSTHOOK: query: SHOW TBLPROPERTIES vt.testTable
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"col1":"true","col2":"true"}}
 a	1
+bucketing_version	2
 c	3
 #### A masked pattern was here ####
 numFiles	0
@@ -56,6 +58,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES vt.testTable
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"col1":"true","col2":"true"}}
+bucketing_version	2
 #### A masked pattern was here ####
 numFiles	0
 numRows	0
@@ -76,6 +79,7 @@ POSTHOOK: query: SHOW TBLPROPERTIES vt.testTable
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"col1":"true","col2":"true"}}
 a	1
+bucketing_version	2
 c	3
 d	4
 #### A masked pattern was here ####
@@ -97,6 +101,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES vt.testTable
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"col1":"true","col2":"true"}}
+bucketing_version	2
 c	3
 #### A masked pattern was here ####
 numFiles	0
@@ -117,6 +122,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES vt.testTable
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"col1":"true","col2":"true"}}
+bucketing_version	2
 #### A masked pattern was here ####
 numFiles	0
 numRows	0
@@ -138,6 +144,7 @@ POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"col1":"true","col2":"true"}}
 a	1
 b	2
+bucketing_version	2
 c	3
 d	4
 #### A masked pattern was here ####
@@ -160,6 +167,7 @@ POSTHOOK: query: SHOW TBLPROPERTIES vt.testTable
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"col1":"true","col2":"true"}}
 a	1
+bucketing_version	2
 c	3
 #### A masked pattern was here ####
 numFiles	0
@@ -181,6 +189,7 @@ POSTHOOK: query: SHOW TBLPROPERTIES vt.testTable
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"col1":"true","col2":"true"}}
 a	1
+bucketing_version	2
 #### A masked pattern was here ####
 numFiles	0
 numRows	0
@@ -218,6 +227,7 @@ PREHOOK: query: SHOW TBLPROPERTIES vt.testView
 PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES vt.testView
 POSTHOOK: type: SHOW_TBLPROPERTIES
+bucketing_version	2
 #### A masked pattern was here ####
 propA	100
 propB	200
@@ -234,6 +244,7 @@ PREHOOK: query: SHOW TBLPROPERTIES vt.testView
 PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES vt.testView
 POSTHOOK: type: SHOW_TBLPROPERTIES
+bucketing_version	2
 #### A masked pattern was here ####
 PREHOOK: query: ALTER VIEW vt.testView SET TBLPROPERTIES ('propA'='100', 'propC'='300', 'propD'='400')
 PREHOOK: type: ALTERVIEW_PROPERTIES
@@ -247,6 +258,7 @@ PREHOOK: query: SHOW TBLPROPERTIES vt.testView
 PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES vt.testView
 POSTHOOK: type: SHOW_TBLPROPERTIES
+bucketing_version	2
 #### A masked pattern was here ####
 propA	100
 propC	300
@@ -264,6 +276,7 @@ PREHOOK: query: SHOW TBLPROPERTIES vt.testView
 PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES vt.testView
 POSTHOOK: type: SHOW_TBLPROPERTIES
+bucketing_version	2
 #### A masked pattern was here ####
 propD	400
 #### A masked pattern was here ####
@@ -279,6 +292,7 @@ PREHOOK: query: SHOW TBLPROPERTIES vt.testView
 PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES vt.testView
 POSTHOOK: type: SHOW_TBLPROPERTIES
+bucketing_version	2
 #### A masked pattern was here ####
 PREHOOK: query: ALTER VIEW vt.testView SET TBLPROPERTIES ('propA'='100', 'propB' = '200', 'propC'='300', 'propD'='400')
 PREHOOK: type: ALTERVIEW_PROPERTIES
@@ -292,6 +306,7 @@ PREHOOK: query: SHOW TBLPROPERTIES vt.testView
 PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES vt.testView
 POSTHOOK: type: SHOW_TBLPROPERTIES
+bucketing_version	2
 #### A masked pattern was here ####
 propA	100
 propB	200
@@ -310,6 +325,7 @@ PREHOOK: query: SHOW TBLPROPERTIES vt.testView
 PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES vt.testView
 POSTHOOK: type: SHOW_TBLPROPERTIES
+bucketing_version	2
 #### A masked pattern was here ####
 propA	100
 propB	200
@@ -326,6 +342,7 @@ PREHOOK: query: SHOW TBLPROPERTIES vt.testView
 PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES vt.testView
 POSTHOOK: type: SHOW_TBLPROPERTIES
+bucketing_version	2
 #### A masked pattern was here ####
 propA	100
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/view_alias.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/view_alias.q.out b/ql/src/test/results/clientpositive/view_alias.q.out
index 6e3c2b5..bbd721a 100644
--- a/ql/src/test/results/clientpositive/view_alias.q.out
+++ b/ql/src/test/results/clientpositive/view_alias.q.out
@@ -30,6 +30,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -96,6 +97,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -164,6 +166,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -232,6 +235,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -298,6 +302,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -412,6 +417,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/view_cbo.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/view_cbo.q.out b/ql/src/test/results/clientpositive/view_cbo.q.out
index 80700ff..f9d6819 100644
--- a/ql/src/test/results/clientpositive/view_cbo.q.out
+++ b/ql/src/test/results/clientpositive/view_cbo.q.out
@@ -123,6 +123,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -192,6 +193,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -271,6 +273,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -332,6 +335,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -381,6 +385,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -430,6 +435,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -481,6 +487,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -532,6 +539,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -583,6 +591,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -634,6 +643,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
----------------------------------------------------------------------
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java b/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
index 635ea04..a442cb1 100644
--- a/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
+++ b/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
@@ -21,6 +21,7 @@ package org.apache.hadoop.hive.serde2.objectinspector;
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
@@ -28,9 +29,12 @@ import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.hadoop.hive.serde2.ByteStream;
+import org.apache.hadoop.hive.serde2.binarysortable.BinarySortableSerDe;
 import org.apache.hadoop.hive.serde2.io.TimestampLocalTZWritable;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.SettableTimestampLocalTZObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.TimestampLocalTZObjectInspector;
+import org.apache.hive.common.util.Murmur3;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.hadoop.hive.serde.serdeConstants;
@@ -154,7 +158,7 @@ public final class ObjectInspectorUtils {
 
     @Override
     public int hashCode() {
-      return ObjectInspectorUtils.getBucketHashCode(objects, oi);
+      return ObjectInspectorUtils.getBucketHashCodeOld(objects, oi);
     }
   }
 
@@ -618,13 +622,25 @@ public final class ObjectInspectorUtils {
    * @param bucketFields  the bucketed fields of the row
    * @param bucketFieldInspectors  the ObjectInpsectors for each of the bucketed fields
    * @param totalBuckets the number of buckets in the table
-   * @return the bucket number
+   * @return the bucket number using Murmur hash
    */
   public static int getBucketNumber(Object[] bucketFields, ObjectInspector[] bucketFieldInspectors, int totalBuckets) {
     return getBucketNumber(getBucketHashCode(bucketFields, bucketFieldInspectors), totalBuckets);
   }
 
   /**
+   * Computes the bucket number to which the bucketFields belong to
+   * @param bucketFields  the bucketed fields of the row
+   * @param bucketFieldInspectors  the ObjectInpsectors for each of the bucketed fields
+   * @param totalBuckets the number of buckets in the table
+   * @return the bucket number
+   */
+  @Deprecated
+  public static int getBucketNumberOld(Object[] bucketFields, ObjectInspector[] bucketFieldInspectors, int totalBuckets) {
+    return getBucketNumber(getBucketHashCodeOld(bucketFields, bucketFieldInspectors), totalBuckets);
+  }
+
+  /**
    * https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL+BucketedTables
    * @param hashCode as produced by {@link #getBucketHashCode(Object[], ObjectInspector[])}
    */
@@ -636,13 +652,15 @@ public final class ObjectInspectorUtils {
     }
     return (hashCode & Integer.MAX_VALUE) % numberOfBuckets;
   }
+
   /**
    * Computes the hash code for the given bucketed fields
    * @param bucketFields
    * @param bucketFieldInspectors
    * @return
    */
-  public static int getBucketHashCode(Object[] bucketFields, ObjectInspector[] bucketFieldInspectors) {
+  @Deprecated
+  public static int getBucketHashCodeOld(Object[] bucketFields, ObjectInspector[] bucketFieldInspectors) {
     int hashCode = 0;
     for (int i = 0; i < bucketFields.length; i++) {
       int fieldHash = ObjectInspectorUtils.hashCode(bucketFields[i], bucketFieldInspectors[i]);
@@ -651,7 +669,6 @@ public final class ObjectInspectorUtils {
     return hashCode;
   }
 
-
   public static int hashCode(Object o, ObjectInspector objIns) {
     if (o == null) {
       return 0;
@@ -769,6 +786,144 @@ public final class ObjectInspectorUtils {
     }
   }
 
+  public static int getBucketHashCode(Object[] bucketFields, ObjectInspector[] bucketFieldInspectors) {
+    int hashCode = 0;
+    ByteBuffer b = ByteBuffer.allocate(8); // To be used with primitive types
+    for (int i = 0; i < bucketFields.length; i++) {
+      int fieldHash = ObjectInspectorUtils.hashCodeMurmur(
+          bucketFields[i], bucketFieldInspectors[i], b);
+      hashCode = 31 * hashCode + fieldHash;
+    }
+    return hashCode;
+  }
+
+  public static int hashCodeMurmur(Object o, ObjectInspector objIns, ByteBuffer byteBuffer) {
+    if (o == null) {
+      return 0;
+    }
+    // Reset the bytebuffer
+    byteBuffer.clear();
+    switch (objIns.getCategory()) {
+      case PRIMITIVE: {
+        PrimitiveObjectInspector poi = ((PrimitiveObjectInspector) objIns);
+        switch (poi.getPrimitiveCategory()) {
+          case VOID:
+            return 0;
+          case BOOLEAN:
+            return (((BooleanObjectInspector) poi).get(o) ? 1 : 0);
+          case BYTE:
+            return ((ByteObjectInspector) poi).get(o);
+          case SHORT: {
+            byteBuffer.putShort(((ShortObjectInspector) poi).get(o));
+            return Murmur3.hash32(byteBuffer.array(), 2);
+          }
+          case INT: {
+            byteBuffer.putInt(((IntObjectInspector) poi).get(o));
+            return Murmur3.hash32(byteBuffer.array(), 4);
+          }
+          case LONG: {
+            byteBuffer.putLong(((LongObjectInspector) poi).get(o));
+            return Murmur3.hash32(byteBuffer.array(), 8);
+          }
+          case FLOAT: {
+            byteBuffer.putFloat(Float.floatToIntBits(((FloatObjectInspector) poi).get(o)));
+            return Murmur3.hash32(byteBuffer.array(), 4);
+          }
+          case DOUBLE: {
+            // This hash function returns the same result as Double.hashCode()
+            // while DoubleWritable.hashCode returns a different result.
+            byteBuffer.putDouble(Double.doubleToLongBits(((DoubleObjectInspector) poi).get(o)));
+            return Murmur3.hash32(byteBuffer.array(), 8);
+          }
+          case STRING: {
+            // This hash function returns the same result as String.hashCode() when
+            // all characters are ASCII, while Text.hashCode() always returns a
+            // different result.
+            Text text = ((StringObjectInspector) poi).getPrimitiveWritableObject(o);
+            return Murmur3.hash32(text.getBytes(), text.getLength());
+          }
+          case CHAR: {
+            Text text = ((HiveCharObjectInspector) poi).getPrimitiveWritableObject(o).getStrippedValue();
+            return Murmur3.hash32(text.getBytes(), text.getLength());
+          }
+          case VARCHAR: {
+            Text text = ((HiveVarcharObjectInspector)poi).getPrimitiveWritableObject(o).getTextValue();
+            return Murmur3.hash32(text.getBytes(), text.getLength());
+          }
+          case BINARY:
+            return Murmur3.hash32(((BinaryObjectInspector) poi).getPrimitiveWritableObject(o).getBytes());
+
+          case DATE:
+            byteBuffer.putInt(((DateObjectInspector) poi).getPrimitiveWritableObject(o).getDays());
+            return Murmur3.hash32(byteBuffer.array(), 4);
+          case TIMESTAMP: {
+            TimestampWritable t = ((TimestampObjectInspector) poi)
+                    .getPrimitiveWritableObject(o);
+            return Murmur3.hash32(t.getBytes());
+          }
+          case TIMESTAMPLOCALTZ:
+            return Murmur3.hash32((((TimestampLocalTZObjectInspector) poi).getPrimitiveWritableObject(o)).getBytes());
+          case INTERVAL_YEAR_MONTH:
+            byteBuffer.putInt(((HiveIntervalYearMonthObjectInspector) poi)
+                    .getPrimitiveWritableObject(o).hashCode());
+            return Murmur3.hash32(byteBuffer.array(), 4);
+          case INTERVAL_DAY_TIME:
+            byteBuffer.putInt(((HiveIntervalDayTimeObjectInspector) poi)
+                    .getPrimitiveWritableObject(o).hashCode());
+            return Murmur3.hash32(byteBuffer.array(), 4);
+          case DECIMAL:
+            // Since getBucketHashCode uses this, HiveDecimal return the old (much slower) but
+            // compatible hash code.
+            return Murmur3.hash32(((HiveDecimalObjectInspector) poi).getPrimitiveWritableObject(o).getInternalStorage());
+
+          default: {
+            throw new RuntimeException("Unknown type: "
+                    + poi.getPrimitiveCategory());
+          }
+        }
+      }
+      case LIST: {
+        int r = 0;
+        ListObjectInspector listOI = (ListObjectInspector)objIns;
+        ObjectInspector elemOI = listOI.getListElementObjectInspector();
+        for (int ii = 0; ii < listOI.getListLength(o); ++ii) {
+          //r = 31 * r + hashCode(listOI.getListElement(o, ii), elemOI);
+          r = 31 * r + hashCodeMurmur(listOI.getListElement(o, ii), elemOI, byteBuffer);
+        }
+        return r;
+      }
+      case MAP: {
+        int r = 0;
+        MapObjectInspector mapOI = (MapObjectInspector)objIns;
+        ObjectInspector keyOI = mapOI.getMapKeyObjectInspector();
+        ObjectInspector valueOI = mapOI.getMapValueObjectInspector();
+        Map<?, ?> map = mapOI.getMap(o);
+        for (Map.Entry<?,?> entry : map.entrySet()) {
+          r += hashCodeMurmur(entry.getKey(), keyOI, byteBuffer) ^
+                  hashCode(entry.getValue(), valueOI);
+        }
+        return r;
+      }
+      case STRUCT:
+        int r = 0;
+        StructObjectInspector structOI = (StructObjectInspector)objIns;
+        List<? extends StructField> fields = structOI.getAllStructFieldRefs();
+        for (StructField field : fields) {
+          r = 31 * r + hashCodeMurmur(structOI.getStructFieldData(o, field),
+                  field.getFieldObjectInspector(), byteBuffer);
+        }
+        return r;
+
+      case UNION:
+        UnionObjectInspector uOI = (UnionObjectInspector)objIns;
+        byte tag = uOI.getTag(o);
+        return hashCodeMurmur(uOI.getField(o), uOI.getObjectInspectors().get(tag), byteBuffer);
+
+      default:
+        throw new RuntimeException("Unknown type: "+ objIns.getTypeName());
+    }
+  }
+
   /**
    * Compare two arrays of objects with their respective arrays of
    * ObjectInspectors.

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorUtils.java
----------------------------------------------------------------------
diff --git a/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorUtils.java b/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorUtils.java
index eca7405..23ca194 100644
--- a/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorUtils.java
+++ b/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorUtils.java
@@ -150,9 +150,9 @@ public class TestObjectInspectorUtils extends TestCase {
     struct.add("two");
     struct.add(true);
 
-    int hashCode = ObjectInspectorUtils.getBucketHashCode(struct.toArray(), fieldObjectInspectors.toArray(new ObjectInspector[fieldObjectInspectors.size()]));
+    int hashCode = ObjectInspectorUtils.getBucketHashCodeOld(struct.toArray(), fieldObjectInspectors.toArray(new ObjectInspector[fieldObjectInspectors.size()]));
     assertEquals("", 3574518, hashCode);
-    int bucketId = ObjectInspectorUtils.getBucketNumber(struct.toArray(), fieldObjectInspectors.toArray(new ObjectInspector[fieldObjectInspectors.size()]), 16);
+    int bucketId = ObjectInspectorUtils.getBucketNumberOld(struct.toArray(), fieldObjectInspectors.toArray(new ObjectInspector[fieldObjectInspectors.size()]), 16);
     assertEquals("", 6, bucketId);
     assertEquals("", bucketId, ObjectInspectorUtils.getBucketNumber(hashCode, 16));
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java
index 2b35e6f..c9d1051 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java
@@ -87,4 +87,5 @@ public class hive_metastoreConstants {
 
   public static final String TABLE_TRANSACTIONAL_PROPERTIES = "transactional_properties";
 
+  public static final String TABLE_BUCKETING_VERSION = "bucketing_version";
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/storage-api/src/java/org/apache/hive/common/util/Murmur3.java
----------------------------------------------------------------------
diff --git a/storage-api/src/java/org/apache/hive/common/util/Murmur3.java b/storage-api/src/java/org/apache/hive/common/util/Murmur3.java
index 6848a59..c896fa7 100644
--- a/storage-api/src/java/org/apache/hive/common/util/Murmur3.java
+++ b/storage-api/src/java/org/apache/hive/common/util/Murmur3.java
@@ -61,7 +61,18 @@ public class Murmur3 {
    * @return - hashcode
    */
   public static int hash32(byte[] data) {
-    return hash32(data, data.length, DEFAULT_SEED);
+    return hash32(data, 0, data.length, DEFAULT_SEED);
+  }
+
+  /**
+   * Murmur3 32-bit variant.
+   *
+   * @param data - input byte array
+   * @param length - length of array
+   * @return - hashcode
+   */
+  public static int hash32(byte[] data, int length) {
+    return hash32(data, 0, length, DEFAULT_SEED);
   }
 
   /**
@@ -73,16 +84,29 @@ public class Murmur3 {
    * @return - hashcode
    */
   public static int hash32(byte[] data, int length, int seed) {
+    return hash32(data, 0, length, seed);
+  }
+
+  /**
+   * Murmur3 32-bit variant.
+   *
+   * @param data   - input byte array
+   * @param offset - offset of data
+   * @param length - length of array
+   * @param seed   - seed. (default 0)
+   * @return - hashcode
+   */
+  public static int hash32(byte[] data, int offset, int length, int seed) {
     int hash = seed;
     final int nblocks = length >> 2;
 
     // body
     for (int i = 0; i < nblocks; i++) {
       int i_4 = i << 2;
-      int k = (data[i_4] & 0xff)
-          | ((data[i_4 + 1] & 0xff) << 8)
-          | ((data[i_4 + 2] & 0xff) << 16)
-          | ((data[i_4 + 3] & 0xff) << 24);
+      int k = (data[offset + i_4] & 0xff)
+          | ((data[offset + i_4 + 1] & 0xff) << 8)
+          | ((data[offset + i_4 + 2] & 0xff) << 16)
+          | ((data[offset + i_4 + 3] & 0xff) << 24);
 
       // mix functions
       k *= C1_32;
@@ -97,11 +121,11 @@ public class Murmur3 {
     int k1 = 0;
     switch (length - idx) {
       case 3:
-        k1 ^= data[idx + 2] << 16;
+        k1 ^= data[offset + idx + 2] << 16;
       case 2:
-        k1 ^= data[idx + 1] << 8;
+        k1 ^= data[offset + idx + 1] << 8;
       case 1:
-        k1 ^= data[idx];
+        k1 ^= data[offset + idx];
 
         // mix functions
         k1 *= C1_32;

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/storage-api/src/test/org/apache/hive/common/util/TestMurmur3.java
----------------------------------------------------------------------
diff --git a/storage-api/src/test/org/apache/hive/common/util/TestMurmur3.java b/storage-api/src/test/org/apache/hive/common/util/TestMurmur3.java
index 9a01255..f20366b 100644
--- a/storage-api/src/test/org/apache/hive/common/util/TestMurmur3.java
+++ b/storage-api/src/test/org/apache/hive/common/util/TestMurmur3.java
@@ -229,7 +229,7 @@ public class TestMurmur3 {
     final int seed = 123, arraySize = 1023;
     byte[] bytes = new byte[arraySize];
     new Random(seed).nextBytes(bytes);
-    int expected = Murmur3.hash32(bytes);
+    int expected = Murmur3.hash32(bytes, arraySize);
     Murmur3.IncrementalHash32 same = new IncrementalHash32(), diff = new IncrementalHash32();
     for (int blockSize = 1; blockSize <= arraySize; ++blockSize) {
       byte[] block = new byte[blockSize];

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/streaming/src/test/org/apache/hive/streaming/TestStreaming.java
----------------------------------------------------------------------
diff --git a/streaming/src/test/org/apache/hive/streaming/TestStreaming.java b/streaming/src/test/org/apache/hive/streaming/TestStreaming.java
index 3343d10..0ec3048 100644
--- a/streaming/src/test/org/apache/hive/streaming/TestStreaming.java
+++ b/streaming/src/test/org/apache/hive/streaming/TestStreaming.java
@@ -1491,9 +1491,9 @@ public class TestStreaming {
 
     // assert bucket listing is as expected
     Assert.assertEquals("number of buckets does not match expectation", actual1.values().size(), 3);
-    Assert.assertEquals("records in bucket does not match expectation", actual1.get(0).size(), 2);
+    Assert.assertTrue("bucket 0 shouldn't have been created", actual1.get(0) == null);
     Assert.assertEquals("records in bucket does not match expectation", actual1.get(1).size(), 1);
-    Assert.assertTrue("bucket 2 shouldn't have been created", actual1.get(2) == null);
+    Assert.assertEquals("records in bucket does not match expectation", actual1.get(2).size(), 2);
     Assert.assertEquals("records in bucket does not match expectation", actual1.get(3).size(), 1);
   }
   private void runCmdOnDriver(String cmd) throws QueryFailedException {
@@ -1696,7 +1696,7 @@ public class TestStreaming {
       } else if (file.contains("bucket_00001")) {
         corruptDataFile(file, conf, -1);
       } else if (file.contains("bucket_00002")) {
-        Assert.assertFalse("bucket 2 shouldn't have been created", true);
+        corruptDataFile(file, conf, 100);
       } else if (file.contains("bucket_00003")) {
         corruptDataFile(file, conf, 100);
       }
@@ -1726,9 +1726,9 @@ public class TestStreaming {
     System.setErr(origErr);
 
     errDump = new String(myErr.toByteArray());
-    Assert.assertEquals(true, errDump.contains("bucket_00000 recovered successfully!"));
-    Assert.assertEquals(true, errDump.contains("No readable footers found. Creating empty orc file."));
     Assert.assertEquals(true, errDump.contains("bucket_00001 recovered successfully!"));
+    Assert.assertEquals(true, errDump.contains("No readable footers found. Creating empty orc file."));
+    Assert.assertEquals(true, errDump.contains("bucket_00002 recovered successfully!"));
     Assert.assertEquals(true, errDump.contains("bucket_00003 recovered successfully!"));
     Assert.assertEquals(false, errDump.contains("Exception"));
     Assert.assertEquals(false, errDump.contains("is still open for writes."));


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/orc_create.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/orc_create.q.out b/ql/src/test/results/clientpositive/llap/orc_create.q.out
index 72d94e5..df286b2 100644
--- a/ql/src/test/results/clientpositive/llap/orc_create.q.out
+++ b/ql/src/test/results/clientpositive/llap/orc_create.q.out
@@ -66,6 +66,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"lst\":\"true\",\"mp\":\"true\",\"str\":\"true\",\"strct\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -119,6 +120,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -176,6 +178,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -223,6 +226,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numPartitions       	0                   
@@ -281,6 +285,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -336,6 +341,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"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/ac6b2a3f/ql/src/test/results/clientpositive/llap/orc_llap_counters.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/orc_llap_counters.q.out b/ql/src/test/results/clientpositive/llap/orc_llap_counters.q.out
index af237ea..98d9e06 100644
--- a/ql/src/test/results/clientpositive/llap/orc_llap_counters.q.out
+++ b/ql/src/test/results/clientpositive/llap/orc_llap_counters.q.out
@@ -227,6 +227,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	2100                
 	orc.bloom.filter.columns	*                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/orc_llap_counters1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/orc_llap_counters1.q.out b/ql/src/test/results/clientpositive/llap/orc_llap_counters1.q.out
index 01fb4af..c078326 100644
--- a/ql/src/test/results/clientpositive/llap/orc_llap_counters1.q.out
+++ b/ql/src/test/results/clientpositive/llap/orc_llap_counters1.q.out
@@ -227,6 +227,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	2100                
 	orc.bloom.filter.columns	*                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/parquet_types.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/parquet_types.q.out b/ql/src/test/results/clientpositive/llap/parquet_types.q.out
index 4d7c5fd..508ac16 100644
--- a/ql/src/test/results/clientpositive/llap/parquet_types.q.out
+++ b/ql/src/test/results/clientpositive/llap/parquet_types.q.out
@@ -369,7 +369,7 @@ POSTHOOK: query: SELECT hex(cbinary), count(*) FROM parquet_types GROUP BY cbina
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@parquet_types
 #### A masked pattern was here ####
-68692CCAC0BDE7	10
+B4F3CAFDBEDD	10
 	1
 68656C6C6F	1
-B4F3CAFDBEDD	10
+68692CCAC0BDE7	10

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/parquet_types_vectorization.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/parquet_types_vectorization.q.out b/ql/src/test/results/clientpositive/llap/parquet_types_vectorization.q.out
index c786ba3..f67c5bc 100644
--- a/ql/src/test/results/clientpositive/llap/parquet_types_vectorization.q.out
+++ b/ql/src/test/results/clientpositive/llap/parquet_types_vectorization.q.out
@@ -843,7 +843,7 @@ POSTHOOK: query: SELECT hex(cbinary), count(*) FROM parquet_types GROUP BY cbina
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@parquet_types
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-68692CCAC0BDE7	10
+B4F3CAFDBEDD	10
 	1
 68656C6C6F	1
-B4F3CAFDBEDD	10
+68692CCAC0BDE7	10

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/partition_multilevels.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/partition_multilevels.q.out b/ql/src/test/results/clientpositive/llap/partition_multilevels.q.out
index 9b6616b..3df6e2f 100644
--- a/ql/src/test/results/clientpositive/llap/partition_multilevels.q.out
+++ b/ql/src/test/results/clientpositive/llap/partition_multilevels.q.out
@@ -470,18 +470,18 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=44
 #### A masked pattern was here ####
-2222	111	11	11
 2222	222	22	16
-2222	222	44	18
-2222	333	11	19
 2222	333	44	22
-2222	111	22	12
+2222	222	44	18
+2222	333	33	21
 2222	111	33	13
 2222	222	11	15
 2222	333	22	20
-2222	222	33	17
-2222	333	33	21
+2222	111	11	11
+2222	111	22	12
 2222	111	44	14
+2222	222	33	17
+2222	333	11	19
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level1 >= '2222' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -514,18 +514,18 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=44
 #### A masked pattern was here ####
-2222	222	11	15
-2222	222	22	16
-2222	333	33	21
+2222	333	44	22
+2222	111	11	11
 2222	111	33	13
+2222	222	11	15
 2222	222	44	18
-2222	333	11	19
 2222	333	22	20
-2222	333	44	22
-2222	111	11	11
-2222	111	22	12
+2222	333	33	21
 2222	111	44	14
+2222	222	22	16
 2222	222	33	17
+2222	333	11	19
+2222	111	22	12
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level1 !='2222' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -558,18 +558,18 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=1111/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=1111/level2=333/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=1111/level2=333/level3=44
 #### A masked pattern was here ####
-1111	222	11	15
-1111	222	44	18
-1111	333	22	20
-1111	111	22	12
-1111	111	33	13
-1111	111	44	14
 1111	222	22	16
 1111	222	33	17
-1111	111	11	11
-1111	333	11	19
+1111	111	33	13
+1111	222	11	15
+1111	333	22	20
 1111	333	33	21
 1111	333	44	22
+1111	111	44	14
+1111	222	44	18
+1111	333	11	19
+1111	111	11	11
+1111	111	22	12
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level2 = '222' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -594,14 +594,14 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3=44
 #### A masked pattern was here ####
-2222	222	33	17
 1111	222	22	16
 1111	222	44	18
-2222	222	44	18
-1111	222	11	15
+2222	222	33	17
 1111	222	33	17
-2222	222	22	16
 2222	222	11	15
+2222	222	22	16
+1111	222	11	15
+2222	222	44	18
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level2 <= '222' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -642,22 +642,22 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3=44
 #### A masked pattern was here ####
+1111	222	22	16
+1111	222	33	17
+1111	111	33	13
 1111	222	11	15
-2222	222	11	15
-2222	222	22	16
-1111	222	44	18
+2222	111	11	11
 2222	111	33	13
+2222	222	11	15
 2222	222	44	18
-1111	111	22	12
-1111	111	33	13
 1111	111	44	14
-1111	222	22	16
-1111	222	33	17
-1111	111	11	11
-2222	111	11	11
-2222	111	22	12
+1111	222	44	18
 2222	111	44	14
+2222	222	22	16
 2222	222	33	17
+1111	111	11	11
+1111	111	22	12
+2222	111	22	12
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level2 != '222' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -698,22 +698,22 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=44
 #### A masked pattern was here ####
-2222	333	33	21
-1111	333	22	20
-2222	111	33	13
-2222	333	11	19
-1111	111	22	12
-1111	111	33	13
-1111	111	44	14
-2222	333	22	20
 2222	333	44	22
-1111	111	11	11
-1111	333	11	19
+1111	111	33	13
+1111	333	22	20
 1111	333	33	21
 1111	333	44	22
 2222	111	11	11
-2222	111	22	12
+2222	111	33	13
+2222	333	22	20
+2222	333	33	21
+1111	111	44	14
+1111	333	11	19
 2222	111	44	14
+2222	333	11	19
+1111	111	11	11
+1111	111	22	12
+2222	111	22	12
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level3 = '22' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -734,12 +734,12 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=111/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3=22
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=22
 #### A masked pattern was here ####
-1111	333	22	20
-2222	222	22	16
-1111	222	22	16
-1111	111	22	12
 2222	111	22	12
+2222	222	22	16
+1111	333	22	20
 2222	333	22	20
+1111	111	22	12
+1111	222	22	16
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level3 >= '22' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -784,24 +784,24 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=44
 #### A masked pattern was here ####
-2222	222	22	16
-2222	333	33	21
-1111	222	44	18
-1111	333	22	20
-2222	111	33	13
-2222	222	44	18
-1111	111	22	12
-1111	111	33	13
-1111	111	44	14
 1111	222	22	16
 1111	222	33	17
-2222	333	22	20
 2222	333	44	22
+1111	111	33	13
+1111	333	22	20
 1111	333	33	21
 1111	333	44	22
-2222	111	22	12
+2222	111	33	13
+2222	222	44	18
+2222	333	22	20
+2222	333	33	21
+1111	111	44	14
+1111	222	44	18
 2222	111	44	14
+2222	222	22	16
 2222	222	33	17
+1111	111	22	12
+2222	111	22	12
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level3 != '22' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -846,24 +846,24 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=44
 #### A masked pattern was here ####
-1111	222	11	15
-2222	222	11	15
-2222	333	33	21
-1111	222	44	18
-2222	111	33	13
-2222	222	44	18
-2222	333	11	19
-1111	111	33	13
-1111	111	44	14
 1111	222	33	17
 2222	333	44	22
-1111	111	11	11
-1111	333	11	19
+1111	111	33	13
+1111	222	11	15
 1111	333	33	21
 1111	333	44	22
 2222	111	11	11
+2222	111	33	13
+2222	222	11	15
+2222	222	44	18
+2222	333	33	21
+1111	111	44	14
+1111	222	44	18
+1111	333	11	19
 2222	111	44	14
 2222	222	33	17
+2222	333	11	19
+1111	111	11	11
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level2 >= '222' and level3 = '33' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -880,10 +880,10 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=1111/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 #### A masked pattern was here ####
-1111	333	33	21
 2222	222	33	17
-1111	222	33	17
+1111	333	33	21
 2222	333	33	21
+1111	222	33	17
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level1 <= '1111' and level3 >= '33' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -904,12 +904,12 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=1111/level2=222/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=1111/level2=333/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=1111/level2=333/level3=44
 #### A masked pattern was here ####
-1111	222	44	18
-1111	111	33	13
-1111	111	44	14
 1111	222	33	17
+1111	111	33	13
 1111	333	33	21
 1111	333	44	22
+1111	111	44	14
+1111	222	44	18
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level1 = '2222' and level2 >= '222' and level3 <= '33' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -931,11 +931,11 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 #### A masked pattern was here ####
 2222	222	22	16
-2222	333	11	19
+2222	333	33	21
 2222	222	11	15
 2222	333	22	20
 2222	222	33	17
-2222	333	33	21
+2222	333	11	19
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where (level1 = '2222') and (level2 between '222' and '333') and (level3 between '11' and '33') group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -957,11 +957,11 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 #### A masked pattern was here ####
 2222	222	22	16
-2222	333	11	19
+2222	333	33	21
 2222	222	11	15
 2222	333	22	20
 2222	222	33	17
-2222	333	33	21
+2222	333	11	19
 PREHOOK: query: explain select level1, level2, level3, count(*) from partition_test_multilevel where (level1 = '2222') and (level2 between '222' and '333') and (level3 between '11' and '33') group by level1, level2, level3
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select level1, level2, level3, count(*) from partition_test_multilevel where (level1 = '2222') and (level2 between '222' and '333') and (level3 between '11' and '33') group by level1, level2, level3
@@ -1060,18 +1060,18 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=44
 #### A masked pattern was here ####
-2222	111	11	11
 2222	222	22	16
-2222	222	44	18
-2222	333	11	19
 2222	333	44	22
-2222	111	22	12
+2222	222	44	18
+2222	333	33	21
 2222	111	33	13
 2222	222	11	15
 2222	333	22	20
-2222	222	33	17
-2222	333	33	21
+2222	111	11	11
+2222	111	22	12
 2222	111	44	14
+2222	222	33	17
+2222	333	11	19
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level1 >= '2222' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -1104,18 +1104,18 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=44
 #### A masked pattern was here ####
-2222	222	11	15
-2222	222	22	16
-2222	333	33	21
+2222	333	44	22
+2222	111	11	11
 2222	111	33	13
+2222	222	11	15
 2222	222	44	18
-2222	333	11	19
 2222	333	22	20
-2222	333	44	22
-2222	111	11	11
-2222	111	22	12
+2222	333	33	21
 2222	111	44	14
+2222	222	22	16
 2222	222	33	17
+2222	333	11	19
+2222	111	22	12
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level1 !='2222' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -1148,18 +1148,18 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=1111/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=1111/level2=333/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=1111/level2=333/level3=44
 #### A masked pattern was here ####
-1111	222	11	15
-1111	222	44	18
-1111	333	22	20
-1111	111	22	12
-1111	111	33	13
-1111	111	44	14
 1111	222	22	16
 1111	222	33	17
-1111	111	11	11
-1111	333	11	19
+1111	111	33	13
+1111	222	11	15
+1111	333	22	20
 1111	333	33	21
 1111	333	44	22
+1111	111	44	14
+1111	222	44	18
+1111	333	11	19
+1111	111	11	11
+1111	111	22	12
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level2 = '222' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -1184,14 +1184,14 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3=44
 #### A masked pattern was here ####
-2222	222	33	17
 1111	222	22	16
 1111	222	44	18
-2222	222	44	18
-1111	222	11	15
+2222	222	33	17
 1111	222	33	17
-2222	222	22	16
 2222	222	11	15
+2222	222	22	16
+1111	222	11	15
+2222	222	44	18
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level2 <= '222' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -1232,22 +1232,22 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3=44
 #### A masked pattern was here ####
+1111	222	22	16
+1111	222	33	17
+1111	111	33	13
 1111	222	11	15
-2222	222	11	15
-2222	222	22	16
-1111	222	44	18
+2222	111	11	11
 2222	111	33	13
+2222	222	11	15
 2222	222	44	18
-1111	111	22	12
-1111	111	33	13
 1111	111	44	14
-1111	222	22	16
-1111	222	33	17
-1111	111	11	11
-2222	111	11	11
-2222	111	22	12
+1111	222	44	18
 2222	111	44	14
+2222	222	22	16
 2222	222	33	17
+1111	111	11	11
+1111	111	22	12
+2222	111	22	12
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level2 != '222' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -1288,22 +1288,22 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=44
 #### A masked pattern was here ####
-2222	333	33	21
-1111	333	22	20
-2222	111	33	13
-2222	333	11	19
-1111	111	22	12
-1111	111	33	13
-1111	111	44	14
-2222	333	22	20
 2222	333	44	22
-1111	111	11	11
-1111	333	11	19
+1111	111	33	13
+1111	333	22	20
 1111	333	33	21
 1111	333	44	22
 2222	111	11	11
-2222	111	22	12
+2222	111	33	13
+2222	333	22	20
+2222	333	33	21
+1111	111	44	14
+1111	333	11	19
 2222	111	44	14
+2222	333	11	19
+1111	111	11	11
+1111	111	22	12
+2222	111	22	12
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level3 = '22' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -1324,12 +1324,12 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=111/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3=22
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=22
 #### A masked pattern was here ####
-1111	333	22	20
-2222	222	22	16
-1111	222	22	16
-1111	111	22	12
 2222	111	22	12
+2222	222	22	16
+1111	333	22	20
 2222	333	22	20
+1111	111	22	12
+1111	222	22	16
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level3 >= '22' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -1374,24 +1374,24 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=44
 #### A masked pattern was here ####
-2222	222	22	16
-2222	333	33	21
-1111	222	44	18
-1111	333	22	20
-2222	111	33	13
-2222	222	44	18
-1111	111	22	12
-1111	111	33	13
-1111	111	44	14
 1111	222	22	16
 1111	222	33	17
-2222	333	22	20
 2222	333	44	22
+1111	111	33	13
+1111	333	22	20
 1111	333	33	21
 1111	333	44	22
-2222	111	22	12
+2222	111	33	13
+2222	222	44	18
+2222	333	22	20
+2222	333	33	21
+1111	111	44	14
+1111	222	44	18
 2222	111	44	14
+2222	222	22	16
 2222	222	33	17
+1111	111	22	12
+2222	111	22	12
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level3 != '22' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -1436,24 +1436,24 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=44
 #### A masked pattern was here ####
-1111	222	11	15
-2222	222	11	15
-2222	333	33	21
-1111	222	44	18
-2222	111	33	13
-2222	222	44	18
-2222	333	11	19
-1111	111	33	13
-1111	111	44	14
 1111	222	33	17
 2222	333	44	22
-1111	111	11	11
-1111	333	11	19
+1111	111	33	13
+1111	222	11	15
 1111	333	33	21
 1111	333	44	22
 2222	111	11	11
+2222	111	33	13
+2222	222	11	15
+2222	222	44	18
+2222	333	33	21
+1111	111	44	14
+1111	222	44	18
+1111	333	11	19
 2222	111	44	14
 2222	222	33	17
+2222	333	11	19
+1111	111	11	11
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level2 >= '222' and level3 = '33' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -1470,10 +1470,10 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=1111/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=222/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 #### A masked pattern was here ####
-1111	333	33	21
 2222	222	33	17
-1111	222	33	17
+1111	333	33	21
 2222	333	33	21
+1111	222	33	17
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level1 <= '1111' and level3 >= '33' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -1494,12 +1494,12 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=1111/level2=222/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=1111/level2=333/level3=33
 POSTHOOK: Input: default@partition_test_multilevel@level1=1111/level2=333/level3=44
 #### A masked pattern was here ####
-1111	222	44	18
-1111	111	33	13
-1111	111	44	14
 1111	222	33	17
+1111	111	33	13
 1111	333	33	21
 1111	333	44	22
+1111	111	44	14
+1111	222	44	18
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where level1 = '2222' and level2 >= '222' and level3 <= '33' group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -1521,11 +1521,11 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 #### A masked pattern was here ####
 2222	222	22	16
-2222	333	11	19
+2222	333	33	21
 2222	222	11	15
 2222	333	22	20
 2222	222	33	17
-2222	333	33	21
+2222	333	11	19
 PREHOOK: query: select level1, level2, level3, count(*) from partition_test_multilevel where (level1 = '2222') and (level2 between '222' and '333') and (level3 between '11' and '33') group by level1, level2, level3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@partition_test_multilevel
@@ -1547,11 +1547,11 @@ POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3
 POSTHOOK: Input: default@partition_test_multilevel@level1=2222/level2=333/level3=33
 #### A masked pattern was here ####
 2222	222	22	16
-2222	333	11	19
+2222	333	33	21
 2222	222	11	15
 2222	333	22	20
 2222	222	33	17
-2222	333	33	21
+2222	333	11	19
 PREHOOK: query: explain select level1, level2, level3, count(*) from partition_test_multilevel where (level1 = '2222') and (level2 between '222' and '333') and (level3 between '11' and '33') group by level1, level2, level3
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select level1, level2, level3, count(*) from partition_test_multilevel where (level1 = '2222') and (level2 between '222' and '333') and (level3 between '11' and '33') group by level1, level2, level3

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/partition_pruning.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/partition_pruning.q.out b/ql/src/test/results/clientpositive/llap/partition_pruning.q.out
index 520e714..829ab15 100644
--- a/ql/src/test/results/clientpositive/llap/partition_pruning.q.out
+++ b/ql/src/test/results/clientpositive/llap/partition_pruning.q.out
@@ -134,6 +134,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns customer
                 columns.comments 
@@ -203,6 +204,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns customer
                 columns.comments 
@@ -248,6 +250,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns customer
                 columns.comments 
@@ -317,6 +320,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns customer
                 columns.comments 
@@ -362,6 +366,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns customer
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/ppd_union_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/ppd_union_view.q.out b/ql/src/test/results/clientpositive/llap/ppd_union_view.q.out
index e04fdda..30a3cde 100644
--- a/ql/src/test/results/clientpositive/llap/ppd_union_view.q.out
+++ b/ql/src/test/results/clientpositive/llap/ppd_union_view.q.out
@@ -253,6 +253,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns keymap,value
                       columns.comments 
@@ -334,6 +335,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,keymap
                       columns.comments 
@@ -535,6 +537,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/ac6b2a3f/ql/src/test/results/clientpositive/llap/quotedid_smb.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/quotedid_smb.q.out b/ql/src/test/results/clientpositive/llap/quotedid_smb.q.out
index 67ab4fe..9c271a7 100644
--- a/ql/src/test/results/clientpositive/llap/quotedid_smb.q.out
+++ b/ql/src/test/results/clientpositive/llap/quotedid_smb.q.out
@@ -128,17 +128,17 @@ POSTHOOK: Input: default@src_b2
 0	val_0	0	val_0
 0	val_0	0	val_0
 0	val_0	0	val_0
-103	val_103	103	val_103
-103	val_103	103	val_103
-103	val_103	103	val_103
-103	val_103	103	val_103
+104	val_104	104	val_104
+104	val_104	104	val_104
+104	val_104	104	val_104
+104	val_104	104	val_104
 105	val_105	105	val_105
 10	val_10	10	val_10
 100	val_100	100	val_100
 100	val_100	100	val_100
 100	val_100	100	val_100
 100	val_100	100	val_100
-104	val_104	104	val_104
-104	val_104	104	val_104
-104	val_104	104	val_104
-104	val_104	104	val_104
+103	val_103	103	val_103
+103	val_103	103	val_103
+103	val_103	103	val_103
+103	val_103	103	val_103

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/reduce_deduplicate.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/reduce_deduplicate.q.out b/ql/src/test/results/clientpositive/llap/reduce_deduplicate.q.out
index 4a57b96..0717559 100644
--- a/ql/src/test/results/clientpositive/llap/reduce_deduplicate.q.out
+++ b/ql/src/test/results/clientpositive/llap/reduce_deduplicate.q.out
@@ -60,6 +60,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'
@@ -82,6 +83,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'
@@ -124,6 +126,7 @@ STAGE PLANS:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                         bucket_count 2
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -195,6 +198,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -385,6 +389,7 @@ STAGE PLANS:
                         output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                         properties:
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns aid,bid,t,ctime,etime,l,et
                           columns.comments 
@@ -474,6 +479,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns aid,bid,t,ctime,etime,l,et
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/reduce_deduplicate_extended.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/reduce_deduplicate_extended.q.out b/ql/src/test/results/clientpositive/llap/reduce_deduplicate_extended.q.out
index 2bae233..ea2587f 100644
--- a/ql/src/test/results/clientpositive/llap/reduce_deduplicate_extended.q.out
+++ b/ql/src/test/results/clientpositive/llap/reduce_deduplicate_extended.q.out
@@ -1856,21 +1856,21 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Input: default@src1
 #### A masked pattern was here ####
-213	426.0
-238	476.0
-406	1624.0
-66	66.0
-278	556.0
-150	150.0
 224	448.0
-255	510.0
 273	819.0
-369	1107.0
 401	2005.0
-128	384.0
 146	292.0
+150	150.0
 311	933.0
+369	1107.0
+66	66.0
+128	384.0
+213	426.0
+406	1624.0
 98	196.0
+238	476.0
+255	510.0
+278	556.0
 PREHOOK: query: select src.key, src.value FROM src JOIN src1 ON src.key = src1.key order by src.key, src.value
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
@@ -4386,21 +4386,21 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Input: default@src1
 #### A masked pattern was here ####
-213	426.0
-238	476.0
-406	1624.0
-66	66.0
-278	556.0
-150	150.0
 224	448.0
-255	510.0
 273	819.0
-369	1107.0
 401	2005.0
-128	384.0
 146	292.0
+150	150.0
 311	933.0
+369	1107.0
+66	66.0
+128	384.0
+213	426.0
+406	1624.0
 98	196.0
+238	476.0
+255	510.0
+278	556.0
 PREHOOK: query: select src.key, src.value FROM src JOIN src1 ON src.key = src1.key order by src.key, src.value
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/results_cache_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/results_cache_1.q.out b/ql/src/test/results/clientpositive/llap/results_cache_1.q.out
index 073bcfe..b1423b9 100644
--- a/ql/src/test/results/clientpositive/llap/results_cache_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/results_cache_1.q.out
@@ -481,10 +481,10 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 8	val_8
-2	val_2
 4	val_4
-5	val_5
 9	val_9
+5	val_5
+2	val_2
 test.comment="Intersect/Except. Cache should be used now"
 PREHOOK: query: explain
 with q1 as ( select distinct key, value from src ),
@@ -522,10 +522,10 @@ select * from q1 intersect all select * from q2 except all select * from q3
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 8	val_8
-2	val_2
 4	val_4
-5	val_5
 9	val_9
+5	val_5
+2	val_2
 PREHOOK: query: select a, c, count(*)  from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by a+b desc, c asc limit 5) cbo_t1 left semi join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by q+r/10 desc, p limit 5) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1  >= 0) and (b > 0 or a >= 0) group by a, c  having a > 0 and (a >=1 or c >= 1) and (a + c) >= 0 order by c, a
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cbo_t1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/results_cache_capacity.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/results_cache_capacity.q.out b/ql/src/test/results/clientpositive/llap/results_cache_capacity.q.out
index 2704aae..995e88c 100644
--- a/ql/src/test/results/clientpositive/llap/results_cache_capacity.q.out
+++ b/ql/src/test/results/clientpositive/llap/results_cache_capacity.q.out
@@ -187,12 +187,12 @@ POSTHOOK: query: select key, count(*) from src where key < 10 group by key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
-8	1
+5	3
 9	1
-4	1
-2	1
 0	3
-5	3
+2	1
+4	1
+8	1
 PREHOOK: query: explain
 select key, count(*) from src where key < 10 group by key
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/results_cache_with_masking.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/results_cache_with_masking.q.out b/ql/src/test/results/clientpositive/llap/results_cache_with_masking.q.out
index db73958..0870e53 100644
--- a/ql/src/test/results/clientpositive/llap/results_cache_with_masking.q.out
+++ b/ql/src/test/results/clientpositive/llap/results_cache_with_masking.q.out
@@ -81,10 +81,10 @@ POSTHOOK: query: select key, count(*) from masking_test group by key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@masking_test
 #### A masked pattern was here ####
-4	1
+8	1
 0	3
+4	1
 2	1
-8	1
 PREHOOK: query: explain
 select key, count(*) from masking_test group by key
 PREHOOK: type: QUERY
@@ -110,7 +110,7 @@ POSTHOOK: query: select key, count(*) from masking_test group by key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@masking_test
 #### A masked pattern was here ####
-4	1
+8	1
 0	3
+4	1
 2	1
-8	1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/sample1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/sample1.q.out b/ql/src/test/results/clientpositive/llap/sample1.q.out
index 3458ee2..583ac35 100644
--- a/ql/src/test/results/clientpositive/llap/sample1.q.out
+++ b/ql/src/test/results/clientpositive/llap/sample1.q.out
@@ -57,6 +57,7 @@ STAGE PLANS:
                             properties:
                               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"dt":"true","hr":"true","key":"true","value":"true"}}
                               bucket_count -1
+                              bucketing_version 2
                               column.name.delimiter ,
                               columns key,value,dt,hr
                               columns.comments 
@@ -130,6 +131,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'
@@ -193,6 +195,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"dt":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,dt,hr
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/sample10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/sample10.q.out b/ql/src/test/results/clientpositive/llap/sample10.q.out
index b8c4059..1b95314 100644
--- a/ql/src/test/results/clientpositive/llap/sample10.q.out
+++ b/ql/src/test/results/clientpositive/llap/sample10.q.out
@@ -34,10 +34,10 @@ POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-09,hr=11).value SIMPLE [(s
 POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-09,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-09,hr=12).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: explain extended
-select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
+select ds, count(1) from srcpartbucket tablesample (bucket 2 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
 PREHOOK: type: QUERY
 POSTHOOK: query: explain extended
-select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
+select ds, count(1) from srcpartbucket tablesample (bucket 2 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
@@ -60,8 +60,8 @@ STAGE PLANS:
                   GatherStats: false
                   Filter Operator
                     isSamplingPred: true
-                    predicate: (((hash(key) & 2147483647) % 4) = 0) (type: boolean)
-                    sampleDesc: BUCKET 1 OUT OF 4
+                    predicate: (((hash(key) & 2147483647) % 4) = 1) (type: boolean)
+                    sampleDesc: BUCKET 2 OUT OF 4
                     Statistics: Num rows: 20 Data size: 5380 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: ds (type: string)
@@ -89,7 +89,7 @@ STAGE PLANS:
             Path -> Partition:
 #### A masked pattern was here ####
                 Partition
-                  base file name: 000000_0
+                  base file name: 000002_0
                   input format: org.apache.hadoop.hive.ql.io.RCFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                   partition values:
@@ -122,6 +122,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -139,7 +140,7 @@ STAGE PLANS:
                   name: default.srcpartbucket
 #### A masked pattern was here ####
                 Partition
-                  base file name: 000000_0
+                  base file name: 000002_0
                   input format: org.apache.hadoop.hive.ql.io.RCFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                   partition values:
@@ -172,6 +173,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -189,7 +191,7 @@ STAGE PLANS:
                   name: default.srcpartbucket
 #### A masked pattern was here ####
                 Partition
-                  base file name: 000000_0
+                  base file name: 000002_0
                   input format: org.apache.hadoop.hive.ql.io.RCFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                   partition values:
@@ -222,6 +224,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -239,7 +242,7 @@ STAGE PLANS:
                   name: default.srcpartbucket
 #### A masked pattern was here ####
                 Partition
-                  base file name: 000000_0
+                  base file name: 000002_0
                   input format: org.apache.hadoop.hive.ql.io.RCFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                   partition values:
@@ -272,6 +275,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -288,10 +292,10 @@ STAGE PLANS:
                     name: default.srcpartbucket
                   name: default.srcpartbucket
             Truncated Path -> Alias:
-              /srcpartbucket/ds=2008-04-08/hr=11/000000_0 [srcpartbucket]
-              /srcpartbucket/ds=2008-04-08/hr=12/000000_0 [srcpartbucket]
-              /srcpartbucket/ds=2008-04-09/hr=11/000000_0 [srcpartbucket]
-              /srcpartbucket/ds=2008-04-09/hr=12/000000_0 [srcpartbucket]
+              /srcpartbucket/ds=2008-04-08/hr=11/000002_0 [srcpartbucket]
+              /srcpartbucket/ds=2008-04-08/hr=12/000002_0 [srcpartbucket]
+              /srcpartbucket/ds=2008-04-09/hr=11/000002_0 [srcpartbucket]
+              /srcpartbucket/ds=2008-04-09/hr=12/000002_0 [srcpartbucket]
         Reducer 2 
             Execution mode: vectorized, llap
             Needs Tagging: false
@@ -347,7 +351,7 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
+PREHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 2 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@srcpartbucket
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=11
@@ -355,7 +359,7 @@ PREHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=12
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=11
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=12
 #### A masked pattern was here ####
-POSTHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
+POSTHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 2 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcpartbucket
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=11
@@ -363,8 +367,6 @@ POSTHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=12
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=11
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=12
 #### A masked pattern was here ####
-2008-04-08	10
-2008-04-09	10
 PREHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 2 on key) where ds is not null group by ds ORDER BY ds ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@srcpartbucket
@@ -381,8 +383,6 @@ POSTHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=12
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=11
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=12
 #### A masked pattern was here ####
-2008-04-08	12
-2008-04-09	12
 PREHOOK: query: select * from srcpartbucket where ds is not null ORDER BY key ASC, value ASC, ds ASC, hr ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@srcpartbucket

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/schema_evol_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/schema_evol_stats.q.out b/ql/src/test/results/clientpositive/llap/schema_evol_stats.q.out
index e76eaf8..2aff794 100644
--- a/ql/src/test/results/clientpositive/llap/schema_evol_stats.q.out
+++ b/ql/src/test/results/clientpositive/llap/schema_evol_stats.q.out
@@ -78,6 +78,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numPartitions       	2                   
@@ -283,6 +284,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numPartitions       	2                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/selectDistinctStar.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/selectDistinctStar.q.out b/ql/src/test/results/clientpositive/llap/selectDistinctStar.q.out
index 72e873b..de9f5f90 100644
--- a/ql/src/test/results/clientpositive/llap/selectDistinctStar.q.out
+++ b/ql/src/test/results/clientpositive/llap/selectDistinctStar.q.out
@@ -1392,6 +1392,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -3853,6 +3854,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/skiphf_aggr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/skiphf_aggr.q.out b/ql/src/test/results/clientpositive/llap/skiphf_aggr.q.out
index 74f98ed..667692a 100644
--- a/ql/src/test/results/clientpositive/llap/skiphf_aggr.q.out
+++ b/ql/src/test/results/clientpositive/llap/skiphf_aggr.q.out
@@ -91,9 +91,9 @@ POSTHOOK: Input: default@skiphtbl
 POSTHOOK: Input: default@skiphtbl@b=1
 POSTHOOK: Input: default@skiphtbl@b=2
 #### A masked pattern was here ####
+3
 4
 2
-3
 PREHOOK: query: INSERT OVERWRITE TABLE skipHTbl PARTITION (b = 1) VALUES (1)
 PREHOOK: type: QUERY
 PREHOOK: Input: _dummy_database@_dummy_table
@@ -150,9 +150,9 @@ POSTHOOK: Input: default@skiphtbl
 POSTHOOK: Input: default@skiphtbl@b=1
 POSTHOOK: Input: default@skiphtbl@b=2
 #### A masked pattern was here ####
+3
 4
 2
-3
 PREHOOK: query: DROP TABLE IF EXISTS skipFTbl
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE IF EXISTS skipFTbl
@@ -247,8 +247,8 @@ POSTHOOK: Input: default@skipftbl@b=1
 POSTHOOK: Input: default@skipftbl@b=2
 #### A masked pattern was here ####
 1
-2
 3
+2
 PREHOOK: query: DROP TABLE skipHTbl
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@skiphtbl

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/smb_mapjoin_15.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/smb_mapjoin_15.q.out b/ql/src/test/results/clientpositive/llap/smb_mapjoin_15.q.out
index c644fef..d444b62 100644
--- a/ql/src/test/results/clientpositive/llap/smb_mapjoin_15.q.out
+++ b/ql/src/test/results/clientpositive/llap/smb_mapjoin_15.q.out
@@ -89,6 +89,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -112,6 +113,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -169,6 +171,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -192,6 +195,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -403,6 +407,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,key2,value
                     columns.comments 
@@ -426,6 +431,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,key2,value
                       columns.comments 
@@ -483,6 +489,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,key2,value
                     columns.comments 
@@ -506,6 +513,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,key2,value
                       columns.comments 
@@ -665,6 +673,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,key2,value
                     columns.comments 
@@ -688,6 +697,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,key2,value
                       columns.comments 
@@ -745,6 +755,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,key2,value
                     columns.comments 
@@ -768,6 +779,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,key2,value
                       columns.comments 
@@ -927,6 +939,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,key2,value
                     columns.comments 
@@ -950,6 +963,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,key2,value
                       columns.comments 
@@ -1007,6 +1021,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,key2,value
                     columns.comments 
@@ -1030,6 +1045,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,key2,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/smb_mapjoin_18.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/smb_mapjoin_18.q.out b/ql/src/test/results/clientpositive/llap/smb_mapjoin_18.q.out
index b76507f..26e09db 100644
--- a/ql/src/test/results/clientpositive/llap/smb_mapjoin_18.q.out
+++ b/ql/src/test/results/clientpositive/llap/smb_mapjoin_18.q.out
@@ -147,7 +147,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table1
 POSTHOOK: Input: default@test_table1@ds=1
 #### A masked pattern was here ####
-247
+243
 PREHOOK: query: select count(*) from test_table1 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table1
@@ -158,7 +158,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table1
 POSTHOOK: Input: default@test_table1@ds=1
 #### A masked pattern was here ####
-253
+257
 PREHOOK: query: select count(*) from test_table2 where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table2
@@ -200,7 +200,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 POSTHOOK: Input: default@test_table2@ds=1
 #### A masked pattern was here ####
-247
+243
 PREHOOK: query: select count(*) from test_table2 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table2
@@ -211,7 +211,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 POSTHOOK: Input: default@test_table2@ds=1
 #### A masked pattern was here ####
-253
+257
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table2 PARTITION (ds = '2')
 SELECT a.key, a.value FROM test_table1 a WHERE a.ds = '1' and a.key = 238

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/smb_mapjoin_19.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/smb_mapjoin_19.q.out b/ql/src/test/results/clientpositive/llap/smb_mapjoin_19.q.out
index 495d509..1d4108d 100644
--- a/ql/src/test/results/clientpositive/llap/smb_mapjoin_19.q.out
+++ b/ql/src/test/results/clientpositive/llap/smb_mapjoin_19.q.out
@@ -169,7 +169,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table1
 POSTHOOK: Input: default@test_table1@ds=1
 #### A masked pattern was here ####
-40
+19
 PREHOOK: query: select count(*) from test_table1 tablesample (bucket 13 out of 16) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table1
@@ -180,7 +180,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table1
 POSTHOOK: Input: default@test_table1@ds=1
 #### A masked pattern was here ####
-29
+33
 PREHOOK: query: select count(*) from test_table2 where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table2
@@ -244,7 +244,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 POSTHOOK: Input: default@test_table2@ds=1
 #### A masked pattern was here ####
-40
+19
 PREHOOK: query: select count(*) from test_table2 tablesample (bucket 13 out of 16) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table2
@@ -255,4 +255,4 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 POSTHOOK: Input: default@test_table2@ds=1
 #### A masked pattern was here ####
-29
+33

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/stats11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/stats11.q.out b/ql/src/test/results/clientpositive/llap/stats11.q.out
index 254649b..e23651b 100644
--- a/ql/src/test/results/clientpositive/llap/stats11.q.out
+++ b/ql/src/test/results/clientpositive/llap/stats11.q.out
@@ -346,6 +346,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -367,6 +368,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -447,6 +449,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -494,6 +497,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -575,6 +579,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -766,6 +771,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -787,6 +793,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -867,6 +874,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -914,6 +922,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -995,6 +1004,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/subquery_notin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/subquery_notin.q.out b/ql/src/test/results/clientpositive/llap/subquery_notin.q.out
index 003ff5b..7270564 100644
--- a/ql/src/test/results/clientpositive/llap/subquery_notin.q.out
+++ b/ql/src/test/results/clientpositive/llap/subquery_notin.q.out
@@ -1241,21 +1241,21 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@lineitem
 #### A masked pattern was here ####
 22630	1
-59694	1
-106170	1
-123076	1
-139636	1
+119477	1
 450	1
-61931	1
-119767	1
-175839	1
 7068	1
-88362	1
+61931	1
+88035	1
+123076	1
 182052	1
 21636	1
+88362	1
+106170	1
+119767	1
+139636	1
+175839	1
+59694	1
 85951	1
-88035	1
-119477	1
 Warning: Shuffle Join MERGEJOIN[30][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
 PREHOOK: query: select * 
 from src 
@@ -3656,37 +3656,37 @@ POSTHOOK: query: select key, count(*) from src where value NOT IN (select key fr
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
-430	3
-128	3
-369	3
-316	3
-199	3
-454	3
-384	3
-311	3
-208	3
-298	3
-187	3
-273	3
+438	3
 417	3
-396	3
-409	3
 403	3
-35	3
+5	3
+384	3
+298	3
+193	3
+128	3
 90	3
-438	3
-327	3
-480	3
 466	3
-318	3
-193	3
+187	3
+369	3
+316	3
+311	3
+119	3
 498	3
-5	3
+480	3
+35	3
+273	3
 0	3
-167	3
-119	3
+208	3
+199	3
+454	3
+396	3
+430	3
 431	3
+167	3
 70	3
+318	3
+409	3
+327	3
 PREHOOK: query: explain select key, count(*) from src where value NOT IN (select concat('v', value) from src sc where sc.key = src.key ) group by key having count(*) in (select count(*) from src s1 where s1.key = '90' group by s1.key )
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select key, count(*) from src where value NOT IN (select concat('v', value) from src sc where sc.key = src.key ) group by key having count(*) in (select count(*) from src s1 where s1.key = '90' group by s1.key )
@@ -3954,37 +3954,37 @@ POSTHOOK: query: select key, count(*) from src where value NOT IN (select concat
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
-430	3
-128	3
-369	3
-316	3
-199	3
-454	3
-384	3
-311	3
-208	3
-298	3
-187	3
-273	3
+438	3
 417	3
-396	3
-409	3
 403	3
-35	3
+5	3
+384	3
+298	3
+193	3
+128	3
 90	3
-438	3
-327	3
-480	3
 466	3
-318	3
-193	3
+187	3
+369	3
+316	3
+311	3
+119	3
 498	3
-5	3
+480	3
+35	3
+273	3
 0	3
-167	3
-119	3
+208	3
+199	3
+454	3
+396	3
+430	3
 431	3
+167	3
 70	3
+318	3
+409	3
+327	3
 Warning: Shuffle Join MERGEJOIN[38][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
 PREHOOK: query: explain select * from part  where (p_size-1) NOT IN (select min(p_size) from part group by p_type) order by p_brand
 PREHOOK: type: QUERY


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/groupby_sort_skew_1_23.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_skew_1_23.q.out b/ql/src/test/results/clientpositive/groupby_sort_skew_1_23.q.out
index cb897d1..5a00d10 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_skew_1_23.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_skew_1_23.q.out
@@ -87,6 +87,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,cnt
                           columns.comments 
@@ -135,6 +136,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -158,6 +160,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -227,6 +230,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -270,6 +274,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -300,6 +305,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -321,6 +327,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -357,6 +364,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -387,6 +395,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -408,6 +417,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -523,6 +533,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -546,6 +557,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -659,6 +671,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,cnt
                     columns.comments 
@@ -717,6 +730,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -894,6 +908,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,cnt
                           columns.comments 
@@ -942,6 +957,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -965,6 +981,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -1034,6 +1051,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -1077,6 +1095,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -1107,6 +1126,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -1128,6 +1148,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -1164,6 +1185,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -1194,6 +1216,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -1215,6 +1238,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -1319,6 +1343,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,cnt
                           columns.comments 
@@ -1367,6 +1392,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -1390,6 +1416,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -1459,6 +1486,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -1502,6 +1530,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -1532,6 +1561,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -1553,6 +1583,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -1589,6 +1620,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -1619,6 +1651,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -1640,6 +1673,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -1752,6 +1786,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,cnt
                           columns.comments 
@@ -1800,6 +1835,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -1823,6 +1859,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -1892,6 +1929,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -1935,6 +1973,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,cnt
                     columns.comments 
@@ -1965,6 +2004,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,cnt
               columns.comments 
@@ -1986,6 +2026,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -2022,6 +2063,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,cnt
                     columns.comments 
@@ -2052,6 +2094,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,cnt
               columns.comments 
@@ -2073,6 +2116,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -2189,6 +2233,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -2212,6 +2257,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -2325,6 +2371,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,cnt
                     columns.comments 
@@ -2383,6 +2430,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -2564,6 +2612,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -2587,6 +2636,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -2700,6 +2750,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,cnt
                     columns.comments 
@@ -2758,6 +2809,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -2951,6 +3003,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -2974,6 +3027,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -3087,6 +3141,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -3145,6 +3200,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -3334,6 +3390,7 @@ STAGE PLANS:
                           properties:
                             COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,cnt
                             columns.comments 
@@ -3402,6 +3459,7 @@ STAGE PLANS:
                           properties:
                             COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,cnt
                             columns.comments 
@@ -3450,6 +3508,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -3473,6 +3532,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -3542,6 +3602,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -3585,6 +3646,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -3615,6 +3677,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -3636,6 +3699,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -3672,6 +3736,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -3702,6 +3767,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -3723,6 +3789,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -3856,6 +3923,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -3879,6 +3947,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -4034,6 +4103,7 @@ STAGE PLANS:
                           properties:
                             COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,cnt
                             columns.comments 
@@ -4090,6 +4160,7 @@ STAGE PLANS:
                       properties:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                         bucket_count -1
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,cnt
                         columns.comments 
@@ -4160,6 +4231,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -4183,6 +4255,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -4253,6 +4326,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -4296,6 +4370,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -4326,6 +4401,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -4347,6 +4423,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -4383,6 +4460,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -4413,6 +4491,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -4434,6 +4513,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -4583,6 +4663,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -4606,6 +4687,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -4652,6 +4734,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -4710,6 +4793,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -4901,6 +4985,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -4924,6 +5009,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -5111,6 +5197,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -5134,6 +5221,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -5270,6 +5358,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -5293,6 +5382,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -5406,6 +5496,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -5464,6 +5555,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -5639,6 +5731,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,key3,cnt
                           columns.comments 
@@ -5687,6 +5780,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -5710,6 +5804,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -5779,6 +5874,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -5822,6 +5918,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,cnt
                     columns.comments 
@@ -5852,6 +5949,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,cnt
               columns.comments 
@@ -5873,6 +5971,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -5909,6 +6008,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,cnt
                     columns.comments 
@@ -5939,6 +6039,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,cnt
               columns.comments 
@@ -5960,6 +6061,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -6075,6 +6177,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,key3,key4,cnt
                           columns.comments 
@@ -6123,6 +6226,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -6146,6 +6250,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -6215,6 +6320,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,key4,cnt
                 columns.comments 
@@ -6258,6 +6364,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,key4,cnt
                     columns.comments 
@@ -6288,6 +6395,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,key4,cnt
               columns.comments 
@@ -6309,6 +6417,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,key4,cnt
                 columns.comments 
@@ -6345,6 +6454,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,key4,cnt
                     columns.comments 
@@ -6375,6 +6485,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,key4,cnt
               columns.comments 
@@ -6396,6 +6507,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,key4,cnt
                 columns.comments 
@@ -6510,6 +6622,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,key3,cnt
                           columns.comments 
@@ -6558,6 +6671,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -6581,6 +6695,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -6650,6 +6765,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -6693,6 +6809,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,cnt
                     columns.comments 
@@ -6723,6 +6840,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,cnt
               columns.comments 
@@ -6744,6 +6862,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -6780,6 +6899,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,cnt
                     columns.comments 
@@ -6810,6 +6930,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,cnt
               columns.comments 
@@ -6831,6 +6952,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -6952,6 +7074,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,key3,cnt
                           columns.comments 
@@ -7000,6 +7123,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -7023,6 +7147,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -7092,6 +7217,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -7135,6 +7261,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,cnt
                     columns.comments 
@@ -7165,6 +7292,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,cnt
               columns.comments 
@@ -7186,6 +7314,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -7222,6 +7351,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,cnt
                     columns.comments 
@@ -7252,6 +7382,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,cnt
               columns.comments 
@@ -7273,6 +7404,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/infer_bucket_sort_dyn_part.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/infer_bucket_sort_dyn_part.q.out b/ql/src/test/results/clientpositive/infer_bucket_sort_dyn_part.q.out
index 4194a41..a0289be 100644
--- a/ql/src/test/results/clientpositive/infer_bucket_sort_dyn_part.q.out
+++ b/ql/src/test/results/clientpositive/infer_bucket_sort_dyn_part.q.out
@@ -444,6 +444,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: string)
                   Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: bigint)
+      Execution mode: vectorized
       Reduce Operator Tree:
         Group By Operator
           aggregations: count(VALUE._col0)
@@ -540,6 +541,7 @@ STAGE PLANS:
               Map-reduce partition columns: _col0 (type: string), _col1 (type: string)
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
               value expressions: _col2 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>), _col3 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>)
+      Execution mode: vectorized
       Reduce Operator Tree:
         Group By Operator
           aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1)

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/infer_bucket_sort_map_operators.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/infer_bucket_sort_map_operators.q.out b/ql/src/test/results/clientpositive/infer_bucket_sort_map_operators.q.out
index 0e687b9..03113d8 100644
--- a/ql/src/test/results/clientpositive/infer_bucket_sort_map_operators.q.out
+++ b/ql/src/test/results/clientpositive/infer_bucket_sort_map_operators.q.out
@@ -366,6 +366,7 @@ STAGE PLANS:
               Map-reduce partition columns: _col0 (type: string)
               Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
               value expressions: _col1 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>), _col2 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>)
+      Execution mode: vectorized
       Reduce Operator Tree:
         Group By Operator
           aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1)
@@ -729,6 +730,7 @@ STAGE PLANS:
               sort order: +
               Map-reduce partition columns: '1' (type: string)
               value expressions: _col1 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>), _col2 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>)
+      Execution mode: vectorized
       Reduce Operator Tree:
         Group By Operator
           aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1)

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/infer_bucket_sort_num_buckets.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/infer_bucket_sort_num_buckets.q.out b/ql/src/test/results/clientpositive/infer_bucket_sort_num_buckets.q.out
index 267933f..08d1341 100644
--- a/ql/src/test/results/clientpositive/infer_bucket_sort_num_buckets.q.out
+++ b/ql/src/test/results/clientpositive/infer_bucket_sort_num_buckets.q.out
@@ -44,6 +44,7 @@ STAGE PLANS:
                 Map-reduce partition columns: _col0 (type: int)
                 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE
                 value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: int)
+      Execution mode: vectorized
       Reduce Operator Tree:
         Select Operator
           expressions: VALUE._col0 (type: int), VALUE._col1 (type: string), VALUE._col2 (type: int)
@@ -105,6 +106,7 @@ STAGE PLANS:
               Map-reduce partition columns: '2008-04-08' (type: string), _col1 (type: string)
               Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE
               value expressions: _col2 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>), _col3 (type: struct<columntype:string,maxlength:bigint,sumlength:bigint,count:bigint,countnulls:bigint,bitvector:binary>)
+      Execution mode: vectorized
       Reduce Operator Tree:
         Group By Operator
           aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1)

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/infer_bucket_sort_reducers_power_two.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/infer_bucket_sort_reducers_power_two.q.out b/ql/src/test/results/clientpositive/infer_bucket_sort_reducers_power_two.q.out
index 6745965..2faa70b 100644
--- a/ql/src/test/results/clientpositive/infer_bucket_sort_reducers_power_two.q.out
+++ b/ql/src/test/results/clientpositive/infer_bucket_sort_reducers_power_two.q.out
@@ -236,9 +236,9 @@ Table:              	test_table
 Partition Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
 	numFiles            	16                  
-	numRows             	2654                
-	rawDataSize         	28466               
-	totalSize           	31120               
+	numRows             	257                 
+	rawDataSize         	2823                
+	totalSize           	3080                
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/input23.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/input23.q.out b/ql/src/test/results/clientpositive/input23.q.out
index 651bf8c..e931c8b 100644
--- a/ql/src/test/results/clientpositive/input23.q.out
+++ b/ql/src/test/results/clientpositive/input23.q.out
@@ -83,6 +83,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/ac6b2a3f/ql/src/test/results/clientpositive/input30.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/input30.q.out b/ql/src/test/results/clientpositive/input30.q.out
index 1cb73df..4e8e87e 100644
--- a/ql/src/test/results/clientpositive/input30.q.out
+++ b/ql/src/test/results/clientpositive/input30.q.out
@@ -123,7 +123,7 @@ POSTHOOK: query: select * from tst_dest30
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@tst_dest30
 #### A masked pattern was here ####
-18
+15
 PREHOOK: query: explain
 insert overwrite table dest30
 select count(1) from src
@@ -232,4 +232,4 @@ POSTHOOK: query: select * from tst_dest30
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@tst_dest30
 #### A masked pattern was here ####
-18
+15

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/input31.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/input31.q.out b/ql/src/test/results/clientpositive/input31.q.out
index 6e7c366..308a5f5 100644
--- a/ql/src/test/results/clientpositive/input31.q.out
+++ b/ql/src/test/results/clientpositive/input31.q.out
@@ -125,4 +125,4 @@ POSTHOOK: query: select * from tst_dest31
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@tst_dest31
 #### A masked pattern was here ####
-493
+242

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/input39.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/input39.q.out b/ql/src/test/results/clientpositive/input39.q.out
index d83849d..a6613d0 100644
--- a/ql/src/test/results/clientpositive/input39.q.out
+++ b/ql/src/test/results/clientpositive/input39.q.out
@@ -164,6 +164,6 @@ POSTHOOK: Input: default@t1@ds=1
 POSTHOOK: Input: default@t2
 POSTHOOK: Input: default@t2@ds=1
 #### A masked pattern was here ####
-18
+15
 mapreduce.framework.name=yarn
 mapreduce.jobtracker.address=localhost:58

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/input42.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/input42.q.out b/ql/src/test/results/clientpositive/input42.q.out
index 07dcdfa..5d44dd2 100644
--- a/ql/src/test/results/clientpositive/input42.q.out
+++ b/ql/src/test/results/clientpositive/input42.q.out
@@ -43,6 +43,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'
@@ -89,6 +90,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'
@@ -1172,6 +1174,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'
@@ -1218,6 +1221,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'
@@ -1683,6 +1687,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'
@@ -1729,6 +1734,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/ac6b2a3f/ql/src/test/results/clientpositive/input_part1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/input_part1.q.out b/ql/src/test/results/clientpositive/input_part1.q.out
index 31f45c2..9a322d3 100644
--- a/ql/src/test/results/clientpositive/input_part1.q.out
+++ b/ql/src/test/results/clientpositive/input_part1.q.out
@@ -53,6 +53,7 @@ STAGE PLANS:
                       properties:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                         bucket_count -1
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value,hr,ds
                         columns.comments 
@@ -124,6 +125,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'
@@ -191,6 +193,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,hr,ds
                 columns.comments 
@@ -234,6 +237,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value,hr,ds
                     columns.comments 
@@ -264,6 +268,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value,hr,ds
               columns.comments 
@@ -285,6 +290,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,hr,ds
                 columns.comments 
@@ -321,6 +327,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value,hr,ds
                     columns.comments 
@@ -351,6 +358,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value,hr,ds
               columns.comments 
@@ -372,6 +380,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,hr,ds
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/input_part2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/input_part2.q.out b/ql/src/test/results/clientpositive/input_part2.q.out
index 59cc455..0dfbf60 100644
--- a/ql/src/test/results/clientpositive/input_part2.q.out
+++ b/ql/src/test/results/clientpositive/input_part2.q.out
@@ -66,6 +66,7 @@ STAGE PLANS:
                       properties:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                         bucket_count -1
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value,hr,ds
                         columns.comments 
@@ -122,6 +123,7 @@ STAGE PLANS:
                       properties:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                         bucket_count -1
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value,hr,ds
                         columns.comments 
@@ -204,6 +206,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'
@@ -252,6 +255,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'
@@ -320,6 +324,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,hr,ds
                 columns.comments 
@@ -363,6 +368,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value,hr,ds
                     columns.comments 
@@ -393,6 +399,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value,hr,ds
               columns.comments 
@@ -414,6 +421,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,hr,ds
                 columns.comments 
@@ -450,6 +458,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value,hr,ds
                     columns.comments 
@@ -480,6 +489,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value,hr,ds
               columns.comments 
@@ -501,6 +511,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,hr,ds
                 columns.comments 
@@ -538,6 +549,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,hr,ds
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/input_part7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/input_part7.q.out b/ql/src/test/results/clientpositive/input_part7.q.out
index 724f070..f6cbda5 100644
--- a/ql/src/test/results/clientpositive/input_part7.q.out
+++ b/ql/src/test/results/clientpositive/input_part7.q.out
@@ -108,6 +108,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'
@@ -156,6 +157,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/ac6b2a3f/ql/src/test/results/clientpositive/input_part9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/input_part9.q.out b/ql/src/test/results/clientpositive/input_part9.q.out
index a6aee99..d1bd4f9 100644
--- a/ql/src/test/results/clientpositive/input_part9.q.out
+++ b/ql/src/test/results/clientpositive/input_part9.q.out
@@ -43,6 +43,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'
@@ -89,6 +90,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/ac6b2a3f/ql/src/test/results/clientpositive/join17.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join17.q.out b/ql/src/test/results/clientpositive/join17.q.out
index b0e999a..feb70dd 100644
--- a/ql/src/test/results/clientpositive/join17.q.out
+++ b/ql/src/test/results/clientpositive/join17.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'
@@ -144,6 +146,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key1":"true","key2":"true","value1":"true","value2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,value1,key2,value2
                     columns.comments 
@@ -202,6 +205,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key1":"true","key2":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,value1,key2,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/join26.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join26.q.out b/ql/src/test/results/clientpositive/join26.q.out
index 20228e4..0f9c55c 100644
--- a/ql/src/test/results/clientpositive/join26.q.out
+++ b/ql/src/test/results/clientpositive/join26.q.out
@@ -118,6 +118,7 @@ STAGE PLANS:
                           properties:
                             COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,value,val2
                             columns.comments 
@@ -177,6 +178,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'
@@ -198,6 +200,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'
@@ -223,6 +226,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'
@@ -244,6 +248,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'
@@ -294,6 +299,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'
@@ -323,6 +329,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/join32.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join32.q.out b/ql/src/test/results/clientpositive/join32.q.out
index 138ac8d..4e9d205 100644
--- a/ql/src/test/results/clientpositive/join32.q.out
+++ b/ql/src/test/results/clientpositive/join32.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'
@@ -171,6 +172,7 @@ STAGE PLANS:
                             properties:
                               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                               bucket_count -1
+                              bucketing_version 2
                               column.name.delimiter ,
                               columns key,value,val2
                               columns.comments 
@@ -230,6 +232,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'
@@ -251,6 +254,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'
@@ -276,6 +280,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'
@@ -297,6 +302,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'
@@ -347,6 +353,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'
@@ -376,6 +383,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/join33.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join33.q.out b/ql/src/test/results/clientpositive/join33.q.out
index 138ac8d..4e9d205 100644
--- a/ql/src/test/results/clientpositive/join33.q.out
+++ b/ql/src/test/results/clientpositive/join33.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'
@@ -171,6 +172,7 @@ STAGE PLANS:
                             properties:
                               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                               bucket_count -1
+                              bucketing_version 2
                               column.name.delimiter ,
                               columns key,value,val2
                               columns.comments 
@@ -230,6 +232,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'
@@ -251,6 +254,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'
@@ -276,6 +280,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'
@@ -297,6 +302,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'
@@ -347,6 +353,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'
@@ -376,6 +383,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/join34.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join34.q.out b/ql/src/test/results/clientpositive/join34.q.out
index b9d19bb..ae7459a 100644
--- a/ql/src/test/results/clientpositive/join34.q.out
+++ b/ql/src/test/results/clientpositive/join34.q.out
@@ -103,6 +103,7 @@ STAGE PLANS:
                             properties:
                               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                               bucket_count -1
+                              bucketing_version 2
                               column.name.delimiter ,
                               columns key,value,val2
                               columns.comments 
@@ -189,6 +190,7 @@ STAGE PLANS:
                             properties:
                               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                               bucket_count -1
+                              bucketing_version 2
                               column.name.delimiter ,
                               columns key,value,val2
                               columns.comments 
@@ -248,6 +250,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'
@@ -269,6 +272,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'
@@ -294,6 +298,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'
@@ -315,6 +320,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'
@@ -346,6 +352,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/join35.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join35.q.out b/ql/src/test/results/clientpositive/join35.q.out
index cf2af3c..f8af6a8 100644
--- a/ql/src/test/results/clientpositive/join35.q.out
+++ b/ql/src/test/results/clientpositive/join35.q.out
@@ -74,6 +74,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'
@@ -95,6 +96,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'
@@ -200,6 +202,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value,val2
                           columns.comments 
@@ -276,6 +279,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value,val2
                           columns.comments 
@@ -379,6 +383,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'
@@ -400,6 +405,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'
@@ -431,6 +437,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 
@@ -566,6 +573,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'
@@ -587,6 +595,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'


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucket1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucket1.q.out b/ql/src/test/results/clientpositive/bucket1.q.out
index 3060df3..07b5b9d 100644
--- a/ql/src/test/results/clientpositive/bucket1.q.out
+++ b/ql/src/test/results/clientpositive/bucket1.q.out
@@ -52,6 +52,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'
@@ -73,6 +74,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'
@@ -112,6 +114,7 @@ STAGE PLANS:
                   COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                   bucket_count 100
                   bucket_field_name key
+                  bucketing_version 2
                   column.name.delimiter ,
                   columns key,value
                   columns.comments 
@@ -171,6 +174,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 100
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucket2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucket2.q.out b/ql/src/test/results/clientpositive/bucket2.q.out
index 16218f9..e8a1dd7 100644
--- a/ql/src/test/results/clientpositive/bucket2.q.out
+++ b/ql/src/test/results/clientpositive/bucket2.q.out
@@ -51,6 +51,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'
@@ -72,6 +73,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'
@@ -111,6 +113,7 @@ STAGE PLANS:
                   COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                   bucket_count 2
                   bucket_field_name key
+                  bucketing_version 2
                   column.name.delimiter ,
                   columns key,value
                   columns.comments 
@@ -178,6 +181,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -264,66 +268,59 @@ POSTHOOK: query: select * from bucket2_1 tablesample (bucket 1 out of 2) s
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucket2_1
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
 10	val_10
-100	val_100
-100	val_100
-104	val_104
-104	val_104
-114	val_114
+105	val_105
+113	val_113
+113	val_113
 116	val_116
-118	val_118
-118	val_118
-12	val_12
-12	val_12
-120	val_120
-120	val_120
+119	val_119
+119	val_119
+119	val_119
 126	val_126
-128	val_128
-128	val_128
-128	val_128
+133	val_133
 134	val_134
 134	val_134
-136	val_136
-138	val_138
-138	val_138
-138	val_138
-138	val_138
+137	val_137
+137	val_137
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
+149	val_149
+149	val_149
+153	val_153
 156	val_156
+157	val_157
 158	val_158
-160	val_160
 162	val_162
+163	val_163
 164	val_164
 164	val_164
-166	val_166
-168	val_168
-170	val_170
-172	val_172
-172	val_172
-174	val_174
-174	val_174
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+17	val_17
+177	val_177
 178	val_178
-18	val_18
-18	val_18
-180	val_180
-186	val_186
+181	val_181
+187	val_187
+187	val_187
+187	val_187
+19	val_19
 190	val_190
-192	val_192
-194	val_194
-196	val_196
+191	val_191
+191	val_191
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+199	val_199
+199	val_199
+199	val_199
 2	val_2
 20	val_20
-200	val_200
-200	val_200
+201	val_201
 202	val_202
 208	val_208
 208	val_208
@@ -331,70 +328,62 @@ POSTHOOK: Input: default@bucket2_1
 214	val_214
 216	val_216
 216	val_216
-218	val_218
-222	val_222
-224	val_224
-224	val_224
+221	val_221
+221	val_221
 226	val_226
-228	val_228
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
-24	val_24
-24	val_24
-242	val_242
-242	val_242
+239	val_239
+239	val_239
 244	val_244
 248	val_248
+249	val_249
 252	val_252
+255	val_255
+255	val_255
 256	val_256
 256	val_256
-258	val_258
-26	val_26
-26	val_26
 260	val_260
-262	val_262
 266	val_266
+27	val_27
 272	val_272
 272	val_272
-274	val_274
-278	val_278
-278	val_278
-28	val_28
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 286	val_286
-288	val_288
-288	val_288
+287	val_287
+289	val_289
+291	val_291
 292	val_292
-296	val_296
-298	val_298
-298	val_298
-298	val_298
 30	val_30
-302	val_302
-306	val_306
+307	val_307
+307	val_307
 308	val_308
 310	val_310
+311	val_311
+311	val_311
+311	val_311
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-322	val_322
-322	val_322
+317	val_317
+317	val_317
+325	val_325
+325	val_325
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 336	val_336
 338	val_338
-34	val_34
+339	val_339
+341	val_341
 342	val_342
 342	val_342
 344	val_344
@@ -404,110 +393,121 @@ POSTHOOK: Input: default@bucket2_1
 348	val_348
 348	val_348
 348	val_348
-356	val_356
+351	val_351
+353	val_353
+353	val_353
 360	val_360
 362	val_362
 364	val_364
-366	val_366
+365	val_365
 368	val_368
-374	val_374
+369	val_369
+369	val_369
+369	val_369
+377	val_377
 378	val_378
-382	val_382
-382	val_382
 384	val_384
 384	val_384
 384	val_384
 386	val_386
 392	val_392
+393	val_393
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-4	val_4
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
 402	val_402
 404	val_404
 404	val_404
-406	val_406
-406	val_406
-406	val_406
-406	val_406
+407	val_407
+409	val_409
+409	val_409
+409	val_409
+41	val_41
+411	val_411
 414	val_414
 414	val_414
-418	val_418
-42	val_42
-42	val_42
-424	val_424
-424	val_424
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+427	val_427
+43	val_43
 430	val_430
 430	val_430
 430	val_430
 432	val_432
-436	val_436
-438	val_438
-438	val_438
-438	val_438
-44	val_44
+435	val_435
+437	val_437
+443	val_443
 444	val_444
 446	val_446
-448	val_448
+449	val_449
 452	val_452
+453	val_453
 454	val_454
 454	val_454
 454	val_454
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
+459	val_459
+459	val_459
+463	val_463
+463	val_463
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-470	val_470
+467	val_467
 472	val_472
 478	val_478
 478	val_478
+479	val_479
 480	val_480
 480	val_480
 480	val_480
 482	val_482
+483	val_483
 484	val_484
+485	val_485
 490	val_490
-492	val_492
-492	val_492
-494	val_494
-496	val_496
+491	val_491
+495	val_495
+497	val_497
 498	val_498
 498	val_498
 498	val_498
+51	val_51
+51	val_51
 54	val_54
+57	val_57
 58	val_58
 58	val_58
 64	val_64
-66	val_66
+65	val_65
+67	val_67
+67	val_67
+69	val_69
 70	val_70
 70	val_70
 70	val_70
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-78	val_78
-8	val_8
+77	val_77
 80	val_80
-82	val_82
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
 86	val_86
 90	val_90
 90	val_90
 90	val_90
-92	val_92
 96	val_96
+97	val_97
+97	val_97
 98	val_98
 98	val_98

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucket3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucket3.q.out b/ql/src/test/results/clientpositive/bucket3.q.out
index be40bd0..0ad6d04 100644
--- a/ql/src/test/results/clientpositive/bucket3.q.out
+++ b/ql/src/test/results/clientpositive/bucket3.q.out
@@ -52,6 +52,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'
@@ -73,6 +74,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'
@@ -112,6 +114,7 @@ STAGE PLANS:
                 properties:
                   bucket_count 2
                   bucket_field_name key
+                  bucketing_version 2
                   column.name.delimiter ,
                   columns key,value
                   columns.comments 
@@ -171,6 +174,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -346,66 +350,59 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucket3_1
 POSTHOOK: Input: default@bucket3_1@ds=1
 #### A masked pattern was here ####
-0	val_0	1
-0	val_0	1
-0	val_0	1
 10	val_10	1
-100	val_100	1
-100	val_100	1
-104	val_104	1
-104	val_104	1
-114	val_114	1
+105	val_105	1
+113	val_113	1
+113	val_113	1
 116	val_116	1
-118	val_118	1
-118	val_118	1
-12	val_12	1
-12	val_12	1
-120	val_120	1
-120	val_120	1
+119	val_119	1
+119	val_119	1
+119	val_119	1
 126	val_126	1
-128	val_128	1
-128	val_128	1
-128	val_128	1
+133	val_133	1
 134	val_134	1
 134	val_134	1
-136	val_136	1
-138	val_138	1
-138	val_138	1
-138	val_138	1
-138	val_138	1
+137	val_137	1
+137	val_137	1
 146	val_146	1
 146	val_146	1
-150	val_150	1
-152	val_152	1
-152	val_152	1
+149	val_149	1
+149	val_149	1
+153	val_153	1
 156	val_156	1
+157	val_157	1
 158	val_158	1
-160	val_160	1
 162	val_162	1
+163	val_163	1
 164	val_164	1
 164	val_164	1
-166	val_166	1
-168	val_168	1
-170	val_170	1
-172	val_172	1
-172	val_172	1
-174	val_174	1
-174	val_174	1
-176	val_176	1
-176	val_176	1
+165	val_165	1
+165	val_165	1
+169	val_169	1
+169	val_169	1
+169	val_169	1
+169	val_169	1
+17	val_17	1
+177	val_177	1
 178	val_178	1
-18	val_18	1
-18	val_18	1
-180	val_180	1
-186	val_186	1
+181	val_181	1
+187	val_187	1
+187	val_187	1
+187	val_187	1
+19	val_19	1
 190	val_190	1
-192	val_192	1
-194	val_194	1
-196	val_196	1
+191	val_191	1
+191	val_191	1
+195	val_195	1
+195	val_195	1
+197	val_197	1
+197	val_197	1
+199	val_199	1
+199	val_199	1
+199	val_199	1
 2	val_2	1
 20	val_20	1
-200	val_200	1
-200	val_200	1
+201	val_201	1
 202	val_202	1
 208	val_208	1
 208	val_208	1
@@ -413,70 +410,62 @@ POSTHOOK: Input: default@bucket3_1@ds=1
 214	val_214	1
 216	val_216	1
 216	val_216	1
-218	val_218	1
-222	val_222	1
-224	val_224	1
-224	val_224	1
+221	val_221	1
+221	val_221	1
 226	val_226	1
-228	val_228	1
-230	val_230	1
-230	val_230	1
-230	val_230	1
-230	val_230	1
-230	val_230	1
+229	val_229	1
+229	val_229	1
+233	val_233	1
+233	val_233	1
+237	val_237	1
+237	val_237	1
 238	val_238	1
 238	val_238	1
-24	val_24	1
-24	val_24	1
-242	val_242	1
-242	val_242	1
+239	val_239	1
+239	val_239	1
 244	val_244	1
 248	val_248	1
+249	val_249	1
 252	val_252	1
+255	val_255	1
+255	val_255	1
 256	val_256	1
 256	val_256	1
-258	val_258	1
-26	val_26	1
-26	val_26	1
 260	val_260	1
-262	val_262	1
 266	val_266	1
+27	val_27	1
 272	val_272	1
 272	val_272	1
-274	val_274	1
-278	val_278	1
-278	val_278	1
-28	val_28	1
-280	val_280	1
-280	val_280	1
-282	val_282	1
-282	val_282	1
 284	val_284	1
 286	val_286	1
-288	val_288	1
-288	val_288	1
+287	val_287	1
+289	val_289	1
+291	val_291	1
 292	val_292	1
-296	val_296	1
-298	val_298	1
-298	val_298	1
-298	val_298	1
 30	val_30	1
-302	val_302	1
-306	val_306	1
+307	val_307	1
+307	val_307	1
 308	val_308	1
 310	val_310	1
+311	val_311	1
+311	val_311	1
+311	val_311	1
+315	val_315	1
 316	val_316	1
 316	val_316	1
 316	val_316	1
-318	val_318	1
-318	val_318	1
-318	val_318	1
-322	val_322	1
-322	val_322	1
+317	val_317	1
+317	val_317	1
+325	val_325	1
+325	val_325	1
+327	val_327	1
+327	val_327	1
+327	val_327	1
 332	val_332	1
 336	val_336	1
 338	val_338	1
-34	val_34	1
+339	val_339	1
+341	val_341	1
 342	val_342	1
 342	val_342	1
 344	val_344	1
@@ -486,110 +475,121 @@ POSTHOOK: Input: default@bucket3_1@ds=1
 348	val_348	1
 348	val_348	1
 348	val_348	1
-356	val_356	1
+351	val_351	1
+353	val_353	1
+353	val_353	1
 360	val_360	1
 362	val_362	1
 364	val_364	1
-366	val_366	1
+365	val_365	1
 368	val_368	1
-374	val_374	1
+369	val_369	1
+369	val_369	1
+369	val_369	1
+377	val_377	1
 378	val_378	1
-382	val_382	1
-382	val_382	1
 384	val_384	1
 384	val_384	1
 384	val_384	1
 386	val_386	1
 392	val_392	1
+393	val_393	1
 394	val_394	1
 396	val_396	1
 396	val_396	1
 396	val_396	1
-4	val_4	1
-400	val_400	1
+397	val_397	1
+397	val_397	1
+399	val_399	1
+399	val_399	1
 402	val_402	1
 404	val_404	1
 404	val_404	1
-406	val_406	1
-406	val_406	1
-406	val_406	1
-406	val_406	1
+407	val_407	1
+409	val_409	1
+409	val_409	1
+409	val_409	1
+41	val_41	1
+411	val_411	1
 414	val_414	1
 414	val_414	1
-418	val_418	1
-42	val_42	1
-42	val_42	1
-424	val_424	1
-424	val_424	1
+417	val_417	1
+417	val_417	1
+417	val_417	1
+419	val_419	1
+421	val_421	1
+427	val_427	1
+43	val_43	1
 430	val_430	1
 430	val_430	1
 430	val_430	1
 432	val_432	1
-436	val_436	1
-438	val_438	1
-438	val_438	1
-438	val_438	1
-44	val_44	1
+435	val_435	1
+437	val_437	1
+443	val_443	1
 444	val_444	1
 446	val_446	1
-448	val_448	1
+449	val_449	1
 452	val_452	1
+453	val_453	1
 454	val_454	1
 454	val_454	1
 454	val_454	1
 458	val_458	1
 458	val_458	1
-460	val_460	1
-462	val_462	1
-462	val_462	1
+459	val_459	1
+459	val_459	1
+463	val_463	1
+463	val_463	1
 466	val_466	1
 466	val_466	1
 466	val_466	1
-468	val_468	1
-468	val_468	1
-468	val_468	1
-468	val_468	1
-470	val_470	1
+467	val_467	1
 472	val_472	1
 478	val_478	1
 478	val_478	1
+479	val_479	1
 480	val_480	1
 480	val_480	1
 480	val_480	1
 482	val_482	1
+483	val_483	1
 484	val_484	1
+485	val_485	1
 490	val_490	1
-492	val_492	1
-492	val_492	1
-494	val_494	1
-496	val_496	1
+491	val_491	1
+495	val_495	1
+497	val_497	1
 498	val_498	1
 498	val_498	1
 498	val_498	1
+51	val_51	1
+51	val_51	1
 54	val_54	1
+57	val_57	1
 58	val_58	1
 58	val_58	1
 64	val_64	1
-66	val_66	1
+65	val_65	1
+67	val_67	1
+67	val_67	1
+69	val_69	1
 70	val_70	1
 70	val_70	1
 70	val_70	1
-72	val_72	1
-72	val_72	1
-74	val_74	1
-76	val_76	1
-76	val_76	1
-78	val_78	1
-8	val_8	1
+77	val_77	1
 80	val_80	1
-82	val_82	1
+83	val_83	1
+83	val_83	1
 84	val_84	1
 84	val_84	1
+85	val_85	1
 86	val_86	1
 90	val_90	1
 90	val_90	1
 90	val_90	1
-92	val_92	1
 96	val_96	1
+97	val_97	1
+97	val_97	1
 98	val_98	1
 98	val_98	1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucket_map_join_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucket_map_join_1.q.out b/ql/src/test/results/clientpositive/bucket_map_join_1.q.out
index 8b2debc..a09faa1 100644
--- a/ql/src/test/results/clientpositive/bucket_map_join_1.q.out
+++ b/ql/src/test/results/clientpositive/bucket_map_join_1.q.out
@@ -122,6 +122,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 1
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -144,6 +145,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 1
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucket_map_join_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucket_map_join_2.q.out b/ql/src/test/results/clientpositive/bucket_map_join_2.q.out
index 0f1acb9..c94dfda 100644
--- a/ql/src/test/results/clientpositive/bucket_map_join_2.q.out
+++ b/ql/src/test/results/clientpositive/bucket_map_join_2.q.out
@@ -122,6 +122,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 1
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -144,6 +145,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 1
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucket_map_join_spark1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucket_map_join_spark1.q.out b/ql/src/test/results/clientpositive/bucket_map_join_spark1.q.out
index 3e917fa..3e711d5 100644
--- a/ql/src/test/results/clientpositive/bucket_map_join_spark1.q.out
+++ b/ql/src/test/results/clientpositive/bucket_map_join_spark1.q.out
@@ -163,6 +163,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -239,6 +240,7 @@ STAGE PLANS:
                           properties:
                             COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,value1,value2
                             columns.comments 
@@ -323,6 +325,7 @@ STAGE PLANS:
               properties:
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -371,6 +374,7 @@ STAGE PLANS:
               properties:
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -400,6 +404,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -600,6 +605,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -676,6 +682,7 @@ STAGE PLANS:
                           properties:
                             COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,value1,value2
                             columns.comments 
@@ -760,6 +767,7 @@ STAGE PLANS:
               properties:
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -808,6 +816,7 @@ STAGE PLANS:
               properties:
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -837,6 +846,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucket_map_join_spark2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucket_map_join_spark2.q.out b/ql/src/test/results/clientpositive/bucket_map_join_spark2.q.out
index 4027863..2084c90 100644
--- a/ql/src/test/results/clientpositive/bucket_map_join_spark2.q.out
+++ b/ql/src/test/results/clientpositive/bucket_map_join_spark2.q.out
@@ -147,6 +147,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -223,6 +224,7 @@ STAGE PLANS:
                           properties:
                             COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,value1,value2
                             columns.comments 
@@ -307,6 +309,7 @@ STAGE PLANS:
               properties:
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -355,6 +358,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -384,6 +388,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -584,6 +589,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -660,6 +666,7 @@ STAGE PLANS:
                           properties:
                             COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,value1,value2
                             columns.comments 
@@ -744,6 +751,7 @@ STAGE PLANS:
               properties:
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -792,6 +800,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -821,6 +830,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucket_map_join_spark3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucket_map_join_spark3.q.out b/ql/src/test/results/clientpositive/bucket_map_join_spark3.q.out
index facb47b..9f601c9 100644
--- a/ql/src/test/results/clientpositive/bucket_map_join_spark3.q.out
+++ b/ql/src/test/results/clientpositive/bucket_map_join_spark3.q.out
@@ -147,6 +147,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -223,6 +224,7 @@ STAGE PLANS:
                           properties:
                             COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,value1,value2
                             columns.comments 
@@ -307,6 +309,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -355,6 +358,7 @@ STAGE PLANS:
               properties:
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -384,6 +388,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -584,6 +589,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -660,6 +666,7 @@ STAGE PLANS:
                           properties:
                             COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,value1,value2
                             columns.comments 
@@ -744,6 +751,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -792,6 +800,7 @@ STAGE PLANS:
               properties:
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -821,6 +830,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucket_map_join_spark4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucket_map_join_spark4.q.out b/ql/src/test/results/clientpositive/bucket_map_join_spark4.q.out
index 2cdf28e..0172264 100644
--- a/ql/src/test/results/clientpositive/bucket_map_join_spark4.q.out
+++ b/ql/src/test/results/clientpositive/bucket_map_join_spark4.q.out
@@ -193,6 +193,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -216,6 +217,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -243,6 +245,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -266,6 +269,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -293,6 +297,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -316,6 +321,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -549,6 +555,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -572,6 +579,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -599,6 +607,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -622,6 +631,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -649,6 +659,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -672,6 +683,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucket_num_reducers.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucket_num_reducers.q.out b/ql/src/test/results/clientpositive/bucket_num_reducers.q.out
deleted file mode 100644
index 9f31781..0000000
--- a/ql/src/test/results/clientpositive/bucket_num_reducers.q.out
+++ /dev/null
@@ -1,17 +0,0 @@
-PREHOOK: query: CREATE TABLE bucket_nr(key int, value string) CLUSTERED BY (key) INTO 50 BUCKETS
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@bucket_nr
-POSTHOOK: query: CREATE TABLE bucket_nr(key int, value string) CLUSTERED BY (key) INTO 50 BUCKETS
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@bucket_nr
-PREHOOK: query: insert overwrite table bucket_nr
-select * from src
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@bucket_nr
-PREHOOK: query: drop table bucket_nr
-PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@bucket_nr
-PREHOOK: Output: default@bucket_nr

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucket_num_reducers2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucket_num_reducers2.q.out b/ql/src/test/results/clientpositive/bucket_num_reducers2.q.out
deleted file mode 100644
index c7eeda0..0000000
--- a/ql/src/test/results/clientpositive/bucket_num_reducers2.q.out
+++ /dev/null
@@ -1,13 +0,0 @@
-PREHOOK: query: CREATE TABLE test_table(key int, value string) CLUSTERED BY (key) INTO 3 BUCKETS
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@test_table
-POSTHOOK: query: CREATE TABLE test_table(key int, value string) CLUSTERED BY (key) INTO 3 BUCKETS
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@test_table
-PREHOOK: query: insert overwrite table test_table
-select * from src
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@test_table

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucket_num_reducers_acid2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucket_num_reducers_acid2.q.out b/ql/src/test/results/clientpositive/bucket_num_reducers_acid2.q.out
deleted file mode 100644
index add89f4..0000000
--- a/ql/src/test/results/clientpositive/bucket_num_reducers_acid2.q.out
+++ /dev/null
@@ -1,48 +0,0 @@
-PREHOOK: query: drop table if exists bucket_nr_acid2
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table if exists bucket_nr_acid2
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table bucket_nr_acid2 (a int, b int) clustered by (a) into 4 buckets stored as orc TBLPROPERTIES ('transactional'='true')
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@bucket_nr_acid2
-POSTHOOK: query: create table bucket_nr_acid2 (a int, b int) clustered by (a) into 4 buckets stored as orc TBLPROPERTIES ('transactional'='true')
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@bucket_nr_acid2
-PREHOOK: query: insert into bucket_nr_acid2 values(0,1),(1,1)
-PREHOOK: type: QUERY
-PREHOOK: Input: _dummy_database@_dummy_table
-PREHOOK: Output: default@bucket_nr_acid2
-PREHOOK: query: insert into bucket_nr_acid2 values(2,2),(3,2)
-PREHOOK: type: QUERY
-PREHOOK: Input: _dummy_database@_dummy_table
-PREHOOK: Output: default@bucket_nr_acid2
-PREHOOK: query: insert into bucket_nr_acid2 values(0,3),(1,3)
-PREHOOK: type: QUERY
-PREHOOK: Input: _dummy_database@_dummy_table
-PREHOOK: Output: default@bucket_nr_acid2
-PREHOOK: query: insert into bucket_nr_acid2 values(2,4),(3,4)
-PREHOOK: type: QUERY
-PREHOOK: Input: _dummy_database@_dummy_table
-PREHOOK: Output: default@bucket_nr_acid2
-PREHOOK: query: update bucket_nr_acid2 set b = -1
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket_nr_acid2
-PREHOOK: Output: default@bucket_nr_acid2
-PREHOOK: query: select * from bucket_nr_acid2 order by a, b
-PREHOOK: type: QUERY
-PREHOOK: Input: default@bucket_nr_acid2
-PREHOOK: Output: hdfs://### HDFS PATH ###
-0	-1
-0	-1
-1	-1
-1	-1
-2	-1
-2	-1
-3	-1
-3	-1
-PREHOOK: query: drop table bucket_nr_acid2
-PREHOOK: type: DROPTABLE
-PREHOOK: Input: default@bucket_nr_acid2
-PREHOOK: Output: default@bucket_nr_acid2

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketcontext_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketcontext_1.q.out b/ql/src/test/results/clientpositive/bucketcontext_1.q.out
index 77c3f93..adc2d76 100644
--- a/ql/src/test/results/clientpositive/bucketcontext_1.q.out
+++ b/ql/src/test/results/clientpositive/bucketcontext_1.q.out
@@ -146,6 +146,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -256,6 +257,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -305,6 +307,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -451,6 +454,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -500,6 +504,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketcontext_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketcontext_2.q.out b/ql/src/test/results/clientpositive/bucketcontext_2.q.out
index 1bc08c8..03ce495 100644
--- a/ql/src/test/results/clientpositive/bucketcontext_2.q.out
+++ b/ql/src/test/results/clientpositive/bucketcontext_2.q.out
@@ -130,6 +130,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -240,6 +241,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -289,6 +291,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -435,6 +438,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -484,6 +488,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketcontext_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketcontext_3.q.out b/ql/src/test/results/clientpositive/bucketcontext_3.q.out
index 0e263e8..57e1701 100644
--- a/ql/src/test/results/clientpositive/bucketcontext_3.q.out
+++ b/ql/src/test/results/clientpositive/bucketcontext_3.q.out
@@ -130,6 +130,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -177,6 +178,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -287,6 +289,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -432,6 +435,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketcontext_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketcontext_4.q.out b/ql/src/test/results/clientpositive/bucketcontext_4.q.out
index d35b226..f448796 100644
--- a/ql/src/test/results/clientpositive/bucketcontext_4.q.out
+++ b/ql/src/test/results/clientpositive/bucketcontext_4.q.out
@@ -146,6 +146,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -193,6 +194,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -303,6 +305,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -448,6 +451,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketcontext_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketcontext_5.q.out b/ql/src/test/results/clientpositive/bucketcontext_5.q.out
index 19751e2..1cce4e0 100644
--- a/ql/src/test/results/clientpositive/bucketcontext_5.q.out
+++ b/ql/src/test/results/clientpositive/bucketcontext_5.q.out
@@ -148,6 +148,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -170,6 +171,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -286,6 +288,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -308,6 +311,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketcontext_6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketcontext_6.q.out b/ql/src/test/results/clientpositive/bucketcontext_6.q.out
index fed20b4..729e9b6 100644
--- a/ql/src/test/results/clientpositive/bucketcontext_6.q.out
+++ b/ql/src/test/results/clientpositive/bucketcontext_6.q.out
@@ -191,6 +191,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -240,6 +241,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -384,6 +386,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -433,6 +436,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketcontext_7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketcontext_7.q.out b/ql/src/test/results/clientpositive/bucketcontext_7.q.out
index dffe45f..fdc8f1d 100644
--- a/ql/src/test/results/clientpositive/bucketcontext_7.q.out
+++ b/ql/src/test/results/clientpositive/bucketcontext_7.q.out
@@ -163,6 +163,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -210,6 +211,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -320,6 +322,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -369,6 +372,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -517,6 +521,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -566,6 +571,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketcontext_8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketcontext_8.q.out b/ql/src/test/results/clientpositive/bucketcontext_8.q.out
index 3ae368d..42260aa 100644
--- a/ql/src/test/results/clientpositive/bucketcontext_8.q.out
+++ b/ql/src/test/results/clientpositive/bucketcontext_8.q.out
@@ -163,6 +163,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -210,6 +211,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -320,6 +322,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -369,6 +372,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -517,6 +521,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -566,6 +571,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketmapjoin10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketmapjoin10.q.out b/ql/src/test/results/clientpositive/bucketmapjoin10.q.out
index 381a691..7fee7c2 100644
--- a/ql/src/test/results/clientpositive/bucketmapjoin10.q.out
+++ b/ql/src/test/results/clientpositive/bucketmapjoin10.q.out
@@ -180,6 +180,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -226,6 +227,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -326,6 +328,7 @@ STAGE PLANS:
               properties:
                 bucket_count 3
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -374,6 +377,7 @@ STAGE PLANS:
               properties:
                 bucket_count 3
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketmapjoin11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketmapjoin11.q.out b/ql/src/test/results/clientpositive/bucketmapjoin11.q.out
index a2c35d8..206de59 100644
--- a/ql/src/test/results/clientpositive/bucketmapjoin11.q.out
+++ b/ql/src/test/results/clientpositive/bucketmapjoin11.q.out
@@ -188,6 +188,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -234,6 +235,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -342,6 +344,7 @@ STAGE PLANS:
               properties:
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -390,6 +393,7 @@ STAGE PLANS:
               properties:
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -521,6 +525,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -567,6 +572,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -675,6 +681,7 @@ STAGE PLANS:
               properties:
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -723,6 +730,7 @@ STAGE PLANS:
               properties:
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketmapjoin12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketmapjoin12.q.out b/ql/src/test/results/clientpositive/bucketmapjoin12.q.out
index d58e959..64eb6a2 100644
--- a/ql/src/test/results/clientpositive/bucketmapjoin12.q.out
+++ b/ql/src/test/results/clientpositive/bucketmapjoin12.q.out
@@ -148,6 +148,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 
@@ -256,6 +257,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -381,6 +383,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -481,6 +484,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketmapjoin13.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketmapjoin13.q.out b/ql/src/test/results/clientpositive/bucketmapjoin13.q.out
index 406cca4..416e316 100644
--- a/ql/src/test/results/clientpositive/bucketmapjoin13.q.out
+++ b/ql/src/test/results/clientpositive/bucketmapjoin13.q.out
@@ -117,6 +117,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -218,6 +219,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -267,6 +269,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -397,6 +400,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -506,6 +510,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -641,6 +646,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -750,6 +756,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -885,6 +892,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -994,6 +1002,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name value
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketmapjoin5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketmapjoin5.q.out b/ql/src/test/results/clientpositive/bucketmapjoin5.q.out
index 1ac8451..5ed02e7 100644
--- a/ql/src/test/results/clientpositive/bucketmapjoin5.q.out
+++ b/ql/src/test/results/clientpositive/bucketmapjoin5.q.out
@@ -253,6 +253,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -326,6 +327,7 @@ STAGE PLANS:
               properties:
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -374,6 +376,7 @@ STAGE PLANS:
               properties:
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -442,6 +445,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -485,6 +489,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value1,value2
                     columns.comments 
@@ -515,6 +520,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value1,value2
               columns.comments 
@@ -536,6 +542,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -572,6 +579,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value1,value2
                     columns.comments 
@@ -602,6 +610,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value1,value2
               columns.comments 
@@ -623,6 +632,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -845,6 +855,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -918,6 +929,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -966,6 +978,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -1034,6 +1047,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -1077,6 +1091,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value1,value2
                     columns.comments 
@@ -1107,6 +1122,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value1,value2
               columns.comments 
@@ -1128,6 +1144,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -1164,6 +1181,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value1,value2
                     columns.comments 
@@ -1194,6 +1212,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value1,value2
               columns.comments 
@@ -1215,6 +1234,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketmapjoin8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketmapjoin8.q.out b/ql/src/test/results/clientpositive/bucketmapjoin8.q.out
index 633d830..d0b1dde 100644
--- a/ql/src/test/results/clientpositive/bucketmapjoin8.q.out
+++ b/ql/src/test/results/clientpositive/bucketmapjoin8.q.out
@@ -114,6 +114,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -222,6 +223,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -356,6 +358,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name value
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -464,6 +467,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketmapjoin9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketmapjoin9.q.out b/ql/src/test/results/clientpositive/bucketmapjoin9.q.out
index f8ce494..24a24e9 100644
--- a/ql/src/test/results/clientpositive/bucketmapjoin9.q.out
+++ b/ql/src/test/results/clientpositive/bucketmapjoin9.q.out
@@ -122,6 +122,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -222,6 +223,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -389,6 +391,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -489,6 +492,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketmapjoin_negative.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketmapjoin_negative.q.out b/ql/src/test/results/clientpositive/bucketmapjoin_negative.q.out
index e209dca..7c560d2 100644
--- a/ql/src/test/results/clientpositive/bucketmapjoin_negative.q.out
+++ b/ql/src/test/results/clientpositive/bucketmapjoin_negative.q.out
@@ -125,6 +125,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -193,6 +194,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -241,6 +243,7 @@ STAGE PLANS:
             properties:
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -262,6 +265,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -331,6 +335,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -374,6 +379,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value1,value2
                     columns.comments 
@@ -404,6 +410,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value1,value2
               columns.comments 
@@ -425,6 +432,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -461,6 +469,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value1,value2
                     columns.comments 
@@ -491,6 +500,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value1,value2
               columns.comments 
@@ -512,6 +522,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketmapjoin_negative2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketmapjoin_negative2.q.out b/ql/src/test/results/clientpositive/bucketmapjoin_negative2.q.out
index eeb4d3d..1260a58 100644
--- a/ql/src/test/results/clientpositive/bucketmapjoin_negative2.q.out
+++ b/ql/src/test/results/clientpositive/bucketmapjoin_negative2.q.out
@@ -134,6 +134,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -180,6 +181,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -256,6 +258,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -304,6 +307,7 @@ STAGE PLANS:
             properties:
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -325,6 +329,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -394,6 +399,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -437,6 +443,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value1,value2
                     columns.comments 
@@ -467,6 +474,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value1,value2
               columns.comments 
@@ -488,6 +496,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -524,6 +533,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value1,value2
                     columns.comments 
@@ -554,6 +564,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value1,value2
               columns.comments 
@@ -575,6 +586,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketmapjoin_negative3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketmapjoin_negative3.q.out b/ql/src/test/results/clientpositive/bucketmapjoin_negative3.q.out
index a3f6bc1..83e74a5 100644
--- a/ql/src/test/results/clientpositive/bucketmapjoin_negative3.q.out
+++ b/ql/src/test/results/clientpositive/bucketmapjoin_negative3.q.out
@@ -243,6 +243,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 3
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -265,6 +266,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 3
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -392,6 +394,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 3
               bucket_field_name value
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -414,6 +417,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 3
                 bucket_field_name value
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -533,6 +537,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 3
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -555,6 +560,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 3
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -674,6 +680,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 3
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -696,6 +703,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 3
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -815,6 +823,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 3
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -837,6 +846,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 3
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -956,6 +966,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 3
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -978,6 +989,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 3
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -1097,6 +1109,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 3
               bucket_field_name value
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -1119,6 +1132,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 3
                 bucket_field_name value
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -1238,6 +1252,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 3
               bucket_field_name value
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -1260,6 +1275,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 3
                 bucket_field_name value
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -1379,6 +1395,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 3
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -1401,6 +1418,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 3
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/sample1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/sample1.q.out b/ql/src/test/results/clientpositive/spark/sample1.q.out
index b711292..164378b 100644
--- a/ql/src/test/results/clientpositive/spark/sample1.q.out
+++ b/ql/src/test/results/clientpositive/spark/sample1.q.out
@@ -53,6 +53,7 @@ STAGE PLANS:
                             properties:
                               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"dt":"true","hr":"true","key":"true","value":"true"}}
                               bucket_count -1
+                              bucketing_version 2
                               column.name.delimiter ,
                               columns key,value,dt,hr
                               columns.comments 
@@ -109,6 +110,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'
@@ -138,6 +140,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"dt":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,dt,hr
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/sample10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/sample10.q.out b/ql/src/test/results/clientpositive/spark/sample10.q.out
index 418f63a..ac28779 100644
--- a/ql/src/test/results/clientpositive/spark/sample10.q.out
+++ b/ql/src/test/results/clientpositive/spark/sample10.q.out
@@ -34,10 +34,10 @@ POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-09,hr=11).value SIMPLE [(s
 POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-09,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: srcpartbucket PARTITION(ds=2008-04-09,hr=12).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: explain extended
-select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
+select ds, count(1) from srcpartbucket tablesample (bucket 2 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
 PREHOOK: type: QUERY
 POSTHOOK: query: explain extended
-select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
+select ds, count(1) from srcpartbucket tablesample (bucket 2 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
@@ -59,8 +59,8 @@ STAGE PLANS:
                   GatherStats: false
                   Filter Operator
                     isSamplingPred: true
-                    predicate: (((hash(key) & 2147483647) % 4) = 0) (type: boolean)
-                    sampleDesc: BUCKET 1 OUT OF 4
+                    predicate: (((hash(key) & 2147483647) % 4) = 1) (type: boolean)
+                    sampleDesc: BUCKET 2 OUT OF 4
                     Statistics: Num rows: 20 Data size: 120 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)
@@ -87,7 +87,7 @@ STAGE PLANS:
             Path -> Partition:
 #### A masked pattern was here ####
                 Partition
-                  base file name: 000000_0
+                  base file name: 000001_0
                   input format: org.apache.hadoop.hive.ql.io.RCFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                   partition values:
@@ -120,6 +120,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -137,7 +138,7 @@ STAGE PLANS:
                   name: default.srcpartbucket
 #### A masked pattern was here ####
                 Partition
-                  base file name: 000000_0
+                  base file name: 000001_0
                   input format: org.apache.hadoop.hive.ql.io.RCFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                   partition values:
@@ -170,6 +171,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -187,7 +189,7 @@ STAGE PLANS:
                   name: default.srcpartbucket
 #### A masked pattern was here ####
                 Partition
-                  base file name: 000000_0
+                  base file name: 000001_0
                   input format: org.apache.hadoop.hive.ql.io.RCFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                   partition values:
@@ -220,6 +222,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -237,7 +240,7 @@ STAGE PLANS:
                   name: default.srcpartbucket
 #### A masked pattern was here ####
                 Partition
-                  base file name: 000000_0
+                  base file name: 000001_0
                   input format: org.apache.hadoop.hive.ql.io.RCFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                   partition values:
@@ -270,6 +273,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -286,10 +290,10 @@ STAGE PLANS:
                     name: default.srcpartbucket
                   name: default.srcpartbucket
             Truncated Path -> Alias:
-              /srcpartbucket/ds=2008-04-08/hr=11/000000_0 [srcpartbucket]
-              /srcpartbucket/ds=2008-04-08/hr=12/000000_0 [srcpartbucket]
-              /srcpartbucket/ds=2008-04-09/hr=11/000000_0 [srcpartbucket]
-              /srcpartbucket/ds=2008-04-09/hr=12/000000_0 [srcpartbucket]
+              /srcpartbucket/ds=2008-04-08/hr=11/000001_0 [srcpartbucket]
+              /srcpartbucket/ds=2008-04-08/hr=12/000001_0 [srcpartbucket]
+              /srcpartbucket/ds=2008-04-09/hr=11/000001_0 [srcpartbucket]
+              /srcpartbucket/ds=2008-04-09/hr=12/000001_0 [srcpartbucket]
         Reducer 2 
             Execution mode: vectorized
             Needs Tagging: false
@@ -345,7 +349,7 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
+PREHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 2 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@srcpartbucket
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=11
@@ -353,7 +357,7 @@ PREHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=12
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=11
 PREHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=12
 #### A masked pattern was here ####
-POSTHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
+POSTHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 2 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcpartbucket
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=11
@@ -361,8 +365,8 @@ POSTHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=12
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=11
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=12
 #### A masked pattern was here ####
-2008-04-08	10
-2008-04-09	10
+2008-04-08	14
+2008-04-09	14
 PREHOOK: query: select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 2 on key) where ds is not null group by ds ORDER BY ds ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@srcpartbucket
@@ -379,8 +383,8 @@ POSTHOOK: Input: default@srcpartbucket@ds=2008-04-08/hr=12
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=11
 POSTHOOK: Input: default@srcpartbucket@ds=2008-04-09/hr=12
 #### A masked pattern was here ####
-2008-04-08	12
-2008-04-09	12
+2008-04-08	4
+2008-04-09	4
 PREHOOK: query: select * from srcpartbucket where ds is not null ORDER BY key ASC, value ASC, ds ASC, hr ASC
 PREHOOK: type: QUERY
 PREHOOK: Input: default@srcpartbucket

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/sample2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/sample2.q.out b/ql/src/test/results/clientpositive/spark/sample2.q.out
index 0515532..9ced901 100644
--- a/ql/src/test/results/clientpositive/spark/sample2.q.out
+++ b/ql/src/test/results/clientpositive/spark/sample2.q.out
@@ -52,6 +52,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 
@@ -84,6 +85,7 @@ STAGE PLANS:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -106,6 +108,7 @@ STAGE PLANS:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -137,6 +140,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 
@@ -181,205 +185,188 @@ order by key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@dest1
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
-0	val_1
-0	val_1
 2	val_2
 2	val_3
-4	val_4
-4	val_5
+3	val_4
 6	val_7
 6	val_7
-8	val_8
-8	val_9
 10	val_10
 10	val_11
-12	val_12
-12	val_12
-12	val_13
-16	val_17
-16	val_17
-18	val_18
-18	val_18
+17	val_17
+19	val_19
+19	val_20
 20	val_20
 20	val_21
 20	val_21
-22	val_23
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
+21	val_22
+21	val_22
+21	val_22
+21	val_22
+27	val_27
+29	val_30
+29	val_30
 30	val_30
 30	val_31
-32	val_33
-34	val_34
+31	val_32
 40	val_41
 40	val_41
-42	val_42
-42	val_42
-42	val_43
-42	val_43
-42	val_43
-44	val_44
+41	val_41
+43	val_43
 46	val_47
 48	val_49
 48	val_49
-50	val_51
-52	val_53
-52	val_53
-52	val_53
-52	val_53
+51	val_51
+51	val_51
+51	val_52
 54	val_54
-56	val_57
+57	val_57
 58	val_58
 58	val_58
 58	val_59
 58	val_59
+59	val_60
 60	val_61
-62	val_63
-62	val_63
+61	val_62
 64	val_64
-66	val_66
+65	val_65
+65	val_66
+65	val_66
+67	val_67
+67	val_67
 68	val_69
+69	val_69
+69	val_70
 70	val_70
 70	val_70
 70	val_70
 70	val_71
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-76	val_77
-76	val_77
-76	val_77
-78	val_78
-78	val_79
+77	val_77
+77	val_78
+77	val_78
 80	val_80
 80	val_81
-82	val_82
-82	val_83
-82	val_83
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
+85	val_86
 86	val_86
 86	val_87
+89	val_90
+89	val_90
+89	val_90
 90	val_90
 90	val_90
 90	val_90
-92	val_92
-94	val_95
+91	val_92
+93	val_94
+93	val_94
+93	val_94
 96	val_96
+97	val_97
+97	val_97
+97	val_98
+97	val_98
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-100	val_101
-100	val_101
-102	val_103
-104	val_104
-104	val_104
-104	val_105
-104	val_105
-104	val_105
+99	val_100
+101	val_102
+105	val_105
+105	val_106
+105	val_106
 106	val_107
 110	val_111
-114	val_114
-114	val_115
-114	val_115
-114	val_115
+113	val_113
+113	val_113
 116	val_116
 116	val_117
-118	val_118
-118	val_118
-118	val_119
-118	val_119
-118	val_119
-120	val_120
-120	val_120
-120	val_121
-122	val_123
-122	val_123
-122	val_123
+117	val_118
+117	val_118
+119	val_119
+119	val_119
+119	val_119
+119	val_120
+119	val_120
+119	val_120
+121	val_122
+121	val_122
+123	val_124
+123	val_124
 126	val_126
 126	val_127
 126	val_127
-128	val_128
-128	val_128
-128	val_128
-128	val_129
-128	val_129
 132	val_133
 132	val_133
+133	val_133
+133	val_134
 134	val_134
 134	val_134
 134	val_135
-136	val_136
-136	val_137
-138	val_138
-138	val_138
-138	val_138
-138	val_138
-138	val_139
-138	val_139
+135	val_136
+135	val_136
+135	val_136
+137	val_137
+137	val_137
+137	val_138
 140	val_141
-144	val_145
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
-152	val_153
-152	val_153
-152	val_153
+149	val_149
+149	val_149
+149	val_150
+153	val_153
+153	val_154
+153	val_154
 156	val_156
 156	val_157
 156	val_157
+157	val_157
+157	val_158
+157	val_158
 158	val_158
-160	val_160
-160	val_161
 162	val_162
 162	val_163
+163	val_163
 164	val_164
 164	val_164
 164	val_165
 164	val_165
-166	val_166
-168	val_168
-168	val_169
-170	val_170
-170	val_171
-172	val_172
-172	val_172
-172	val_173
-174	val_174
-174	val_174
-174	val_175
-174	val_175
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+165	val_166
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+177	val_177
+177	val_178
+177	val_178
 178	val_178
 178	val_179
 178	val_179
-180	val_180
+181	val_181
 182	val_183
 184	val_185
-186	val_186
+185	val_186
+187	val_187
+187	val_187
+187	val_187
 190	val_190
-192	val_192
-192	val_193
-194	val_194
-196	val_196
-196	val_197
-196	val_197
-196	val_197
-200	val_200
-200	val_200
+191	val_191
+191	val_191
+191	val_192
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+197	val_198
+199	val_199
+199	val_199
+199	val_199
+199	val_200
+201	val_201
 202	val_202
-204	val_205
 206	val_207
 206	val_207
 206	val_207
@@ -388,95 +375,80 @@ POSTHOOK: Input: default@dest1
 208	val_208
 212	val_213
 214	val_214
+215	val_216
 216	val_216
 216	val_216
 216	val_217
-218	val_218
-222	val_222
-222	val_223
-224	val_224
-224	val_224
-224	val_225
+221	val_221
+221	val_221
 226	val_226
 226	val_227
 226	val_227
 226	val_227
 226	val_227
-228	val_228
-228	val_229
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+231	val_232
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
 238	val_239
+239	val_239
+239	val_239
+239	val_240
+239	val_240
 240	val_241
-242	val_242
-242	val_242
-242	val_243
+243	val_244
+243	val_244
 244	val_244
 244	val_245
 244	val_245
 244	val_245
-246	val_247
-246	val_247
 248	val_248
 248	val_249
+249	val_249
+249	val_250
+249	val_250
 252	val_252
 252	val_253
 254	val_255
+255	val_255
+255	val_255
 256	val_256
 256	val_256
 256	val_257
-258	val_258
-258	val_259
 260	val_260
 260	val_261
 260	val_261
-262	val_262
-262	val_263
-262	val_263
-264	val_265
-264	val_265
+261	val_262
 266	val_266
-268	val_269
+271	val_272
 272	val_272
 272	val_272
 272	val_273
-274	val_274
-274	val_275
 276	val_277
-278	val_278
-278	val_278
-278	val_279
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 284	val_285
 284	val_285
 286	val_286
 286	val_287
-288	val_288
-288	val_288
+287	val_287
+287	val_288
+287	val_288
+289	val_289
+289	val_290
+291	val_291
+291	val_292
+291	val_292
 292	val_292
 292	val_293
 292	val_293
-296	val_296
-296	val_297
-298	val_298
-298	val_298
-298	val_298
-300	val_301
-300	val_301
-302	val_302
-302	val_303
 304	val_305
-306	val_306
-306	val_307
+307	val_307
+307	val_307
 308	val_308
 308	val_309
 308	val_309
@@ -484,63 +456,83 @@ POSTHOOK: Input: default@dest1
 310	val_311
 310	val_311
 310	val_311
-314	val_315
+311	val_311
+311	val_311
+311	val_311
+313	val_314
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-318	val_319
-322	val_322
-322	val_322
-322	val_323
+317	val_317
+317	val_317
+317	val_318
 324	val_325
+325	val_325
+325	val_325
 326	val_327
-328	val_329
-328	val_329
-330	val_331
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 334	val_335
 336	val_336
 336	val_337
+337	val_338
 338	val_338
 338	val_339
-340	val_341
+339	val_339
+341	val_341
+341	val_342
+341	val_342
+341	val_342
 342	val_342
 342	val_342
 342	val_343
+343	val_344
 344	val_344
 344	val_344
 344	val_345
+347	val_348
+347	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_349
+349	val_350
+349	val_350
+349	val_350
+349	val_350
+351	val_351
+351	val_352
+351	val_352
 352	val_353
 352	val_353
-356	val_356
-356	val_357
-356	val_357
-358	val_359
+353	val_353
+353	val_353
+353	val_354
+355	val_356
+355	val_356
 360	val_360
 360	val_361
 362	val_362
 364	val_364
 364	val_365
-366	val_366
+365	val_365
 368	val_368
-374	val_374
-374	val_375
-376	val_377
+369	val_369
+369	val_369
+369	val_369
+369	val_370
+371	val_372
+371	val_372
+371	val_372
+371	val_372
+377	val_377
 378	val_378
 378	val_379
-382	val_382
-382	val_382
-382	val_383
-382	val_383
 384	val_384
 384	val_384
 384	val_384
@@ -551,18 +543,24 @@ POSTHOOK: Input: default@dest1
 386	val_387
 386	val_387
 388	val_389
-390	val_391
-390	val_391
-390	val_391
+391	val_392
+391	val_392
 392	val_392
 392	val_393
 392	val_393
+393	val_393
+393	val_394
+393	val_394
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-398	val_399
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
+399	val_400
+399	val_400
 402	val_402
 402	val_403
 402	val_403
@@ -572,25 +570,36 @@ POSTHOOK: Input: default@dest1
 404	val_405
 404	val_405
 404	val_405
-406	val_406
-406	val_406
-406	val_406
-406	val_406
-406	val_407
+407	val_407
+407	val_408
+407	val_408
+407	val_408
 408	val_409
 408	val_409
+409	val_409
+409	val_409
+409	val_409
+409	val_410
+409	val_410
 410	val_411
-412	val_413
-412	val_413
+411	val_411
+411	val_412
 414	val_414
 414	val_414
 414	val_415
-416	val_417
-418	val_418
-424	val_424
-424	val_424
-424	val_425
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+421	val_422
+421	val_422
+423	val_424
+425	val_426
 426	val_427
+427	val_427
+427	val_428
+427	val_428
 428	val_429
 430	val_430
 430	val_430
@@ -598,25 +607,24 @@ POSTHOOK: Input: default@dest1
 430	val_431
 432	val_432
 432	val_433
-436	val_436
-436	val_437
-438	val_438
-438	val_438
-438	val_438
-438	val_439
-438	val_439
+435	val_435
+435	val_436
+437	val_437
+437	val_438
 440	val_441
 440	val_441
-442	val_443
+443	val_443
+443	val_444
+443	val_444
+443	val_444
 444	val_444
 446	val_446
 446	val_447
 446	val_447
-448	val_448
-448	val_449
-450	val_451
-450	val_451
+449	val_449
 452	val_452
+453	val_453
+453	val_454
 454	val_454
 454	val_454
 454	val_454
@@ -624,23 +632,19 @@ POSTHOOK: Input: default@dest1
 454	val_455
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
-462	val_463
+459	val_459
+459	val_459
+459	val_460
+463	val_463
+463	val_463
+463	val_464
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-468	val_469
-468	val_469
-468	val_469
-470	val_470
-470	val_471
+467	val_467
+467	val_468
 472	val_472
+473	val_474
 474	val_475
 474	val_475
 476	val_477
@@ -649,6 +653,7 @@ POSTHOOK: Input: default@dest1
 478	val_478
 478	val_479
 478	val_479
+479	val_479
 480	val_480
 480	val_480
 480	val_480
@@ -656,21 +661,23 @@ POSTHOOK: Input: default@dest1
 480	val_481
 482	val_482
 482	val_483
+483	val_483
 484	val_484
 484	val_485
-486	val_487
+485	val_485
+485	val_486
+485	val_486
 488	val_489
 490	val_490
 490	val_491
-492	val_492
-492	val_492
-492	val_493
-492	val_493
-494	val_494
-494	val_495
-494	val_495
-496	val_496
-496	val_497
+491	val_491
+491	val_492
+491	val_492
+495	val_495
+495	val_496
+497	val_497
+497	val_498
+497	val_498
 498	val_498
 498	val_498
 498	val_498

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/sample3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/sample3.q.out b/ql/src/test/results/clientpositive/spark/sample3.q.out
index 667d5c3..e979f1e 100644
--- a/ql/src/test/results/clientpositive/spark/sample3.q.out
+++ b/ql/src/test/results/clientpositive/spark/sample3.q.out
@@ -33,192 +33,221 @@ FROM srcbucket TABLESAMPLE (BUCKET 1 OUT OF 5 on key) s SORT BY key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket
 #### A masked pattern was here ####
-0
-0
-0
-0
-0
-10
-10
-100
-100
-100
-100
-105
-105
-105
-110
-120
-120
-120
+1
+103
+103
+122
+122
+122
 125
 125
 125
-135
-135
-135
-140
-145
-15
-15
-15
-15
-150
+133
+133
+147
+147
 155
-160
-160
+16
+16
+161
+161
+161
+161
+162
+162
+163
 165
 165
 165
-170
-170
-175
-175
-175
-175
-180
-185
-190
-195
-195
-20
-20
-20
-200
-200
-205
-205
-205
-215
+18
+18
+194
+196
+196
+196
+196
+21
+21
+21
+21
+222
+222
 230
 230
 230
 230
 230
-235
-235
+237
+237
+238
+238
+238
+24
+24
 240
-245
-245
-255
-255
+246
+246
+256
+256
+256
 260
 260
 260
-265
-265
-265
+264
+264
+273
+273
+273
+273
 275
 275
 275
-280
-280
-285
-285
-295
-295
-30
-30
-300
-300
+276
+278
+278
+278
+288
+288
+289
+289
+296
+296
+302
+302
 305
 305
-310
-310
-310
-310
-315
-325
-325
-330
+311
+311
+311
+32
+323
+323
+33
+33
+332
 335
 335
 335
-340
-345
+344
+344
+344
 35
 35
 35
 35
 35
 35
+352
+352
 355
 355
-360
-360
-365
-375
-375
-375
-375
-375
-375
-385
-385
-390
-390
-390
-395
-395
-395
-395
-40
-40
-400
+362
+366
+369
+369
+369
+369
+37
+37
+373
+373
+379
+379
+391
+391
+393
+393
+393
+397
+397
 405
+407
+407
+407
+407
+41
 410
-415
+411
+411
+416
 425
-430
-430
-430
-430
+43
+432
+432
 435
 435
-440
-440
+436
+436
+439
+439
+439
+439
+441
 450
 450
+453
+453
+454
+454
+454
+454
+454
 455
 455
 455
 460
+466
+466
+466
+469
+469
+469
+469
+469
+469
 470
 470
-475
-475
-480
-480
-480
-480
-480
-485
-485
-485
-490
-490
-495
-495
-5
-5
-5
-5
-50
-60
-65
-65
-65
-70
-70
-70
-70
-75
-80
-80
-85
-85
-90
-90
-90
-95
-95
+481
+481
+484
+484
+492
+492
+492
+492
+493
+494
+494
+494
+498
+498
+498
+51
+51
+51
+52
+52
+52
+52
+53
+53
+54
+61
+68
+69
+69
+72
+72
+8
+8
+87
+87
+87
+89
+89
+89
+91
+93
+93
+93
+96

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/sample4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/sample4.q.out b/ql/src/test/results/clientpositive/spark/sample4.q.out
index 330fa64..77c6a4a 100644
--- a/ql/src/test/results/clientpositive/spark/sample4.q.out
+++ b/ql/src/test/results/clientpositive/spark/sample4.q.out
@@ -52,6 +52,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 
@@ -84,6 +85,7 @@ STAGE PLANS:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -106,6 +108,7 @@ STAGE PLANS:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -137,6 +140,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 
@@ -181,205 +185,188 @@ order by key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@dest1
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
-0	val_1
-0	val_1
 2	val_2
 2	val_3
-4	val_4
-4	val_5
+3	val_4
 6	val_7
 6	val_7
-8	val_8
-8	val_9
 10	val_10
 10	val_11
-12	val_12
-12	val_12
-12	val_13
-16	val_17
-16	val_17
-18	val_18
-18	val_18
+17	val_17
+19	val_19
+19	val_20
 20	val_20
 20	val_21
 20	val_21
-22	val_23
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
+21	val_22
+21	val_22
+21	val_22
+21	val_22
+27	val_27
+29	val_30
+29	val_30
 30	val_30
 30	val_31
-32	val_33
-34	val_34
+31	val_32
 40	val_41
 40	val_41
-42	val_42
-42	val_42
-42	val_43
-42	val_43
-42	val_43
-44	val_44
+41	val_41
+43	val_43
 46	val_47
 48	val_49
 48	val_49
-50	val_51
-52	val_53
-52	val_53
-52	val_53
-52	val_53
+51	val_51
+51	val_51
+51	val_52
 54	val_54
-56	val_57
+57	val_57
 58	val_58
 58	val_58
 58	val_59
 58	val_59
+59	val_60
 60	val_61
-62	val_63
-62	val_63
+61	val_62
 64	val_64
-66	val_66
+65	val_65
+65	val_66
+65	val_66
+67	val_67
+67	val_67
 68	val_69
+69	val_69
+69	val_70
 70	val_70
 70	val_70
 70	val_70
 70	val_71
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-76	val_77
-76	val_77
-76	val_77
-78	val_78
-78	val_79
+77	val_77
+77	val_78
+77	val_78
 80	val_80
 80	val_81
-82	val_82
-82	val_83
-82	val_83
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
+85	val_86
 86	val_86
 86	val_87
+89	val_90
+89	val_90
+89	val_90
 90	val_90
 90	val_90
 90	val_90
-92	val_92
-94	val_95
+91	val_92
+93	val_94
+93	val_94
+93	val_94
 96	val_96
+97	val_97
+97	val_97
+97	val_98
+97	val_98
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-100	val_101
-100	val_101
-102	val_103
-104	val_104
-104	val_104
-104	val_105
-104	val_105
-104	val_105
+99	val_100
+101	val_102
+105	val_105
+105	val_106
+105	val_106
 106	val_107
 110	val_111
-114	val_114
-114	val_115
-114	val_115
-114	val_115
+113	val_113
+113	val_113
 116	val_116
 116	val_117
-118	val_118
-118	val_118
-118	val_119
-118	val_119
-118	val_119
-120	val_120
-120	val_120
-120	val_121
-122	val_123
-122	val_123
-122	val_123
+117	val_118
+117	val_118
+119	val_119
+119	val_119
+119	val_119
+119	val_120
+119	val_120
+119	val_120
+121	val_122
+121	val_122
+123	val_124
+123	val_124
 126	val_126
 126	val_127
 126	val_127
-128	val_128
-128	val_128
-128	val_128
-128	val_129
-128	val_129
 132	val_133
 132	val_133
+133	val_133
+133	val_134
 134	val_134
 134	val_134
 134	val_135
-136	val_136
-136	val_137
-138	val_138
-138	val_138
-138	val_138
-138	val_138
-138	val_139
-138	val_139
+135	val_136
+135	val_136
+135	val_136
+137	val_137
+137	val_137
+137	val_138
 140	val_141
-144	val_145
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
-152	val_153
-152	val_153
-152	val_153
+149	val_149
+149	val_149
+149	val_150
+153	val_153
+153	val_154
+153	val_154
 156	val_156
 156	val_157
 156	val_157
+157	val_157
+157	val_158
+157	val_158
 158	val_158
-160	val_160
-160	val_161
 162	val_162
 162	val_163
+163	val_163
 164	val_164
 164	val_164
 164	val_165
 164	val_165
-166	val_166
-168	val_168
-168	val_169
-170	val_170
-170	val_171
-172	val_172
-172	val_172
-172	val_173
-174	val_174
-174	val_174
-174	val_175
-174	val_175
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+165	val_166
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+177	val_177
+177	val_178
+177	val_178
 178	val_178
 178	val_179
 178	val_179
-180	val_180
+181	val_181
 182	val_183
 184	val_185
-186	val_186
+185	val_186
+187	val_187
+187	val_187
+187	val_187
 190	val_190
-192	val_192
-192	val_193
-194	val_194
-196	val_196
-196	val_197
-196	val_197
-196	val_197
-200	val_200
-200	val_200
+191	val_191
+191	val_191
+191	val_192
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+197	val_198
+199	val_199
+199	val_199
+199	val_199
+199	val_200
+201	val_201
 202	val_202
-204	val_205
 206	val_207
 206	val_207
 206	val_207
@@ -388,95 +375,80 @@ POSTHOOK: Input: default@dest1
 208	val_208
 212	val_213
 214	val_214
+215	val_216
 216	val_216
 216	val_216
 216	val_217
-218	val_218
-222	val_222
-222	val_223
-224	val_224
-224	val_224
-224	val_225
+221	val_221
+221	val_221
 226	val_226
 226	val_227
 226	val_227
 226	val_227
 226	val_227
-228	val_228
-228	val_229
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+231	val_232
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
 238	val_239
+239	val_239
+239	val_239
+239	val_240
+239	val_240
 240	val_241
-242	val_242
-242	val_242
-242	val_243
+243	val_244
+243	val_244
 244	val_244
 244	val_245
 244	val_245
 244	val_245
-246	val_247
-246	val_247
 248	val_248
 248	val_249
+249	val_249
+249	val_250
+249	val_250
 252	val_252
 252	val_253
 254	val_255
+255	val_255
+255	val_255
 256	val_256
 256	val_256
 256	val_257
-258	val_258
-258	val_259
 260	val_260
 260	val_261
 260	val_261
-262	val_262
-262	val_263
-262	val_263
-264	val_265
-264	val_265
+261	val_262
 266	val_266
-268	val_269
+271	val_272
 272	val_272
 272	val_272
 272	val_273
-274	val_274
-274	val_275
 276	val_277
-278	val_278
-278	val_278
-278	val_279
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 284	val_285
 284	val_285
 286	val_286
 286	val_287
-288	val_288
-288	val_288
+287	val_287
+287	val_288
+287	val_288
+289	val_289
+289	val_290
+291	val_291
+291	val_292
+291	val_292
 292	val_292
 292	val_293
 292	val_293
-296	val_296
-296	val_297
-298	val_298
-298	val_298
-298	val_298
-300	val_301
-300	val_301
-302	val_302
-302	val_303
 304	val_305
-306	val_306
-306	val_307
+307	val_307
+307	val_307
 308	val_308
 308	val_309
 308	val_309
@@ -484,63 +456,83 @@ POSTHOOK: Input: default@dest1
 310	val_311
 310	val_311
 310	val_311
-314	val_315
+311	val_311
+311	val_311
+311	val_311
+313	val_314
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-318	val_319
-322	val_322
-322	val_322
-322	val_323
+317	val_317
+317	val_317
+317	val_318
 324	val_325
+325	val_325
+325	val_325
 326	val_327
-328	val_329
-328	val_329
-330	val_331
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 334	val_335
 336	val_336
 336	val_337
+337	val_338
 338	val_338
 338	val_339
-340	val_341
+339	val_339
+341	val_341
+341	val_342
+341	val_342
+341	val_342
 342	val_342
 342	val_342
 342	val_343
+343	val_344
 344	val_344
 344	val_344
 344	val_345
+347	val_348
+347	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_349
+349	val_350
+349	val_350
+349	val_350
+349	val_350
+351	val_351
+351	val_352
+351	val_352
 352	val_353
 352	val_353
-356	val_356
-356	val_357
-356	val_357
-358	val_359
+353	val_353
+353	val_353
+353	val_354
+355	val_356
+355	val_356
 360	val_360
 360	val_361
 362	val_362
 364	val_364
 364	val_365
-366	val_366
+365	val_365
 368	val_368
-374	val_374
-374	val_375
-376	val_377
+369	val_369
+369	val_369
+369	val_369
+369	val_370
+371	val_372
+371	val_372
+371	val_372
+371	val_372
+377	val_377
 378	val_378
 378	val_379
-382	val_382
-382	val_382
-382	val_383
-382	val_383
 384	val_384
 384	val_384
 384	val_384
@@ -551,18 +543,24 @@ POSTHOOK: Input: default@dest1
 386	val_387
 386	val_387
 388	val_389
-390	val_391
-390	val_391
-390	val_391
+391	val_392
+391	val_392
 392	val_392
 392	val_393
 392	val_393
+393	val_393
+393	val_394
+393	val_394
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-398	val_399
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
+399	val_400
+399	val_400
 402	val_402
 402	val_403
 402	val_403
@@ -572,25 +570,36 @@ POSTHOOK: Input: default@dest1
 404	val_405
 404	val_405
 404	val_405
-406	val_406
-406	val_406
-406	val_406
-406	val_406
-406	val_407
+407	val_407
+407	val_408
+407	val_408
+407	val_408
 408	val_409
 408	val_409
+409	val_409
+409	val_409
+409	val_409
+409	val_410
+409	val_410
 410	val_411
-412	val_413
-412	val_413
+411	val_411
+411	val_412
 414	val_414
 414	val_414
 414	val_415
-416	val_417
-418	val_418
-424	val_424
-424	val_424
-424	val_425
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+421	val_422
+421	val_422
+423	val_424
+425	val_426
 426	val_427
+427	val_427
+427	val_428
+427	val_428
 428	val_429
 430	val_430
 430	val_430
@@ -598,25 +607,24 @@ POSTHOOK: Input: default@dest1
 430	val_431
 432	val_432
 432	val_433
-436	val_436
-436	val_437
-438	val_438
-438	val_438
-438	val_438
-438	val_439
-438	val_439
+435	val_435
+435	val_436
+437	val_437
+437	val_438
 440	val_441
 440	val_441
-442	val_443
+443	val_443
+443	val_444
+443	val_444
+443	val_444
 444	val_444
 446	val_446
 446	val_447
 446	val_447
-448	val_448
-448	val_449
-450	val_451
-450	val_451
+449	val_449
 452	val_452
+453	val_453
+453	val_454
 454	val_454
 454	val_454
 454	val_454
@@ -624,23 +632,19 @@ POSTHOOK: Input: default@dest1
 454	val_455
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
-462	val_463
+459	val_459
+459	val_459
+459	val_460
+463	val_463
+463	val_463
+463	val_464
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-468	val_469
-468	val_469
-468	val_469
-470	val_470
-470	val_471
+467	val_467
+467	val_468
 472	val_472
+473	val_474
 474	val_475
 474	val_475
 476	val_477
@@ -649,6 +653,7 @@ POSTHOOK: Input: default@dest1
 478	val_478
 478	val_479
 478	val_479
+479	val_479
 480	val_480
 480	val_480
 480	val_480
@@ -656,21 +661,23 @@ POSTHOOK: Input: default@dest1
 480	val_481
 482	val_482
 482	val_483
+483	val_483
 484	val_484
 484	val_485
-486	val_487
+485	val_485
+485	val_486
+485	val_486
 488	val_489
 490	val_490
 490	val_491
-492	val_492
-492	val_492
-492	val_493
-492	val_493
-494	val_494
-494	val_495
-494	val_495
-496	val_496
-496	val_497
+491	val_491
+491	val_492
+491	val_492
+495	val_495
+495	val_496
+497	val_497
+497	val_498
+497	val_498
 498	val_498
 498	val_498
 498	val_498

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/sample5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/sample5.q.out b/ql/src/test/results/clientpositive/spark/sample5.q.out
index c4f6541..a0a7678 100644
--- a/ql/src/test/results/clientpositive/spark/sample5.q.out
+++ b/ql/src/test/results/clientpositive/spark/sample5.q.out
@@ -53,6 +53,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 
@@ -85,6 +86,7 @@ STAGE PLANS:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -107,6 +109,7 @@ STAGE PLANS:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -138,6 +141,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 
@@ -182,192 +186,221 @@ POSTHOOK: query: SELECT dest1.* FROM dest1 SORT BY key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@dest1
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
-0	val_1
-0	val_1
-10	val_10
-10	val_11
-100	val_100
-100	val_100
-100	val_101
-100	val_101
-105	val_105
-105	val_106
-105	val_106
-110	val_111
-120	val_120
-120	val_120
-120	val_121
+1	val_2
+103	val_103
+103	val_103
+122	val_123
+122	val_123
+122	val_123
 125	val_125
 125	val_125
 125	val_126
-135	val_136
-135	val_136
-135	val_136
-140	val_141
-145	val_145
-15	val_15
-15	val_15
-15	val_16
-15	val_16
-150	val_150
+133	val_133
+133	val_134
+147	val_148
+147	val_148
 155	val_155
-160	val_160
-160	val_161
+16	val_17
+16	val_17
+161	val_162
+161	val_162
+161	val_162
+161	val_162
+162	val_162
+162	val_163
+163	val_163
 165	val_165
 165	val_165
 165	val_166
-170	val_170
-170	val_171
-175	val_175
-175	val_175
-175	val_176
-175	val_176
-180	val_180
-185	val_186
-190	val_190
-195	val_195
-195	val_195
-20	val_20
-20	val_21
-20	val_21
-200	val_200
-200	val_200
-205	val_205
-205	val_205
-205	val_206
-215	val_216
+18	val_18
+18	val_18
+194	val_194
+196	val_196
+196	val_197
+196	val_197
+196	val_197
+21	val_22
+21	val_22
+21	val_22
+21	val_22
+222	val_222
+222	val_223
 230	val_230
 230	val_230
 230	val_230
 230	val_230
 230	val_230
-235	val_235
-235	val_236
+237	val_237
+237	val_237
+238	val_238
+238	val_238
+238	val_239
+24	val_24
+24	val_24
 240	val_241
-245	val_246
-245	val_246
-255	val_255
-255	val_255
+246	val_247
+246	val_247
+256	val_256
+256	val_256
+256	val_257
 260	val_260
 260	val_261
 260	val_261
-265	val_265
-265	val_265
-265	val_266
+264	val_265
+264	val_265
+273	val_273
+273	val_273
+273	val_273
+273	val_274
 275	val_275
 275	val_276
 275	val_276
-280	val_280
-280	val_280
-285	val_285
-285	val_286
-295	val_296
-295	val_296
-30	val_30
-30	val_31
-300	val_301
-300	val_301
+276	val_277
+278	val_278
+278	val_278
+278	val_279
+288	val_288
+288	val_288
+289	val_289
+289	val_290
+296	val_296
+296	val_297
+302	val_302
+302	val_303
 305	val_305
 305	val_306
-310	val_310
-310	val_311
-310	val_311
-310	val_311
-315	val_315
-325	val_325
-325	val_325
-330	val_331
+311	val_311
+311	val_311
+311	val_311
+32	val_33
+323	val_323
+323	val_324
+33	val_33
+33	val_34
+332	val_332
 335	val_335
 335	val_336
 335	val_336
-340	val_341
-345	val_345
+344	val_344
+344	val_344
+344	val_345
 35	val_35
 35	val_35
 35	val_35
 35	val_36
 35	val_36
 35	val_36
+352	val_353
+352	val_353
 355	val_356
 355	val_356
-360	val_360
-360	val_361
-365	val_365
-375	val_375
-375	val_376
-375	val_376
-375	val_376
-375	val_376
-375	val_376
-385	val_386
-385	val_386
-390	val_391
-390	val_391
-390	val_391
-395	val_395
-395	val_395
-395	val_396
-395	val_396
-40	val_41
-40	val_41
-400	val_400
+362	val_362
+366	val_366
+369	val_369
+369	val_369
+369	val_369
+369	val_370
+37	val_37
+37	val_37
+373	val_373
+373	val_374
+379	val_379
+379	val_380
+391	val_392
+391	val_392
+393	val_393
+393	val_394
+393	val_394
+397	val_397
+397	val_397
 405	val_406
+407	val_407
+407	val_408
+407	val_408
+407	val_408
+41	val_41
 410	val_411
-415	val_416
+411	val_411
+411	val_412
+416	val_417
 425	val_426
-430	val_430
-430	val_430
-430	val_430
-430	val_431
+43	val_43
+432	val_432
+432	val_433
 435	val_435
 435	val_436
-440	val_441
-440	val_441
+436	val_436
+436	val_437
+439	val_439
+439	val_439
+439	val_440
+439	val_440
+441	val_442
 450	val_451
 450	val_451
+453	val_453
+453	val_454
+454	val_454
+454	val_454
+454	val_454
+454	val_455
+454	val_455
 455	val_455
 455	val_456
 455	val_456
 460	val_460
+466	val_466
+466	val_466
+466	val_466
+469	val_469
+469	val_469
+469	val_469
+469	val_469
+469	val_469
+469	val_470
 470	val_470
 470	val_471
-475	val_475
-475	val_476
-480	val_480
-480	val_480
-480	val_480
-480	val_481
-480	val_481
-485	val_485
-485	val_486
-485	val_486
-490	val_490
-490	val_491
-495	val_495
-495	val_496
-5	val_5
-5	val_5
-5	val_5
-5	val_6
-50	val_51
-60	val_61
-65	val_65
-65	val_66
-65	val_66
-70	val_70
-70	val_70
-70	val_70
-70	val_71
-75	val_76
-80	val_80
-80	val_81
-85	val_85
-85	val_86
-90	val_90
-90	val_90
-90	val_90
-95	val_95
-95	val_95
+481	val_481
+481	val_482
+484	val_484
+484	val_485
+492	val_492
+492	val_492
+492	val_493
+492	val_493
+493	val_493
+494	val_494
+494	val_495
+494	val_495
+498	val_498
+498	val_498
+498	val_498
+51	val_51
+51	val_51
+51	val_52
+52	val_53
+52	val_53
+52	val_53
+52	val_53
+53	val_53
+53	val_54
+54	val_54
+61	val_62
+68	val_69
+69	val_69
+69	val_70
+72	val_72
+72	val_72
+8	val_8
+8	val_9
+87	val_87
+87	val_88
+87	val_88
+89	val_90
+89	val_90
+89	val_90
+91	val_92
+93	val_94
+93	val_94
+93	val_94
+96	val_96


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

Posted by dj...@apache.org.
HIVE-18910 : Migrate to Murmur hash for shuffle and bucketing (Deepak Jaiswal, reviewed by Jasone Dere)


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

Branch: refs/heads/master
Commit: ac6b2a3fb195916e22b2e5f465add2ffbcdc7430
Parents: a095c3d
Author: Deepak Jaiswal <dj...@apache.org>
Authored: Sun Apr 29 22:24:15 2018 -0700
Committer: Deepak Jaiswal <dj...@apache.org>
Committed: Sun Apr 29 22:24:15 2018 -0700

----------------------------------------------------------------------
 .../results/positive/external_table_ppd.q.out   |     1 +
 .../positive/hbase_binary_storage_queries.q.out |     2 +
 .../src/test/results/positive/hbase_ddl.q.out   |     2 +
 .../src/test/results/positive/hbasestats.q.out  |     5 +
 .../streaming/AbstractRecordWriter.java         |     9 +-
 .../hive/hcatalog/streaming/TestStreaming.java  |    10 +-
 .../mutate/worker/TestBucketIdResolverImpl.java |     2 +-
 .../org/apache/hive/hcatalog/api/HCatTable.java |     4 +
 .../hive/hcatalog/api/TestHCatClient.java       |     2 +
 .../insert_into_dynamic_partitions.q.out        |     4 +
 .../clientpositive/insert_into_table.q.out      |    11 +
 .../insert_overwrite_directory.q.out            |     4 +
 .../insert_overwrite_dynamic_partitions.q.out   |     4 +
 .../clientpositive/insert_overwrite_table.q.out |    11 +
 .../write_final_output_blobstore.q.out          |     8 +
 .../hive/ql/txn/compactor/TestCompactor.java    |     2 +-
 .../test/resources/testconfiguration.properties |     6 +-
 .../hadoop/hive/ql/exec/FileSinkOperator.java   |    16 +-
 .../hadoop/hive/ql/exec/FunctionRegistry.java   |     1 +
 .../apache/hadoop/hive/ql/exec/Operator.java    |     9 +
 .../hadoop/hive/ql/exec/OperatorFactory.java    |     3 +
 .../hadoop/hive/ql/exec/ReduceSinkOperator.java |    44 +-
 .../apache/hadoop/hive/ql/exec/Utilities.java   |    13 +
 .../bootstrap/load/table/LoadPartitions.java    |     3 +-
 .../VectorKeySeriesSerializedImpl.java          |     4 +-
 .../VectorReduceSinkObjectHashOperator.java     |   135 +-
 .../hadoop/hive/ql/io/HiveFileFormatUtils.java  |    11 +-
 .../hadoop/hive/ql/io/orc/OrcInputFormat.java   |     8 +-
 .../apache/hadoop/hive/ql/metadata/Table.java   |    11 +
 .../hive/ql/optimizer/ConvertJoinMapJoin.java   |    63 +-
 .../optimizer/FixedBucketPruningOptimizer.java  |    18 +-
 .../ql/optimizer/PrunerOperatorFactory.java     |     3 +-
 .../optimizer/SortedDynPartitionOptimizer.java  |     6 +-
 ...tedDynPartitionTimeGranularityOptimizer.java |     9 +-
 .../annotation/OpTraitsRulesProcFactory.java    |    37 +-
 .../hive/ql/optimizer/physical/Vectorizer.java  |    16 +-
 .../optimizer/spark/SparkMapJoinOptimizer.java  |     3 +-
 .../hadoop/hive/ql/parse/SemanticAnalyzer.java  |    33 +-
 .../apache/hadoop/hive/ql/plan/OpTraits.java    |    24 +-
 .../apache/hadoop/hive/ql/plan/PlanUtils.java   |     2 +-
 .../hadoop/hive/ql/plan/ReduceSinkDesc.java     |    10 +-
 .../apache/hadoop/hive/ql/plan/TableDesc.java   |     5 +
 .../hive/ql/plan/VectorReduceSinkDesc.java      |     9 +
 .../hive/ql/udf/generic/GenericUDFHash.java     |     3 +-
 .../ql/udf/generic/GenericUDFMurmurHash.java    |    64 +
 .../hadoop/hive/ql/TestTxnAddPartition.java     |    11 +-
 .../apache/hadoop/hive/ql/TestTxnCommands.java  |    20 +-
 .../apache/hadoop/hive/ql/TestTxnCommands2.java |    63 +-
 .../apache/hadoop/hive/ql/TestTxnNoBuckets.java |    14 +-
 .../parse/authorization/TestPrivilegesV1.java   |     2 +-
 .../clientpositive/archive_excludeHadoop20.q    |     4 +-
 .../test/queries/clientpositive/bucket_many.q   |     4 +-
 .../clientpositive/bucket_map_join_tez1.q       |     2 +-
 .../clientpositive/bucket_num_reducers.q        |     5 +-
 .../clientpositive/bucket_num_reducers2.q       |     6 +-
 .../clientpositive/bucket_num_reducers_acid2.q  |     3 -
 .../clientpositive/insert_update_delete.q       |     1 -
 ql/src/test/queries/clientpositive/sample10.q   |     4 +-
 .../clientpositive/tez_dynpart_hashjoin_3.q     |     4 +-
 ql/src/test/queries/clientpositive/tez_smb_1.q  |     2 +-
 .../clientnegative/alter_file_format.q.out      |     1 +
 .../alter_view_as_select_with_partition.q.out   |     1 +
 .../clientnegative/unset_table_property.q.out   |     1 +
 .../clientnegative/unset_view_property.q.out    |     1 +
 .../results/clientpositive/acid_mapjoin.q.out   |    20 +-
 .../results/clientpositive/acid_nullscan.q.out  |     2 +
 .../clientpositive/acid_table_stats.q.out       |     2 +
 .../clientpositive/alterColumnStats.q.out       |     3 +
 .../clientpositive/alterColumnStatsPart.q.out   |     1 +
 .../clientpositive/alter_file_format.q.out      |     7 +
 ...lter_numbuckets_partitioned_table2_h23.q.out |     9 +
 ...alter_numbuckets_partitioned_table_h23.q.out |     8 +
 .../alter_partition_clusterby_sortby.q.out      |     1 +
 .../alter_partition_coltype.q.out               |     4 +
 .../clientpositive/alter_skewed_table.q.out     |     6 +
 .../alter_table_add_partition.q.out             |     3 +
 .../alter_table_column_stats.q.out              |    22 +
 .../clientpositive/alter_table_not_sorted.q.out |     2 +
 .../clientpositive/alter_table_serde2.q.out     |     2 +
 .../clientpositive/alter_view_as_select.q.out   |     3 +
 .../clientpositive/alter_view_col_type.q.out    |     2 +
 .../analyze_table_null_partition.q.out          |     4 +
 .../clientpositive/analyze_tbl_date.q.out       |     1 +
 .../archive_excludeHadoop20.q.out               |    33 +-
 .../clientpositive/autoColumnStats_1.q.out      |     2 +
 .../clientpositive/autoColumnStats_10.q.out     |     8 +
 .../clientpositive/autoColumnStats_2.q.out      |     1 +
 .../clientpositive/autoColumnStats_3.q.out      |     1 +
 .../clientpositive/autoColumnStats_4.q.out      |     3 +
 .../clientpositive/autoColumnStats_5a.q.out     |    21 +
 .../clientpositive/autoColumnStats_8.q.out      |     4 +
 .../clientpositive/autoColumnStats_9.q.out      |     1 +
 .../auto_join_reordering_values.q.out           |     8 +
 .../avro_schema_evolution_native.q.out          |     2 +
 .../clientpositive/basicstat_partval.q.out      |     1 +
 .../beeline/escape_comments.q.out               |     3 +
 .../materialized_view_create_rewrite.q.out      |     2 +
 .../clientpositive/beeline/smb_mapjoin_1.q.out  |     1 +
 .../clientpositive/beeline/smb_mapjoin_11.q.out |   229 +-
 .../clientpositive/beeline/smb_mapjoin_12.q.out |    10 +-
 .../clientpositive/beeline/smb_mapjoin_13.q.out |     4 +
 .../clientpositive/binary_output_format.q.out   |    10 +
 .../test/results/clientpositive/bucket1.q.out   |     4 +
 .../test/results/clientpositive/bucket2.q.out   |   256 +-
 .../test/results/clientpositive/bucket3.q.out   |   256 +-
 .../clientpositive/bucket_map_join_1.q.out      |     2 +
 .../clientpositive/bucket_map_join_2.q.out      |     2 +
 .../clientpositive/bucket_map_join_spark1.q.out |    10 +
 .../clientpositive/bucket_map_join_spark2.q.out |    10 +
 .../clientpositive/bucket_map_join_spark3.q.out |    10 +
 .../clientpositive/bucket_map_join_spark4.q.out |    12 +
 .../clientpositive/bucket_num_reducers.q.out    |    17 -
 .../clientpositive/bucket_num_reducers2.q.out   |    13 -
 .../bucket_num_reducers_acid2.q.out             |    48 -
 .../clientpositive/bucketcontext_1.q.out        |     5 +
 .../clientpositive/bucketcontext_2.q.out        |     5 +
 .../clientpositive/bucketcontext_3.q.out        |     4 +
 .../clientpositive/bucketcontext_4.q.out        |     4 +
 .../clientpositive/bucketcontext_5.q.out        |     4 +
 .../clientpositive/bucketcontext_6.q.out        |     4 +
 .../clientpositive/bucketcontext_7.q.out        |     6 +
 .../clientpositive/bucketcontext_8.q.out        |     6 +
 .../clientpositive/bucketmapjoin10.q.out        |     4 +
 .../clientpositive/bucketmapjoin11.q.out        |     8 +
 .../clientpositive/bucketmapjoin12.q.out        |     4 +
 .../clientpositive/bucketmapjoin13.q.out        |     9 +
 .../results/clientpositive/bucketmapjoin5.q.out |    20 +
 .../results/clientpositive/bucketmapjoin8.q.out |     4 +
 .../results/clientpositive/bucketmapjoin9.q.out |     4 +
 .../clientpositive/bucketmapjoin_negative.q.out |    11 +
 .../bucketmapjoin_negative2.q.out               |    12 +
 .../bucketmapjoin_negative3.q.out               |    18 +
 .../bucketsortoptimize_insert_1.q.out           |     8 +-
 .../bucketsortoptimize_insert_3.q.out           |     4 +-
 .../bucketsortoptimize_insert_4.q.out           |    24 +-
 .../bucketsortoptimize_insert_5.q.out           |    44 +-
 .../bucketsortoptimize_insert_8.q.out           |    44 +-
 .../clientpositive/cbo_rp_outer_join_ppr.q.out  |     8 +
 .../columnStatsUpdateForStatsOptimizer_2.q.out  |     4 +
 ...names_with_leading_and_trailing_spaces.q.out |     1 +
 .../column_pruner_multiple_children.q.out       |     1 +
 .../clientpositive/columnstats_infinity.q.out   |     3 +
 .../clientpositive/columnstats_partlvl.q.out    |     2 +
 .../clientpositive/columnstats_tbllvl.q.out     |     4 +
 .../test/results/clientpositive/combine3.q.out  |    48 +-
 .../test/results/clientpositive/comments.q.out  |     2 +
 .../constantPropagateForSubQuery.q.out          |     4 +
 .../create_alter_list_bucketing_table1.q.out    |     6 +
 .../results/clientpositive/create_like.q.out    |     3 +
 .../clientpositive/create_like_tbl_props.q.out  |     1 +
 .../clientpositive/create_like_view.q.out       |     4 +
 .../clientpositive/create_or_replace_view.q.out |     5 +
 .../clientpositive/create_skewed_table1.q.out   |     3 +
 .../create_table_like_stats.q.out               |     1 +
 .../results/clientpositive/create_view.q.out    |    38 +-
 .../create_view_defaultformats.q.out            |     2 +
 .../create_view_partitioned.q.out               |     3 +
 .../clientpositive/create_view_translate.q.out  |     2 +
 .../create_with_constraints.q.out               |    44 +
 .../create_with_constraints2.q.out              |     2 +
 ql/src/test/results/clientpositive/ctas.q.out   |     5 +
 .../results/clientpositive/ctas_colname.q.out   |     7 +
 .../ctas_uses_database_location.q.out           |     1 +
 .../clientpositive/database_location.q.out      |     2 +
 .../results/clientpositive/decimal_serde.q.out  |     2 +
 .../clientpositive/default_file_format.q.out    |    12 +
 .../results/clientpositive/deleteAnalyze.q.out  |     2 +
 .../describe_comment_indent.q.out               |     1 +
 .../describe_comment_nonascii.q.out             |     1 +
 .../clientpositive/describe_syntax.q.out        |     2 +
 .../results/clientpositive/describe_table.q.out |     2 +
 .../display_colstats_tbllvl.q.out               |     2 +
 .../druid/druidkafkamini_basic.q.out            |     4 +
 .../clientpositive/druid/druidmini_mv.q.out     |     3 +
 .../results/clientpositive/druid_basic1.q.out   |     2 +
 .../results/clientpositive/druid_basic2.q.out   |     7 +
 .../clientpositive/druid_intervals.q.out        |     1 +
 .../results/clientpositive/druid_topn.q.out     |     1 +
 .../dynamic_partition_skip_default.q.out        |     4 +
 .../dynpart_sort_opt_bucketing.q.out            |    88 +-
 .../encryption_join_unencrypted_tbl.q.out       |     4 +
 ...on_join_with_different_encryption_keys.q.out |     4 +
 .../clientpositive/escape_comments.q.out        |     3 +
 .../clientpositive/exim_hidden_files.q.out      |     1 +
 .../extrapolate_part_stats_date.q.out           |     4 +
 .../extrapolate_part_stats_full.q.out           |    12 +
 .../extrapolate_part_stats_partial.q.out        |    38 +
 .../results/clientpositive/filter_aggr.q.out    |     2 +
 .../clientpositive/filter_join_breaktask.q.out  |     2 +
 .../results/clientpositive/filter_union.q.out   |     4 +
 .../clientpositive/fouter_join_ppr.q.out        |    16 +
 .../clientpositive/groupby_map_ppr.q.out        |     4 +
 .../groupby_map_ppr_multi_distinct.q.out        |     4 +
 .../results/clientpositive/groupby_ppr.q.out    |     4 +
 .../groupby_ppr_multi_distinct.q.out            |     8 +
 .../clientpositive/groupby_sort_1_23.q.out      |   132 +
 .../results/clientpositive/groupby_sort_6.q.out |     7 +
 .../clientpositive/groupby_sort_skew_1_23.q.out |   132 +
 .../infer_bucket_sort_dyn_part.q.out            |     2 +
 .../infer_bucket_sort_map_operators.q.out       |     2 +
 .../infer_bucket_sort_num_buckets.q.out         |     2 +
 .../infer_bucket_sort_reducers_power_two.q.out  |     6 +-
 .../test/results/clientpositive/input23.q.out   |     1 +
 .../test/results/clientpositive/input30.q.out   |     4 +-
 .../test/results/clientpositive/input31.q.out   |     2 +-
 .../test/results/clientpositive/input39.q.out   |     2 +-
 .../test/results/clientpositive/input42.q.out   |     6 +
 .../results/clientpositive/input_part1.q.out    |     9 +
 .../results/clientpositive/input_part2.q.out    |    12 +
 .../results/clientpositive/input_part7.q.out    |     2 +
 .../results/clientpositive/input_part9.q.out    |     2 +
 ql/src/test/results/clientpositive/join17.q.out |     4 +
 ql/src/test/results/clientpositive/join26.q.out |     7 +
 ql/src/test/results/clientpositive/join32.q.out |     8 +
 ql/src/test/results/clientpositive/join33.q.out |     8 +
 ql/src/test/results/clientpositive/join34.q.out |     7 +
 ql/src/test/results/clientpositive/join35.q.out |     9 +
 ql/src/test/results/clientpositive/join9.q.out  |     5 +
 .../clientpositive/join_filters_overlap.q.out   |    10 +
 .../results/clientpositive/join_map_ppr.q.out   |    18 +
 .../clientpositive/list_bucket_dml_1.q.out      |     5 +
 .../clientpositive/list_bucket_dml_11.q.out     |     5 +
 .../clientpositive/list_bucket_dml_12.q.out     |     6 +
 .../clientpositive/list_bucket_dml_13.q.out     |     5 +
 .../clientpositive/list_bucket_dml_14.q.out     |     7 +
 .../clientpositive/list_bucket_dml_2.q.out      |     5 +
 .../clientpositive/list_bucket_dml_3.q.out      |     5 +
 .../clientpositive/list_bucket_dml_4.q.out      |    13 +
 .../clientpositive/list_bucket_dml_5.q.out      |     6 +
 .../clientpositive/list_bucket_dml_6.q.out      |    14 +
 .../clientpositive/list_bucket_dml_7.q.out      |    14 +
 .../clientpositive/list_bucket_dml_8.q.out      |     6 +
 .../clientpositive/list_bucket_dml_9.q.out      |    13 +
 .../list_bucket_query_multiskew_1.q.out         |     4 +
 .../list_bucket_query_multiskew_2.q.out         |     3 +
 .../list_bucket_query_multiskew_3.q.out         |     3 +
 .../list_bucket_query_oneskew_1.q.out           |     3 +
 .../list_bucket_query_oneskew_2.q.out           |     4 +
 .../list_bucket_query_oneskew_3.q.out           |     1 +
 .../llap/acid_bucket_pruning.q.out              |    10 +-
 .../llap/acid_vectorization_original.q.out      |    30 +-
 .../llap/alter_merge_stats_orc.q.out            |     2 +
 .../clientpositive/llap/autoColumnStats_1.q.out |     2 +
 .../llap/autoColumnStats_10.q.out               |     8 +
 .../clientpositive/llap/autoColumnStats_2.q.out |     1 +
 .../llap/auto_sortmerge_join_1.q.out            |     9 +
 .../llap/auto_sortmerge_join_11.q.out           |    14 +
 .../llap/auto_sortmerge_join_12.q.out           |     5 +
 .../llap/auto_sortmerge_join_2.q.out            |     6 +
 .../llap/auto_sortmerge_join_3.q.out            |     9 +
 .../llap/auto_sortmerge_join_4.q.out            |     9 +
 .../llap/auto_sortmerge_join_5.q.out            |    12 +
 .../llap/auto_sortmerge_join_7.q.out            |    12 +
 .../llap/auto_sortmerge_join_8.q.out            |    12 +
 .../results/clientpositive/llap/bucket2.q.out   |   256 +-
 .../results/clientpositive/llap/bucket3.q.out   |   256 +-
 .../results/clientpositive/llap/bucket4.q.out   |   256 +-
 .../results/clientpositive/llap/bucket5.q.out   |    39 +-
 .../results/clientpositive/llap/bucket6.q.out   |   136 +-
 .../clientpositive/llap/bucket_groupby.q.out    |   470 +-
 .../clientpositive/llap/bucket_many.q.out       |    27 +-
 .../llap/bucket_map_join_tez1.q.out             |   134 +-
 .../llap/bucket_num_reducers.q.out              |   202 +
 .../llap/bucket_num_reducers2.q.out             |   242 +
 .../llap/bucket_num_reducers_acid2.q.out        |    84 +
 .../clientpositive/llap/bucketmapjoin1.q.out    |    10 +
 .../clientpositive/llap/bucketmapjoin2.q.out    |    13 +
 .../clientpositive/llap/bucketmapjoin3.q.out    |     8 +
 .../clientpositive/llap/bucketmapjoin4.q.out    |    12 +
 .../clientpositive/llap/bucketmapjoin7.q.out    |     2 +
 .../clientpositive/llap/bucketpruning1.q.out    |    30 +-
 .../llap/bucketsortoptimize_insert_2.q.out      |   148 +-
 .../llap/bucketsortoptimize_insert_6.q.out      |    88 +-
 .../llap/bucketsortoptimize_insert_7.q.out      |    54 +-
 .../clientpositive/llap/cbo_rp_views.q.out      |     2 +-
 .../results/clientpositive/llap/cbo_views.q.out |     2 +-
 .../clientpositive/llap/check_constraint.q.out  |    37 +-
 .../results/clientpositive/llap/cluster.q.out   |   754 +-
 .../columnStatsUpdateForStatsOptimizer_1.q.out  |     8 +
 ...names_with_leading_and_trailing_spaces.q.out |     1 +
 .../llap/column_table_stats.q.out               |    15 +
 .../llap/column_table_stats_orc.q.out           |    11 +
 .../llap/correlationoptimizer1.q.out            |    40 +-
 .../test/results/clientpositive/llap/ctas.q.out |     5 +
 .../results/clientpositive/llap/cte_1.q.out     | 37328 ++++++++---------
 .../llap/default_constraint.q.out               |    29 +-
 .../clientpositive/llap/deleteAnalyze.q.out     |     2 +
 .../llap/disable_merge_for_bucketing.q.out      |   256 +-
 .../llap/dynamic_partition_pruning.q.out        |     6 +-
 .../llap/dynamic_semijoin_reduction.q.out       |     4 +
 .../llap/dynamic_semijoin_user_level.q.out      |     4 +
 .../llap/dynpart_sort_optimization_acid.q.out   |    54 +-
 .../llap/enforce_constraint_notnull.q.out       |    24 +-
 .../clientpositive/llap/except_distinct.q.out   |     2 +-
 .../clientpositive/llap/explainuser_4.q.out     |     2 +-
 .../extrapolate_part_stats_partial_ndv.q.out    |    19 +
 .../llap/filter_join_breaktask.q.out            |     3 +
 .../clientpositive/llap/filter_union.q.out      |     4 +
 .../llap/hybridgrace_hashjoin_2.q.out           |     4 +-
 .../llap/infer_bucket_sort_bucketed_table.q.out |    12 +-
 .../llap/insert_into_default_keyword.q.out      |    20 +-
 .../insert_values_orig_table_use_metadata.q.out |     5 +
 .../clientpositive/llap/intersect_all.q.out     |  1528 +-
 .../llap/intersect_distinct.q.out               |   922 +-
 .../clientpositive/llap/join32_lessSize.q.out   |    31 +
 .../clientpositive/llap/lateral_view.q.out      |    14 +-
 .../results/clientpositive/llap/lineage2.q.out  |    60 +-
 .../llap/list_bucket_dml_10.q.out               |     4 +
 .../clientpositive/llap/llap_nullscan.q.out     |     2 +
 .../results/clientpositive/llap/llap_smb.q.out  |    44 +-
 .../clientpositive/llap/mapjoin_mapjoin.q.out   |     8 +
 .../llap/materialized_view_create.q.out         |     5 +-
 .../llap/materialized_view_create_rewrite.q.out |     2 +
 .../materialized_view_create_rewrite_2.q.out    |    10 +-
 .../materialized_view_create_rewrite_3.q.out    |     6 +-
 .../materialized_view_create_rewrite_4.q.out    |     9 +-
 .../materialized_view_create_rewrite_5.q.out    |     1 +
 ...materialized_view_create_rewrite_dummy.q.out |     2 +
 ...erialized_view_create_rewrite_multi_db.q.out |     2 +
 ...ized_view_create_rewrite_rebuild_dummy.q.out |     6 +-
 ...alized_view_create_rewrite_time_window.q.out |    13 +-
 .../llap/materialized_view_describe.q.out       |     7 +-
 .../clientpositive/llap/metadataonly1.q.out     |    22 +-
 .../results/clientpositive/llap/mm_all.q.out    |     3 +
 .../clientpositive/llap/multiMapJoin1.q.out     |     4 +-
 .../clientpositive/llap/multi_column_in.q.out   |     4 +-
 .../llap/multi_count_distinct_null.q.out        |    28 +-
 .../clientpositive/llap/optimize_nullscan.q.out |    28 +
 .../clientpositive/llap/orc_analyze.q.out       |    21 +-
 .../clientpositive/llap/orc_create.q.out        |     6 +
 .../clientpositive/llap/orc_llap_counters.q.out |     1 +
 .../llap/orc_llap_counters1.q.out               |     1 +
 .../clientpositive/llap/parquet_types.q.out     |     4 +-
 .../llap/parquet_types_vectorization.q.out      |     4 +-
 .../llap/partition_multilevels.q.out            |   324 +-
 .../clientpositive/llap/partition_pruning.q.out |     5 +
 .../clientpositive/llap/ppd_union_view.q.out    |     3 +
 .../clientpositive/llap/quotedid_smb.q.out      |    16 +-
 .../llap/reduce_deduplicate.q.out               |     6 +
 .../llap/reduce_deduplicate_extended.q.out      |    36 +-
 .../clientpositive/llap/results_cache_1.q.out   |     8 +-
 .../llap/results_cache_capacity.q.out           |     8 +-
 .../llap/results_cache_with_masking.q.out       |     8 +-
 .../results/clientpositive/llap/sample1.q.out   |     3 +
 .../results/clientpositive/llap/sample10.q.out  |    36 +-
 .../clientpositive/llap/schema_evol_stats.q.out |     2 +
 .../llap/selectDistinctStar.q.out               |     2 +
 .../clientpositive/llap/skiphf_aggr.q.out       |     6 +-
 .../clientpositive/llap/smb_mapjoin_15.q.out    |    16 +
 .../clientpositive/llap/smb_mapjoin_18.q.out    |     8 +-
 .../clientpositive/llap/smb_mapjoin_19.q.out    |     8 +-
 .../results/clientpositive/llap/stats11.q.out   |    10 +
 .../clientpositive/llap/subquery_notin.q.out    |   112 +-
 .../results/clientpositive/llap/sysdb.q.out     |   190 +-
 .../llap/tez_dynpart_hashjoin_3.q.out           |    59 +-
 .../llap/tez_join_result_complex.q.out          |     8 +
 .../clientpositive/llap/tez_smb_main.q.out      |     4 +-
 .../clientpositive/llap/tez_union2.q.out        |   922 +-
 .../llap/tez_vector_dynpart_hashjoin_1.q.out    |     6 +-
 .../llap/udaf_collect_set_2.q.out               |    60 +-
 .../clientpositive/llap/unionDistinct_1.q.out   |  2365 +-
 .../clientpositive/llap/unionDistinct_3.q.out   |  1276 +-
 .../clientpositive/llap/union_fast_stats.q.out  |    12 +-
 .../clientpositive/llap/union_stats.q.out       |     7 +
 .../clientpositive/llap/vector_coalesce_2.q.out |     8 +-
 .../llap/vector_complex_all.q.out               |     6 +-
 .../llap/vector_grouping_sets.q.out             |     8 +-
 .../llap/vector_partitioned_date_time.q.out     |   128 +-
 .../llap/vector_ptf_part_simple.q.out           |   788 +-
 .../llap/vector_windowing_expressions.q.out     |    64 +-
 .../vector_windowing_multipartitioning.q.out    |    42 +-
 .../vector_windowing_range_multiorder.q.out     | 19084 ++++-----
 .../clientpositive/llap/vectorization_0.q.out   |    10 +
 .../llap/vectorized_distinct_gby.q.out          |     2 +-
 .../vectorized_dynamic_partition_pruning.q.out  |     6 +-
 .../vectorized_insert_into_bucketed_table.q.out |     6 +-
 .../llap/vectorized_parquet.q.out               |   190 +-
 .../results/clientpositive/load_dyn_part8.q.out |     4 +
 .../clientpositive/louter_join_ppr.q.out        |    16 +
 .../clientpositive/mapjoin_mapjoin.q.out        |     8 +
 .../test/results/clientpositive/masking_5.q.out |     5 -
 ql/src/test/results/clientpositive/merge3.q.out |     7 +
 ql/src/test/results/clientpositive/mm_all.q.out |     3 +
 .../results/clientpositive/mm_buckets.q.out     |    34 +-
 .../results/clientpositive/mm_default.q.out     |     4 +
 .../multi_insert_partitioned.q.out              |     5 +
 .../clientpositive/named_column_join.q.out      |     3 +
 .../results/clientpositive/nonmr_fetch.q.out    |   105 +-
 .../results/clientpositive/nullformat.q.out     |     1 +
 .../results/clientpositive/nullformatCTAS.q.out |     1 +
 .../offset_limit_global_optimizer.q.out         |    32 +
 .../results/clientpositive/outer_join_ppr.q.out |     8 +
 .../outer_reference_windowed.q.out              |     1 +
 .../clientpositive/parallel_orderby.q.out       |     6 +-
 .../clientpositive/parquet_analyze.q.out        |     2 +
 .../parquet_array_null_element.q.out            |     1 +
 .../results/clientpositive/parquet_create.q.out |     1 +
 .../parquet_mixed_partition_formats.q.out       |     1 +
 .../clientpositive/parquet_partitioned.q.out    |     1 +
 .../results/clientpositive/parquet_serde.q.out  |     1 +
 .../parquet_vectorization_0.q.out               |    10 +
 .../part_inherit_tbl_props_with_star.q.out      |     1 +
 ql/src/test/results/clientpositive/pcr.q.out    |    61 +
 ql/src/test/results/clientpositive/pcs.q.out    |    19 +
 .../results/clientpositive/pointlookup2.q.out   |    28 +
 .../results/clientpositive/pointlookup3.q.out   |    18 +
 .../results/clientpositive/pointlookup4.q.out   |     4 +
 .../clientpositive/ppd_join_filter.q.out        |    16 +
 ql/src/test/results/clientpositive/ppd_vc.q.out |    10 +
 .../clientpositive/ppr_allchildsarenull.q.out   |     6 +
 .../test/results/clientpositive/push_or.q.out   |     2 +
 .../results/clientpositive/quotedid_stats.q.out |     2 +
 .../clientpositive/rand_partitionpruner1.q.out  |     2 +
 .../clientpositive/rand_partitionpruner2.q.out  |    10 +
 .../clientpositive/rand_partitionpruner3.q.out  |     2 +
 .../clientpositive/rcfile_default_format.q.out  |     8 +
 .../results/clientpositive/regexp_extract.q.out |     4 +
 .../rename_external_partition_location.q.out    |     2 +
 .../clientpositive/repl_2_exim_basic.q.out      |     4 +
 .../clientpositive/repl_3_exim_metadata.q.out   |     2 +
 .../clientpositive/router_join_ppr.q.out        |    16 +
 .../test/results/clientpositive/row__id.q.out   |    18 +-
 .../test/results/clientpositive/sample1.q.out   |     9 +
 .../test/results/clientpositive/sample2.q.out   |   515 +-
 .../test/results/clientpositive/sample3.q.out   |   317 +-
 .../test/results/clientpositive/sample4.q.out   |   515 +-
 .../test/results/clientpositive/sample5.q.out   |   327 +-
 .../test/results/clientpositive/sample6.q.out   |  1889 +-
 .../test/results/clientpositive/sample7.q.out   |   184 +-
 .../test/results/clientpositive/sample8.q.out   |   660 +-
 .../test/results/clientpositive/sample9.q.out   |   253 +-
 .../sample_islocalmode_hook_use_metadata.q.out  |     1 +
 .../clientpositive/serde_user_properties.q.out  |     6 +
 .../show_create_table_alter.q.out               |     5 +
 .../show_create_table_db_table.q.out            |     3 +
 .../show_create_table_delimited.q.out           |     1 +
 .../show_create_table_partitioned.q.out         |     1 +
 .../show_create_table_serde.q.out               |     4 +
 .../show_create_table_temp_table.q.out          |     2 +-
 .../results/clientpositive/show_functions.q.out |     2 +
 .../clientpositive/show_tblproperties.q.out     |     5 +
 .../results/clientpositive/smb_mapjoin_1.q.out  |     1 +
 .../results/clientpositive/smb_mapjoin_11.q.out |   229 +-
 .../results/clientpositive/smb_mapjoin_12.q.out |    10 +-
 .../results/clientpositive/smb_mapjoin_13.q.out |     4 +
 .../results/clientpositive/smb_mapjoin_20.q.out |  1016 +-
 .../results/clientpositive/smb_mapjoin_22.q.out |     8 +-
 .../results/clientpositive/smb_mapjoin_46.q.out |    36 +-
 .../results/clientpositive/smb_mapjoin_47.q.out |    46 +-
 .../clientpositive/sort_merge_join_desc_5.q.out |     1 +
 .../clientpositive/sort_merge_join_desc_6.q.out |     2 +
 .../clientpositive/sort_merge_join_desc_7.q.out |     4 +
 .../spark/alter_merge_stats_orc.q.out           |     2 +
 .../spark/auto_join_reordering_values.q.out     |    10 +
 .../spark/auto_sortmerge_join_1.q.out           |     6 +
 .../spark/auto_sortmerge_join_12.q.out          |     5 +
 .../spark/auto_sortmerge_join_2.q.out           |     4 +
 .../spark/auto_sortmerge_join_3.q.out           |     3 +
 .../spark/auto_sortmerge_join_4.q.out           |     3 +
 .../spark/auto_sortmerge_join_5.q.out           |     6 +
 .../spark/auto_sortmerge_join_7.q.out           |     6 +
 .../spark/auto_sortmerge_join_8.q.out           |     6 +
 .../results/clientpositive/spark/bucket2.q.out  |   256 +-
 .../results/clientpositive/spark/bucket3.q.out  |   256 +-
 .../results/clientpositive/spark/bucket4.q.out  |   256 +-
 .../clientpositive/spark/bucket4.q.out_spark    |   256 +-
 .../results/clientpositive/spark/bucket5.q.out  |    35 +-
 .../results/clientpositive/spark/bucket6.q.out  |   136 +-
 .../spark/bucket_map_join_1.q.out               |     4 +
 .../spark/bucket_map_join_2.q.out               |     4 +
 .../spark/bucket_map_join_spark1.q.out          |     8 +
 .../spark/bucket_map_join_spark2.q.out          |     8 +
 .../spark/bucket_map_join_spark3.q.out          |     8 +
 .../spark/bucket_map_join_spark4.q.out          |    12 +
 .../spark/bucket_map_join_tez1.q.out            |   428 +-
 .../clientpositive/spark/bucketmapjoin1.q.out   |    10 +
 .../clientpositive/spark/bucketmapjoin10.q.out  |     4 +
 .../clientpositive/spark/bucketmapjoin11.q.out  |     8 +
 .../clientpositive/spark/bucketmapjoin12.q.out  |     4 +
 .../clientpositive/spark/bucketmapjoin13.q.out  |     9 +
 .../clientpositive/spark/bucketmapjoin2.q.out   |    13 +
 .../clientpositive/spark/bucketmapjoin3.q.out   |     8 +
 .../clientpositive/spark/bucketmapjoin4.q.out   |    12 +
 .../clientpositive/spark/bucketmapjoin5.q.out   |    12 +
 .../clientpositive/spark/bucketmapjoin7.q.out   |     2 +
 .../spark/bucketmapjoin7.q.out_spark            |     2 +
 .../clientpositive/spark/bucketmapjoin8.q.out   |     4 +
 .../clientpositive/spark/bucketmapjoin9.q.out   |     4 +
 .../spark/bucketmapjoin_negative.q.out          |     5 +
 .../spark/bucketmapjoin_negative2.q.out         |     6 +
 .../spark/bucketmapjoin_negative3.q.out         |    36 +
 .../spark/bucketsortoptimize_insert_2.q.out     |   148 +-
 .../spark/bucketsortoptimize_insert_4.q.out     |    24 +-
 .../spark/bucketsortoptimize_insert_6.q.out     |    88 +-
 .../spark/bucketsortoptimize_insert_7.q.out     |    54 +-
 .../spark/bucketsortoptimize_insert_8.q.out     |    44 +-
 .../clientpositive/spark/cbo_semijoin.q.out     |     4 +-
 .../results/clientpositive/spark/ctas.q.out     |     5 +
 .../spark/disable_merge_for_bucketing.q.out     |   256 +-
 .../disable_merge_for_bucketing.q.out_spark     |   256 +-
 .../spark/filter_join_breaktask.q.out           |     3 +
 .../clientpositive/spark/groupby_map_ppr.q.out  |     4 +
 .../spark/groupby_map_ppr_multi_distinct.q.out  |     4 +
 .../clientpositive/spark/groupby_ppr.q.out      |     4 +
 .../spark/groupby_ppr_multi_distinct.q.out      |     8 +
 .../spark/groupby_sort_1_23.q.out               |    76 +
 .../spark/groupby_sort_skew_1_23.q.out          |    76 +
 .../infer_bucket_sort_bucketed_table.q.out      |    11 +-
 .../spark/infer_bucket_sort_num_buckets.q.out   |     2 +-
 .../clientpositive/spark/input_part2.q.out      |     6 +
 .../results/clientpositive/spark/join17.q.out   |     6 +
 .../results/clientpositive/spark/join26.q.out   |     7 +
 .../results/clientpositive/spark/join32.q.out   |     7 +
 .../clientpositive/spark/join32_lessSize.q.out  |    31 +
 .../results/clientpositive/spark/join33.q.out   |     7 +
 .../results/clientpositive/spark/join34.q.out   |     8 +
 .../results/clientpositive/spark/join35.q.out   |     8 +
 .../results/clientpositive/spark/join9.q.out    |     5 +
 .../spark/join_filters_overlap.q.out            |    34 +
 .../clientpositive/spark/join_map_ppr.q.out     |    14 +
 .../spark/list_bucket_dml_10.q.out              |     4 +
 .../spark/list_bucket_dml_2.q.out               |     5 +
 .../clientpositive/spark/load_dyn_part8.q.out   |     4 +
 .../clientpositive/spark/louter_join_ppr.q.out  |    16 +
 .../clientpositive/spark/mapjoin_mapjoin.q.out  |     8 +
 .../clientpositive/spark/mapreduce1.q.out       |   448 +-
 .../spark/optimize_nullscan.q.out               |    28 +
 .../clientpositive/spark/outer_join_ppr.q.out   |     8 +
 .../clientpositive/spark/parallel_orderby.q.out |     2 +
 .../spark/parquet_vectorization_0.q.out         |    10 +
 .../test/results/clientpositive/spark/pcr.q.out |    50 +
 .../clientpositive/spark/ppd_join_filter.q.out  |    16 +
 .../clientpositive/spark/quotedid_smb.q.out     |    16 +-
 .../spark/reduce_deduplicate.q.out              |     6 +
 .../clientpositive/spark/router_join_ppr.q.out  |    16 +
 .../results/clientpositive/spark/sample1.q.out  |     3 +
 .../results/clientpositive/spark/sample10.q.out |    40 +-
 .../results/clientpositive/spark/sample2.q.out  |   509 +-
 .../results/clientpositive/spark/sample3.q.out  |   317 +-
 .../results/clientpositive/spark/sample4.q.out  |   509 +-
 .../results/clientpositive/spark/sample5.q.out  |   321 +-
 .../results/clientpositive/spark/sample6.q.out  |  2589 +-
 .../results/clientpositive/spark/sample7.q.out  |   288 +-
 .../results/clientpositive/spark/sample8.q.out  |   661 +-
 .../results/clientpositive/spark/sample9.q.out  |   505 +-
 .../clientpositive/spark/smb_mapjoin_1.q.out    |     1 +
 .../clientpositive/spark/smb_mapjoin_11.q.out   |   229 +-
 .../clientpositive/spark/smb_mapjoin_12.q.out   |    10 +-
 .../clientpositive/spark/smb_mapjoin_13.q.out   |     6 +
 .../clientpositive/spark/smb_mapjoin_15.q.out   |    16 +
 .../clientpositive/spark/smb_mapjoin_18.q.out   |     8 +-
 .../clientpositive/spark/smb_mapjoin_19.q.out   |     8 +-
 .../clientpositive/spark/smb_mapjoin_20.q.out   |  1016 +-
 .../clientpositive/spark/smb_mapjoin_22.q.out   |     8 +-
 .../spark/spark_union_merge.q.out               |     8 +
 .../results/clientpositive/spark/stats0.q.out   |     8 +
 .../results/clientpositive/spark/stats1.q.out   |     2 +
 .../results/clientpositive/spark/stats10.q.out  |   253 +-
 .../results/clientpositive/spark/stats16.q.out  |     2 +
 .../results/clientpositive/spark/stats3.q.out   |     3 +
 .../results/clientpositive/spark/stats5.q.out   |     1 +
 .../clientpositive/spark/stats_noscan_2.q.out   |     2 +
 .../results/clientpositive/spark/statsfs.q.out  |     2 +
 .../spark/subquery_nested_subquery.q.out        |    24 +-
 .../clientpositive/spark/subquery_notin.q.out   |  1368 +-
 .../clientpositive/spark/subquery_select.q.out  |   370 +-
 .../spark/subquery_shared_alias.q.out           |     8 +-
 .../clientpositive/spark/transform_ppr1.q.out   |     4 +
 .../clientpositive/spark/transform_ppr2.q.out   |     2 +
 .../spark/truncate_column_buckets.q.out         |     8 +-
 .../results/clientpositive/spark/union22.q.out  |     6 +
 .../results/clientpositive/spark/union24.q.out  |    24 +
 .../clientpositive/spark/union_ppr.q.out        |     4 +
 .../clientpositive/spark/union_remove_1.q.out   |     1 +
 .../clientpositive/spark/union_remove_10.q.out  |     3 +-
 .../clientpositive/spark/union_remove_11.q.out  |     1 +
 .../clientpositive/spark/union_remove_12.q.out  |     1 +
 .../clientpositive/spark/union_remove_13.q.out  |     3 +-
 .../clientpositive/spark/union_remove_14.q.out  |     1 +
 .../clientpositive/spark/union_remove_15.q.out  |     3 +-
 .../clientpositive/spark/union_remove_16.q.out  |     3 +-
 .../clientpositive/spark/union_remove_17.q.out  |     1 +
 .../clientpositive/spark/union_remove_18.q.out  |     1 +
 .../clientpositive/spark/union_remove_19.q.out  |     1 +
 .../clientpositive/spark/union_remove_2.q.out   |     1 +
 .../clientpositive/spark/union_remove_20.q.out  |     1 +
 .../clientpositive/spark/union_remove_21.q.out  |     1 +
 .../clientpositive/spark/union_remove_22.q.out  |     1 +
 .../clientpositive/spark/union_remove_23.q.out  |     1 +
 .../clientpositive/spark/union_remove_24.q.out  |     1 +
 .../clientpositive/spark/union_remove_3.q.out   |     1 +
 .../clientpositive/spark/union_remove_4.q.out   |     1 +
 .../clientpositive/spark/union_remove_5.q.out   |     1 +
 .../clientpositive/spark/union_remove_7.q.out   |     3 +-
 .../clientpositive/spark/union_remove_8.q.out   |     3 +-
 .../clientpositive/spark/union_remove_9.q.out   |     3 +-
 .../clientpositive/spark/vectorization_0.q.out  |    10 +
 ql/src/test/results/clientpositive/stats0.q.out |    14 +
 ql/src/test/results/clientpositive/stats1.q.out |     2 +
 .../test/results/clientpositive/stats10.q.out   |   253 +-
 .../test/results/clientpositive/stats16.q.out   |     2 +
 ql/src/test/results/clientpositive/stats3.q.out |     3 +
 ql/src/test/results/clientpositive/stats5.q.out |     1 +
 .../clientpositive/stats_empty_partition2.q.out |     1 +
 .../clientpositive/stats_invalidation.q.out     |     2 +
 .../clientpositive/stats_list_bucket.q.out      |     1 +
 .../results/clientpositive/stats_noscan_2.q.out |     2 +
 .../test/results/clientpositive/statsfs.q.out   |     2 +
 .../temp_table_display_colstats_tbllvl.q.out    |     5 +
 .../tez/acid_vectorization_original_tez.q.out   |    62 +-
 .../clientpositive/tez/explainanalyze_4.q.out   |     2 +-
 .../clientpositive/tez/explainanalyze_5.q.out   |     8 +-
 .../results/clientpositive/transform_ppr1.q.out |     4 +
 .../results/clientpositive/transform_ppr2.q.out |     2 +
 .../clientpositive/truncate_column.q.out        |     7 +
 .../truncate_column_list_bucket.q.out           |     2 +
 .../results/clientpositive/udf_explode.q.out    |     4 +
 .../results/clientpositive/udtf_explode.q.out   |     4 +
 .../clientpositive/unicode_comments.q.out       |     3 +
 .../clientpositive/unicode_notation.q.out       |     3 +
 .../test/results/clientpositive/union22.q.out   |     9 +
 .../test/results/clientpositive/union24.q.out   |    24 +
 .../clientpositive/union_pos_alias.q.out        |     1 +
 .../test/results/clientpositive/union_ppr.q.out |     2 +
 .../results/clientpositive/union_remove_1.q.out |     1 +
 .../clientpositive/union_remove_10.q.out        |     1 +
 .../clientpositive/union_remove_11.q.out        |     1 +
 .../clientpositive/union_remove_12.q.out        |     1 +
 .../clientpositive/union_remove_13.q.out        |     1 +
 .../clientpositive/union_remove_14.q.out        |     1 +
 .../clientpositive/union_remove_15.q.out        |     1 +
 .../clientpositive/union_remove_16.q.out        |     1 +
 .../clientpositive/union_remove_17.q.out        |     1 +
 .../clientpositive/union_remove_18.q.out        |     1 +
 .../clientpositive/union_remove_19.q.out        |     1 +
 .../results/clientpositive/union_remove_2.q.out |     1 +
 .../clientpositive/union_remove_20.q.out        |     1 +
 .../clientpositive/union_remove_21.q.out        |     1 +
 .../clientpositive/union_remove_22.q.out        |     1 +
 .../clientpositive/union_remove_23.q.out        |     1 +
 .../clientpositive/union_remove_24.q.out        |     1 +
 .../results/clientpositive/union_remove_3.q.out |     1 +
 .../results/clientpositive/union_remove_4.q.out |     1 +
 .../results/clientpositive/union_remove_5.q.out |     1 +
 .../results/clientpositive/union_remove_7.q.out |     1 +
 .../results/clientpositive/union_remove_8.q.out |     1 +
 .../results/clientpositive/union_remove_9.q.out |     1 +
 .../results/clientpositive/union_stats.q.out    |     5 +
 .../unset_table_view_property.q.out             |    17 +
 .../results/clientpositive/view_alias.q.out     |     6 +
 .../test/results/clientpositive/view_cbo.q.out  |    10 +
 .../objectinspector/ObjectInspectorUtils.java   |   163 +-
 .../TestObjectInspectorUtils.java               |     4 +-
 .../metastore/api/hive_metastoreConstants.java  |     1 +
 .../org/apache/hive/common/util/Murmur3.java    |    40 +-
 .../apache/hive/common/util/TestMurmur3.java    |     2 +-
 .../apache/hive/streaming/TestStreaming.java    |    10 +-
 657 files changed, 48165 insertions(+), 45019 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/hbase-handler/src/test/results/positive/external_table_ppd.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/positive/external_table_ppd.q.out b/hbase-handler/src/test/results/positive/external_table_ppd.q.out
index 6acdb3f..aed43cf 100644
--- a/hbase-handler/src/test/results/positive/external_table_ppd.q.out
+++ b/hbase-handler/src/test/results/positive/external_table_ppd.q.out
@@ -56,6 +56,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"bigint_col\":\"true\",\"boolean_col\":\"true\",\"double_col\":\"true\",\"float_col\":\"true\",\"int_col\":\"true\",\"key\":\"true\",\"smallint_col\":\"true\",\"tinyint_col\":\"true\"}}
+	bucketing_version   	2                   
 	hbase.table.default.storage.type	binary              
 	hbase.table.name    	t_hive              
 	numFiles            	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/hbase-handler/src/test/results/positive/hbase_binary_storage_queries.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/positive/hbase_binary_storage_queries.q.out b/hbase-handler/src/test/results/positive/hbase_binary_storage_queries.q.out
index 153613e..172db75 100644
--- a/hbase-handler/src/test/results/positive/hbase_binary_storage_queries.q.out
+++ b/hbase-handler/src/test/results/positive/hbase_binary_storage_queries.q.out
@@ -56,6 +56,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"bigint_col\":\"true\",\"boolean_col\":\"true\",\"double_col\":\"true\",\"float_col\":\"true\",\"int_col\":\"true\",\"key\":\"true\",\"smallint_col\":\"true\",\"tinyint_col\":\"true\"}}
+	bucketing_version   	2                   
 	hbase.table.default.storage.type	binary              
 	hbase.table.name    	t_hive              
 	numFiles            	0                   
@@ -236,6 +237,7 @@ Table Type:         	EXTERNAL_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"bigint_col\":\"true\",\"boolean_col\":\"true\",\"double_col\":\"true\",\"float_col\":\"true\",\"int_col\":\"true\",\"key\":\"true\",\"smallint_col\":\"true\",\"tinyint_col\":\"true\"}}
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	hbase.table.name    	t_hive              
 	numFiles            	0                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/hbase-handler/src/test/results/positive/hbase_ddl.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/positive/hbase_ddl.q.out b/hbase-handler/src/test/results/positive/hbase_ddl.q.out
index db40f84..bf7da98 100644
--- a/hbase-handler/src/test/results/positive/hbase_ddl.q.out
+++ b/hbase-handler/src/test/results/positive/hbase_ddl.q.out
@@ -117,6 +117,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	hbase.mapred.output.outputtable	kkk                 
 	hbase.table.name    	hbase_table_0       
 #### A masked pattern was here ####
@@ -163,6 +164,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	hbase.table.name    	hbase_table_0       
 #### A masked pattern was here ####
 	numFiles            	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/hbase-handler/src/test/results/positive/hbasestats.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/positive/hbasestats.q.out b/hbase-handler/src/test/results/positive/hbasestats.q.out
index f2285d4..92cf8cc 100644
--- a/hbase-handler/src/test/results/positive/hbasestats.q.out
+++ b/hbase-handler/src/test/results/positive/hbasestats.q.out
@@ -38,6 +38,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"country\":\"true\",\"country_id\":\"true\",\"key\":\"true\",\"state\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -130,6 +131,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -194,6 +196,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -250,6 +253,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	2                   
@@ -319,6 +323,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	2                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/AbstractRecordWriter.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/AbstractRecordWriter.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/AbstractRecordWriter.java
index 924e233..2a68220 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/AbstractRecordWriter.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/AbstractRecordWriter.java
@@ -19,6 +19,7 @@
 package org.apache.hive.hcatalog.streaming;
 
 
+import org.apache.hadoop.hive.ql.exec.Utilities;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -27,6 +28,7 @@ import org.apache.hadoop.hive.common.JavaUtils;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.metastore.IMetaStoreClient;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
+import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants;
 import org.apache.hadoop.hive.metastore.api.MetaException;
 import org.apache.hadoop.hive.metastore.api.NoSuchObjectException;
 import org.apache.hadoop.hive.metastore.api.Table;
@@ -185,7 +187,12 @@ public abstract class AbstractRecordWriter implements RecordWriter {
     }
     ObjectInspector[] inspectors = getBucketObjectInspectors();
     Object[] bucketFields = getBucketFields(row);
-    return ObjectInspectorUtils.getBucketNumber(bucketFields, inspectors, totalBuckets);
+    int bucketingVersion = Utilities.getBucketingVersion(
+        tbl.getParameters().get(hive_metastoreConstants.TABLE_BUCKETING_VERSION));
+
+    return bucketingVersion == 2 ?
+        ObjectInspectorUtils.getBucketNumber(bucketFields, inspectors, totalBuckets) :
+        ObjectInspectorUtils.getBucketNumberOld(bucketFields, inspectors, totalBuckets);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java
index fe2b1c1..90dbdac 100644
--- a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java
+++ b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java
@@ -1491,9 +1491,9 @@ public class TestStreaming {
 
     // assert bucket listing is as expected
     Assert.assertEquals("number of buckets does not match expectation", actual1.values().size(), 3);
-    Assert.assertEquals("records in bucket does not match expectation", actual1.get(0).size(), 2);
+    Assert.assertTrue("bucket 0 shouldn't have been created", actual1.get(0) == null);
     Assert.assertEquals("records in bucket does not match expectation", actual1.get(1).size(), 1);
-    Assert.assertTrue("bucket 2 shouldn't have been created", actual1.get(2) == null);
+    Assert.assertEquals("records in bucket does not match expectation", actual1.get(2).size(), 2);
     Assert.assertEquals("records in bucket does not match expectation", actual1.get(3).size(), 1);
   }
   private void runCmdOnDriver(String cmd) throws QueryFailedException {
@@ -1624,7 +1624,7 @@ public class TestStreaming {
       } else if (file.contains("bucket_00001")) {
         corruptDataFile(file, conf, -1);
       } else if (file.contains("bucket_00002")) {
-        Assert.assertFalse("bucket 2 shouldn't have been created", true);
+        corruptDataFile(file, conf, 100);
       } else if (file.contains("bucket_00003")) {
         corruptDataFile(file, conf, 100);
       }
@@ -1654,9 +1654,9 @@ public class TestStreaming {
     System.setErr(origErr);
 
     errDump = new String(myErr.toByteArray());
-    Assert.assertEquals(true, errDump.contains("bucket_00000 recovered successfully!"));
-    Assert.assertEquals(true, errDump.contains("No readable footers found. Creating empty orc file."));
     Assert.assertEquals(true, errDump.contains("bucket_00001 recovered successfully!"));
+    Assert.assertEquals(true, errDump.contains("No readable footers found. Creating empty orc file."));
+    Assert.assertEquals(true, errDump.contains("bucket_00002 recovered successfully!"));
     Assert.assertEquals(true, errDump.contains("bucket_00003 recovered successfully!"));
     Assert.assertEquals(false, errDump.contains("Exception"));
     Assert.assertEquals(false, errDump.contains("is still open for writes."));

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/worker/TestBucketIdResolverImpl.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/worker/TestBucketIdResolverImpl.java b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/worker/TestBucketIdResolverImpl.java
index 03c28a3..e890c52 100644
--- a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/worker/TestBucketIdResolverImpl.java
+++ b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/worker/TestBucketIdResolverImpl.java
@@ -42,7 +42,7 @@ public class TestBucketIdResolverImpl {
   public void testAttachBucketIdToRecord() {
     MutableRecord record = new MutableRecord(1, "hello");
     capturingBucketIdResolver.attachBucketIdToRecord(record);
-    assertThat(record.rowId, is(new RecordIdentifier(-1L, 
+    assertThat(record.rowId, is(new RecordIdentifier(-1L,
       BucketCodec.V1.encode(new AcidOutputFormat.Options(null).bucket(1)),
       -1L)));
     assertThat(record.id, is(1));

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/HCatTable.java
----------------------------------------------------------------------
diff --git a/hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/HCatTable.java b/hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/HCatTable.java
index 9963291..ed2aef4 100644
--- a/hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/HCatTable.java
+++ b/hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/HCatTable.java
@@ -176,6 +176,10 @@ public class HCatTable {
       newTable.putToParameters("comment", comment);
     }
 
+    if (newTable.getParameters().get("bucketing_version") == null) {
+      newTable.putToParameters("bucketing_version", "2");
+    }
+
     newTable.setSd(sd);
     if (partCols != null) {
       ArrayList<FieldSchema> hivePtnCols = new ArrayList<FieldSchema>();

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java
----------------------------------------------------------------------
diff --git a/hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java b/hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java
index f9ee9d9..da08d2f 100644
--- a/hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java
+++ b/hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java
@@ -297,6 +297,8 @@ public class TestHCatClient {
     assertNotNull(inner);
     assertNotNull(outer);
     for ( Map.Entry<String,String> e : inner.entrySet()){
+      // If it is bucketing version, skip it
+      if (e.getKey().equals("bucketing_version")) continue;
       assertTrue(outer.containsKey(e.getKey()));
       assertEquals(outer.get(e.getKey()), e.getValue());
     }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/itests/hive-blobstore/src/test/results/clientpositive/insert_into_dynamic_partitions.q.out
----------------------------------------------------------------------
diff --git a/itests/hive-blobstore/src/test/results/clientpositive/insert_into_dynamic_partitions.q.out b/itests/hive-blobstore/src/test/results/clientpositive/insert_into_dynamic_partitions.q.out
index caa0029..a0ebed7 100644
--- a/itests/hive-blobstore/src/test/results/clientpositive/insert_into_dynamic_partitions.q.out
+++ b/itests/hive-blobstore/src/test/results/clientpositive/insert_into_dynamic_partitions.q.out
@@ -122,6 +122,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns 
               columns.comments 
@@ -137,6 +138,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns 
                 columns.comments 
@@ -171,6 +173,7 @@ STAGE PLANS:
                 properties:
                   bucket_count 2
                   bucket_field_name id
+                  bucketing_version 2
                   column.name.delimiter ,
                   columns id
                   columns.comments 
@@ -203,6 +206,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name id
+                bucketing_version 2
                 column.name.delimiter ,
                 columns id
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/itests/hive-blobstore/src/test/results/clientpositive/insert_into_table.q.out
----------------------------------------------------------------------
diff --git a/itests/hive-blobstore/src/test/results/clientpositive/insert_into_table.q.out b/itests/hive-blobstore/src/test/results/clientpositive/insert_into_table.q.out
index ab8ad77..f6b6fee 100644
--- a/itests/hive-blobstore/src/test/results/clientpositive/insert_into_table.q.out
+++ b/itests/hive-blobstore/src/test/results/clientpositive/insert_into_table.q.out
@@ -87,6 +87,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns id
                           columns.comments 
@@ -133,6 +134,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns 
               columns.comments 
@@ -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 
                 columns.comments 
@@ -206,6 +209,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns id
                 columns.comments 
@@ -250,6 +254,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns id
                     columns.comments 
@@ -281,6 +286,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns id
               columns.comments 
@@ -303,6 +309,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns id
                 columns.comments 
@@ -335,6 +342,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns id
                 columns.comments 
@@ -369,6 +377,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns id
                     columns.comments 
@@ -400,6 +409,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns id
               columns.comments 
@@ -422,6 +432,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns id
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/itests/hive-blobstore/src/test/results/clientpositive/insert_overwrite_directory.q.out
----------------------------------------------------------------------
diff --git a/itests/hive-blobstore/src/test/results/clientpositive/insert_overwrite_directory.q.out b/itests/hive-blobstore/src/test/results/clientpositive/insert_overwrite_directory.q.out
index 18fe4cd..8581a17 100644
--- a/itests/hive-blobstore/src/test/results/clientpositive/insert_overwrite_directory.q.out
+++ b/itests/hive-blobstore/src/test/results/clientpositive/insert_overwrite_directory.q.out
@@ -114,6 +114,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns id,key
               columns.comments 
@@ -136,6 +137,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns id,key
                 columns.comments 
@@ -366,6 +368,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns id,key
               columns.comments 
@@ -388,6 +391,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns id,key
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/itests/hive-blobstore/src/test/results/clientpositive/insert_overwrite_dynamic_partitions.q.out
----------------------------------------------------------------------
diff --git a/itests/hive-blobstore/src/test/results/clientpositive/insert_overwrite_dynamic_partitions.q.out b/itests/hive-blobstore/src/test/results/clientpositive/insert_overwrite_dynamic_partitions.q.out
index cdb67dd..6dba301 100644
--- a/itests/hive-blobstore/src/test/results/clientpositive/insert_overwrite_dynamic_partitions.q.out
+++ b/itests/hive-blobstore/src/test/results/clientpositive/insert_overwrite_dynamic_partitions.q.out
@@ -140,6 +140,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns 
               columns.comments 
@@ -155,6 +156,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns 
                 columns.comments 
@@ -189,6 +191,7 @@ STAGE PLANS:
                 properties:
                   bucket_count 2
                   bucket_field_name id
+                  bucketing_version 2
                   column.name.delimiter ,
                   columns id
                   columns.comments 
@@ -221,6 +224,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name id
+                bucketing_version 2
                 column.name.delimiter ,
                 columns id
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/itests/hive-blobstore/src/test/results/clientpositive/insert_overwrite_table.q.out
----------------------------------------------------------------------
diff --git a/itests/hive-blobstore/src/test/results/clientpositive/insert_overwrite_table.q.out b/itests/hive-blobstore/src/test/results/clientpositive/insert_overwrite_table.q.out
index 2c23a7e..fdfe44c 100644
--- a/itests/hive-blobstore/src/test/results/clientpositive/insert_overwrite_table.q.out
+++ b/itests/hive-blobstore/src/test/results/clientpositive/insert_overwrite_table.q.out
@@ -95,6 +95,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns id
                           columns.comments 
@@ -141,6 +142,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns 
               columns.comments 
@@ -156,6 +158,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns 
                 columns.comments 
@@ -214,6 +217,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns id
                 columns.comments 
@@ -258,6 +262,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns id
                     columns.comments 
@@ -289,6 +294,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns id
               columns.comments 
@@ -311,6 +317,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns id
                 columns.comments 
@@ -343,6 +350,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns id
                 columns.comments 
@@ -377,6 +385,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns id
                     columns.comments 
@@ -408,6 +417,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns id
               columns.comments 
@@ -430,6 +440,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns id
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/itests/hive-blobstore/src/test/results/clientpositive/write_final_output_blobstore.q.out
----------------------------------------------------------------------
diff --git a/itests/hive-blobstore/src/test/results/clientpositive/write_final_output_blobstore.q.out b/itests/hive-blobstore/src/test/results/clientpositive/write_final_output_blobstore.q.out
index 4016d25..73fe3f9 100644
--- a/itests/hive-blobstore/src/test/results/clientpositive/write_final_output_blobstore.q.out
+++ b/itests/hive-blobstore/src/test/results/clientpositive/write_final_output_blobstore.q.out
@@ -71,6 +71,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key
               columns.comments 
@@ -92,6 +93,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key
                 columns.comments 
@@ -196,6 +198,7 @@ STAGE PLANS:
                 properties:
                   COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true"}}
                   bucket_count -1
+                  bucketing_version 2
                   column.name.delimiter ,
                   columns key
                   columns.comments 
@@ -263,6 +266,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key
                 columns.comments 
@@ -338,6 +342,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key
               columns.comments 
@@ -359,6 +364,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key
                 columns.comments 
@@ -463,6 +469,7 @@ STAGE PLANS:
                 properties:
                   COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true"}}
                   bucket_count -1
+                  bucketing_version 2
                   column.name.delimiter ,
                   columns key
                   columns.comments 
@@ -530,6 +537,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java
index 4ebd096..8ee033d 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java
@@ -1107,7 +1107,7 @@ public class TestCompactor {
       }
       String name = stat[0].getPath().getName();
       Assert.assertEquals(name, "base_0000004");
-      checkExpectedTxnsPresent(stat[0].getPath(), null, columnNamesProperty, columnTypesProperty, 0, 1L, 4L, 2);
+      checkExpectedTxnsPresent(stat[0].getPath(), null, columnNamesProperty, columnTypesProperty, 1, 1L, 4L, 2);
     } finally {
       connection.close();
     }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/itests/src/test/resources/testconfiguration.properties
----------------------------------------------------------------------
diff --git a/itests/src/test/resources/testconfiguration.properties b/itests/src/test/resources/testconfiguration.properties
index 1a34659..2ca7b5f 100644
--- a/itests/src/test/resources/testconfiguration.properties
+++ b/itests/src/test/resources/testconfiguration.properties
@@ -8,14 +8,11 @@ minimr.query.files=infer_bucket_sort_map_operators.q,\
   infer_bucket_sort_num_buckets.q,\
   root_dir_external_table.q,\
   parallel_orderby.q,\
-  bucket_num_reducers.q,\
   udf_using.q,\
   index_bitmap3.q,\
   index_bitmap_auto.q,\
   scriptfile1.q,\
-  bucket_num_reducers2.q,\
   bucket_num_reducers_acid.q,\
-  bucket_num_reducers_acid2.q,\
   scriptfile1_win.q
 
 # These tests are disabled for minimr
@@ -464,6 +461,9 @@ minillaplocal.query.files=\
   bucket_map_join_tez1.q,\
   bucket_map_join_tez2.q,\
   bucket_map_join_tez_empty.q,\
+  bucket_num_reducers.q,\
+  bucket_num_reducers2.q,\
+  bucket_num_reducers_acid2.q,\
   bucketizedhiveinputformat.q,\
   bucketmapjoin6.q,\
   bucketmapjoin7.q,\

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
index c084fa0..962fc5d 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
@@ -66,10 +66,7 @@ import org.apache.hadoop.hive.ql.plan.SkewedColumnPositionPair;
 import org.apache.hadoop.hive.ql.plan.api.OperatorType;
 import org.apache.hadoop.hive.ql.stats.StatsCollectionContext;
 import org.apache.hadoop.hive.ql.stats.StatsPublisher;
-import org.apache.hadoop.hive.serde2.ColumnProjectionUtils;
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.SerDeStats;
-import org.apache.hadoop.hive.serde2.Serializer;
+import org.apache.hadoop.hive.serde2.*;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.ObjectInspectorCopyOption;
@@ -86,6 +83,7 @@ import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.Reporter;
 import org.apache.hadoop.util.ReflectionUtils;
 import org.apache.hive.common.util.HiveStringUtils;
+import org.apache.hive.common.util.Murmur3;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -99,6 +97,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
+import java.util.function.BiFunction;
 
 import static org.apache.hadoop.hive.conf.HiveConf.ConfVars.HIVE_TEMPORARY_TABLE_STORAGE;
 
@@ -144,6 +143,7 @@ public class FileSinkOperator extends TerminalOperator<FileSinkDesc> implements
   private transient Path destTablePath;
   private transient boolean isInsertOverwrite;
   private transient String counterGroup;
+  private transient BiFunction<Object[], ObjectInspector[], Integer> hashFunc;
   /**
    * Counters.
    */
@@ -587,6 +587,11 @@ public class FileSinkOperator extends TerminalOperator<FileSinkDesc> implements
       logEveryNRows = HiveConf.getLongVar(hconf, HiveConf.ConfVars.HIVE_LOG_N_RECORDS);
 
       statsMap.put(getCounterName(Counter.RECORDS_OUT), row_count);
+
+      // Setup hashcode
+      hashFunc = conf.getTableInfo().getBucketingVersion() == 2 ?
+          ObjectInspectorUtils::getBucketHashCode :
+          ObjectInspectorUtils::getBucketHashCodeOld;
     } catch (HiveException e) {
       throw e;
     } catch (Exception e) {
@@ -1050,7 +1055,7 @@ public class FileSinkOperator extends TerminalOperator<FileSinkDesc> implements
       for(int i = 0; i < partitionEval.length; i++) {
         bucketFieldValues[i] = partitionEval[i].evaluate(row);
       }
-      int keyHashCode = ObjectInspectorUtils.getBucketHashCode(bucketFieldValues, partitionObjectInspectors);
+      int keyHashCode = hashFunc.apply(bucketFieldValues, partitionObjectInspectors);
       key.setHashCode(keyHashCode);
       int bucketNum = prtner.getBucket(key, null, totalFiles);
       return bucketMap.get(bucketNum);
@@ -1578,4 +1583,5 @@ public class FileSinkOperator extends TerminalOperator<FileSinkDesc> implements
   private boolean isNativeTable() {
     return !conf.getTableInfo().isNonNative();
   }
+
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
index d59bf1f..bb91eea 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
@@ -478,6 +478,7 @@ public final class FunctionRegistry {
     system.registerGenericUDF("when", GenericUDFWhen.class);
     system.registerGenericUDF("nullif", GenericUDFNullif.class);
     system.registerGenericUDF("hash", GenericUDFHash.class);
+    system.registerGenericUDF("murmur_hash", GenericUDFMurmurHash.class);
     system.registerGenericUDF("coalesce", GenericUDFCoalesce.class);
     system.registerGenericUDF("index", GenericUDFIndex.class);
     system.registerGenericUDF("in_file", GenericUDFInFile.class);

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
index c28ef99..108bb57 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
@@ -90,6 +90,7 @@ public abstract class Operator<T extends OperatorDesc> implements Serializable,C
   private transient Configuration hconf;
   protected final transient Collection<Future<?>> asyncInitOperations = new HashSet<>();
 
+  protected int bucketingVersion = -1;
   // It can be optimized later so that an operator operator (init/close) is performed
   // only after that operation has been performed on all the parents. This will require
   // initializing the whole tree in all the mappers (which might be required for mappers
@@ -1600,4 +1601,12 @@ public abstract class Operator<T extends OperatorDesc> implements Serializable,C
     }
     return true;
   }
+
+  public void setBucketingVersion(int bucketingVersion) {
+    this.bucketingVersion = bucketingVersion;
+  }
+
+  public int getBucketingVersion() {
+    return bucketingVersion;
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorFactory.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorFactory.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorFactory.java
index 21ca04d..7bb6590 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorFactory.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorFactory.java
@@ -265,6 +265,9 @@ public final class OperatorFactory {
     Operator<T> ret = get(oplist0.getCompilationOpContext(), (Class<T>) conf.getClass());
     ret.setConf(conf);
 
+    // Set the bucketing Version
+    ret.setBucketingVersion(oplist0.getBucketingVersion());
+
     // Add the new operator as child of each of the passed in operators
     List<Operator> children = oplist0.getChildOperators();
     children.add(ret);

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java
index d4363fd..caaf543 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java
@@ -27,10 +27,12 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Random;
+import java.util.function.BiFunction;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.ql.CompilationOpContext;
+import org.apache.hadoop.hive.ql.io.AcidUtils;
 import org.apache.hadoop.hive.ql.io.HiveKey;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc;
@@ -39,20 +41,19 @@ import org.apache.hadoop.hive.ql.plan.ExprNodeDescUtils;
 import org.apache.hadoop.hive.ql.plan.ReduceSinkDesc;
 import org.apache.hadoop.hive.ql.plan.TableDesc;
 import org.apache.hadoop.hive.ql.plan.api.OperatorType;
+import org.apache.hadoop.hive.serde2.ByteStream;
 import org.apache.hadoop.hive.serde2.SerDeException;
 import org.apache.hadoop.hive.serde2.Serializer;
+import org.apache.hadoop.hive.serde2.binarysortable.BinarySortableSerDe;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils;
 import org.apache.hadoop.hive.serde2.objectinspector.StandardUnionObjectInspector.StandardUnion;
 import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.UnionObjectInspector;
-import org.apache.hadoop.io.BinaryComparable;
-import org.apache.hadoop.io.BytesWritable;
-import org.apache.hadoop.io.Text;
-import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.io.*;
 import org.apache.hadoop.mapred.OutputCollector;
-import org.apache.hadoop.util.hash.MurmurHash;
+import org.apache.hive.common.util.Murmur3;
 
 /**
  * Reduce Sink Operator sends output to the reduce stage.
@@ -61,7 +62,6 @@ public class ReduceSinkOperator extends TerminalOperator<ReduceSinkDesc>
     implements Serializable, TopNHash.BinaryCollector {
 
   private static final long serialVersionUID = 1L;
-  private static final MurmurHash hash = (MurmurHash) MurmurHash.getInstance();
 
   private transient ObjectInspector[] partitionObjectInspectors;
   private transient ObjectInspector[] bucketObjectInspectors;
@@ -114,11 +114,13 @@ public class ReduceSinkOperator extends TerminalOperator<ReduceSinkDesc>
   protected transient List<List<Integer>> distinctColIndices;
   protected transient Random random;
 
+  protected transient BiFunction<Object[], ObjectInspector[], Integer> hashFunc;
+
   /**
    * This two dimensional array holds key data and a corresponding Union object
    * which contains the tag identifying the aggregate expression for distinct columns.
    *
-   * If there is no distict expression, cachedKeys is simply like this.
+   * If there is no distinct expression, cachedKeys is simply like this.
    * cachedKeys[0] = [col0][col1]
    *
    * with two distict expression, union(tag:key) is attatched for each distinct expression
@@ -228,6 +230,14 @@ public class ReduceSinkOperator extends TerminalOperator<ReduceSinkDesc>
       useUniformHash = conf.getReducerTraits().contains(UNIFORM);
 
       firstRow = true;
+      // acidOp flag has to be checked to use JAVA hash which works like
+      // identity function for integers, necessary to read RecordIdentifier
+      // incase of ACID updates/deletes.
+      boolean acidOp = conf.getWriteType() == AcidUtils.Operation.UPDATE ||
+          conf.getWriteType() == AcidUtils.Operation.DELETE;
+      hashFunc = bucketingVersion == 2 && !acidOp ?
+          ObjectInspectorUtils::getBucketHashCode :
+          ObjectInspectorUtils::getBucketHashCodeOld;
     } catch (Exception e) {
       String msg = "Error initializing ReduceSinkOperator: " + e.getMessage();
       LOG.error(msg, e);
@@ -308,7 +318,7 @@ public class ReduceSinkOperator extends TerminalOperator<ReduceSinkDesc>
       }
 
       // Determine distKeyLength (w/o distincts), and then add the first if present.
-      populateCachedDistributionKeys(row, 0);
+      populateCachedDistributionKeys(row);
 
       // replace bucketing columns with hashcode % numBuckets
       int bucketNumber = -1;
@@ -335,7 +345,6 @@ public class ReduceSinkOperator extends TerminalOperator<ReduceSinkDesc>
       } else {
         hashCode = computeHashCode(row, bucketNumber);
       }
-
       firstKey.setHashCode(hashCode);
 
       /*
@@ -379,20 +388,22 @@ public class ReduceSinkOperator extends TerminalOperator<ReduceSinkDesc>
     }
   }
 
-  private int computeBucketNumber(Object row, int numBuckets) throws HiveException {
+  private int computeBucketNumber(Object row, int numBuckets)
+          throws HiveException, SerDeException {
     Object[] bucketFieldValues = new Object[bucketEval.length];
     for (int i = 0; i < bucketEval.length; i++) {
       bucketFieldValues[i] = bucketEval[i].evaluate(row);
     }
-    return ObjectInspectorUtils.getBucketNumber(bucketFieldValues, bucketObjectInspectors, numBuckets);
+    return ObjectInspectorUtils.getBucketNumber(
+        hashFunc.apply(bucketFieldValues, bucketObjectInspectors), numBuckets);
   }
 
-  private void populateCachedDistributionKeys(Object row, int index) throws HiveException {
+  private void populateCachedDistributionKeys(Object row) throws HiveException {
     for (int i = 0; i < numDistributionKeys; i++) {
-      cachedKeys[index][i] = keyEval[i].evaluate(row);
+      cachedKeys[0][i] = keyEval[i].evaluate(row);
     }
     if (cachedKeys[0].length > numDistributionKeys) {
-      cachedKeys[index][numDistributionKeys] = null;
+      cachedKeys[0][numDistributionKeys] = null;
     }
   }
 
@@ -414,7 +425,7 @@ public class ReduceSinkOperator extends TerminalOperator<ReduceSinkDesc>
   }
 
   protected final int computeMurmurHash(HiveKey firstKey) {
-    return hash.hash(firstKey.getBytes(), firstKey.getDistKeyLength(), 0);
+    return Murmur3.hash32(firstKey.getBytes(), firstKey.getDistKeyLength(), 0);
   }
 
   /**
@@ -439,7 +450,7 @@ public class ReduceSinkOperator extends TerminalOperator<ReduceSinkDesc>
       for(int i = 0; i < partitionEval.length; i++) {
         bucketFieldValues[i] = partitionEval[i].evaluate(row);
       }
-      keyHashCode = ObjectInspectorUtils.getBucketHashCode(bucketFieldValues, partitionObjectInspectors);
+      keyHashCode = hashFunc.apply(bucketFieldValues, partitionObjectInspectors);
     }
     int hashCode = buckNum < 0 ? keyHashCode : keyHashCode * 31 + buckNum;
     if (LOG.isTraceEnabled()) {
@@ -586,4 +597,5 @@ public class ReduceSinkOperator extends TerminalOperator<ReduceSinkDesc>
   public void setOutputCollector(OutputCollector _out) {
     this.out = _out;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
index 2503543..b5a7853 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
@@ -4475,4 +4475,17 @@ public final class Utilities {
           + " on HDFS should be writable. Current permissions are: " + currentHDFSDirPermission);
     }
   }
+
+  // Get the bucketing version stored in the string format
+  public static int getBucketingVersion(final String versionStr) {
+    int bucketingVersion = 1;
+    if (versionStr != null) {
+      try {
+        bucketingVersion = Integer.parseInt(versionStr);
+      } catch (NumberFormatException e) {
+        // Do nothing
+      }
+    }
+    return bucketingVersion;
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/bootstrap/load/table/LoadPartitions.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/bootstrap/load/table/LoadPartitions.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/bootstrap/load/table/LoadPartitions.java
index a42c299..7a95716 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/bootstrap/load/table/LoadPartitions.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/bootstrap/load/table/LoadPartitions.java
@@ -142,7 +142,8 @@ public class LoadPartitions {
       if (table == null) {
         //new table
 
-        table = new Table(tableDesc.getDatabaseName(), tableDesc.getTableName());
+        table = new Table(tableDesc.getDatabaseName(),
+            tableDesc.getTableName());
         if (isPartitioned(tableDesc)) {
           updateReplicationState(initialReplicationState());
           if (!forNewTable().hasReplicationState()) {


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/groupby_sort_1_23.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_1_23.q.out b/ql/src/test/results/clientpositive/groupby_sort_1_23.q.out
index 4d8dd74..11ef8b1 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_1_23.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_1_23.q.out
@@ -87,6 +87,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,cnt
                           columns.comments 
@@ -135,6 +136,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -158,6 +160,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -227,6 +230,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -270,6 +274,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -300,6 +305,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -321,6 +327,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -357,6 +364,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -387,6 +395,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -408,6 +417,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -522,6 +532,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -545,6 +556,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -589,6 +601,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,cnt
                     columns.comments 
@@ -647,6 +660,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -824,6 +838,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,cnt
                           columns.comments 
@@ -872,6 +887,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -895,6 +911,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -964,6 +981,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -1007,6 +1025,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -1037,6 +1056,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -1058,6 +1078,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -1094,6 +1115,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -1124,6 +1146,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -1145,6 +1168,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -1249,6 +1273,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,cnt
                           columns.comments 
@@ -1297,6 +1322,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -1320,6 +1346,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -1389,6 +1416,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -1432,6 +1460,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -1462,6 +1491,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -1483,6 +1513,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -1519,6 +1550,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -1549,6 +1581,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -1570,6 +1603,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -1682,6 +1716,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,cnt
                           columns.comments 
@@ -1730,6 +1765,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -1753,6 +1789,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -1822,6 +1859,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -1865,6 +1903,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,cnt
                     columns.comments 
@@ -1895,6 +1934,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,cnt
               columns.comments 
@@ -1916,6 +1956,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -1952,6 +1993,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,cnt
                     columns.comments 
@@ -1982,6 +2024,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,cnt
               columns.comments 
@@ -2003,6 +2046,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -2118,6 +2162,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -2141,6 +2186,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -2185,6 +2231,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,cnt
                     columns.comments 
@@ -2243,6 +2290,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -2423,6 +2471,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -2446,6 +2495,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -2490,6 +2540,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,cnt
                     columns.comments 
@@ -2548,6 +2599,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -2740,6 +2792,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -2763,6 +2816,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -2807,6 +2861,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -2865,6 +2920,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -3054,6 +3110,7 @@ STAGE PLANS:
                           properties:
                             COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,cnt
                             columns.comments 
@@ -3122,6 +3179,7 @@ STAGE PLANS:
                           properties:
                             COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,cnt
                             columns.comments 
@@ -3170,6 +3228,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -3193,6 +3252,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -3262,6 +3322,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -3305,6 +3366,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -3335,6 +3397,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -3356,6 +3419,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -3392,6 +3456,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -3422,6 +3487,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -3443,6 +3509,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -3575,6 +3642,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -3598,6 +3666,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -3684,6 +3753,7 @@ STAGE PLANS:
                           properties:
                             COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,cnt
                             columns.comments 
@@ -3740,6 +3810,7 @@ STAGE PLANS:
                       properties:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                         bucket_count -1
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,cnt
                         columns.comments 
@@ -3810,6 +3881,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -3833,6 +3905,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -3903,6 +3976,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -3946,6 +4020,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -3976,6 +4051,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -3997,6 +4073,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -4033,6 +4110,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -4063,6 +4141,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,cnt
               columns.comments 
@@ -4084,6 +4163,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -4233,6 +4313,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -4256,6 +4337,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -4302,6 +4384,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -4360,6 +4443,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -4550,6 +4634,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -4573,6 +4658,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -4691,6 +4777,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -4714,6 +4801,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -4849,6 +4937,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -4872,6 +4961,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -4916,6 +5006,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -4974,6 +5065,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -5149,6 +5241,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,key3,cnt
                           columns.comments 
@@ -5197,6 +5290,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -5220,6 +5314,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -5289,6 +5384,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -5332,6 +5428,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,cnt
                     columns.comments 
@@ -5362,6 +5459,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,cnt
               columns.comments 
@@ -5383,6 +5481,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -5419,6 +5518,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,cnt
                     columns.comments 
@@ -5449,6 +5549,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,cnt
               columns.comments 
@@ -5470,6 +5571,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -5585,6 +5687,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,key3,key4,cnt
                           columns.comments 
@@ -5633,6 +5736,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -5656,6 +5760,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -5725,6 +5830,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,key4,cnt
                 columns.comments 
@@ -5768,6 +5874,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,key4,cnt
                     columns.comments 
@@ -5798,6 +5905,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,key4,cnt
               columns.comments 
@@ -5819,6 +5927,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,key4,cnt
                 columns.comments 
@@ -5855,6 +5964,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,key4,cnt
                     columns.comments 
@@ -5885,6 +5995,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,key4,cnt
               columns.comments 
@@ -5906,6 +6017,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,key4,cnt
                 columns.comments 
@@ -6020,6 +6132,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,key3,cnt
                           columns.comments 
@@ -6068,6 +6181,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -6091,6 +6205,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -6160,6 +6275,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -6203,6 +6319,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,cnt
                     columns.comments 
@@ -6233,6 +6350,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,cnt
               columns.comments 
@@ -6254,6 +6372,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -6290,6 +6409,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,cnt
                     columns.comments 
@@ -6320,6 +6440,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,cnt
               columns.comments 
@@ -6341,6 +6462,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -6462,6 +6584,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,key3,cnt
                           columns.comments 
@@ -6510,6 +6633,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,val
               columns.comments 
@@ -6533,6 +6657,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -6602,6 +6727,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -6645,6 +6771,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,cnt
                     columns.comments 
@@ -6675,6 +6802,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,cnt
               columns.comments 
@@ -6696,6 +6824,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -6732,6 +6861,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key1,key2,key3,cnt
                     columns.comments 
@@ -6762,6 +6892,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key1,key2,key3,cnt
               columns.comments 
@@ -6783,6 +6914,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/groupby_sort_6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_6.q.out b/ql/src/test/results/clientpositive/groupby_sort_6.q.out
index 13f8bdf..fae54eb 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_6.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_6.q.out
@@ -85,6 +85,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -143,6 +144,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -340,6 +342,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -398,6 +401,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -591,6 +595,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,val
                 columns.comments 
@@ -633,6 +638,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,cnt
                     columns.comments 
@@ -691,6 +697,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/sample1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/sample1.q.out b/ql/src/test/results/clientpositive/sample1.q.out
index 6d58658..09b9ac7 100644
--- a/ql/src/test/results/clientpositive/sample1.q.out
+++ b/ql/src/test/results/clientpositive/sample1.q.out
@@ -55,6 +55,7 @@ STAGE PLANS:
                       properties:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"dt":"true","hr":"true","key":"true","value":"true"}}
                         bucket_count -1
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value,dt,hr
                         columns.comments 
@@ -126,6 +127,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'
@@ -193,6 +195,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"dt":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,dt,hr
                 columns.comments 
@@ -236,6 +239,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"dt":"true","hr":"true","key":"true","value":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value,dt,hr
                     columns.comments 
@@ -266,6 +270,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"dt":"true","hr":"true","key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value,dt,hr
               columns.comments 
@@ -287,6 +292,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"dt":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,dt,hr
                 columns.comments 
@@ -323,6 +329,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"dt":"true","hr":"true","key":"true","value":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value,dt,hr
                     columns.comments 
@@ -353,6 +360,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"dt":"true","hr":"true","key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value,dt,hr
               columns.comments 
@@ -374,6 +382,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"dt":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,dt,hr
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/sample2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/sample2.q.out b/ql/src/test/results/clientpositive/sample2.q.out
index 164ce43..53c3df2 100644
--- a/ql/src/test/results/clientpositive/sample2.q.out
+++ b/ql/src/test/results/clientpositive/sample2.q.out
@@ -54,6 +54,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 
@@ -101,6 +102,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -123,6 +125,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -192,6 +195,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 
@@ -235,6 +239,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 
@@ -265,6 +270,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 
@@ -286,6 +292,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 
@@ -322,6 +329,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 
@@ -352,6 +360,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 
@@ -373,6 +382,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 
@@ -421,205 +431,188 @@ order by key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@dest1
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
-0	val_1
-0	val_1
 2	val_2
 2	val_3
-4	val_4
-4	val_5
+3	val_4
 6	val_7
 6	val_7
-8	val_8
-8	val_9
 10	val_10
 10	val_11
-12	val_12
-12	val_12
-12	val_13
-16	val_17
-16	val_17
-18	val_18
-18	val_18
+17	val_17
+19	val_19
+19	val_20
 20	val_20
 20	val_21
 20	val_21
-22	val_23
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
+21	val_22
+21	val_22
+21	val_22
+21	val_22
+27	val_27
+29	val_30
+29	val_30
 30	val_30
 30	val_31
-32	val_33
-34	val_34
+31	val_32
 40	val_41
 40	val_41
-42	val_42
-42	val_42
-42	val_43
-42	val_43
-42	val_43
-44	val_44
+41	val_41
+43	val_43
 46	val_47
 48	val_49
 48	val_49
-50	val_51
-52	val_53
-52	val_53
-52	val_53
-52	val_53
+51	val_51
+51	val_51
+51	val_52
 54	val_54
-56	val_57
+57	val_57
 58	val_58
 58	val_58
 58	val_59
 58	val_59
+59	val_60
 60	val_61
-62	val_63
-62	val_63
+61	val_62
 64	val_64
-66	val_66
+65	val_65
+65	val_66
+65	val_66
+67	val_67
+67	val_67
 68	val_69
+69	val_69
+69	val_70
 70	val_70
 70	val_70
 70	val_70
 70	val_71
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-76	val_77
-76	val_77
-76	val_77
-78	val_78
-78	val_79
+77	val_77
+77	val_78
+77	val_78
 80	val_80
 80	val_81
-82	val_82
-82	val_83
-82	val_83
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
+85	val_86
 86	val_86
 86	val_87
+89	val_90
+89	val_90
+89	val_90
 90	val_90
 90	val_90
 90	val_90
-92	val_92
-94	val_95
+91	val_92
+93	val_94
+93	val_94
+93	val_94
 96	val_96
+97	val_97
+97	val_97
+97	val_98
+97	val_98
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-100	val_101
-100	val_101
-102	val_103
-104	val_104
-104	val_104
-104	val_105
-104	val_105
-104	val_105
+99	val_100
+101	val_102
+105	val_105
+105	val_106
+105	val_106
 106	val_107
 110	val_111
-114	val_114
-114	val_115
-114	val_115
-114	val_115
+113	val_113
+113	val_113
 116	val_116
 116	val_117
-118	val_118
-118	val_118
-118	val_119
-118	val_119
-118	val_119
-120	val_120
-120	val_120
-120	val_121
-122	val_123
-122	val_123
-122	val_123
+117	val_118
+117	val_118
+119	val_119
+119	val_119
+119	val_119
+119	val_120
+119	val_120
+119	val_120
+121	val_122
+121	val_122
+123	val_124
+123	val_124
 126	val_126
 126	val_127
 126	val_127
-128	val_128
-128	val_128
-128	val_128
-128	val_129
-128	val_129
 132	val_133
 132	val_133
+133	val_133
+133	val_134
 134	val_134
 134	val_134
 134	val_135
-136	val_136
-136	val_137
-138	val_138
-138	val_138
-138	val_138
-138	val_138
-138	val_139
-138	val_139
+135	val_136
+135	val_136
+135	val_136
+137	val_137
+137	val_137
+137	val_138
 140	val_141
-144	val_145
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
-152	val_153
-152	val_153
-152	val_153
+149	val_149
+149	val_149
+149	val_150
+153	val_153
+153	val_154
+153	val_154
 156	val_156
 156	val_157
 156	val_157
+157	val_157
+157	val_158
+157	val_158
 158	val_158
-160	val_160
-160	val_161
 162	val_162
 162	val_163
+163	val_163
 164	val_164
 164	val_164
 164	val_165
 164	val_165
-166	val_166
-168	val_168
-168	val_169
-170	val_170
-170	val_171
-172	val_172
-172	val_172
-172	val_173
-174	val_174
-174	val_174
-174	val_175
-174	val_175
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+165	val_166
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+177	val_177
+177	val_178
+177	val_178
 178	val_178
 178	val_179
 178	val_179
-180	val_180
+181	val_181
 182	val_183
 184	val_185
-186	val_186
+185	val_186
+187	val_187
+187	val_187
+187	val_187
 190	val_190
-192	val_192
-192	val_193
-194	val_194
-196	val_196
-196	val_197
-196	val_197
-196	val_197
-200	val_200
-200	val_200
+191	val_191
+191	val_191
+191	val_192
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+197	val_198
+199	val_199
+199	val_199
+199	val_199
+199	val_200
+201	val_201
 202	val_202
-204	val_205
 206	val_207
 206	val_207
 206	val_207
@@ -628,95 +621,80 @@ POSTHOOK: Input: default@dest1
 208	val_208
 212	val_213
 214	val_214
+215	val_216
 216	val_216
 216	val_216
 216	val_217
-218	val_218
-222	val_222
-222	val_223
-224	val_224
-224	val_224
-224	val_225
+221	val_221
+221	val_221
 226	val_226
 226	val_227
 226	val_227
 226	val_227
 226	val_227
-228	val_228
-228	val_229
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+231	val_232
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
 238	val_239
+239	val_239
+239	val_239
+239	val_240
+239	val_240
 240	val_241
-242	val_242
-242	val_242
-242	val_243
+243	val_244
+243	val_244
 244	val_244
 244	val_245
 244	val_245
 244	val_245
-246	val_247
-246	val_247
 248	val_248
 248	val_249
+249	val_249
+249	val_250
+249	val_250
 252	val_252
 252	val_253
 254	val_255
+255	val_255
+255	val_255
 256	val_256
 256	val_256
 256	val_257
-258	val_258
-258	val_259
 260	val_260
 260	val_261
 260	val_261
-262	val_262
-262	val_263
-262	val_263
-264	val_265
-264	val_265
+261	val_262
 266	val_266
-268	val_269
+271	val_272
 272	val_272
 272	val_272
 272	val_273
-274	val_274
-274	val_275
 276	val_277
-278	val_278
-278	val_278
-278	val_279
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 284	val_285
 284	val_285
 286	val_286
 286	val_287
-288	val_288
-288	val_288
+287	val_287
+287	val_288
+287	val_288
+289	val_289
+289	val_290
+291	val_291
+291	val_292
+291	val_292
 292	val_292
 292	val_293
 292	val_293
-296	val_296
-296	val_297
-298	val_298
-298	val_298
-298	val_298
-300	val_301
-300	val_301
-302	val_302
-302	val_303
 304	val_305
-306	val_306
-306	val_307
+307	val_307
+307	val_307
 308	val_308
 308	val_309
 308	val_309
@@ -724,63 +702,83 @@ POSTHOOK: Input: default@dest1
 310	val_311
 310	val_311
 310	val_311
-314	val_315
+311	val_311
+311	val_311
+311	val_311
+313	val_314
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-318	val_319
-322	val_322
-322	val_322
-322	val_323
+317	val_317
+317	val_317
+317	val_318
 324	val_325
+325	val_325
+325	val_325
 326	val_327
-328	val_329
-328	val_329
-330	val_331
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 334	val_335
 336	val_336
 336	val_337
+337	val_338
 338	val_338
 338	val_339
-340	val_341
+339	val_339
+341	val_341
+341	val_342
+341	val_342
+341	val_342
 342	val_342
 342	val_342
 342	val_343
+343	val_344
 344	val_344
 344	val_344
 344	val_345
+347	val_348
+347	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_349
+349	val_350
+349	val_350
+349	val_350
+349	val_350
+351	val_351
+351	val_352
+351	val_352
 352	val_353
 352	val_353
-356	val_356
-356	val_357
-356	val_357
-358	val_359
+353	val_353
+353	val_353
+353	val_354
+355	val_356
+355	val_356
 360	val_360
 360	val_361
 362	val_362
 364	val_364
 364	val_365
-366	val_366
+365	val_365
 368	val_368
-374	val_374
-374	val_375
-376	val_377
+369	val_369
+369	val_369
+369	val_369
+369	val_370
+371	val_372
+371	val_372
+371	val_372
+371	val_372
+377	val_377
 378	val_378
 378	val_379
-382	val_382
-382	val_382
-382	val_383
-382	val_383
 384	val_384
 384	val_384
 384	val_384
@@ -791,18 +789,24 @@ POSTHOOK: Input: default@dest1
 386	val_387
 386	val_387
 388	val_389
-390	val_391
-390	val_391
-390	val_391
+391	val_392
+391	val_392
 392	val_392
 392	val_393
 392	val_393
+393	val_393
+393	val_394
+393	val_394
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-398	val_399
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
+399	val_400
+399	val_400
 402	val_402
 402	val_403
 402	val_403
@@ -812,25 +816,36 @@ POSTHOOK: Input: default@dest1
 404	val_405
 404	val_405
 404	val_405
-406	val_406
-406	val_406
-406	val_406
-406	val_406
-406	val_407
+407	val_407
+407	val_408
+407	val_408
+407	val_408
 408	val_409
 408	val_409
+409	val_409
+409	val_409
+409	val_409
+409	val_410
+409	val_410
 410	val_411
-412	val_413
-412	val_413
+411	val_411
+411	val_412
 414	val_414
 414	val_414
 414	val_415
-416	val_417
-418	val_418
-424	val_424
-424	val_424
-424	val_425
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+421	val_422
+421	val_422
+423	val_424
+425	val_426
 426	val_427
+427	val_427
+427	val_428
+427	val_428
 428	val_429
 430	val_430
 430	val_430
@@ -838,25 +853,24 @@ POSTHOOK: Input: default@dest1
 430	val_431
 432	val_432
 432	val_433
-436	val_436
-436	val_437
-438	val_438
-438	val_438
-438	val_438
-438	val_439
-438	val_439
+435	val_435
+435	val_436
+437	val_437
+437	val_438
 440	val_441
 440	val_441
-442	val_443
+443	val_443
+443	val_444
+443	val_444
+443	val_444
 444	val_444
 446	val_446
 446	val_447
 446	val_447
-448	val_448
-448	val_449
-450	val_451
-450	val_451
+449	val_449
 452	val_452
+453	val_453
+453	val_454
 454	val_454
 454	val_454
 454	val_454
@@ -864,23 +878,19 @@ POSTHOOK: Input: default@dest1
 454	val_455
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
-462	val_463
+459	val_459
+459	val_459
+459	val_460
+463	val_463
+463	val_463
+463	val_464
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-468	val_469
-468	val_469
-468	val_469
-470	val_470
-470	val_471
+467	val_467
+467	val_468
 472	val_472
+473	val_474
 474	val_475
 474	val_475
 476	val_477
@@ -889,6 +899,7 @@ POSTHOOK: Input: default@dest1
 478	val_478
 478	val_479
 478	val_479
+479	val_479
 480	val_480
 480	val_480
 480	val_480
@@ -896,21 +907,23 @@ POSTHOOK: Input: default@dest1
 480	val_481
 482	val_482
 482	val_483
+483	val_483
 484	val_484
 484	val_485
-486	val_487
+485	val_485
+485	val_486
+485	val_486
 488	val_489
 490	val_490
 490	val_491
-492	val_492
-492	val_492
-492	val_493
-492	val_493
-494	val_494
-494	val_495
-494	val_495
-496	val_496
-496	val_497
+491	val_491
+491	val_492
+491	val_492
+495	val_495
+495	val_496
+497	val_497
+497	val_498
+497	val_498
 498	val_498
 498	val_498
 498	val_498

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/sample3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/sample3.q.out b/ql/src/test/results/clientpositive/sample3.q.out
index 700c663..183ad2d 100644
--- a/ql/src/test/results/clientpositive/sample3.q.out
+++ b/ql/src/test/results/clientpositive/sample3.q.out
@@ -49,192 +49,221 @@ FROM srcbucket TABLESAMPLE (BUCKET 1 OUT OF 5 on key) s SORT BY key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket
 #### A masked pattern was here ####
-0
-0
-0
-0
-0
-10
-10
-100
-100
-100
-100
-105
-105
-105
-110
-120
-120
-120
+1
+103
+103
+122
+122
+122
 125
 125
 125
-135
-135
-135
-140
-145
-15
-15
-15
-15
-150
+133
+133
+147
+147
 155
-160
-160
+16
+16
+161
+161
+161
+161
+162
+162
+163
 165
 165
 165
-170
-170
-175
-175
-175
-175
-180
-185
-190
-195
-195
-20
-20
-20
-200
-200
-205
-205
-205
-215
+18
+18
+194
+196
+196
+196
+196
+21
+21
+21
+21
+222
+222
 230
 230
 230
 230
 230
-235
-235
+237
+237
+238
+238
+238
+24
+24
 240
-245
-245
-255
-255
+246
+246
+256
+256
+256
 260
 260
 260
-265
-265
-265
+264
+264
+273
+273
+273
+273
 275
 275
 275
-280
-280
-285
-285
-295
-295
-30
-30
-300
-300
+276
+278
+278
+278
+288
+288
+289
+289
+296
+296
+302
+302
 305
 305
-310
-310
-310
-310
-315
-325
-325
-330
+311
+311
+311
+32
+323
+323
+33
+33
+332
 335
 335
 335
-340
-345
+344
+344
+344
 35
 35
 35
 35
 35
 35
+352
+352
 355
 355
-360
-360
-365
-375
-375
-375
-375
-375
-375
-385
-385
-390
-390
-390
-395
-395
-395
-395
-40
-40
-400
+362
+366
+369
+369
+369
+369
+37
+37
+373
+373
+379
+379
+391
+391
+393
+393
+393
+397
+397
 405
+407
+407
+407
+407
+41
 410
-415
+411
+411
+416
 425
-430
-430
-430
-430
+43
+432
+432
 435
 435
-440
-440
+436
+436
+439
+439
+439
+439
+441
 450
 450
+453
+453
+454
+454
+454
+454
+454
 455
 455
 455
 460
+466
+466
+466
+469
+469
+469
+469
+469
+469
 470
 470
-475
-475
-480
-480
-480
-480
-480
-485
-485
-485
-490
-490
-495
-495
-5
-5
-5
-5
-50
-60
-65
-65
-65
-70
-70
-70
-70
-75
-80
-80
-85
-85
-90
-90
-90
-95
-95
+481
+481
+484
+484
+492
+492
+492
+492
+493
+494
+494
+494
+498
+498
+498
+51
+51
+51
+52
+52
+52
+52
+53
+53
+54
+61
+68
+69
+69
+72
+72
+8
+8
+87
+87
+87
+89
+89
+89
+91
+93
+93
+93
+96

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/sample4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/sample4.q.out b/ql/src/test/results/clientpositive/sample4.q.out
index ff97dd0..46ec309 100644
--- a/ql/src/test/results/clientpositive/sample4.q.out
+++ b/ql/src/test/results/clientpositive/sample4.q.out
@@ -54,6 +54,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 
@@ -101,6 +102,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -123,6 +125,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -192,6 +195,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 
@@ -235,6 +239,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 
@@ -265,6 +270,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 
@@ -286,6 +292,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 
@@ -322,6 +329,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 
@@ -352,6 +360,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 
@@ -373,6 +382,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 
@@ -421,205 +431,188 @@ order by key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@dest1
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
-0	val_1
-0	val_1
 2	val_2
 2	val_3
-4	val_4
-4	val_5
+3	val_4
 6	val_7
 6	val_7
-8	val_8
-8	val_9
 10	val_10
 10	val_11
-12	val_12
-12	val_12
-12	val_13
-16	val_17
-16	val_17
-18	val_18
-18	val_18
+17	val_17
+19	val_19
+19	val_20
 20	val_20
 20	val_21
 20	val_21
-22	val_23
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
+21	val_22
+21	val_22
+21	val_22
+21	val_22
+27	val_27
+29	val_30
+29	val_30
 30	val_30
 30	val_31
-32	val_33
-34	val_34
+31	val_32
 40	val_41
 40	val_41
-42	val_42
-42	val_42
-42	val_43
-42	val_43
-42	val_43
-44	val_44
+41	val_41
+43	val_43
 46	val_47
 48	val_49
 48	val_49
-50	val_51
-52	val_53
-52	val_53
-52	val_53
-52	val_53
+51	val_51
+51	val_51
+51	val_52
 54	val_54
-56	val_57
+57	val_57
 58	val_58
 58	val_58
 58	val_59
 58	val_59
+59	val_60
 60	val_61
-62	val_63
-62	val_63
+61	val_62
 64	val_64
-66	val_66
+65	val_65
+65	val_66
+65	val_66
+67	val_67
+67	val_67
 68	val_69
+69	val_69
+69	val_70
 70	val_70
 70	val_70
 70	val_70
 70	val_71
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-76	val_77
-76	val_77
-76	val_77
-78	val_78
-78	val_79
+77	val_77
+77	val_78
+77	val_78
 80	val_80
 80	val_81
-82	val_82
-82	val_83
-82	val_83
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
+85	val_86
 86	val_86
 86	val_87
+89	val_90
+89	val_90
+89	val_90
 90	val_90
 90	val_90
 90	val_90
-92	val_92
-94	val_95
+91	val_92
+93	val_94
+93	val_94
+93	val_94
 96	val_96
+97	val_97
+97	val_97
+97	val_98
+97	val_98
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-100	val_101
-100	val_101
-102	val_103
-104	val_104
-104	val_104
-104	val_105
-104	val_105
-104	val_105
+99	val_100
+101	val_102
+105	val_105
+105	val_106
+105	val_106
 106	val_107
 110	val_111
-114	val_114
-114	val_115
-114	val_115
-114	val_115
+113	val_113
+113	val_113
 116	val_116
 116	val_117
-118	val_118
-118	val_118
-118	val_119
-118	val_119
-118	val_119
-120	val_120
-120	val_120
-120	val_121
-122	val_123
-122	val_123
-122	val_123
+117	val_118
+117	val_118
+119	val_119
+119	val_119
+119	val_119
+119	val_120
+119	val_120
+119	val_120
+121	val_122
+121	val_122
+123	val_124
+123	val_124
 126	val_126
 126	val_127
 126	val_127
-128	val_128
-128	val_128
-128	val_128
-128	val_129
-128	val_129
 132	val_133
 132	val_133
+133	val_133
+133	val_134
 134	val_134
 134	val_134
 134	val_135
-136	val_136
-136	val_137
-138	val_138
-138	val_138
-138	val_138
-138	val_138
-138	val_139
-138	val_139
+135	val_136
+135	val_136
+135	val_136
+137	val_137
+137	val_137
+137	val_138
 140	val_141
-144	val_145
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
-152	val_153
-152	val_153
-152	val_153
+149	val_149
+149	val_149
+149	val_150
+153	val_153
+153	val_154
+153	val_154
 156	val_156
 156	val_157
 156	val_157
+157	val_157
+157	val_158
+157	val_158
 158	val_158
-160	val_160
-160	val_161
 162	val_162
 162	val_163
+163	val_163
 164	val_164
 164	val_164
 164	val_165
 164	val_165
-166	val_166
-168	val_168
-168	val_169
-170	val_170
-170	val_171
-172	val_172
-172	val_172
-172	val_173
-174	val_174
-174	val_174
-174	val_175
-174	val_175
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+165	val_166
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+177	val_177
+177	val_178
+177	val_178
 178	val_178
 178	val_179
 178	val_179
-180	val_180
+181	val_181
 182	val_183
 184	val_185
-186	val_186
+185	val_186
+187	val_187
+187	val_187
+187	val_187
 190	val_190
-192	val_192
-192	val_193
-194	val_194
-196	val_196
-196	val_197
-196	val_197
-196	val_197
-200	val_200
-200	val_200
+191	val_191
+191	val_191
+191	val_192
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+197	val_198
+199	val_199
+199	val_199
+199	val_199
+199	val_200
+201	val_201
 202	val_202
-204	val_205
 206	val_207
 206	val_207
 206	val_207
@@ -628,95 +621,80 @@ POSTHOOK: Input: default@dest1
 208	val_208
 212	val_213
 214	val_214
+215	val_216
 216	val_216
 216	val_216
 216	val_217
-218	val_218
-222	val_222
-222	val_223
-224	val_224
-224	val_224
-224	val_225
+221	val_221
+221	val_221
 226	val_226
 226	val_227
 226	val_227
 226	val_227
 226	val_227
-228	val_228
-228	val_229
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+231	val_232
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
 238	val_239
+239	val_239
+239	val_239
+239	val_240
+239	val_240
 240	val_241
-242	val_242
-242	val_242
-242	val_243
+243	val_244
+243	val_244
 244	val_244
 244	val_245
 244	val_245
 244	val_245
-246	val_247
-246	val_247
 248	val_248
 248	val_249
+249	val_249
+249	val_250
+249	val_250
 252	val_252
 252	val_253
 254	val_255
+255	val_255
+255	val_255
 256	val_256
 256	val_256
 256	val_257
-258	val_258
-258	val_259
 260	val_260
 260	val_261
 260	val_261
-262	val_262
-262	val_263
-262	val_263
-264	val_265
-264	val_265
+261	val_262
 266	val_266
-268	val_269
+271	val_272
 272	val_272
 272	val_272
 272	val_273
-274	val_274
-274	val_275
 276	val_277
-278	val_278
-278	val_278
-278	val_279
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 284	val_285
 284	val_285
 286	val_286
 286	val_287
-288	val_288
-288	val_288
+287	val_287
+287	val_288
+287	val_288
+289	val_289
+289	val_290
+291	val_291
+291	val_292
+291	val_292
 292	val_292
 292	val_293
 292	val_293
-296	val_296
-296	val_297
-298	val_298
-298	val_298
-298	val_298
-300	val_301
-300	val_301
-302	val_302
-302	val_303
 304	val_305
-306	val_306
-306	val_307
+307	val_307
+307	val_307
 308	val_308
 308	val_309
 308	val_309
@@ -724,63 +702,83 @@ POSTHOOK: Input: default@dest1
 310	val_311
 310	val_311
 310	val_311
-314	val_315
+311	val_311
+311	val_311
+311	val_311
+313	val_314
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-318	val_319
-322	val_322
-322	val_322
-322	val_323
+317	val_317
+317	val_317
+317	val_318
 324	val_325
+325	val_325
+325	val_325
 326	val_327
-328	val_329
-328	val_329
-330	val_331
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 334	val_335
 336	val_336
 336	val_337
+337	val_338
 338	val_338
 338	val_339
-340	val_341
+339	val_339
+341	val_341
+341	val_342
+341	val_342
+341	val_342
 342	val_342
 342	val_342
 342	val_343
+343	val_344
 344	val_344
 344	val_344
 344	val_345
+347	val_348
+347	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_349
+349	val_350
+349	val_350
+349	val_350
+349	val_350
+351	val_351
+351	val_352
+351	val_352
 352	val_353
 352	val_353
-356	val_356
-356	val_357
-356	val_357
-358	val_359
+353	val_353
+353	val_353
+353	val_354
+355	val_356
+355	val_356
 360	val_360
 360	val_361
 362	val_362
 364	val_364
 364	val_365
-366	val_366
+365	val_365
 368	val_368
-374	val_374
-374	val_375
-376	val_377
+369	val_369
+369	val_369
+369	val_369
+369	val_370
+371	val_372
+371	val_372
+371	val_372
+371	val_372
+377	val_377
 378	val_378
 378	val_379
-382	val_382
-382	val_382
-382	val_383
-382	val_383
 384	val_384
 384	val_384
 384	val_384
@@ -791,18 +789,24 @@ POSTHOOK: Input: default@dest1
 386	val_387
 386	val_387
 388	val_389
-390	val_391
-390	val_391
-390	val_391
+391	val_392
+391	val_392
 392	val_392
 392	val_393
 392	val_393
+393	val_393
+393	val_394
+393	val_394
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-398	val_399
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
+399	val_400
+399	val_400
 402	val_402
 402	val_403
 402	val_403
@@ -812,25 +816,36 @@ POSTHOOK: Input: default@dest1
 404	val_405
 404	val_405
 404	val_405
-406	val_406
-406	val_406
-406	val_406
-406	val_406
-406	val_407
+407	val_407
+407	val_408
+407	val_408
+407	val_408
 408	val_409
 408	val_409
+409	val_409
+409	val_409
+409	val_409
+409	val_410
+409	val_410
 410	val_411
-412	val_413
-412	val_413
+411	val_411
+411	val_412
 414	val_414
 414	val_414
 414	val_415
-416	val_417
-418	val_418
-424	val_424
-424	val_424
-424	val_425
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+421	val_422
+421	val_422
+423	val_424
+425	val_426
 426	val_427
+427	val_427
+427	val_428
+427	val_428
 428	val_429
 430	val_430
 430	val_430
@@ -838,25 +853,24 @@ POSTHOOK: Input: default@dest1
 430	val_431
 432	val_432
 432	val_433
-436	val_436
-436	val_437
-438	val_438
-438	val_438
-438	val_438
-438	val_439
-438	val_439
+435	val_435
+435	val_436
+437	val_437
+437	val_438
 440	val_441
 440	val_441
-442	val_443
+443	val_443
+443	val_444
+443	val_444
+443	val_444
 444	val_444
 446	val_446
 446	val_447
 446	val_447
-448	val_448
-448	val_449
-450	val_451
-450	val_451
+449	val_449
 452	val_452
+453	val_453
+453	val_454
 454	val_454
 454	val_454
 454	val_454
@@ -864,23 +878,19 @@ POSTHOOK: Input: default@dest1
 454	val_455
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
-462	val_463
+459	val_459
+459	val_459
+459	val_460
+463	val_463
+463	val_463
+463	val_464
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-468	val_469
-468	val_469
-468	val_469
-470	val_470
-470	val_471
+467	val_467
+467	val_468
 472	val_472
+473	val_474
 474	val_475
 474	val_475
 476	val_477
@@ -889,6 +899,7 @@ POSTHOOK: Input: default@dest1
 478	val_478
 478	val_479
 478	val_479
+479	val_479
 480	val_480
 480	val_480
 480	val_480
@@ -896,21 +907,23 @@ POSTHOOK: Input: default@dest1
 480	val_481
 482	val_482
 482	val_483
+483	val_483
 484	val_484
 484	val_485
-486	val_487
+485	val_485
+485	val_486
+485	val_486
 488	val_489
 490	val_490
 490	val_491
-492	val_492
-492	val_492
-492	val_493
-492	val_493
-494	val_494
-494	val_495
-494	val_495
-496	val_496
-496	val_497
+491	val_491
+491	val_492
+491	val_492
+495	val_495
+495	val_496
+497	val_497
+497	val_498
+497	val_498
 498	val_498
 498	val_498
 498	val_498

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/sample5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/sample5.q.out b/ql/src/test/results/clientpositive/sample5.q.out
index 6d50ff5..6bfb366 100644
--- a/ql/src/test/results/clientpositive/sample5.q.out
+++ b/ql/src/test/results/clientpositive/sample5.q.out
@@ -55,6 +55,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 
@@ -102,6 +103,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -124,6 +126,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -193,6 +196,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 
@@ -236,6 +240,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 
@@ -266,6 +271,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 
@@ -287,6 +293,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 
@@ -323,6 +330,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 
@@ -353,6 +361,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 
@@ -374,6 +383,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 
@@ -422,192 +432,221 @@ POSTHOOK: query: SELECT dest1.* FROM dest1 SORT BY key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@dest1
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
-0	val_1
-0	val_1
-10	val_10
-10	val_11
-100	val_100
-100	val_100
-100	val_101
-100	val_101
-105	val_105
-105	val_106
-105	val_106
-110	val_111
-120	val_120
-120	val_120
-120	val_121
+1	val_2
+103	val_103
+103	val_103
+122	val_123
+122	val_123
+122	val_123
 125	val_125
 125	val_125
 125	val_126
-135	val_136
-135	val_136
-135	val_136
-140	val_141
-145	val_145
-15	val_15
-15	val_15
-15	val_16
-15	val_16
-150	val_150
+133	val_133
+133	val_134
+147	val_148
+147	val_148
 155	val_155
-160	val_160
-160	val_161
+16	val_17
+16	val_17
+161	val_162
+161	val_162
+161	val_162
+161	val_162
+162	val_162
+162	val_163
+163	val_163
 165	val_165
 165	val_165
 165	val_166
-170	val_170
-170	val_171
-175	val_175
-175	val_175
-175	val_176
-175	val_176
-180	val_180
-185	val_186
-190	val_190
-195	val_195
-195	val_195
-20	val_20
-20	val_21
-20	val_21
-200	val_200
-200	val_200
-205	val_205
-205	val_205
-205	val_206
-215	val_216
+18	val_18
+18	val_18
+194	val_194
+196	val_196
+196	val_197
+196	val_197
+196	val_197
+21	val_22
+21	val_22
+21	val_22
+21	val_22
+222	val_222
+222	val_223
 230	val_230
 230	val_230
 230	val_230
 230	val_230
 230	val_230
-235	val_235
-235	val_236
+237	val_237
+237	val_237
+238	val_238
+238	val_238
+238	val_239
+24	val_24
+24	val_24
 240	val_241
-245	val_246
-245	val_246
-255	val_255
-255	val_255
+246	val_247
+246	val_247
+256	val_256
+256	val_256
+256	val_257
 260	val_260
 260	val_261
 260	val_261
-265	val_265
-265	val_265
-265	val_266
+264	val_265
+264	val_265
+273	val_273
+273	val_273
+273	val_273
+273	val_274
 275	val_275
 275	val_276
 275	val_276
-280	val_280
-280	val_280
-285	val_285
-285	val_286
-295	val_296
-295	val_296
-30	val_30
-30	val_31
-300	val_301
-300	val_301
+276	val_277
+278	val_278
+278	val_278
+278	val_279
+288	val_288
+288	val_288
+289	val_289
+289	val_290
+296	val_296
+296	val_297
+302	val_302
+302	val_303
 305	val_305
 305	val_306
-310	val_310
-310	val_311
-310	val_311
-310	val_311
-315	val_315
-325	val_325
-325	val_325
-330	val_331
+311	val_311
+311	val_311
+311	val_311
+32	val_33
+323	val_323
+323	val_324
+33	val_33
+33	val_34
+332	val_332
 335	val_335
 335	val_336
 335	val_336
-340	val_341
-345	val_345
+344	val_344
+344	val_344
+344	val_345
 35	val_35
 35	val_35
 35	val_35
 35	val_36
 35	val_36
 35	val_36
+352	val_353
+352	val_353
 355	val_356
 355	val_356
-360	val_360
-360	val_361
-365	val_365
-375	val_375
-375	val_376
-375	val_376
-375	val_376
-375	val_376
-375	val_376
-385	val_386
-385	val_386
-390	val_391
-390	val_391
-390	val_391
-395	val_395
-395	val_395
-395	val_396
-395	val_396
-40	val_41
-40	val_41
-400	val_400
+362	val_362
+366	val_366
+369	val_369
+369	val_369
+369	val_369
+369	val_370
+37	val_37
+37	val_37
+373	val_373
+373	val_374
+379	val_379
+379	val_380
+391	val_392
+391	val_392
+393	val_393
+393	val_394
+393	val_394
+397	val_397
+397	val_397
 405	val_406
+407	val_407
+407	val_408
+407	val_408
+407	val_408
+41	val_41
 410	val_411
-415	val_416
+411	val_411
+411	val_412
+416	val_417
 425	val_426
-430	val_430
-430	val_430
-430	val_430
-430	val_431
+43	val_43
+432	val_432
+432	val_433
 435	val_435
 435	val_436
-440	val_441
-440	val_441
+436	val_436
+436	val_437
+439	val_439
+439	val_439
+439	val_440
+439	val_440
+441	val_442
 450	val_451
 450	val_451
+453	val_453
+453	val_454
+454	val_454
+454	val_454
+454	val_454
+454	val_455
+454	val_455
 455	val_455
 455	val_456
 455	val_456
 460	val_460
+466	val_466
+466	val_466
+466	val_466
+469	val_469
+469	val_469
+469	val_469
+469	val_469
+469	val_469
+469	val_470
 470	val_470
 470	val_471
-475	val_475
-475	val_476
-480	val_480
-480	val_480
-480	val_480
-480	val_481
-480	val_481
-485	val_485
-485	val_486
-485	val_486
-490	val_490
-490	val_491
-495	val_495
-495	val_496
-5	val_5
-5	val_5
-5	val_5
-5	val_6
-50	val_51
-60	val_61
-65	val_65
-65	val_66
-65	val_66
-70	val_70
-70	val_70
-70	val_70
-70	val_71
-75	val_76
-80	val_80
-80	val_81
-85	val_85
-85	val_86
-90	val_90
-90	val_90
-90	val_90
-95	val_95
-95	val_95
+481	val_481
+481	val_482
+484	val_484
+484	val_485
+492	val_492
+492	val_492
+492	val_493
+492	val_493
+493	val_493
+494	val_494
+494	val_495
+494	val_495
+498	val_498
+498	val_498
+498	val_498
+51	val_51
+51	val_51
+51	val_52
+52	val_53
+52	val_53
+52	val_53
+52	val_53
+53	val_53
+53	val_54
+54	val_54
+61	val_62
+68	val_69
+69	val_69
+69	val_70
+72	val_72
+72	val_72
+8	val_8
+8	val_9
+87	val_87
+87	val_88
+87	val_88
+89	val_90
+89	val_90
+89	val_90
+91	val_92
+93	val_94
+93	val_94
+93	val_94
+96	val_96

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/sample6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/sample6.q.out b/ql/src/test/results/clientpositive/sample6.q.out
index cccb561..97d5dd1 100644
--- a/ql/src/test/results/clientpositive/sample6.q.out
+++ b/ql/src/test/results/clientpositive/sample6.q.out
@@ -54,6 +54,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 
@@ -101,6 +102,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -123,6 +125,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -192,6 +195,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 
@@ -235,6 +239,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 
@@ -265,6 +270,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 
@@ -286,6 +292,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 
@@ -322,6 +329,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 
@@ -352,6 +360,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 
@@ -373,6 +382,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 
@@ -421,158 +431,76 @@ order by key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@dest1
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
-0	val_1
-0	val_1
-4	val_4
-4	val_5
-8	val_8
-8	val_9
-12	val_12
-12	val_12
-12	val_13
-16	val_17
-16	val_17
-20	val_20
-20	val_21
-20	val_21
-24	val_24
-24	val_24
-28	val_28
-32	val_33
+2	val_2
+2	val_3
+6	val_7
+6	val_7
+10	val_10
+10	val_11
+30	val_30
+30	val_31
 40	val_41
 40	val_41
-44	val_44
-48	val_49
-48	val_49
-52	val_53
-52	val_53
-52	val_53
-52	val_53
-56	val_57
-60	val_61
+58	val_58
+58	val_58
+58	val_59
+58	val_59
 64	val_64
-68	val_69
-72	val_72
-72	val_72
-76	val_76
-76	val_76
-76	val_77
-76	val_77
-76	val_77
+70	val_70
+70	val_70
+70	val_70
+70	val_71
 80	val_80
 80	val_81
-84	val_84
-84	val_84
-92	val_92
-96	val_96
-100	val_100
-100	val_100
-100	val_101
-100	val_101
-104	val_104
-104	val_104
-104	val_105
-104	val_105
-104	val_105
+86	val_86
+86	val_87
+90	val_90
+90	val_90
+90	val_90
+98	val_98
+98	val_98
+110	val_111
 116	val_116
 116	val_117
-120	val_120
-120	val_120
-120	val_121
-128	val_128
-128	val_128
-128	val_128
-128	val_129
-128	val_129
-132	val_133
-132	val_133
-136	val_136
-136	val_137
-140	val_141
-144	val_145
-152	val_152
-152	val_152
-152	val_153
-152	val_153
-152	val_153
+126	val_126
+126	val_127
+126	val_127
+134	val_134
+134	val_134
+134	val_135
 156	val_156
 156	val_157
 156	val_157
-160	val_160
-160	val_161
-164	val_164
-164	val_164
-164	val_165
-164	val_165
-168	val_168
-168	val_169
-172	val_172
-172	val_172
-172	val_173
-176	val_176
-176	val_176
-180	val_180
+158	val_158
+178	val_178
+178	val_179
+178	val_179
 184	val_185
-192	val_192
-192	val_193
-196	val_196
-196	val_197
-196	val_197
-196	val_197
-200	val_200
-200	val_200
-204	val_205
+206	val_207
+206	val_207
+206	val_207
 208	val_208
 208	val_208
 208	val_208
-212	val_213
-216	val_216
-216	val_216
-216	val_217
-224	val_224
-224	val_224
-224	val_225
-228	val_228
-228	val_229
-240	val_241
 244	val_244
 244	val_245
 244	val_245
 244	val_245
-248	val_248
-248	val_249
 252	val_252
 252	val_253
+254	val_255
 256	val_256
 256	val_256
 256	val_257
-260	val_260
-260	val_261
-260	val_261
-264	val_265
-264	val_265
-268	val_269
+266	val_266
 272	val_272
 272	val_272
 272	val_273
-276	val_277
-280	val_280
-280	val_280
-284	val_284
-284	val_285
-284	val_285
-288	val_288
-288	val_288
+286	val_286
+286	val_287
 292	val_292
 292	val_293
 292	val_293
-296	val_296
-296	val_297
-300	val_301
-300	val_301
 304	val_305
 308	val_308
 308	val_309
@@ -580,13 +508,15 @@ POSTHOOK: Input: default@dest1
 316	val_316
 316	val_316
 316	val_316
-324	val_325
-328	val_329
-328	val_329
-332	val_332
+326	val_327
+334	val_335
 336	val_336
 336	val_337
-340	val_341
+338	val_338
+338	val_339
+342	val_342
+342	val_342
+342	val_343
 344	val_344
 344	val_344
 344	val_345
@@ -598,29 +528,23 @@ POSTHOOK: Input: default@dest1
 348	val_349
 352	val_353
 352	val_353
-356	val_356
-356	val_357
-356	val_357
 360	val_360
 360	val_361
+362	val_362
 364	val_364
 364	val_365
-368	val_368
-376	val_377
-384	val_384
-384	val_384
-384	val_384
-384	val_385
-384	val_385
-384	val_385
-388	val_389
+378	val_378
+378	val_379
 392	val_392
 392	val_393
 392	val_393
 396	val_396
 396	val_396
 396	val_396
-400	val_400
+402	val_402
+402	val_403
+402	val_403
+402	val_403
 404	val_404
 404	val_404
 404	val_405
@@ -628,48 +552,27 @@ POSTHOOK: Input: default@dest1
 404	val_405
 408	val_409
 408	val_409
-412	val_413
-412	val_413
-416	val_417
-424	val_424
-424	val_424
-424	val_425
-428	val_429
-432	val_432
-432	val_433
-436	val_436
-436	val_437
+410	val_411
+426	val_427
 440	val_441
 440	val_441
-444	val_444
-448	val_448
-448	val_449
 452	val_452
-460	val_460
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-468	val_469
-468	val_469
-468	val_469
+458	val_458
+458	val_458
+466	val_466
+466	val_466
+466	val_466
 472	val_472
 476	val_477
 476	val_477
-480	val_480
-480	val_480
-480	val_480
-480	val_481
-480	val_481
+478	val_478
+478	val_478
+478	val_479
+478	val_479
+482	val_482
+482	val_483
 484	val_484
 484	val_485
-488	val_489
-492	val_492
-492	val_492
-492	val_493
-492	val_493
-496	val_496
-496	val_497
 PREHOOK: query: EXPLAIN EXTENDED SELECT s.* FROM srcbucket TABLESAMPLE (BUCKET 4 OUT OF 4 on key) s
 ORDER BY key, value
 PREHOOK: type: QUERY
@@ -717,6 +620,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -739,6 +643,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -803,147 +708,105 @@ ORDER BY key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket
 #### A masked pattern was here ####
-3	val_4
-11	val_11
-11	val_12
-11	val_12
-11	val_12
+5	val_5
+5	val_5
+5	val_5
+5	val_6
 15	val_15
 15	val_15
 15	val_16
 15	val_16
-19	val_19
-19	val_20
 23	val_24
-27	val_27
-31	val_32
+33	val_33
+33	val_34
 35	val_35
 35	val_35
 35	val_35
 35	val_36
 35	val_36
 35	val_36
-43	val_43
 47	val_47
 47	val_48
-51	val_51
-51	val_51
-51	val_52
-59	val_60
+49	val_50
+49	val_50
+53	val_53
+53	val_54
 63	val_64
-67	val_67
-67	val_67
-71	val_72
 75	val_76
-83	val_83
-83	val_83
 87	val_87
 87	val_88
 87	val_88
-91	val_92
 95	val_95
 95	val_95
-99	val_100
-103	val_103
-103	val_103
 111	val_111
-119	val_119
-119	val_119
-119	val_119
-119	val_120
-119	val_120
-119	val_120
-123	val_124
-123	val_124
-131	val_131
-135	val_136
-135	val_136
-135	val_136
-143	val_143
-143	val_144
+125	val_125
+125	val_125
+125	val_126
+129	val_129
+129	val_129
+129	val_130
+129	val_130
+145	val_145
 147	val_148
 147	val_148
 151	val_152
 151	val_152
-155	val_155
-163	val_163
+161	val_162
+161	val_162
+161	val_162
+161	val_162
 167	val_167
 167	val_167
 167	val_167
 167	val_168
-175	val_175
-175	val_175
-175	val_176
-175	val_176
-179	val_179
-179	val_179
-179	val_180
-183	val_183
-183	val_184
-187	val_187
-187	val_187
-187	val_187
-191	val_191
-191	val_191
-191	val_192
-195	val_195
-195	val_195
-199	val_199
-199	val_199
-199	val_199
-199	val_200
+193	val_193
+193	val_193
+193	val_193
 203	val_203
 203	val_203
 207	val_207
 207	val_207
-215	val_216
+209	val_209
+209	val_209
+209	val_210
+209	val_210
+213	val_213
+213	val_213
+213	val_214
 219	val_219
 219	val_219
-223	val_223
-223	val_223
 227	val_228
-231	val_232
-235	val_235
-235	val_236
-239	val_239
-239	val_239
-239	val_240
-239	val_240
-243	val_244
-243	val_244
-247	val_247
-255	val_255
-255	val_255
+241	val_241
+241	val_242
+241	val_242
+241	val_242
+241	val_242
+245	val_246
+245	val_246
+257	val_257
+257	val_258
+257	val_258
 259	val_260
 259	val_260
 263	val_263
+265	val_265
+265	val_265
+265	val_266
 267	val_268
-271	val_272
-275	val_275
-275	val_276
-275	val_276
+273	val_273
+273	val_273
+273	val_273
+273	val_274
+281	val_281
+281	val_281
+281	val_282
+281	val_282
+281	val_282
 283	val_283
-287	val_287
-287	val_288
-287	val_288
-291	val_291
-291	val_292
-291	val_292
-295	val_296
-295	val_296
+293	val_294
+293	val_294
 303	val_304
 303	val_304
-307	val_307
-307	val_307
-311	val_311
-311	val_311
-311	val_311
-315	val_315
-323	val_323
-323	val_324
-327	val_327
-327	val_327
-327	val_327
 331	val_331
 331	val_331
 331	val_332
@@ -951,97 +814,51 @@ POSTHOOK: Input: default@srcbucket
 335	val_335
 335	val_336
 335	val_336
-339	val_339
-343	val_344
-347	val_348
-347	val_348
-351	val_351
-351	val_352
-351	val_352
-355	val_356
-355	val_356
-363	val_364
-363	val_364
-363	val_364
 367	val_367
 367	val_367
 367	val_368
 367	val_368
-371	val_372
-371	val_372
-371	val_372
-371	val_372
-375	val_375
-375	val_376
-375	val_376
-375	val_376
-375	val_376
-375	val_376
+373	val_373
+373	val_374
 379	val_379
 379	val_380
-391	val_392
-391	val_392
+381	val_382
+385	val_386
+385	val_386
 395	val_395
 395	val_395
 395	val_396
 395	val_396
-399	val_399
-399	val_399
-399	val_400
-399	val_400
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_402
 403	val_403
 403	val_403
 403	val_403
-407	val_407
-407	val_408
-407	val_408
-407	val_408
-411	val_411
-411	val_412
+405	val_406
 415	val_416
-419	val_419
-423	val_424
-427	val_427
-427	val_428
-427	val_428
+429	val_429
+429	val_429
+429	val_430
+429	val_430
 431	val_431
 431	val_431
 431	val_431
 431	val_432
-435	val_435
-435	val_436
-439	val_439
-439	val_439
-439	val_440
-439	val_440
-443	val_443
-443	val_444
-443	val_444
-443	val_444
+441	val_442
 447	val_448
-451	val_452
-455	val_455
-455	val_456
-455	val_456
-459	val_459
-459	val_459
-459	val_460
-463	val_463
-463	val_463
-463	val_464
-467	val_467
-467	val_468
 475	val_475
 475	val_476
-479	val_479
-483	val_483
-487	val_487
-487	val_488
-491	val_491
-491	val_492
-491	val_492
-495	val_495
-495	val_496
+481	val_481
+481	val_482
+489	val_489
+489	val_489
+489	val_489
+489	val_489
+489	val_490
 PREHOOK: query: EXPLAIN EXTENDED SELECT s.* FROM srcbucket TABLESAMPLE (BUCKET 1 OUT OF 2 on key) s
 ORDER BY key, value
 PREHOOK: type: QUERY
@@ -1089,6 +906,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -1111,6 +929,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -1175,88 +994,36 @@ ORDER BY key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
-0	val_1
-0	val_1
 2	val_2
 2	val_3
-4	val_4
-4	val_5
 6	val_7
 6	val_7
-8	val_8
-8	val_9
 10	val_10
 10	val_11
-12	val_12
-12	val_12
-12	val_13
-16	val_17
-16	val_17
-18	val_18
-18	val_18
 20	val_20
 20	val_21
 20	val_21
-22	val_23
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
 30	val_30
 30	val_31
-32	val_33
-34	val_34
 40	val_41
 40	val_41
-42	val_42
-42	val_42
-42	val_43
-42	val_43
-42	val_43
-44	val_44
 46	val_47
 48	val_49
 48	val_49
-50	val_51
-52	val_53
-52	val_53
-52	val_53
-52	val_53
 54	val_54
-56	val_57
 58	val_58
 58	val_58
 58	val_59
 58	val_59
 60	val_61
-62	val_63
-62	val_63
 64	val_64
-66	val_66
 68	val_69
 70	val_70
 70	val_70
 70	val_70
 70	val_71
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-76	val_77
-76	val_77
-76	val_77
-78	val_78
-78	val_79
 80	val_80
 80	val_81
-82	val_82
-82	val_83
-82	val_83
 84	val_84
 84	val_84
 86	val_86
@@ -1264,116 +1031,41 @@ POSTHOOK: Input: default@srcbucket
 90	val_90
 90	val_90
 90	val_90
-92	val_92
-94	val_95
 96	val_96
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-100	val_101
-100	val_101
-102	val_103
-104	val_104
-104	val_104
-104	val_105
-104	val_105
-104	val_105
 106	val_107
 110	val_111
-114	val_114
-114	val_115
-114	val_115
-114	val_115
 116	val_116
 116	val_117
-118	val_118
-118	val_118
-118	val_119
-118	val_119
-118	val_119
-120	val_120
-120	val_120
-120	val_121
-122	val_123
-122	val_123
-122	val_123
 126	val_126
 126	val_127
 126	val_127
-128	val_128
-128	val_128
-128	val_128
-128	val_129
-128	val_129
 132	val_133
 132	val_133
 134	val_134
 134	val_134
 134	val_135
-136	val_136
-136	val_137
-138	val_138
-138	val_138
-138	val_138
-138	val_138
-138	val_139
-138	val_139
 140	val_141
-144	val_145
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
-152	val_153
-152	val_153
-152	val_153
 156	val_156
 156	val_157
 156	val_157
 158	val_158
-160	val_160
-160	val_161
 162	val_162
 162	val_163
 164	val_164
 164	val_164
 164	val_165
 164	val_165
-166	val_166
-168	val_168
-168	val_169
-170	val_170
-170	val_171
-172	val_172
-172	val_172
-172	val_173
-174	val_174
-174	val_174
-174	val_175
-174	val_175
-176	val_176
-176	val_176
 178	val_178
 178	val_179
 178	val_179
-180	val_180
 182	val_183
 184	val_185
-186	val_186
 190	val_190
-192	val_192
-192	val_193
-194	val_194
-196	val_196
-196	val_197
-196	val_197
-196	val_197
-200	val_200
-200	val_200
 202	val_202
-204	val_205
 206	val_207
 206	val_207
 206	val_207
@@ -1385,37 +1077,19 @@ POSTHOOK: Input: default@srcbucket
 216	val_216
 216	val_216
 216	val_217
-218	val_218
-222	val_222
-222	val_223
-224	val_224
-224	val_224
-224	val_225
 226	val_226
 226	val_227
 226	val_227
 226	val_227
 226	val_227
-228	val_228
-228	val_229
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
 238	val_238
 238	val_238
 238	val_239
 240	val_241
-242	val_242
-242	val_242
-242	val_243
 244	val_244
 244	val_245
 244	val_245
 244	val_245
-246	val_247
-246	val_247
 248	val_248
 248	val_249
 252	val_252
@@ -1424,53 +1098,23 @@ POSTHOOK: Input: default@srcbucket
 256	val_256
 256	val_256
 256	val_257
-258	val_258
-258	val_259
 260	val_260
 260	val_261
 260	val_261
-262	val_262
-262	val_263
-262	val_263
-264	val_265
-264	val_265
 266	val_266
-268	val_269
 272	val_272
 272	val_272
 272	val_273
-274	val_274
-274	val_275
 276	val_277
-278	val_278
-278	val_278
-278	val_279
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 284	val_285
 284	val_285
 286	val_286
 286	val_287
-288	val_288
-288	val_288
 292	val_292
 292	val_293
 292	val_293
-296	val_296
-296	val_297
-298	val_298
-298	val_298
-298	val_298
-300	val_301
-300	val_301
-302	val_302
-302	val_303
 304	val_305
-306	val_306
-306	val_307
 308	val_308
 308	val_309
 308	val_309
@@ -1478,29 +1122,17 @@ POSTHOOK: Input: default@srcbucket
 310	val_311
 310	val_311
 310	val_311
-314	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-318	val_319
-322	val_322
-322	val_322
-322	val_323
 324	val_325
 326	val_327
-328	val_329
-328	val_329
-330	val_331
 332	val_332
 334	val_335
 336	val_336
 336	val_337
 338	val_338
 338	val_339
-340	val_341
 342	val_342
 342	val_342
 342	val_343
@@ -1515,26 +1147,14 @@ POSTHOOK: Input: default@srcbucket
 348	val_349
 352	val_353
 352	val_353
-356	val_356
-356	val_357
-356	val_357
-358	val_359
 360	val_360
 360	val_361
 362	val_362
 364	val_364
 364	val_365
-366	val_366
 368	val_368
-374	val_374
-374	val_375
-376	val_377
 378	val_378
 378	val_379
-382	val_382
-382	val_382
-382	val_383
-382	val_383
 384	val_384
 384	val_384
 384	val_384
@@ -1545,9 +1165,6 @@ POSTHOOK: Input: default@srcbucket
 386	val_387
 386	val_387
 388	val_389
-390	val_391
-390	val_391
-390	val_391
 392	val_392
 392	val_393
 392	val_393
@@ -1555,8 +1172,6 @@ POSTHOOK: Input: default@srcbucket
 396	val_396
 396	val_396
 396	val_396
-398	val_399
-400	val_400
 402	val_402
 402	val_403
 402	val_403
@@ -1566,24 +1181,12 @@ POSTHOOK: Input: default@srcbucket
 404	val_405
 404	val_405
 404	val_405
-406	val_406
-406	val_406
-406	val_406
-406	val_406
-406	val_407
 408	val_409
 408	val_409
 410	val_411
-412	val_413
-412	val_413
 414	val_414
 414	val_414
 414	val_415
-416	val_417
-418	val_418
-424	val_424
-424	val_424
-424	val_425
 426	val_427
 428	val_429
 430	val_430
@@ -1592,24 +1195,12 @@ POSTHOOK: Input: default@srcbucket
 430	val_431
 432	val_432
 432	val_433
-436	val_436
-436	val_437
-438	val_438
-438	val_438
-438	val_438
-438	val_439
-438	val_439
 440	val_441
 440	val_441
-442	val_443
 444	val_444
 446	val_446
 446	val_447
 446	val_447
-448	val_448
-448	val_449
-450	val_451
-450	val_451
 452	val_452
 454	val_454
 454	val_454
@@ -1618,22 +1209,9 @@ POSTHOOK: Input: default@srcbucket
 454	val_455
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
-462	val_463
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-468	val_469
-468	val_469
-468	val_469
-470	val_470
-470	val_471
 472	val_472
 474	val_475
 474	val_475
@@ -1652,19 +1230,9 @@ POSTHOOK: Input: default@srcbucket
 482	val_483
 484	val_484
 484	val_485
-486	val_487
 488	val_489
 490	val_490
 490	val_491
-492	val_492
-492	val_492
-492	val_493
-492	val_493
-494	val_494
-494	val_495
-494	val_495
-496	val_496
-496	val_497
 498	val_498
 498	val_498
 498	val_498
@@ -1714,6 +1282,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -1736,6 +1305,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -1800,24 +1370,16 @@ ORDER BY key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
-0	val_1
-0	val_1
-3	val_4
-6	val_7
-6	val_7
 9	val_9
-12	val_12
-12	val_12
-12	val_13
-15	val_15
-15	val_15
-15	val_16
-15	val_16
+16	val_17
+16	val_17
 18	val_18
 18	val_18
+19	val_19
+19	val_20
+20	val_20
+20	val_21
+20	val_21
 21	val_22
 21	val_22
 21	val_22
@@ -1825,265 +1387,302 @@ POSTHOOK: Input: default@srcbucket
 24	val_24
 24	val_24
 27	val_27
+29	val_30
+29	val_30
 30	val_30
 30	val_31
-33	val_33
-33	val_34
-42	val_42
-42	val_42
-42	val_43
-42	val_43
-42	val_43
-48	val_49
-48	val_49
-51	val_51
-51	val_51
-51	val_52
+31	val_32
+32	val_33
+40	val_41
+40	val_41
+41	val_41
+43	val_43
+44	val_44
+47	val_47
+47	val_48
+49	val_50
+49	val_50
+50	val_51
 54	val_54
-57	val_57
-60	val_61
-63	val_64
-66	val_66
-69	val_69
-69	val_70
-72	val_72
-72	val_72
+61	val_62
+64	val_64
+67	val_67
+67	val_67
+70	val_70
+70	val_70
+70	val_70
+70	val_71
+71	val_72
+74	val_74
 75	val_76
-78	val_78
-78	val_79
-84	val_84
-84	val_84
+76	val_76
+76	val_76
+76	val_77
+76	val_77
+76	val_77
+77	val_77
+77	val_78
+77	val_78
+82	val_82
+82	val_83
+82	val_83
+85	val_85
+85	val_86
 87	val_87
 87	val_88
 87	val_88
+89	val_90
+89	val_90
+89	val_90
 90	val_90
 90	val_90
 90	val_90
-93	val_94
-93	val_94
-93	val_94
-96	val_96
-99	val_100
-102	val_103
+92	val_92
 105	val_105
 105	val_106
 105	val_106
-111	val_111
 114	val_114
 114	val_115
 114	val_115
 114	val_115
+116	val_116
+116	val_117
 117	val_118
 117	val_118
+118	val_118
+118	val_118
+118	val_119
+118	val_119
+118	val_119
 120	val_120
 120	val_120
 120	val_121
-123	val_124
-123	val_124
-126	val_126
-126	val_127
-126	val_127
-129	val_129
-129	val_129
-129	val_130
-129	val_130
-132	val_133
-132	val_133
+122	val_123
+122	val_123
+122	val_123
+134	val_134
+134	val_134
+134	val_135
 135	val_136
 135	val_136
 135	val_136
-138	val_138
-138	val_138
-138	val_138
-138	val_138
-138	val_139
-138	val_139
+143	val_143
+143	val_144
 144	val_145
-147	val_148
-147	val_148
-150	val_150
-153	val_153
-153	val_154
-153	val_154
-156	val_156
-156	val_157
-156	val_157
-162	val_162
-162	val_163
+145	val_145
+146	val_146
+146	val_146
+149	val_149
+149	val_149
+149	val_150
+157	val_157
+157	val_158
+157	val_158
+158	val_158
+161	val_162
+161	val_162
+161	val_162
+161	val_162
 165	val_165
 165	val_165
 165	val_166
+166	val_166
 168	val_168
 168	val_169
-174	val_174
-174	val_174
-174	val_175
-174	val_175
-177	val_177
-177	val_178
-177	val_178
+170	val_170
+170	val_171
+179	val_179
+179	val_179
+179	val_180
 180	val_180
+181	val_181
 183	val_183
 183	val_184
-186	val_186
-189	val_189
-189	val_190
 192	val_192
 192	val_193
+193	val_193
+193	val_193
+193	val_193
 195	val_195
 195	val_195
-201	val_201
+197	val_197
+197	val_197
+197	val_198
+203	val_203
+203	val_203
 204	val_205
-207	val_207
-207	val_207
-213	val_213
-213	val_213
-213	val_214
-216	val_216
-216	val_216
-216	val_217
-219	val_219
-219	val_219
+209	val_209
+209	val_209
+209	val_210
+209	val_210
+214	val_214
 222	val_222
 222	val_223
+226	val_226
+226	val_227
+226	val_227
+226	val_227
+226	val_227
 228	val_228
 228	val_229
-231	val_232
-237	val_237
-237	val_237
-240	val_241
-243	val_244
-243	val_244
-246	val_247
-246	val_247
-249	val_249
-249	val_250
-249	val_250
-252	val_252
-252	val_253
-255	val_255
-255	val_255
-258	val_258
-258	val_259
+235	val_235
+235	val_236
+238	val_238
+238	val_238
+238	val_239
+241	val_241
+241	val_242
+241	val_242
+241	val_242
+241	val_242
+242	val_242
+242	val_242
+242	val_243
+245	val_246
+245	val_246
+254	val_255
+256	val_256
+256	val_256
+256	val_257
 261	val_262
-264	val_265
-264	val_265
-267	val_268
+262	val_262
+262	val_263
+262	val_263
+266	val_266
+268	val_269
+271	val_272
 273	val_273
 273	val_273
 273	val_273
 273	val_274
 276	val_277
-282	val_282
-282	val_282
+278	val_278
+278	val_278
+278	val_279
+280	val_280
+280	val_280
+284	val_284
+284	val_285
+284	val_285
 285	val_285
 285	val_286
-288	val_288
-288	val_288
-291	val_291
-291	val_292
-291	val_292
-300	val_301
-300	val_301
-303	val_304
-303	val_304
+286	val_286
+286	val_287
+287	val_287
+287	val_288
+287	val_288
+288	val_288
+288	val_288
+292	val_292
+292	val_293
+292	val_293
+293	val_294
+293	val_294
+295	val_296
+295	val_296
+298	val_298
+298	val_298
+298	val_298
+300	val_301
+300	val_301
 306	val_306
 306	val_307
+308	val_308
+308	val_309
+308	val_309
 309	val_309
 309	val_309
 309	val_310
-315	val_315
+316	val_316
+316	val_316
+316	val_316
 318	val_318
 318	val_318
 318	val_318
 318	val_319
-321	val_321
-321	val_321
-324	val_325
-327	val_327
-327	val_327
-327	val_327
-330	val_331
-333	val_333
-333	val_333
-333	val_334
-336	val_336
-336	val_337
-339	val_339
-342	val_342
-342	val_342
-342	val_343
-345	val_345
+323	val_323
+323	val_324
+325	val_325
+325	val_325
+326	val_327
+331	val_331
+331	val_331
+331	val_332
+331	val_332
+332	val_332
+341	val_341
+341	val_342
+341	val_342
+341	val_342
+343	val_344
+344	val_344
+344	val_344
+344	val_345
+347	val_348
+347	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_349
-351	val_351
-351	val_352
-351	val_352
-360	val_360
-360	val_361
-363	val_364
-363	val_364
-363	val_364
+364	val_364
+364	val_365
 366	val_366
 369	val_369
 369	val_369
 369	val_369
 369	val_370
-375	val_375
-375	val_376
-375	val_376
-375	val_376
-375	val_376
-375	val_376
-378	val_378
-378	val_379
-381	val_382
+373	val_373
+373	val_374
+374	val_374
+374	val_375
+379	val_379
+379	val_380
 384	val_384
 384	val_384
 384	val_384
 384	val_385
 384	val_385
 384	val_385
-390	val_391
-390	val_391
-390	val_391
-393	val_393
-393	val_394
-393	val_394
-396	val_396
-396	val_396
-396	val_396
+391	val_392
+391	val_392
+392	val_392
+392	val_393
+392	val_393
+395	val_395
+395	val_395
+395	val_396
+395	val_396
+397	val_397
+397	val_397
 399	val_399
 399	val_399
 399	val_400
 399	val_400
-402	val_402
-402	val_403
-402	val_403
-402	val_403
-405	val_406
-408	val_409
-408	val_409
-411	val_411
-411	val_412
+407	val_407
+407	val_408
+407	val_408
+407	val_408
+409	val_409
+409	val_409
+409	val_409
+409	val_410
+409	val_410
+410	val_411
 414	val_414
 414	val_414
 414	val_415
+415	val_416
 417	val_417
 417	val_417
 417	val_417
 423	val_424
 426	val_427
-429	val_429
-429	val_429
-429	val_430
-429	val_430
-432	val_432
-432	val_433
+430	val_430
+430	val_430
+430	val_430
+430	val_431
 435	val_435
 435	val_436
 438	val_438
@@ -2091,19 +1690,24 @@ POSTHOOK: Input: default@srcbucket
 438	val_438
 438	val_439
 438	val_439
-441	val_442
+439	val_439
+439	val_439
+439	val_440
+439	val_440
+440	val_441
+440	val_441
+443	val_443
+443	val_444
+443	val_444
+443	val_444
 444	val_444
 447	val_448
-450	val_451
-450	val_451
-453	val_453
-453	val_454
+448	val_448
+448	val_449
+452	val_452
 459	val_459
 459	val_459
 459	val_460
-462	val_462
-462	val_462
-462	val_463
 468	val_468
 468	val_468
 468	val_468
@@ -2111,31 +1715,39 @@ POSTHOOK: Input: default@srcbucket
 468	val_469
 468	val_469
 468	val_469
-474	val_475
-474	val_475
-477	val_477
-477	val_478
+469	val_469
+469	val_469
+469	val_469
+469	val_469
+469	val_469
+469	val_470
+470	val_470
+470	val_471
+472	val_472
+478	val_478
+478	val_478
+478	val_479
+478	val_479
 480	val_480
 480	val_480
 480	val_480
 480	val_481
 480	val_481
-483	val_483
-486	val_487
-489	val_489
-489	val_489
-489	val_489
-489	val_489
-489	val_490
+485	val_485
+485	val_486
+485	val_486
+491	val_491
+491	val_492
+491	val_492
 492	val_492
 492	val_492
 492	val_493
 492	val_493
 495	val_495
 495	val_496
-498	val_498
-498	val_498
-498	val_498
+497	val_497
+497	val_498
+497	val_498
 PREHOOK: query: EXPLAIN EXTENDED SELECT s.* FROM srcbucket TABLESAMPLE (BUCKET 2 OUT OF 3 on key) s
 ORDER BY key, value
 PREHOOK: type: QUERY
@@ -2182,6 +1794,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -2204,6 +1817,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -2268,91 +1882,125 @@ ORDER BY key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket
 #### A masked pattern was here ####
+0	val_0
+0	val_0
+0	val_0
+0	val_1
+0	val_1
 1	val_2
-4	val_4
-4	val_5
+5	val_5
+5	val_5
+5	val_5
+5	val_6
+8	val_8
+8	val_9
 10	val_10
 10	val_11
-16	val_17
-16	val_17
-19	val_19
-19	val_20
-22	val_23
-28	val_28
-31	val_32
+15	val_15
+15	val_15
+15	val_16
+15	val_16
+17	val_17
+26	val_26
+26	val_26
+33	val_33
+33	val_34
 34	val_34
 37	val_37
 37	val_37
-40	val_41
-40	val_41
-43	val_43
-46	val_47
-49	val_50
-49	val_50
+42	val_42
+42	val_42
+42	val_43
+42	val_43
+42	val_43
 52	val_53
 52	val_53
 52	val_53
 52	val_53
+53	val_53
+53	val_54
+56	val_57
 58	val_58
 58	val_58
 58	val_59
 58	val_59
-61	val_62
-64	val_64
-67	val_67
-67	val_67
-70	val_70
-70	val_70
-70	val_70
-70	val_71
-76	val_76
-76	val_76
-76	val_77
-76	val_77
-76	val_77
-82	val_82
-82	val_83
-82	val_83
-85	val_85
-85	val_86
+59	val_60
+60	val_61
+65	val_65
+65	val_66
+65	val_66
+66	val_66
+69	val_69
+69	val_70
+72	val_72
+72	val_72
+83	val_83
+83	val_83
+84	val_84
+84	val_84
 91	val_92
 94	val_95
 97	val_97
 97	val_97
 97	val_98
 97	val_98
-100	val_100
-100	val_100
-100	val_101
-100	val_101
-103	val_103
-103	val_103
+99	val_100
+101	val_102
+102	val_103
+104	val_104
+104	val_104
+104	val_105
+104	val_105
+104	val_105
 106	val_107
-118	val_118
-118	val_118
-118	val_119
-118	val_119
-118	val_119
+110	val_111
+113	val_113
+113	val_113
 121	val_122
 121	val_122
+123	val_124
+123	val_124
+126	val_126
+126	val_127
+126	val_127
+128	val_128
+128	val_128
+128	val_128
+128	val_129
+128	val_129
+132	val_133
+132	val_133
 133	val_133
 133	val_134
-136	val_136
-136	val_137
-145	val_145
-151	val_152
-151	val_152
-157	val_157
-157	val_158
-157	val_158
+137	val_137
+137	val_137
+137	val_138
+138	val_138
+138	val_138
+138	val_138
+138	val_138
+138	val_139
+138	val_139
+150	val_150
+152	val_152
+152	val_152
+152	val_153
+152	val_153
+152	val_153
+153	val_153
+153	val_154
+153	val_154
 160	val_160
 160	val_161
 163	val_163
-166	val_166
-169	val_169
-169	val_169
-169	val_169
-169	val_169
+164	val_164
+164	val_164
+164	val_165
+164	val_165
+167	val_167
+167	val_167
+167	val_167
+167	val_168
 172	val_172
 172	val_172
 172	val_173
@@ -2360,197 +2008,154 @@ POSTHOOK: Input: default@srcbucket
 175	val_175
 175	val_176
 175	val_176
-178	val_178
-178	val_179
-178	val_179
-181	val_181
+176	val_176
+176	val_176
+177	val_177
+177	val_178
+177	val_178
 184	val_185
 187	val_187
 187	val_187
 187	val_187
+189	val_189
+189	val_190
 190	val_190
-193	val_193
-193	val_193
-193	val_193
-196	val_196
-196	val_197
-196	val_197
-196	val_197
+194	val_194
 199	val_199
 199	val_199
 199	val_199
 199	val_200
 202	val_202
-205	val_205
-205	val_205
-205	val_206
-208	val_208
-208	val_208
-208	val_208
-214	val_214
-217	val_217
-217	val_217
-217	val_218
-217	val_218
-223	val_223
-223	val_223
-226	val_226
-226	val_227
-226	val_227
-226	val_227
-226	val_227
+212	val_213
+213	val_213
+213	val_213
+213	val_214
+215	val_216
+218	val_218
+219	val_219
+219	val_219
+224	val_224
+224	val_224
+224	val_225
+227	val_228
 229	val_229
 229	val_229
-235	val_235
-235	val_236
-238	val_238
-238	val_238
-238	val_239
-241	val_241
-241	val_242
-241	val_242
-241	val_242
-241	val_242
-244	val_244
-244	val_245
-244	val_245
-244	val_245
+233	val_233
+233	val_233
+243	val_244
+243	val_244
+246	val_247
+246	val_247
 247	val_247
-256	val_256
-256	val_256
-256	val_257
+249	val_249
+249	val_250
+249	val_250
+252	val_252
+252	val_253
+255	val_255
+255	val_255
+257	val_257
+257	val_258
+257	val_258
 259	val_260
 259	val_260
-262	val_262
-262	val_263
-262	val_263
-265	val_265
-265	val_265
-265	val_266
-268	val_269
-271	val_272
-274	val_274
-274	val_275
+260	val_260
+260	val_261
+260	val_261
+267	val_268
+272	val_272
+272	val_272
+272	val_273
+275	val_275
+275	val_276
+275	val_276
 277	val_277
 277	val_277
 277	val_277
 277	val_277
 277	val_278
 277	val_278
-280	val_280
-280	val_280
-283	val_283
-286	val_286
-286	val_287
+282	val_282
+282	val_282
 289	val_289
 289	val_290
-292	val_292
-292	val_293
-292	val_293
-295	val_296
-295	val_296
-298	val_298
-298	val_298
-298	val_298
 304	val_305
-307	val_307
-307	val_307
 310	val_310
 310	val_311
 310	val_311
 310	val_311
 313	val_314
-316	val_316
-316	val_316
-316	val_316
-322	val_322
-322	val_322
-322	val_323
-325	val_325
-325	val_325
-328	val_329
-328	val_329
-331	val_331
-331	val_331
-331	val_332
-331	val_332
-334	val_335
-337	val_338
+314	val_315
+315	val_315
+324	val_325
+330	val_331
+333	val_333
+333	val_333
+333	val_334
 340	val_341
-343	val_344
-349	val_350
-349	val_350
-349	val_350
-349	val_350
-352	val_353
-352	val_353
-355	val_356
-355	val_356
+351	val_351
+351	val_352
+351	val_352
+353	val_353
+353	val_353
+353	val_354
+356	val_356
+356	val_357
+356	val_357
 358	val_359
-364	val_364
-364	val_365
-367	val_367
-367	val_367
-367	val_368
-367	val_368
-373	val_373
-373	val_374
-376	val_377
-379	val_379
-379	val_380
+363	val_364
+363	val_364
+363	val_364
+377	val_377
+378	val_378
+378	val_379
 382	val_382
 382	val_382
 382	val_383
 382	val_383
-385	val_386
-385	val_386
-388	val_389
-391	val_392
-391	val_392
-394	val_394
-397	val_397
-397	val_397
-400	val_400
-403	val_403
-403	val_403
-403	val_403
-406	val_406
-406	val_406
-406	val_406
-406	val_406
-406	val_407
-409	val_409
-409	val_409
-409	val_409
-409	val_410
-409	val_410
+385	val_386
+385	val_386
+388	val_389
+393	val_393
+393	val_394
+393	val_394
+396	val_396
+396	val_396
+396	val_396
+402	val_402
+402	val_403
+402	val_403
+402	val_403
+405	val_406
+408	val_409
+408	val_409
 412	val_413
 412	val_413
-415	val_416
-418	val_418
+413	val_413
+413	val_413
+413	val_414
+416	val_417
+419	val_419
 421	val_421
 421	val_422
 421	val_422
-424	val_424
-424	val_424
-424	val_425
-427	val_427
-427	val_428
-427	val_428
-430	val_430
-430	val_430
-430	val_430
-430	val_431
+429	val_429
+429	val_429
+429	val_430
+429	val_430
+432	val_432
+432	val_433
 436	val_436
 436	val_437
-439	val_439
-439	val_439
-439	val_440
-439	val_440
-442	val_443
-448	val_448
-448	val_449
+437	val_437
+437	val_438
+441	val_442
+446	val_446
+446	val_447
+446	val_447
 451	val_452
+453	val_453
+453	val_454
 454	val_454
 454	val_454
 454	val_454
@@ -2559,37 +2164,41 @@ POSTHOOK: Input: default@srcbucket
 457	val_457
 457	val_458
 457	val_458
+458	val_458
+458	val_458
 460	val_460
+461	val_462
 463	val_463
 463	val_463
 463	val_464
 466	val_466
 466	val_466
 466	val_466
-469	val_469
-469	val_469
-469	val_469
-469	val_469
-469	val_469
-469	val_470
-472	val_472
+474	val_475
+474	val_475
 475	val_475
 475	val_476
-478	val_478
-478	val_478
-478	val_479
-478	val_479
+476	val_477
+476	val_477
+477	val_477
+477	val_478
 481	val_481
 481	val_482
+482	val_482
+482	val_483
+483	val_483
 484	val_484
 484	val_485
+486	val_487
 487	val_487
 487	val_488
+489	val_489
+489	val_489
+489	val_489
+489	val_489
+489	val_490
 490	val_490
 490	val_491
-493	val_493
-496	val_496
-496	val_497
 PREHOOK: query: EXPLAIN EXTENDED SELECT s.* FROM srcbucket2 TABLESAMPLE (BUCKET 1 OUT OF 2 on key) s
 ORDER BY key, value
 PREHOOK: type: QUERY
@@ -2637,6 +2246,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count 4
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -2659,6 +2269,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -2685,6 +2296,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count 4
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -2707,6 +2319,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -2772,104 +2385,40 @@ ORDER BY key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket2
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
 2	val_2
-4	val_4
-8	val_8
 10	val_10
-12	val_12
-12	val_12
-18	val_18
-18	val_18
 20	val_20
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
 30	val_30
-34	val_34
-42	val_42
-42	val_42
-44	val_44
 54	val_54
 58	val_58
 58	val_58
 64	val_64
-66	val_66
 70	val_70
 70	val_70
 70	val_70
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-78	val_78
 80	val_80
-82	val_82
 84	val_84
 84	val_84
 86	val_86
 90	val_90
 90	val_90
 90	val_90
-92	val_92
 96	val_96
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-104	val_104
-104	val_104
-114	val_114
 116	val_116
-118	val_118
-118	val_118
-120	val_120
-120	val_120
 126	val_126
-128	val_128
-128	val_128
-128	val_128
 134	val_134
 134	val_134
-136	val_136
-138	val_138
-138	val_138
-138	val_138
-138	val_138
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
 156	val_156
 158	val_158
-160	val_160
 162	val_162
 164	val_164
 164	val_164
-166	val_166
-168	val_168
-170	val_170
-172	val_172
-172	val_172
-174	val_174
-174	val_174
-176	val_176
-176	val_176
 178	val_178
-180	val_180
-186	val_186
 190	val_190
-192	val_192
-194	val_194
-196	val_196
-200	val_200
-200	val_200
 202	val_202
 208	val_208
 208	val_208
@@ -2877,60 +2426,26 @@ POSTHOOK: Input: default@srcbucket2
 214	val_214
 216	val_216
 216	val_216
-218	val_218
-222	val_222
-224	val_224
-224	val_224
 226	val_226
-228	val_228
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
 238	val_238
 238	val_238
-242	val_242
-242	val_242
 244	val_244
 248	val_248
 252	val_252
 256	val_256
 256	val_256
-258	val_258
 260	val_260
-262	val_262
 266	val_266
 272	val_272
 272	val_272
-274	val_274
-278	val_278
-278	val_278
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 286	val_286
-288	val_288
-288	val_288
 292	val_292
-296	val_296
-298	val_298
-298	val_298
-298	val_298
-302	val_302
-306	val_306
 308	val_308
 310	val_310
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-322	val_322
-322	val_322
 332	val_332
 336	val_336
 338	val_338
@@ -2943,16 +2458,11 @@ POSTHOOK: Input: default@srcbucket2
 348	val_348
 348	val_348
 348	val_348
-356	val_356
 360	val_360
 362	val_362
 364	val_364
-366	val_366
 368	val_368
-374	val_374
 378	val_378
-382	val_382
-382	val_382
 384	val_384
 384	val_384
 384	val_384
@@ -2962,47 +2472,26 @@ POSTHOOK: Input: default@srcbucket2
 396	val_396
 396	val_396
 396	val_396
-400	val_400
 402	val_402
 404	val_404
 404	val_404
-406	val_406
-406	val_406
-406	val_406
-406	val_406
 414	val_414
 414	val_414
-418	val_418
-424	val_424
-424	val_424
 430	val_430
 430	val_430
 430	val_430
 432	val_432
-436	val_436
-438	val_438
-438	val_438
-438	val_438
 444	val_444
 446	val_446
-448	val_448
 452	val_452
 454	val_454
 454	val_454
 454	val_454
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-470	val_470
 472	val_472
 478	val_478
 478	val_478
@@ -3012,10 +2501,6 @@ POSTHOOK: Input: default@srcbucket2
 482	val_482
 484	val_484
 490	val_490
-492	val_492
-492	val_492
-494	val_494
-496	val_496
 498	val_498
 498	val_498
 498	val_498
@@ -3066,6 +2551,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count 4
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -3088,6 +2574,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 4
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -3152,129 +2639,30 @@ ORDER BY key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket2
 #### A masked pattern was here ####
-5	val_5
-5	val_5
-5	val_5
 9	val_9
-17	val_17
-33	val_33
 37	val_37
 37	val_37
-41	val_41
-53	val_53
-57	val_57
-65	val_65
-69	val_69
-77	val_77
-85	val_85
-97	val_97
-97	val_97
-105	val_105
-113	val_113
-113	val_113
-125	val_125
-125	val_125
-129	val_129
-129	val_129
-133	val_133
-137	val_137
-137	val_137
-145	val_145
-149	val_149
-149	val_149
-153	val_153
-157	val_157
-165	val_165
-165	val_165
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-177	val_177
-181	val_181
 189	val_189
-193	val_193
-193	val_193
-193	val_193
-197	val_197
-197	val_197
-201	val_201
 205	val_205
 205	val_205
-209	val_209
-209	val_209
-213	val_213
-213	val_213
 217	val_217
 217	val_217
-221	val_221
-221	val_221
-229	val_229
-229	val_229
-233	val_233
-233	val_233
-237	val_237
-237	val_237
-241	val_241
-249	val_249
-257	val_257
-265	val_265
-265	val_265
-273	val_273
-273	val_273
-273	val_273
 277	val_277
 277	val_277
 277	val_277
 277	val_277
-281	val_281
-281	val_281
 285	val_285
-289	val_289
 305	val_305
 309	val_309
 309	val_309
-317	val_317
-317	val_317
 321	val_321
 321	val_321
-325	val_325
-325	val_325
 333	val_333
 333	val_333
-341	val_341
 345	val_345
-353	val_353
-353	val_353
-365	val_365
-369	val_369
-369	val_369
-369	val_369
-373	val_373
-377	val_377
 389	val_389
-393	val_393
-397	val_397
-397	val_397
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-409	val_409
-409	val_409
-409	val_409
 413	val_413
 413	val_413
-417	val_417
-417	val_417
-417	val_417
-421	val_421
-429	val_429
-429	val_429
-437	val_437
-449	val_449
-453	val_453
 457	val_457
 469	val_469
 469	val_469
@@ -3282,14 +2670,7 @@ POSTHOOK: Input: default@srcbucket2
 469	val_469
 469	val_469
 477	val_477
-481	val_481
-485	val_485
-489	val_489
-489	val_489
-489	val_489
-489	val_489
 493	val_493
-497	val_497
 PREHOOK: query: CREATE TABLE empty_bucket (key int, value string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/join9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join9.q.out b/ql/src/test/results/clientpositive/join9.q.out
index 50ca52c..0a86a6e 100644
--- a/ql/src/test/results/clientpositive/join9.q.out
+++ b/ql/src/test/results/clientpositive/join9.q.out
@@ -76,6 +76,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'
@@ -97,6 +98,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'
@@ -147,6 +149,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'
@@ -192,6 +195,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 
@@ -250,6 +254,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 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/join_filters_overlap.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join_filters_overlap.q.out b/ql/src/test/results/clientpositive/join_filters_overlap.q.out
index db0b26d..7d4855a 100644
--- a/ql/src/test/results/clientpositive/join_filters_overlap.q.out
+++ b/ql/src/test/results/clientpositive/join_filters_overlap.q.out
@@ -92,6 +92,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -113,6 +114,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -283,6 +285,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -304,6 +307,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -474,6 +478,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -495,6 +500,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -682,6 +688,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -703,6 +710,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -889,6 +897,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -910,6 +919,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/join_map_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join_map_ppr.q.out b/ql/src/test/results/clientpositive/join_map_ppr.q.out
index c5acb9b..b16185e 100644
--- a/ql/src/test/results/clientpositive/join_map_ppr.q.out
+++ b/ql/src/test/results/clientpositive/join_map_ppr.q.out
@@ -112,6 +112,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value,val2
                           columns.comments 
@@ -185,6 +186,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'
@@ -252,6 +254,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 
@@ -295,6 +298,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value,val2
                     columns.comments 
@@ -325,6 +329,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value,val2
               columns.comments 
@@ -346,6 +351,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 
@@ -382,6 +388,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value,val2
                     columns.comments 
@@ -412,6 +419,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value,val2
               columns.comments 
@@ -433,6 +441,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 
@@ -741,6 +750,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value,val2
                           columns.comments 
@@ -814,6 +824,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'
@@ -881,6 +892,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 
@@ -924,6 +936,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value,val2
                     columns.comments 
@@ -954,6 +967,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value,val2
               columns.comments 
@@ -975,6 +989,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 
@@ -1011,6 +1026,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value,val2
                     columns.comments 
@@ -1041,6 +1057,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value,val2
               columns.comments 
@@ -1062,6 +1079,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_dml_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_dml_1.q.out b/ql/src/test/results/clientpositive/list_bucket_dml_1.q.out
index 6901a8e..e2f18a1 100644
--- a/ql/src/test/results/clientpositive/list_bucket_dml_1.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_dml_1.q.out
@@ -48,6 +48,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 
@@ -120,6 +121,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'
@@ -168,6 +170,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'
@@ -234,6 +237,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 
@@ -436,6 +440,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/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_dml_11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_dml_11.q.out b/ql/src/test/results/clientpositive/list_bucket_dml_11.q.out
index 872dd14..d708fe8 100644
--- a/ql/src/test/results/clientpositive/list_bucket_dml_11.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_dml_11.q.out
@@ -52,6 +52,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -99,6 +100,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'
@@ -120,6 +122,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'
@@ -187,6 +190,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -319,6 +323,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               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/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_dml_12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_dml_12.q.out b/ql/src/test/results/clientpositive/list_bucket_dml_12.q.out
index 09d4718..83d27c1 100644
--- a/ql/src/test/results/clientpositive/list_bucket_dml_12.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_dml_12.q.out
@@ -52,6 +52,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns col1,col2,col3,col4,col5
                       columns.comments 
@@ -99,6 +100,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'
@@ -120,6 +122,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'
@@ -187,6 +190,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns col1,col2,col3,col4,col5
                 columns.comments 
@@ -327,6 +331,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns col1,col2,col3,col4,col5
                 columns.comments 
@@ -419,6 +424,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns col1,col2,col3,col4,col5
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_dml_13.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_dml_13.q.out b/ql/src/test/results/clientpositive/list_bucket_dml_13.q.out
index becdf67..4d1224b 100644
--- a/ql/src/test/results/clientpositive/list_bucket_dml_13.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_dml_13.q.out
@@ -52,6 +52,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns col1,col2,col3,col4,col5
                       columns.comments 
@@ -99,6 +100,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'
@@ -120,6 +122,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'
@@ -187,6 +190,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns col1,col2,col3,col4,col5
                 columns.comments 
@@ -327,6 +331,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns col1,col2,col3,col4,col5
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_dml_14.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_dml_14.q.out b/ql/src/test/results/clientpositive/list_bucket_dml_14.q.out
index d96f701..ed23b0d 100644
--- a/ql/src/test/results/clientpositive/list_bucket_dml_14.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_dml_14.q.out
@@ -46,6 +46,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 
@@ -92,6 +93,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'
@@ -113,6 +115,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'
@@ -173,6 +176,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 
@@ -228,6 +232,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	500                 
 	rawDataSize         	5312                
@@ -336,6 +341,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 
@@ -357,6 +363,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 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_dml_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_dml_2.q.out b/ql/src/test/results/clientpositive/list_bucket_dml_2.q.out
index 0280c02..fd8de07 100644
--- a/ql/src/test/results/clientpositive/list_bucket_dml_2.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_dml_2.q.out
@@ -52,6 +52,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -124,6 +125,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'
@@ -172,6 +174,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'
@@ -238,6 +241,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -392,6 +396,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               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/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_dml_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_dml_3.q.out b/ql/src/test/results/clientpositive/list_bucket_dml_3.q.out
index b556890..c75d161 100644
--- a/ql/src/test/results/clientpositive/list_bucket_dml_3.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_dml_3.q.out
@@ -42,6 +42,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 
@@ -114,6 +115,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'
@@ -162,6 +164,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'
@@ -228,6 +231,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 
@@ -384,6 +388,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/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_dml_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_dml_4.q.out b/ql/src/test/results/clientpositive/list_bucket_dml_4.q.out
index 7fc96c1..967b84d 100644
--- a/ql/src/test/results/clientpositive/list_bucket_dml_4.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_dml_4.q.out
@@ -52,6 +52,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -124,6 +125,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'
@@ -172,6 +174,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'
@@ -238,6 +241,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -372,6 +376,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -443,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'
@@ -491,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'
@@ -566,6 +573,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -604,6 +612,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -621,6 +630,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -653,6 +663,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -670,6 +681,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -823,6 +835,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               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/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_dml_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_dml_5.q.out b/ql/src/test/results/clientpositive/list_bucket_dml_5.q.out
index f70ffa5..d67ec0a 100644
--- a/ql/src/test/results/clientpositive/list_bucket_dml_5.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_dml_5.q.out
@@ -48,6 +48,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 
@@ -120,6 +121,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'
@@ -168,6 +170,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'
@@ -234,6 +237,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 
@@ -441,6 +445,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 
@@ -487,6 +492,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/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_dml_6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_dml_6.q.out b/ql/src/test/results/clientpositive/list_bucket_dml_6.q.out
index 40011a7..42afe47 100644
--- a/ql/src/test/results/clientpositive/list_bucket_dml_6.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_dml_6.q.out
@@ -52,6 +52,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -124,6 +125,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'
@@ -172,6 +174,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'
@@ -238,6 +241,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -417,6 +421,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -489,6 +494,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'
@@ -537,6 +543,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'
@@ -612,6 +619,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -651,6 +659,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -669,6 +678,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -702,6 +712,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -720,6 +731,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -919,6 +931,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -965,6 +978,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               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/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_dml_7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_dml_7.q.out b/ql/src/test/results/clientpositive/list_bucket_dml_7.q.out
index 83d6c3b..a325337 100644
--- a/ql/src/test/results/clientpositive/list_bucket_dml_7.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_dml_7.q.out
@@ -52,6 +52,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -124,6 +125,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'
@@ -172,6 +174,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'
@@ -238,6 +241,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -417,6 +421,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -489,6 +494,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'
@@ -537,6 +543,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'
@@ -612,6 +619,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -651,6 +659,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -669,6 +678,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -702,6 +712,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -720,6 +731,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -919,6 +931,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -965,6 +978,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               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/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_dml_8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_dml_8.q.out b/ql/src/test/results/clientpositive/list_bucket_dml_8.q.out
index 22096dc..6b407ad 100644
--- a/ql/src/test/results/clientpositive/list_bucket_dml_8.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_dml_8.q.out
@@ -52,6 +52,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -124,6 +125,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'
@@ -172,6 +174,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'
@@ -238,6 +241,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -491,6 +495,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -536,6 +541,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               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/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_dml_9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_dml_9.q.out b/ql/src/test/results/clientpositive/list_bucket_dml_9.q.out
index 495934f..7afece8 100644
--- a/ql/src/test/results/clientpositive/list_bucket_dml_9.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_dml_9.q.out
@@ -52,6 +52,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -124,6 +125,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'
@@ -172,6 +174,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'
@@ -238,6 +241,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -372,6 +376,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -443,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'
@@ -491,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'
@@ -566,6 +573,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -604,6 +612,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -621,6 +630,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -653,6 +663,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -670,6 +681,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -823,6 +835,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               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/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_query_multiskew_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_query_multiskew_1.q.out b/ql/src/test/results/clientpositive/list_bucket_query_multiskew_1.q.out
index 0dc5493..40455b7 100644
--- a/ql/src/test/results/clientpositive/list_bucket_query_multiskew_1.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_query_multiskew_1.q.out
@@ -119,6 +119,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 
@@ -203,6 +204,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 
@@ -288,6 +290,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 
@@ -371,6 +374,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/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_query_multiskew_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_query_multiskew_2.q.out b/ql/src/test/results/clientpositive/list_bucket_query_multiskew_2.q.out
index 3aefb55..54e9009 100644
--- a/ql/src/test/results/clientpositive/list_bucket_query_multiskew_2.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_query_multiskew_2.q.out
@@ -119,6 +119,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 
@@ -203,6 +204,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 
@@ -290,6 +292,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/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_query_multiskew_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_query_multiskew_3.q.out b/ql/src/test/results/clientpositive/list_bucket_query_multiskew_3.q.out
index 13073f4..cdf8339 100644
--- a/ql/src/test/results/clientpositive/list_bucket_query_multiskew_3.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_query_multiskew_3.q.out
@@ -229,6 +229,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 
@@ -340,6 +341,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 
@@ -426,6 +428,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/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_query_oneskew_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_query_oneskew_1.q.out b/ql/src/test/results/clientpositive/list_bucket_query_oneskew_1.q.out
index bb75940..1868691 100644
--- a/ql/src/test/results/clientpositive/list_bucket_query_oneskew_1.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_query_oneskew_1.q.out
@@ -167,6 +167,7 @@ STAGE PLANS:
               properties:
                 EXTERNAL TRUE
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns x
                 columns.comments 
@@ -248,6 +249,7 @@ STAGE PLANS:
               properties:
                 EXTERNAL TRUE
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns x
                 columns.comments 
@@ -329,6 +331,7 @@ STAGE PLANS:
               properties:
                 EXTERNAL TRUE
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns x
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_query_oneskew_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_query_oneskew_2.q.out b/ql/src/test/results/clientpositive/list_bucket_query_oneskew_2.q.out
index f87d6de..d190c2d 100644
--- a/ql/src/test/results/clientpositive/list_bucket_query_oneskew_2.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_query_oneskew_2.q.out
@@ -170,6 +170,7 @@ STAGE PLANS:
               properties:
                 EXTERNAL TRUE
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns x,y
                 columns.comments 
@@ -251,6 +252,7 @@ STAGE PLANS:
               properties:
                 EXTERNAL TRUE
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns x,y
                 columns.comments 
@@ -365,6 +367,7 @@ STAGE PLANS:
               properties:
                 EXTERNAL TRUE
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns x,y
                 columns.comments 
@@ -501,6 +504,7 @@ STAGE PLANS:
               properties:
                 EXTERNAL TRUE
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns x,y
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/list_bucket_query_oneskew_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/list_bucket_query_oneskew_3.q.out b/ql/src/test/results/clientpositive/list_bucket_query_oneskew_3.q.out
index cc8d3ce..7b0e8d4 100644
--- a/ql/src/test/results/clientpositive/list_bucket_query_oneskew_3.q.out
+++ b/ql/src/test/results/clientpositive/list_bucket_query_oneskew_3.q.out
@@ -190,6 +190,7 @@ STAGE PLANS:
               properties:
                 EXTERNAL TRUE
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns x,y,z
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/acid_bucket_pruning.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/acid_bucket_pruning.q.out b/ql/src/test/results/clientpositive/llap/acid_bucket_pruning.q.out
index 3b2a8a2..c89c22c 100644
--- a/ql/src/test/results/clientpositive/llap/acid_bucket_pruning.q.out
+++ b/ql/src/test/results/clientpositive/llap/acid_bucket_pruning.q.out
@@ -44,8 +44,8 @@ STAGE PLANS:
                 TableScan
                   alias: acidtbldefault
                   filterExpr: (a = 1) (type: boolean)
-                  buckets included: [1,] of 16
-                  Statistics: Num rows: 1762 Data size: 6700 Basic stats: COMPLETE Column stats: NONE
+                  buckets included: [13,] of 16
+                  Statistics: Num rows: 1837 Data size: 6988 Basic stats: COMPLETE Column stats: NONE
                   GatherStats: false
                   Filter Operator
                     isSamplingPred: false
@@ -90,6 +90,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 16
                     bucket_field_name a
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns a
                     columns.comments 
@@ -101,7 +102,7 @@ STAGE PLANS:
                     serialization.ddl struct acidtbldefault { i32 a}
                     serialization.format 1
                     serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
-                    totalSize 33143
+                    totalSize 34540
                     transactional true
                     transactional_properties default
 #### A masked pattern was here ####
@@ -112,6 +113,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 16
                       bucket_field_name a
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a
                       columns.comments 
@@ -123,7 +125,7 @@ STAGE PLANS:
                       serialization.ddl struct acidtbldefault { i32 a}
                       serialization.format 1
                       serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
-                      totalSize 33143
+                      totalSize 34540
                       transactional true
                       transactional_properties default
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/acid_vectorization_original.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/acid_vectorization_original.q.out b/ql/src/test/results/clientpositive/llap/acid_vectorization_original.q.out
index 442627f..44ad6d566 100644
--- a/ql/src/test/results/clientpositive/llap/acid_vectorization_original.q.out
+++ b/ql/src/test/results/clientpositive/llap/acid_vectorization_original.q.out
@@ -543,12 +543,12 @@ POSTHOOK: query: select ROW__ID, t, si, i from over10k_orc_bucketed where b = 42
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@over10k_orc_bucketed
 #### A masked pattern was here ####
-{"writeid":0,"bucketid":536870912,"rowid":36}	-3	344	65733
-{"writeid":0,"bucketid":536870912,"rowid":300}	-3	344	65733
-{"writeid":0,"bucketid":536936448,"rowid":82}	5	501	65585
-{"writeid":0,"bucketid":536936448,"rowid":344}	5	501	65585
-{"writeid":0,"bucketid":537067520,"rowid":211}	35	463	65646
-{"writeid":0,"bucketid":537067520,"rowid":488}	35	463	65646
+{"writeid":0,"bucketid":536870912,"rowid":104}	5	501	65585
+{"writeid":0,"bucketid":536870912,"rowid":420}	5	501	65585
+{"writeid":0,"bucketid":536936448,"rowid":37}	-3	344	65733
+{"writeid":0,"bucketid":536936448,"rowid":295}	-3	344	65733
+{"writeid":0,"bucketid":537067520,"rowid":173}	35	463	65646
+{"writeid":0,"bucketid":537067520,"rowid":406}	35	463	65646
 PREHOOK: query: explain update over10k_orc_bucketed set i = 0 where b = 4294967363 and t < 100
 PREHOOK: type: QUERY
 POSTHOOK: query: explain update over10k_orc_bucketed set i = 0 where b = 4294967363 and t < 100
@@ -639,10 +639,10 @@ POSTHOOK: query: select ROW__ID, t, si, i from over10k_orc_bucketed where b = 42
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@over10k_orc_bucketed
 #### A masked pattern was here ####
-{"writeid":### Masked writeid ###,"bucketid":536870912,"rowid":0}	-3	344	0
-{"writeid":### Masked writeid ###,"bucketid":536870912,"rowid":1}	-3	344	0
-{"writeid":### Masked writeid ###,"bucketid":536936448,"rowid":0}	5	501	0
-{"writeid":### Masked writeid ###,"bucketid":536936448,"rowid":1}	5	501	0
+{"writeid":### Masked writeid ###,"bucketid":536870912,"rowid":0}	5	501	0
+{"writeid":### Masked writeid ###,"bucketid":536870912,"rowid":1}	5	501	0
+{"writeid":### Masked writeid ###,"bucketid":536936448,"rowid":0}	-3	344	0
+{"writeid":### Masked writeid ###,"bucketid":536936448,"rowid":1}	-3	344	0
 {"writeid":### Masked writeid ###,"bucketid":537067520,"rowid":0}	35	463	0
 {"writeid":### Masked writeid ###,"bucketid":537067520,"rowid":1}	35	463	0
 PREHOOK: query: explain select ROW__ID, count(*) from over10k_orc_bucketed group by ROW__ID having count(*) > 1
@@ -665,22 +665,22 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: over10k_orc_bucketed
-                  Statistics: Num rows: 1227 Data size: 701970 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1229 Data size: 703430 Basic stats: COMPLETE Column stats: COMPLETE
                   Select Operator
                     expressions: ROW__ID (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                     outputColumnNames: ROW__ID
-                    Statistics: Num rows: 1227 Data size: 701970 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 1229 Data size: 703430 Basic stats: COMPLETE Column stats: COMPLETE
                     Group By Operator
                       aggregations: count()
                       keys: ROW__ID (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                       mode: hash
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 613 Data size: 51492 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 614 Data size: 51576 Basic stats: COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
-                        Statistics: Num rows: 613 Data size: 51492 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 614 Data size: 51576 Basic stats: COMPLETE Column stats: COMPLETE
                         value expressions: _col1 (type: bigint)
             Execution mode: llap
             LLAP IO: may be used (ACID table)
@@ -692,7 +692,7 @@ STAGE PLANS:
                 keys: KEY._col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 613 Data size: 51492 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 614 Data size: 51576 Basic stats: COMPLETE Column stats: COMPLETE
                 Filter Operator
                   predicate: (_col1 > 1L) (type: boolean)
                   Statistics: Num rows: 204 Data size: 17136 Basic stats: COMPLETE Column stats: COMPLETE

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/alter_merge_stats_orc.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/alter_merge_stats_orc.q.out b/ql/src/test/results/clientpositive/llap/alter_merge_stats_orc.q.out
index c87a0a6..c8b831d 100644
--- a/ql/src/test/results/clientpositive/llap/alter_merge_stats_orc.q.out
+++ b/ql/src/test/results/clientpositive/llap/alter_merge_stats_orc.q.out
@@ -89,6 +89,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	3                   
 	numRows             	1500                
 	rawDataSize         	141000              
@@ -139,6 +140,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1500                
 	rawDataSize         	141000              

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/autoColumnStats_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/autoColumnStats_1.q.out b/ql/src/test/results/clientpositive/llap/autoColumnStats_1.q.out
index b630223..3266fde 100644
--- a/ql/src/test/results/clientpositive/llap/autoColumnStats_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/autoColumnStats_1.q.out
@@ -395,6 +395,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -1005,6 +1006,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/ac6b2a3f/ql/src/test/results/clientpositive/llap/autoColumnStats_10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/autoColumnStats_10.q.out b/ql/src/test/results/clientpositive/llap/autoColumnStats_10.q.out
index 9ae59e6..6634966 100644
--- a/ql/src/test/results/clientpositive/llap/autoColumnStats_10.q.out
+++ b/ql/src/test/results/clientpositive/llap/autoColumnStats_10.q.out
@@ -29,6 +29,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c1\":\"true\",\"c2\":\"true\",\"insert_num\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -75,6 +76,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c1\":\"true\",\"c2\":\"true\",\"insert_num\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1                   
 	rawDataSize         	8                   
@@ -118,6 +120,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"insert_num\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	1                   
@@ -203,6 +206,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"insert_num\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numRows             	2                   
@@ -293,6 +297,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c1\":\"true\",\"c2\":\"true\",\"insert_num\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -339,6 +344,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1                   
 	rawDataSize         	8                   
@@ -382,6 +388,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	1                   
@@ -467,6 +474,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numRows             	2                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/autoColumnStats_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/autoColumnStats_2.q.out b/ql/src/test/results/clientpositive/llap/autoColumnStats_2.q.out
index 6973ec0..f1ae2a5 100644
--- a/ql/src/test/results/clientpositive/llap/autoColumnStats_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/autoColumnStats_2.q.out
@@ -1127,6 +1127,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/ac6b2a3f/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_1.q.out b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_1.q.out
index b6003b0..00c8dab 100644
--- a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_1.q.out
@@ -165,6 +165,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -252,6 +253,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -300,6 +302,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -439,6 +442,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -526,6 +530,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -574,6 +579,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -713,6 +719,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -800,6 +807,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -848,6 +856,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_11.q.out b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_11.q.out
index 809a158..5449098 100644
--- a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_11.q.out
+++ b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_11.q.out
@@ -175,6 +175,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -253,6 +254,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -302,6 +304,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -465,6 +468,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -552,6 +556,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -600,6 +605,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -735,6 +741,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -818,6 +825,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -866,6 +874,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1001,6 +1010,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1063,6 +1073,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1111,6 +1122,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1197,6 +1209,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1245,6 +1258,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_12.q.out b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_12.q.out
index c0bd706..48890b2 100644
--- a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_12.q.out
+++ b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_12.q.out
@@ -202,6 +202,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -268,6 +269,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -351,6 +353,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -399,6 +402,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -470,6 +474,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/cte_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/cte_1.q.out b/ql/src/test/results/clientpositive/llap/cte_1.q.out
index d7bc062..d98862c 100644
--- a/ql/src/test/results/clientpositive/llap/cte_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/cte_1.q.out
@@ -159,178 +159,217 @@ POSTHOOK: Input: default@src
 10	val_10	val_10
 100	val_100	val_100
 100	val_100	val_100
+103	val_103	val_103
+103	val_103	val_103
 104	val_104	val_104
 104	val_104	val_104
-111	val_111	val_111
-114	val_114	val_114
-116	val_116	val_116
+105	val_105	val_105
+11	val_11	val_11
 126	val_126	val_126
 128	val_128	val_128
 128	val_128	val_128
 128	val_128	val_128
-131	val_131	val_131
+129	val_129	val_129
+129	val_129	val_129
+133	val_133	val_133
 134	val_134	val_134
 134	val_134	val_134
+136	val_136	val_136
+143	val_143	val_143
+149	val_149	val_149
+149	val_149	val_149
 152	val_152	val_152
 152	val_152	val_152
-155	val_155	val_155
+153	val_153	val_153
+157	val_157	val_157
+162	val_162	val_162
+166	val_166	val_166
 169	val_169	val_169
 169	val_169	val_169
 169	val_169	val_169
 169	val_169	val_169
-17	val_17	val_17
 170	val_170	val_170
-172	val_172	val_172
-172	val_172	val_172
-178	val_178	val_178
-179	val_179	val_179
-179	val_179	val_179
-189	val_189	val_189
-19	val_19	val_19
-192	val_192	val_192
-194	val_194	val_194
-195	val_195	val_195
-195	val_195	val_195
-199	val_199	val_199
-199	val_199	val_199
-199	val_199	val_199
-20	val_20	val_20
-207	val_207	val_207
-207	val_207	val_207
+174	val_174	val_174
+174	val_174	val_174
+176	val_176	val_176
+176	val_176	val_176
+193	val_193	val_193
+193	val_193	val_193
+193	val_193	val_193
+196	val_196	val_196
+201	val_201	val_201
+205	val_205	val_205
+205	val_205	val_205
+209	val_209	val_209
+209	val_209	val_209
 213	val_213	val_213
 213	val_213	val_213
 218	val_218	val_218
+221	val_221	val_221
+221	val_221	val_221
 223	val_223	val_223
 223	val_223	val_223
-229	val_229	val_229
-229	val_229	val_229
 233	val_233	val_233
 233	val_233	val_233
-235	val_235	val_235
+239	val_239	val_239
+239	val_239	val_239
 24	val_24	val_24
 24	val_24	val_24
-256	val_256	val_256
-256	val_256	val_256
-257	val_257	val_257
+241	val_241	val_241
+242	val_242	val_242
+242	val_242	val_242
+247	val_247	val_247
+248	val_248	val_248
 26	val_26	val_26
 26	val_26	val_26
-265	val_265	val_265
-265	val_265	val_265
-266	val_266	val_266
-27	val_27	val_27
-278	val_278	val_278
-278	val_278	val_278
-280	val_280	val_280
-280	val_280	val_280
-284	val_284	val_284
-291	val_291	val_291
-30	val_30	val_30
+263	val_263	val_263
+272	val_272	val_272
+272	val_272	val_272
+275	val_275	val_275
+285	val_285	val_285
+296	val_296	val_296
+298	val_298	val_298
+298	val_298	val_298
+298	val_298	val_298
 302	val_302	val_302
-305	val_305	val_305
-316	val_316	val_316
-316	val_316	val_316
-316	val_316	val_316
-321	val_321	val_321
-321	val_321	val_321
+307	val_307	val_307
+307	val_307	val_307
+310	val_310	val_310
 323	val_323	val_323
-33	val_33	val_33
+325	val_325	val_325
+325	val_325	val_325
 333	val_333	val_333
 333	val_333	val_333
+335	val_335	val_335
 338	val_338	val_338
-344	val_344	val_344
-344	val_344	val_344
-353	val_353	val_353
-353	val_353	val_353
-356	val_356	val_356
-364	val_364	val_364
-368	val_368	val_368
-369	val_369	val_369
-369	val_369	val_369
-369	val_369	val_369
-37	val_37	val_37
-37	val_37	val_37
+360	val_360	val_360
+362	val_362	val_362
+367	val_367	val_367
+367	val_367	val_367
+375	val_375	val_375
 377	val_377	val_377
-378	val_378	val_378
-386	val_386	val_386
+384	val_384	val_384
+384	val_384	val_384
+384	val_384	val_384
 392	val_392	val_392
-397	val_397	val_397
-397	val_397	val_397
-404	val_404	val_404
-404	val_404	val_404
-407	val_407	val_407
-411	val_411	val_411
-418	val_418	val_418
+399	val_399	val_399
+399	val_399	val_399
+401	val_401	val_401
+401	val_401	val_401
+401	val_401	val_401
+401	val_401	val_401
+401	val_401	val_401
+402	val_402	val_402
+403	val_403	val_403
+403	val_403	val_403
+403	val_403	val_403
+413	val_413	val_413
+413	val_413	val_413
+417	val_417	val_417
+417	val_417	val_417
+417	val_417	val_417
 419	val_419	val_419
-424	val_424	val_424
-424	val_424	val_424
-430	val_430	val_430
-430	val_430	val_430
-430	val_430	val_430
-432	val_432	val_432
-436	val_436	val_436
-437	val_437	val_437
-448	val_448	val_448
-454	val_454	val_454
-454	val_454	val_454
-454	val_454	val_454
-457	val_457	val_457
-468	val_468	val_468
-468	val_468	val_468
-468	val_468	val_468
-468	val_468	val_468
-477	val_477	val_477
+42	val_42	val_42
+42	val_42	val_42
+427	val_427	val_427
+438	val_438	val_438
+438	val_438	val_438
+438	val_438	val_438
+44	val_44	val_44
+458	val_458	val_458
+458	val_458	val_458
+459	val_459	val_459
+459	val_459	val_459
+466	val_466	val_466
+466	val_466	val_466
+466	val_466	val_466
+469	val_469	val_469
+469	val_469	val_469
+469	val_469	val_469
+469	val_469	val_469
+469	val_469	val_469
+472	val_472	val_472
+475	val_475	val_475
+478	val_478	val_478
+478	val_478	val_478
 479	val_479	val_479
-490	val_490	val_490
-492	val_492	val_492
-492	val_492	val_492
-493	val_493	val_493
+483	val_483	val_483
+489	val_489	val_489
+489	val_489	val_489
+489	val_489	val_489
+489	val_489	val_489
 495	val_495	val_495
 496	val_496	val_496
-497	val_497	val_497
+5	val_5	val_5
+5	val_5	val_5
+5	val_5	val_5
 57	val_57	val_57
-67	val_67	val_67
-67	val_67	val_67
-8	val_8	val_8
-80	val_80	val_80
-85	val_85	val_85
+58	val_58	val_58
+58	val_58	val_58
+64	val_64	val_64
+66	val_66	val_66
+69	val_69	val_69
+72	val_72	val_72
+72	val_72	val_72
+76	val_76	val_76
+76	val_76	val_76
+77	val_77	val_77
 9	val_9	val_9
-92	val_92	val_92
-97	val_97	val_97
-97	val_97	val_97
-105	val_105	val_105
-11	val_11	val_11
+90	val_90	val_90
+90	val_90	val_90
+90	val_90	val_90
+0	val_0	val_0
+0	val_0	val_0
+0	val_0	val_0
 113	val_113	val_113
 113	val_113	val_113
-136	val_136	val_136
+114	val_114	val_114
+116	val_116	val_116
+118	val_118	val_118
+118	val_118	val_118
 137	val_137	val_137
 137	val_137	val_137
 138	val_138	val_138
 138	val_138	val_138
 138	val_138	val_138
 138	val_138	val_138
-143	val_143	val_143
-150	val_150	val_150
+145	val_145	val_145
+146	val_146	val_146
+146	val_146	val_146
+155	val_155	val_155
 158	val_158	val_158
-160	val_160	val_160
-162	val_162	val_162
+164	val_164	val_164
+164	val_164	val_164
 165	val_165	val_165
 165	val_165	val_165
-166	val_166	val_166
-174	val_174	val_174
-174	val_174	val_174
-177	val_177	val_177
-18	val_18	val_18
-18	val_18	val_18
-180	val_180	val_180
+178	val_178	val_178
+181	val_181	val_181
+183	val_183	val_183
 186	val_186	val_186
-196	val_196	val_196
-197	val_197	val_197
-197	val_197	val_197
-217	val_217	val_217
-217	val_217	val_217
-219	val_219	val_219
-219	val_219	val_219
-226	val_226	val_226
+189	val_189	val_189
+190	val_190	val_190
+191	val_191	val_191
+191	val_191	val_191
+194	val_194	val_194
+195	val_195	val_195
+195	val_195	val_195
+199	val_199	val_199
+199	val_199	val_199
+199	val_199	val_199
+2	val_2	val_2
+207	val_207	val_207
+207	val_207	val_207
+208	val_208	val_208
+208	val_208	val_208
+208	val_208	val_208
+214	val_214	val_214
+216	val_216	val_216
+216	val_216	val_216
+222	val_222	val_222
+224	val_224	val_224
+224	val_224	val_224
+229	val_229	val_229
+229	val_229	val_229
 230	val_230	val_230
 230	val_230	val_230
 230	val_230	val_230
@@ -338,322 +377,283 @@ POSTHOOK: Input: default@src
 230	val_230	val_230
 238	val_238	val_238
 238	val_238	val_238
-242	val_242	val_242
-242	val_242	val_242
-248	val_248	val_248
-252	val_252	val_252
+244	val_244	val_244
+258	val_258	val_258
 260	val_260	val_260
-263	val_263	val_263
+262	val_262	val_262
+266	val_266	val_266
+27	val_27	val_27
+273	val_273	val_273
+273	val_273	val_273
+273	val_273	val_273
+28	val_28	val_28
+284	val_284	val_284
+288	val_288	val_288
+288	val_288	val_288
+30	val_30	val_30
+315	val_315	val_315
+321	val_321	val_321
+321	val_321	val_321
+33	val_33	val_33
+342	val_342	val_342
+342	val_342	val_342
+35	val_35	val_35
+35	val_35	val_35
+35	val_35	val_35
+364	val_364	val_364
+365	val_365	val_365
+366	val_366	val_366
+368	val_368	val_368
+386	val_386	val_386
+389	val_389	val_389
+394	val_394	val_394
+396	val_396	val_396
+396	val_396	val_396
+396	val_396	val_396
+397	val_397	val_397
+397	val_397	val_397
+4	val_4	val_4
+41	val_41	val_41
+414	val_414	val_414
+414	val_414	val_414
+421	val_421	val_421
+444	val_444	val_444
+446	val_446	val_446
+448	val_448	val_448
+452	val_452	val_452
+454	val_454	val_454
+454	val_454	val_454
+454	val_454	val_454
+455	val_455	val_455
+460	val_460	val_460
+463	val_463	val_463
+463	val_463	val_463
+482	val_482	val_482
+492	val_492	val_492
+492	val_492	val_492
+493	val_493	val_493
+65	val_65	val_65
+78	val_78	val_78
+80	val_80	val_80
+97	val_97	val_97
+97	val_97	val_97
+111	val_111	val_111
+12	val_12	val_12
+12	val_12	val_12
+120	val_120	val_120
+120	val_120	val_120
+131	val_131	val_131
+150	val_150	val_150
+156	val_156	val_156
+160	val_160	val_160
+163	val_163	val_163
+167	val_167	val_167
+167	val_167	val_167
+167	val_167	val_167
+168	val_168	val_168
+17	val_17	val_17
+175	val_175	val_175
+175	val_175	val_175
+180	val_180	val_180
+20	val_20	val_20
+203	val_203	val_203
+203	val_203	val_203
+226	val_226	val_226
+237	val_237	val_237
+237	val_237	val_237
+255	val_255	val_255
+255	val_255	val_255
+256	val_256	val_256
+256	val_256	val_256
 274	val_274	val_274
 277	val_277	val_277
 277	val_277	val_277
 277	val_277	val_277
 277	val_277	val_277
-296	val_296	val_296
-307	val_307	val_307
-307	val_307	val_307
+281	val_281	val_281
+281	val_281	val_281
+282	val_282	val_282
+282	val_282	val_282
+286	val_286	val_286
+287	val_287	val_287
+289	val_289	val_289
+292	val_292	val_292
 308	val_308	val_308
-325	val_325	val_325
-325	val_325	val_325
+309	val_309	val_309
+309	val_309	val_309
+318	val_318	val_318
+318	val_318	val_318
+318	val_318	val_318
 327	val_327	val_327
 327	val_327	val_327
 327	val_327	val_327
-342	val_342	val_342
-342	val_342	val_342
+332	val_332	val_332
+339	val_339	val_339
+34	val_34	val_34
+341	val_341	val_341
 348	val_348	val_348
 348	val_348	val_348
 348	val_348	val_348
 348	val_348	val_348
 348	val_348	val_348
-35	val_35	val_35
-35	val_35	val_35
-35	val_35	val_35
-351	val_351	val_351
-367	val_367	val_367
-367	val_367	val_367
-389	val_389	val_389
-393	val_393	val_393
-394	val_394	val_394
-4	val_4	val_4
-403	val_403	val_403
-403	val_403	val_403
-403	val_403	val_403
+356	val_356	val_356
+37	val_37	val_37
+37	val_37	val_37
+374	val_374	val_374
+379	val_379	val_379
+382	val_382	val_382
+382	val_382	val_382
 409	val_409	val_409
 409	val_409	val_409
 409	val_409	val_409
-414	val_414	val_414
-414	val_414	val_414
-421	val_421	val_421
-427	val_427	val_427
 429	val_429	val_429
 429	val_429	val_429
+43	val_43	val_43
+430	val_430	val_430
+430	val_430	val_430
+430	val_430	val_430
+431	val_431	val_431
+431	val_431	val_431
+431	val_431	val_431
+432	val_432	val_432
 435	val_435	val_435
-438	val_438	val_438
-438	val_438	val_438
-438	val_438	val_438
+437	val_437	val_437
 439	val_439	val_439
 439	val_439	val_439
-455	val_455	val_455
-458	val_458	val_458
-458	val_458	val_458
-460	val_460	val_460
+443	val_443	val_443
+457	val_457	val_457
 462	val_462	val_462
 462	val_462	val_462
-475	val_475	val_475
-478	val_478	val_478
-478	val_478	val_478
-480	val_480	val_480
-480	val_480	val_480
-480	val_480	val_480
-484	val_484	val_484
+467	val_467	val_467
+470	val_470	val_470
+481	val_481	val_481
 487	val_487	val_487
-53	val_53	val_53
-58	val_58	val_58
-58	val_58	val_58
-66	val_66	val_66
-69	val_69	val_69
-77	val_77	val_77
-78	val_78	val_78
+494	val_494	val_494
+51	val_51	val_51
+51	val_51	val_51
+70	val_70	val_70
+70	val_70	val_70
+70	val_70	val_70
+74	val_74	val_74
+82	val_82	val_82
 83	val_83	val_83
 83	val_83	val_83
-90	val_90	val_90
-90	val_90	val_90
-90	val_90	val_90
-95	val_95	val_95
-95	val_95	val_95
-103	val_103	val_103
-103	val_103	val_103
-120	val_120	val_120
-120	val_120	val_120
-129	val_129	val_129
-129	val_129	val_129
-133	val_133	val_133
-145	val_145	val_145
-146	val_146	val_146
-146	val_146	val_146
-149	val_149	val_149
-149	val_149	val_149
+84	val_84	val_84
+84	val_84	val_84
+119	val_119	val_119
+119	val_119	val_119
+119	val_119	val_119
+125	val_125	val_125
+125	val_125	val_125
 15	val_15	val_15
 15	val_15	val_15
-157	val_157	val_157
-181	val_181	val_181
+172	val_172	val_172
+172	val_172	val_172
+177	val_177	val_177
+179	val_179	val_179
+179	val_179	val_179
+18	val_18	val_18
+18	val_18	val_18
 187	val_187	val_187
 187	val_187	val_187
 187	val_187	val_187
-191	val_191	val_191
-191	val_191	val_191
-2	val_2	val_2
+19	val_19	val_19
+192	val_192	val_192
+197	val_197	val_197
+197	val_197	val_197
 200	val_200	val_200
 200	val_200	val_200
-201	val_201	val_201
 202	val_202	val_202
-203	val_203	val_203
-203	val_203	val_203
-208	val_208	val_208
-208	val_208	val_208
-208	val_208	val_208
-214	val_214	val_214
-216	val_216	val_216
-216	val_216	val_216
-222	val_222	val_222
-224	val_224	val_224
-224	val_224	val_224
+217	val_217	val_217
+217	val_217	val_217
+219	val_219	val_219
+219	val_219	val_219
 228	val_228	val_228
-237	val_237	val_237
-237	val_237	val_237
-239	val_239	val_239
-239	val_239	val_239
-241	val_241	val_241
-244	val_244	val_244
-255	val_255	val_255
-255	val_255	val_255
-258	val_258	val_258
-262	val_262	val_262
-273	val_273	val_273
-273	val_273	val_273
-273	val_273	val_273
-275	val_275	val_275
-28	val_28	val_28
-282	val_282	val_282
-282	val_282	val_282
-285	val_285	val_285
-286	val_286	val_286
-287	val_287	val_287
-288	val_288	val_288
-288	val_288	val_288
-292	val_292	val_292
-298	val_298	val_298
-298	val_298	val_298
-298	val_298	val_298
-310	val_310	val_310
-311	val_311	val_311
-311	val_311	val_311
-311	val_311	val_311
-332	val_332	val_332
-335	val_335	val_335
-336	val_336	val_336
-339	val_339	val_339
-360	val_360	val_360
-362	val_362	val_362
-373	val_373	val_373
-384	val_384	val_384
-384	val_384	val_384
-384	val_384	val_384
-395	val_395	val_395
-395	val_395	val_395
-396	val_396	val_396
-396	val_396	val_396
-396	val_396	val_396
-402	val_402	val_402
-417	val_417	val_417
-417	val_417	val_417
-417	val_417	val_417
-42	val_42	val_42
-42	val_42	val_42
-43	val_43	val_43
-444	val_444	val_444
-449	val_449	val_449
-453	val_453	val_453
-459	val_459	val_459
-459	val_459	val_459
-47	val_47	val_47
-481	val_481	val_481
-482	val_482	val_482
-483	val_483	val_483
-485	val_485	val_485
-489	val_489	val_489
-489	val_489	val_489
-489	val_489	val_489
-489	val_489	val_489
-494	val_494	val_494
-65	val_65	val_65
-72	val_72	val_72
-72	val_72	val_72
-74	val_74	val_74
-76	val_76	val_76
-76	val_76	val_76
-82	val_82	val_82
-86	val_86	val_86
-87	val_87	val_87
-96	val_96	val_96
-0	val_0	val_0
-0	val_0	val_0
-0	val_0	val_0
-118	val_118	val_118
-118	val_118	val_118
-119	val_119	val_119
-119	val_119	val_119
-119	val_119	val_119
-12	val_12	val_12
-12	val_12	val_12
-125	val_125	val_125
-125	val_125	val_125
-153	val_153	val_153
-156	val_156	val_156
-163	val_163	val_163
-164	val_164	val_164
-164	val_164	val_164
-167	val_167	val_167
-167	val_167	val_167
-167	val_167	val_167
-168	val_168	val_168
-175	val_175	val_175
-175	val_175	val_175
-176	val_176	val_176
-176	val_176	val_176
-183	val_183	val_183
-190	val_190	val_190
-193	val_193	val_193
-193	val_193	val_193
-193	val_193	val_193
-205	val_205	val_205
-205	val_205	val_205
-209	val_209	val_209
-209	val_209	val_209
-221	val_221	val_221
-221	val_221	val_221
-247	val_247	val_247
+235	val_235	val_235
 249	val_249	val_249
-272	val_272	val_272
-272	val_272	val_272
-281	val_281	val_281
-281	val_281	val_281
+252	val_252	val_252
+257	val_257	val_257
+265	val_265	val_265
+265	val_265	val_265
+278	val_278	val_278
+278	val_278	val_278
+280	val_280	val_280
+280	val_280	val_280
 283	val_283	val_283
-289	val_289	val_289
+291	val_291	val_291
+305	val_305	val_305
 306	val_306	val_306
-309	val_309	val_309
-309	val_309	val_309
-315	val_315	val_315
+311	val_311	val_311
+311	val_311	val_311
+311	val_311	val_311
+316	val_316	val_316
+316	val_316	val_316
+316	val_316	val_316
 317	val_317	val_317
 317	val_317	val_317
-318	val_318	val_318
-318	val_318	val_318
-318	val_318	val_318
 322	val_322	val_322
 322	val_322	val_322
 331	val_331	val_331
 331	val_331	val_331
-34	val_34	val_34
-341	val_341	val_341
+336	val_336	val_336
+344	val_344	val_344
+344	val_344	val_344
 345	val_345	val_345
-365	val_365	val_365
-366	val_366	val_366
-374	val_374	val_374
-375	val_375	val_375
-379	val_379	val_379
-382	val_382	val_382
-382	val_382	val_382
-399	val_399	val_399
-399	val_399	val_399
+351	val_351	val_351
+353	val_353	val_353
+353	val_353	val_353
+369	val_369	val_369
+369	val_369	val_369
+369	val_369	val_369
+373	val_373	val_373
+378	val_378	val_378
+393	val_393	val_393
+395	val_395	val_395
+395	val_395	val_395
 400	val_400	val_400
-401	val_401	val_401
-401	val_401	val_401
-401	val_401	val_401
-401	val_401	val_401
-401	val_401	val_401
+404	val_404	val_404
+404	val_404	val_404
 406	val_406	val_406
 406	val_406	val_406
 406	val_406	val_406
 406	val_406	val_406
-41	val_41	val_41
-413	val_413	val_413
-413	val_413	val_413
-431	val_431	val_431
-431	val_431	val_431
-431	val_431	val_431
-44	val_44	val_44
-443	val_443	val_443
-446	val_446	val_446
-452	val_452	val_452
-463	val_463	val_463
-463	val_463	val_463
-466	val_466	val_466
-466	val_466	val_466
-466	val_466	val_466
-467	val_467	val_467
-469	val_469	val_469
-469	val_469	val_469
-469	val_469	val_469
-469	val_469	val_469
-469	val_469	val_469
-470	val_470	val_470
-472	val_472	val_472
+407	val_407	val_407
+411	val_411	val_411
+418	val_418	val_418
+424	val_424	val_424
+424	val_424	val_424
+436	val_436	val_436
+449	val_449	val_449
+453	val_453	val_453
+468	val_468	val_468
+468	val_468	val_468
+468	val_468	val_468
+468	val_468	val_468
+47	val_47	val_47
+477	val_477	val_477
+480	val_480	val_480
+480	val_480	val_480
+480	val_480	val_480
+484	val_484	val_484
+485	val_485	val_485
+490	val_490	val_490
 491	val_491	val_491
+497	val_497	val_497
 498	val_498	val_498
 498	val_498	val_498
 498	val_498	val_498
-5	val_5	val_5
-5	val_5	val_5
-5	val_5	val_5
-51	val_51	val_51
-51	val_51	val_51
+53	val_53	val_53
 54	val_54	val_54
-64	val_64	val_64
-70	val_70	val_70
-70	val_70	val_70
-70	val_70	val_70
-84	val_84	val_84
-84	val_84	val_84
+67	val_67	val_67
+67	val_67	val_67
+8	val_8	val_8
+85	val_85	val_85
+86	val_86	val_86
+87	val_87	val_87
+92	val_92	val_92
+95	val_95	val_95
+95	val_95	val_95
+96	val_96	val_96
 98	val_98	val_98
 98	val_98	val_98
 PREHOOK: query: with q1 as (select * from alltypesorc)
@@ -671,12237 +671,12237 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc
 #### A masked pattern was here ####
 NULL	NULL	2735.0
-NULL	3Ke6A1U847tV73	NULL
-NULL	45ja5suO	NULL
+NULL	4R0XI865tG1o	NULL
 NULL	4fNIOF6ul	NULL
-NULL	62vmI4	NULL
-NULL	84O1C65C5k88bI7i4	NULL
 NULL	AmPHc4NUg3HwJ	NULL
+NULL	J84WKCH	NULL
 NULL	LR2AKy0dPt8vFdIV5760jriw	NULL
-NULL	Oye1OEeN	NULL
-NULL	THog3nx6pd1Bb	NULL
+NULL	MqcMK622OR2	NULL
+NULL	Pw53BBJ	NULL
+NULL	W114Au1ELrT7tRYnqE3MxCv	NULL
 NULL	Xw6nBW1A205Rv7rE	NULL
 NULL	Yssb82rdfylDv4K	NULL
-NULL	a7GT5lui7rc	NULL
+NULL	d1135cW8G6QCDM8LiD0c	NULL
 NULL	fVgv88OvQR1BB7toX	NULL
-NULL	gC1t8pc	NULL
+NULL	nc1y0EKQ51B4U0F06	NULL
 NULL	p61uO61KDWhQ8b648ac2xyFO	NULL
-NULL	y605nF0K3mMoM75j	NULL
+NULL	r2uhJH3	NULL
 -1073279343	NULL	NULL
--1073279343	oj1YrV5Wa	NULL
--1073051226	NULL	-7382.0
--1072081801	dPkN74F7	8373.0
--1072076362	NULL	-5470.0
--1071363017	Anj0oF	NULL
--1070883071	0ruyd6Y50JpdGRf6HqD	-741.0
--1070551679	NULL	-947.0
--1069109166	vW36C22KS75R	8390.0
--1069103950	NULL	NULL
--1068336533	PUn1YVC	NULL
--1067874703	NULL	NULL
--1067683781	IbgbUvP5	NULL
--1067386090	HBtg2r6pR16VC73	-3977.0
--1066922682	NULL	-9987.0
--1063745167	NULL	NULL
--1063745167	L47nqo	NULL
+-1072081801	NULL	8373.0
+-1071480828	NULL	NULL
+-1070883071	NULL	-741.0
+-1070551679	iUR3Q	-947.0
+-1068623584	NULL	-14005.0
+-1068623584	s5O357fO5pF0	-14005.0
+-1067683781	NULL	NULL
+-1065117869	jWVP6gOkq12mdh	2538.0
+-1064949302	8u8tR858jC01y8Ft66nYRnb6	6454.0
+-1064718136	NULL	NULL
+-1064623720	NULL	NULL
+-1064623720	47INeW44yvsne46Mu	NULL
+-1063498122	703Y1U84Wa28ryl	-11480.0
 -1063164541	1NydRD5y5o3	NULL
--1062973443	144eST755Fvf6nLi74SK	10541.0
--1061614989	61Oa7M7Pl17d7auyXra6	-4234.0
+-1062973443	NULL	10541.0
 -1061509617	NULL	NULL
--1060624784	NULL	NULL
--1060624784	Das7E73	NULL
+-1060990068	NULL	NULL
+-1059941909	Bu880nx	8782.0
+-1059338191	NULL	7322.0
+-1059047258	NULL	12452.0
 -1058897881	NULL	NULL
--1056684111	NULL	13991.0
--1056684111	7K7y062ndg5aRSBsx	13991.0
--1055945837	Qc722Gg4280	13690.0
--1055669248	NULL	2570.0
--1055185482	l20vn2Awc	NULL
+-1058844180	C6hoSE4L6NCrA	NULL
+-1058286942	NULL	NULL
+-1055040773	NULL	NULL
+-1055040773	1t2c87D721uxcFhn2	NULL
 -1054958082	im6VJRHh5EGfS7FVhw	NULL
--1054849160	NULL	NULL
--1053238077	NULL	-3704.0
+-1053254526	NULL	NULL
 -1052322972	C60KTh	-7433.0
 -1051223597	NULL	NULL
--1050388484	B26L6Qp134xe0wy0Si	NULL
--1048934049	NULL	-524.0
--1046913669	NULL	NULL
+-1050684541	D7uQjIbBdnn	-8261.0
+-1050657303	NULL	-6999.0
+-1050165799	NULL	8634.0
+-1049984461	NULL	NULL
+-1048934049	CjC3BPy1KH421o32f8	-524.0
+-1048097158	NULL	NULL
+-1047036113	Js07yFa2qnrfVU1j2e3	NULL
 -1046766350	s4LPR6Bg0j25SWD8	NULL
--1046399794	NULL	4130.0
--1045737053	FGQf6n21ES	NULL
--1044828205	Ej05nrdc8CVXYu1Axy6W	NULL
--1044748460	NULL	NULL
--1044357977	NULL	NULL
--1043573508	NULL	16216.0
--1043082182	NULL	9180.0
--1042712895	iD2KrmBUbvNjuhHR2r	9296.0
--1042396242	3E1ynn7EtEFXaiQ772b86gVL	9583.0
--1039776293	NULL	13704.0
--1039637549	KH8n8pUDpPj0hPA6	NULL
--1039514580	NULL	NULL
--1039355325	r17jGvc7gR	NULL
--1039292315	07488p5vb4d2	NULL
--1038649744	yl7A1QkSCYHui8cwp4b1OW43	NULL
--1037086954	65n3amk86ayb7	4048.0
--1036396564	NULL	-14238.0
--1034002107	aa6sWJ28wU1wvv6it	13650.0
--1032255988	NULL	NULL
--1032115017	yc2pX4jTI0xKh5xTys	NULL
--1031230441	NULL	-4561.0
--1031230441	iF1fQ7gn0qgpH7HKS5N3	-4561.0
--1029979211	NULL	NULL
--1029879672	NULL	NULL
+-1045737053	NULL	NULL
+-1043132597	NULL	12302.0
+-1042712895	NULL	9296.0
+-1042396242	NULL	9583.0
+-1041734429	NULL	-836.0
+-1041734429	wVq06T0QJ	-836.0
+-1041391389	NULL	-12970.0
+-1041391389	IL6Ct0hm2	-12970.0
+-1039776293	LaONIKN	13704.0
+-1039524403	NULL	-4773.0
+-1039524403	Bd1f156OCy1u	-4773.0
+-1039514580	IjDM0V0b7savVtf2tbHOy	NULL
+-1039355325	NULL	NULL
+-1039292315	NULL	NULL
+-1039064141	hLEVieIhDXuQ8W2YF	NULL
+-1038649744	NULL	NULL
+-1037086954	NULL	4048.0
+-1036396564	gO13PbgBt48eAg84Bq8	-14238.0
+-1034002107	NULL	13650.0
+-1033919841	6lk5XcgAmKuHHjg	NULL
+-1033608051	jENe6I6	-3287.0
+-1032115017	NULL	NULL
+-1031797254	NULL	-326.0
+-1031797254	sKEJ8vy8kHWK7D	-326.0
+-1031594611	dFE1VTv3P5WDi20YecUuv7	NULL
 -1029267410	NULL	-5497.0
--1027845003	NULL	15332.0
--1026479711	806vT7T4G4Y4	-2414.0
--1024321144	NULL	NULL
--1023919084	NULL	NULL
--1023919084	3cT82	NULL
+-1029267410	in6jU6Ke8n	-5497.0
+-1028293812	uY5BRu6VpGUPj4	13237.0
+-1026479711	NULL	-2414.0
+-1024159115	3a7WcjS0uc0bqUmPmu	-1885.0
 -1023644243	NULL	NULL
--1023644243	Cxas82oA2hX884xmYQ2jrpDX	NULL
--1023481424	77jNF	2306.0
+-1023165277	NULL	NULL
+-1022702965	k3a17i1ndf	NULL
 -1022326946	NULL	NULL
+-1021337976	NULL	-11929.0
+-1020568554	fX2DVO612	492.0
+-1020466796	7hCJ5yJvt0775jjgq8S0bX6W	NULL
 -1020464283	xknXeDuW	-5126.0
--1020120834	NULL	NULL
--1020120834	6Ob80MBP350rI275	NULL
 -1019836360	8vFbY6BM35cX2G	-872.0
--1019324384	NULL	NULL
 -1018959984	NULL	6882.0
--1016801620	NULL	NULL
--1016801620	8vKN51JNM7	NULL
+-1018959984	s7Ct1y6ga8FJla5	6882.0
+-1016986173	NULL	9897.0
+-1016835101	Md2lY0T7reBu	NULL
 -1016704824	NULL	NULL
--1015614511	NULL	-2849.0
--1015614511	j3LaR1p1e2	-2849.0
--1015510885	Kw7fOuw4DHeyXe2yg	NULL
--1015272448	jTQ68531mP	NULL
--1011976278	LxB3GrxHyeem1fekvgm	13126.0
--1011024551	NULL	NULL
--1011024551	cTWO4kFIrl1n	NULL
--1010636986	NULL	NULL
+-1016256312	O1Rlpc2lK3YRjAQu34gE2UK5	-6216.0
+-1015510885	NULL	NULL
+-1014120220	NULL	6770.0
+-1013988078	F3OEU67i11yDY0Lok02y6	3944.0
+-1013781936	hnq6hkAfna	5926.0
+-1013659284	NULL	NULL
+-1012066281	Kv017	4376.0
+-1011944040	X81pl2c1Y	NULL
+-1010636986	2p0iX031016VDNb6KWJ	NULL
+-1009874474	8IkicjRJ21c054Id	NULL
 -1009581584	NULL	NULL
--1009581584	I884R85q1kn	NULL
+-1009451677	NULL	11324.0
 -1009352973	NULL	-6439.0
 -1009299079	t5p3LN7q	-2596.0
--1008549738	NULL	1308.0
--1008498471	NULL	NULL
+-1008498471	8uc06Qq7RP2P1RAf	NULL
 -1007972409	NULL	14665.0
--1007972409	QRofyh6UgWdm	14665.0
 -1007835480	NULL	NULL
--1006411472	hQAra	14460.0
--1005155523	1062158y	NULL
--1004894301	NULL	676.0
+-1007330209	pg6MXmv06w1IPinrVuLU6qWI	-12558.0
+-1007097729	NULL	NULL
+-1006409417	2bD1h	3467.0
 -1004803191	NULL	8058.0
--1003938647	R04RF7qkQ8Gn1PPd33pU6	6637.0
+-1004604371	2618CM	6617.0
 -1003789565	NULL	NULL
--1003789565	dq1Ji5vGb4GVow42	NULL
--1003663525	mPp7oQ4Adp2f7Hl82	NULL
 -1003461762	NULL	NULL
--1002568394	Vpsyy3y3607I45wt80mt8v	5012.0
--1002498271	NULL	NULL
--1002350795	UD71663I2qu1c5pqA2Kf1	-7893.0
--1002277189	gGFiuV	10937.0
--1002045753	bjQP6L	8401.0
--1001487162	UrDe6x72B5ycy	12961.0
+-1002568394	NULL	5012.0
+-1002431520	NULL	3259.0
+-1001510525	NULL	10887.0
+-1001446082	CqdMb86r52TC3NgM187	NULL
+-1000804087	NULL	NULL
 -1000804087	H8LCu4M2u4f1S	NULL
 -999783487	I6Yl6OVpH65i	NULL
+-999260869	NULL	5312.0
+-998835088	327LJ26mRqM	9182.0
+-998124283	NULL	4762.0
+-998124283	EavI0LN82c3A1UN	4762.0
 -996912892	NULL	NULL
--994853271	YNsNwqw8y7D65	NULL
--994526450	Y55ytQtGRN8l58131e	NULL
--994104389	piK2mt5jDn	NULL
+-996769125	NULL	-10813.0
+-996346808	LgMBG6G3Oc5baLkjeP50i8	NULL
+-994675218	NULL	-13240.0
+-994644593	N7ED661T508c1vmM	NULL
+-994526450	NULL	NULL
+-994104389	NULL	NULL
+-993786473	qAoGjP7q7r8p460I3aT5x7o	NULL
 -993447992	NULL	NULL
--993291633	NULL	NULL
--992653997	YIxsR	NULL
--992176092	NULL	7031.0
+-993291633	8reJCOg48gHGHDs	NULL
+-991137058	hAd5Sr6Iosm0	-3128.0
 -991049363	yif2md2VvY	NULL
--990765448	Ki4yIh3hXjHn26	-2693.0
--989521057	NULL	-10688.0
--986848527	NULL	7571.0
--983336429	8U0bLsWq8444DJ5TW	NULL
--982218899	TBbxkMGlYD17B7d76b7x3	13786.0
--981689559	iSWa0uvV1O16A3H	-31.0
--981501268	NC7F5u31	12800.0
--980921154	j337j4544rq	NULL
--980795786	rELQhxExg7NKKs8hS5c	-4843.0
--980511555	NULL	NULL
--979388590	ovf0gMXhh2H86Alw2C0	2045.0
--977661266	NULL	NULL
--976688676	NULL	NULL
--973002254	yHf3d	-13269.0
--972704111	NULL	-10146.0
--971543377	NULL	NULL
--971543377	uN803aW	NULL
--970918963	suoqdh	NULL
+-990765448	NULL	-2693.0
+-989395010	NULL	-16172.0
+-989395010	ROLlg0rtT	-16172.0
+-989154705	Y7vBl4PXIPqRBJSx3sd75	14445.0
+-988289401	CeG187j	NULL
+-987261044	3meYy6xhwQL4817A3UM	3978.0
+-981967139	04w7DF25lHW4	NULL
+-981825987	4x1067604ekVjosSK5d2umw	NULL
+-981689559	NULL	-31.0
+-981501268	NULL	12800.0
+-981445439	1RH526	NULL
+-980921154	NULL	NULL
+-980375431	mc3NjQOr14RVi	NULL
+-979733794	NULL	NULL
+-979494445	NULL	NULL
+-979494445	o6kKvK7SDJ6	NULL
+-979430024	NULL	-9418.0
+-978516833	NULL	NULL
+-978062582	NULL	NULL
+-977661266	b	NULL
+-976688676	Ph2xOHI4	NULL
+-974538365	NULL	4516.0
+-971659088	GVsdgDhg	NULL
+-971594866	2bc3O0wh	-3079.0
+-970831643	NULL	2930.0
+-970458577	NULL	-12937.0
 -969472955	NULL	-11432.0
--969455852	NULL	NULL
--969157542	NULL	8738.0
--968537902	NULL	-7803.0
--968054937	NULL	14266.0
--968054937	3l2B8dk37cU2tI73S74Iw	14266.0
--965597463	NULL	NULL
--965597463	b0G65a66732y6yE65hQ0	NULL
--964373678	58dScG1eiYxH	-9013.0
--960321207	JvGVOip65N3hgA	NULL
--959745051	NULL	-5818.0
+-969455852	0Apbh7X08i2JyMK	NULL
+-968854798	NULL	8848.0
+-968854798	11R5e0X4LOeDU3kGt	8848.0
+-967332397	V3xf5QPg7EABK	NULL
+-966800904	NULL	12585.0
+-966800904	A5d3WY0X3i8b	12585.0
+-966581785	NULL	5323.0
+-965597463	NULL	NULL
+-963057170	QdHVkD7V11xI8fC	NULL
 -958302213	5d4rPb72As3cr1UU04go8	NULL
+-958189198	NULL	-12313.0
 -958189198	B0q1K7dlcKAC46176yc83	-12313.0
--958046031	NULL	12073.0
--958046031	ytj7g5W	12073.0
--957669269	OQk1qTc7L6BHW0IU5cbY	5188.0
--956049586	Hj3R632OuQwd0r	-10014.0
--954361618	NULL	-11009.0
--954361618	8e5DWN6xSnwJyy	-11009.0
--952682211	NULL	NULL
--950198887	NULL	NULL
--950198887	58hP5c4e3S68K72k1tO1Edw	NULL
--950164694	NULL	NULL
--949589359	NULL	NULL
--949589359	6n3S324AM	NULL
+-958151799	NULL	-5513.0
+-957669269	NULL	5188.0
+-956384224	NULL	-5503.0
+-956027484	NULL	NULL
+-956027484	1w7DPjq	NULL
+-955690983	7UcmGTD0H3teObxa3PIKsChx	-4191.0
+-954917203	NULL	NULL
+-954917203	1M4eTm8OcOW2dAMV2V5slS1	NULL
 -949587513	NULL	NULL
--946531910	NULL	NULL
--944227723	03Kvh3FL1P5FN0BY37kHpH	1307.0
+-947302120	035i4wu42Rs3Uu1ft5K0AOe	NULL
+-945525067	K8COoSc8N	680.0
+-944135193	NULL	NULL
+-943276546	NULL	6206.0
+-942970125	7V65Eih84lc86QMJ2O	NULL
 -941887337	NULL	NULL
+-941753533	033ffm5082ng0V	NULL
+-940778067	NULL	NULL
 -940778067	vjtW5U2e1	NULL
--939492022	NULL	NULL
--939492022	uT5e2	NULL
--938612134	6bnEapMI6L	NULL
+-940211279	NULL	336.0
+-939769556	NULL	NULL
 -938540627	I642k31ww3Dpg87fN41	NULL
+-938297418	NULL	NULL
 -938297418	G7IJs50P82Y5G4s1nH52Y2j	NULL
--938136664	Md0yyD6nXB1OBFdM2Gc	NULL
--936910207	NULL	NULL
--936910207	ImYiNP1Y0JoBfQLbd	NULL
--935954054	NULL	NULL
--935790912	NULL	-12757.0
+-937792363	NULL	-4909.0
+-937792363	7Qy0j102iq4kv45G	-4909.0
+-937557606	NULL	NULL
+-937557606	2251WSv5eA2l6WqesdKPM2	NULL
+-937519227	Y5u0Yy	NULL
+-936752168	aH8tj4fj5to6URm5U6oonnd7	NULL
+-935954054	v6lPjluh77k5	NULL
+-935790912	H8MrS6CwPO16RoSj	-12757.0
 -935243511	88Gp8064umWOY	3290.0
--934621405	NULL	-852.0
--934037832	NULL	-4583.0
--932998902	NULL	NULL
--932173888	0N7O6L1Gg1ja	NULL
--930947105	NULL	7187.0
--930924528	NULL	3242.0
+-933664265	ue8IUf0GlY18RT325P2tu	13750.0
+-932621913	7etT21xSNx	8285.0
+-932242433	6F8wR45s5ys8AkrBE17dn2oV	NULL
+-931748444	NULL	10538.0
+-931195659	NULL	-12704.0
 -930286025	NULL	NULL
--924070723	NULL	NULL
+-930153712	NULL	NULL
+-928500968	34oSgU32X	NULL
+-928315588	NULL	-12244.0
+-927796109	ASm1a20I155Y	NULL
+-927731540	pIO3OuP40U8U1i112A	NULL
+-924196532	NULL	NULL
+-924196532	LfUyaaMR2	NULL
 -923967881	NULL	-11896.0
--923783523	NULL	-5511.0
--923400421	NULL	NULL
--923085953	Y452MvjJO04RMqES3O3	15530.0
--922060433	CHP5367P06dFMPWw23eQ	-15760.0
--921160274	G0PNHsT6RM4	NULL
+-923967881	kE4AFD1BKG	-11896.0
+-923565158	NULL	7265.0
+-921532922	q2gwWd	3806.0
+-920640297	NULL	-11092.0
 -919606143	NULL	NULL
--919086142	NULL	-10390.0
--918847065	NULL	12969.0
+-919606143	LOP6Akks01gG1	NULL
+-919000494	SDw8F62m1k4E8tR1YSIfT8	-14534.0
+-918121938	oVbH3m8HbK1lc7T23YH57C	-13932.0
 -917825506	NULL	NULL
--916961534	x28I3iV5XV870TUy3Fww	NULL
--916222455	NULL	NULL
+-917493150	wB06b612o55	NULL
+-916999377	2H45o	NULL
+-916953929	X5yxXhH276Da44jYTNH	-14533.0
+-916222455	dG8B5PQ3b85U362G6huu	NULL
 -916043488	BPm3v8Y4	3151.0
 -915948843	631404U8x6HaGp62LP6o	5468.0
 -915663531	NULL	6474.0
--915640580	NULL	NULL
--915397772	NULL	NULL
--914887396	NULL	NULL
--913679461	V0aUb2c8h6sjlr1EaX5	1997.0
+-915661374	NULL	-10967.0
+-915318164	NULL	NULL
+-913679461	NULL	1997.0
+-913636403	6bRSgHOELMA	583.0
 -912375058	NULL	423.0
--912295013	NULL	NULL
+-912375058	RDLOWd758CODQgBBA8hd172	423.0
+-912295013	oE25GuI6446Hq06G4f	NULL
 -911324411	NULL	NULL
--911324411	0dtVL5IFPf	NULL
--910451798	W8515aW82L	NULL
--907260907	oyxhfOgpr	-2565.0
+-910580287	NULL	NULL
+-908724863	2By078	-15454.0
+-907944783	NULL	4059.0
 -906869010	NULL	NULL
--905885890	NULL	14557.0
--905885890	Holgr1pin	14557.0
--904482179	NULL	NULL
--904482179	k3GuA6TkIg322clu8v55qt	NULL
+-906869010	djLQ52K3s5ReY3TQyWRl6	NULL
+-906573604	h2Q4cPeN8N81eVRhLb	-15016.0
 -904319033	puBJkwCpLJ7W3O144W	-14585.0
--901668129	P3p570gQ8	NULL
--900785703	NULL	NULL
--900044062	NULL	NULL
--899756697	NULL	NULL
--899756697	5nDHTQtR7	NULL
--899385340	NULL	NULL
--895220143	Xtw4eM002sS1101p	NULL
--893936088	j5QBwD36Ay5	NULL
--892924454	NULL	NULL
--892924454	akfWVGu2g0io	NULL
+-903930060	WpFX83866M7mrm	-15851.0
+-901934849	6tH7O0gw0gJ	NULL
+-901621628	6i3yr5yS8g5fm8I	NULL
+-899654283	NULL	15570.0
+-899654283	5cN3HGI4KhCrP	15570.0
+-898241885	pM6Gt05s1YJeii	NULL
+-897937425	NULL	-8153.0
+-896870823	fduo5V7B450uUI3H436Q8	-11838.0
+-892838981	lB0rr84T78QE8UDVl0e1qI	14187.0
+-892021712	NULL	NULL
+-892021712	SimYF0Eg747f7	NULL
+-891685715	NULL	NULL
 -891685715	G3a6E0Mll	NULL
--891316721	NULL	-16030.0
--888580429	NULL	-11781.0
--888269444	NULL	NULL
--887750610	NULL	NULL
+-891462242	ebM416Q021xLQ0h8qDS7qw7U	NULL
+-889865534	NULL	13080.0
+-888580429	s78853HC8E	-11781.0
+-888297283	883d6jHJd20KHEEu0R1Kx41	NULL
+-888269444	F13clAHtHaUN2t6wLxE7S3T	NULL
 -886426182	0i88xYq3gx1nW4vKjp7vBp3	NULL
--885788893	LX6QHG6sEmBAIbA6e6Am24	NULL
--885777373	NULL	NULL
 -885777373	F3wAY4D4XxYt	NULL
--885024586	NULL	NULL
--884913446	NULL	NULL
+-885643945	VU46u4nh7	-15237.0
+-884258732	A6M1di6LUH	-6786.0
+-883321517	NULL	NULL
+-883321517	RJsFsi3a85svGBfT8	NULL
 -882327854	NULL	6348.0
+-882327854	u67X1Fjm	6348.0
 -882306033	3h01b8LfJ812JV4gwhfT8u	6798.0
--882279083	BYD32YqIWlOgNpL	NULL
--881630661	NULL	NULL
--878577676	ea23p2penJ5W5T4	NULL
--877935440	mLcj2Cd6L317mcE8Wyv5	NULL
--877904231	NULL	NULL
--876398260	NULL	NULL
--876398260	2kechLGLtV1b2FK6h	NULL
+-879467959	NULL	-15727.0
+-878577676	NULL	NULL
+-878138057	NULL	8128.0
+-878138057	pE1ogG1QvOu0Wabw6xaK7	8128.0
+-876146622	NULL	2624.0
 -876146622	dQsIgL	2624.0
--875527384	NULL	NULL
 -874869587	NULL	3540.0
 -874250037	NULL	-10928.0
--874250037	K3imEW3S7DRihILRDg7qq	-10928.0
--873076557	NULL	14197.0
--873076557	m1r44v7Vm6O6Et2	14197.0
--871945058	lcL6t	NULL
 -871729045	7cyjB646NeRKiJ2	14015.0
--871616990	NULL	-15590.0
--871053717	NULL	15217.0
--869486135	NULL	NULL
+-870474082	NULL	NULL
+-870467382	NULL	NULL
 -868817933	NULL	NULL
+-867544560	NULL	4898.0
+-867442312	NULL	-2476.0
 -867244616	NULL	-7246.0
--865393033	NULL	15600.0
--865283615	NULL	-7691.0
--863937148	vUum3jv	NULL
+-867244616	rmshOh3J4a8	-7246.0
+-866979144	oX8e2n7518CMTFQP	-4050.0
 -863239524	NULL	NULL
--861509703	5tdqo738BN	NULL
--861480849	NULL	8068.0
+-861480849	04H5odDUy1D1rhGLXGu	8068.0
+-861309065	NULL	11795.0
+-860076303	NULL	-6204.0
+-860076303	LBaRLg3	-6204.0
+-859482455	14fnT7A11Y6fE	NULL
 -859441069	NULL	804.0
--859441069	01JwN1NVt1HU3sW3	804.0
--857251816	II1600yobW7p	NULL
--854749761	NULL	NULL
--854062357	NULL	NULL
--853693520	NULL	NULL
--853174251	kf0sFoH0CK1HEIOTntq	-8708.0
--853118632	er5IUhd505r0lT6sc20Tef5q	NULL
+-857698490	NULL	NULL
+-857484124	65NJ5u6TD716OP4hB	NULL
+-857251816	NULL	NULL
+-854749761	pL11U1oq48Oj202Wy2W7B	NULL
+-853928913	NULL	NULL
 -852864663	NULL	NULL
--852228124	563414Ge0cqfJ8v5SaIQ2W3j	-7170.0
--851067861	NULL	NULL
--851067861	lD0h1L8852501n	NULL
--850295959	NULL	NULL
--850094446	NULL	NULL
--849536850	NULL	NULL
--849536850	U3MM60y4t4Ykm	NULL
--849286968	U83eH0Y8P1	NULL
+-851613195	NULL	NULL
+-850655056	NULL	270.0
+-850655056	35nkObNsO2p045cJ3	270.0
+-850295959	WMIgGA73	NULL
+-848947717	NULL	NULL
+-848947717	34o2M3	NULL
 -847982475	0A2k346GBQ	NULL
--847027327	NULL	7125.0
--846295151	NULL	-11227.0
--846105768	EPCRx8ObNv51rOF	NULL
--845351824	1WRcDois5	-11392.0
--844012686	NULL	1681.0
+-846755534	NULL	NULL
+-846755534	HkX7hlT2TK0Je7ersfx72o	NULL
+-845913091	NULL	NULL
 -844012686	3U6OMM3	1681.0
--839336166	r5osh2m507Ot387emvDxNY	NULL
--839128780	NULL	NULL
--836821859	3tARUFE5DqTe7	NULL
--835885621	IQnp6a50KF	NULL
--833770179	NULL	-10682.0
+-843407989	wLm0KO7A8v2S88GbFqMvP4	NULL
+-841726321	NULL	-4011.0
+-841726321	dLYpl55rytQl5	-4011.0
+-841119873	NULL	NULL
+-841119873	c06VUBp33f60n5jx3o1LWkpF	NULL
+-841037187	NULL	NULL
+-839336166	NULL	NULL
+-839128780	H581dL8J4qjjb1DAPl	NULL
+-838810013	N016jPED08o	NULL
+-837529554	yAl0UQdXg0	NULL
+-835897529	pn1RqShxA031bNd	NULL
+-834997594	nhv8Bo2VCHouwa01x1	NULL
+-834792062	vuNP0Q21M	NULL
 -833770179	NEK1MY7NTS36Ov4FI7xQx	-10682.0
+-833480226	rNGcxI3PkU2K	NULL
+-833350254	ij735	-2626.0
+-833225522	NULL	NULL
 -831468557	5ealv0e6tmDnoS0bOmX	NULL
--830255911	NULL	-15550.0
 -830255911	s0v64CJR22531	-15550.0
+-829660206	NULL	-269.0
 -829660206	V78Fw1q	-269.0
--829429490	DJxhgDD0mIQeDgs8	NULL
--829409877	NULL	NULL
--826698716	sUPw866pq	-7554.0
--825630453	NULL	NULL
--824231957	pCP7Qwk2d1i5vBo	571.0
--823911743	NULL	9528.0
--823911743	W4GLKnA2Nwk0HJ	9528.0
+-828036042	NULL	-11179.0
+-827490071	NULL	-28.0
+-827490071	CbbC4f5L6l3L6k	-28.0
+-827437326	doI56Fdj4YgK3Q335155DC6	NULL
+-827212561	NULL	NULL
+-827212561	NULL	NULL
+-826698716	NULL	-7554.0
+-824231957	NULL	571.0
 -823391707	YXy2ny	NULL
--822796861	NULL	4980.0
--822641109	126aSR	-1988.0
--822105069	HN3I58	NULL
+-822105069	NULL	NULL
+-821957276	NULL	NULL
+-821544816	361M8OmUcKBPrFTcY5	NULL
 -821479281	OA8N5i1UCdUv87i	NULL
+-820914973	NULL	NULL
+-820914973	O5hC1xAT0EgNEke1U2a	NULL
+-820334107	k2TbxJ8	-11044.0
+-820296689	NjjnM2LBF4a6Ru3V11F2L5F	-9716.0
 -820082961	NULL	NULL
--820082961	nuKKHi	NULL
--819686939	d77tW1Y01AT7U	-15267.0
--819657767	NULL	-14640.0
--819152895	NULL	NULL
--818322129	8hMHl64qhfWSdC	-8814.0
--816258769	NkGnA	NULL
+-819686939	NULL	-15267.0
+-817914787	24IGcUngY	NULL
+-817390578	NULL	NULL
+-817390578	t18Qu	NULL
+-816466475	NULL	NULL
+-816457176	NULL	NULL
+-816258769	NULL	NULL
+-816219598	NULL	-6913.0
 -816219598	SMeUi5ykXo0Vi6I	-6913.0
 -815431072	NULL	3658.0
 -815431072	5RyN2I4gSo	3658.0
--815145125	NULL	-1050.0
--814492539	0JiVbqP3cG7I20UlHuc	NULL
+-814492539	NULL	NULL
 -814200252	8WC462P3JLhaXTN	NULL
+-813519584	7g13w40lHv7wDaf1m4MQ8m	15869.0
+-813066804	NULL	253.0
 -813066804	fo7hQ0lLo0K78	253.0
+-812907272	NULL	16171.0
 -812907272	3HlOeEUFSLcdPk	16171.0
 -812890478	NULL	NULL
--812631881	NULL	NULL
 -812098587	S7a45WOo7	3844.0
--811306029	8TY873CPrH82JPwf	NULL
--809646785	hO87j00S6nkbuEFh1rL5ie	NULL
--809338218	NULL	NULL
--809162203	NULL	NULL
+-811374694	5sQ4qB4ML02YI5Jo	NULL
+-810657270	NULL	NULL
+-810605184	5Y2H4C4	NULL
+-809646785	NULL	NULL
 -809162203	shMOr3b8w1F4F38D4wih0	NULL
--808977278	NULL	NULL
--808977278	kN1P50L5yeSw	NULL
--808669759	WQk67I0Gk	2489.0
--808412943	NULL	10896.0
--808412943	32Q066E	10896.0
 -807026780	53OS1HM8	-11797.0
+-806862853	3M5o368CP0fJpOiskA6pYeVu	1154.0
+-806644736	NULL	NULL
 -806577273	Fg05tGcQqI78e4cgDn538v	-9151.0
 -805261582	NULL	NULL
--804390280	NULL	-10737.0
 -804390280	uNJPm	-10737.0
--803890067	e4ie13qpm6LnXF21C5	-14982.0
--803418256	NULL	4328.0
--803212304	NULL	-12742.0
--802835753	vp8Wvr40Cc3xhVFK230H	5389.0
--802740333	NULL	10725.0
--802706391	NULL	NULL
--802505616	NULL	NULL
--801826220	NULL	NULL
+-803037284	NULL	12744.0
+-802740333	QI3ERh13R	10725.0
+-801853022	NULL	4102.0
+-801477739	qngJ5VN31QNp3E6GBwnHW	7120.0
 -799860725	b01GFHiSj4Yig1tk4bSex	NULL
--799432675	6b72Wg1nICD	8219.0
+-799465722	NULL	8437.0
 -798837262	NULL	NULL
--798734139	FO81NX2MQ1Tv2	NULL
+-798837262	U16wryUI	NULL
 -798407322	NULL	-7179.0
--796614931	NULL	-4586.0
--796067023	NULL	NULL
--792320898	NULL	-11447.0
+-798407322	pSueHN	-7179.0
+-796484582	gj5IRDNe62057M	NULL
+-796067023	lBoQXomNtF2131ymAFCB	NULL
+-794965918	NULL	-14280.0
+-792579516	NULL	-972.0
+-792579516	1rK23	-972.0
+-792520485	NULL	NULL
 -790091464	NULL	NULL
+-788756901	NULL	-2477.0
+-788756901	bTT4xqcq	-2477.0
 -788340979	NULL	-12026.0
--786987890	NULL	-3937.0
--786987890	Vn4S1kpwhJ016S007em56Ll	-3937.0
--786733525	OVMDTY5Y4L8iaNgw8V3qrfHP	-15289.0
--786511858	NULL	NULL
--786511858	7Kp283Fa5	NULL
+-788249780	NULL	NULL
+-787673764	o12yq	7358.0
+-786957690	7Nu0NxOnHSsecxU56XQbJR	-11542.0
+-785399865	cWKyPK	NULL
+-783282474	NULL	10852.0
 -783282474	sRY8V5YDK4MvY	10852.0
 -783004176	NULL	-16092.0
--783004176	7JDt8xM8G778vdBUA1	-16092.0
--781894394	NULL	-11227.0
--781678672	NULL	4434.0
--780969554	NULL	-10291.0
+-781678672	QYW7H8ta63kcfM	4434.0
 -780875740	NULL	2438.0
--779155816	LI5r3n388rMETn6	1008.0
 -778541551	t66fkUkSNP78t2856Lcn	15678.0
--778016256	UL8rV5M81k6hVJ	-13050.0
+-778246344	tKRUQ0e	NULL
+-777049854	NULL	NULL
 -776603040	M5MJdPI5Agcy5T	NULL
--776034535	NULL	NULL
--775576170	0F5hWvBF2QOa8A5ThNXq	7006.0
--774129472	NULL	NULL
--772812640	uu20hX	NULL
--770958258	uXu1mj3tWs36cGpu4p3aHq	8059.0
--770852384	252YCGI2DXxpdm7	NULL
--770833110	NULL	11010.0
--770484362	kkbBss8Ie65SWe	4869.0
--770058550	NkytEWShAd84ojaKa7A	NULL
--767533824	NULL	NULL
--767533824	3y1D3A7yxnQenJs	NULL
--767080360	5dENnx6VjU14iaLFV0IR	NULL
+-776253314	NULL	NULL
+-776034535	B5ixKlEEhbWPV64wjMe8Os	NULL
+-775576170	NULL	7006.0
+-775326158	eQ80MW0h728I204P87YXc	NULL
+-774129472	jeOFkUX5u5flcN5hCr4	NULL
+-772614141	NULL	15490.0
+-772614141	e8VT3kOBd654uL7eH	15490.0
+-771786697	NULL	11056.0
+-771786697	A2REERChgbC5c4	11056.0
+-771611394	NULL	-8703.0
+-770833110	H42eLKO	11010.0
+-769401304	b2Mvom63qTp4o	-14355.0
+-767080360	NULL	NULL
+-766689905	NULL	8759.0
+-766689905	40U0TKk6diRgJyuF2nNRvwX	8759.0
+-766356937	NULL	9863.0
+-766188002	NULL	NULL
 -766188002	5oUu102B4tP7	NULL
--764942166	7aiqnEep0bBDD04D370	NULL
--764743983	NULL	12553.0
+-764942166	NULL	NULL
 -764462878	NULL	NULL
--763516052	NULL	-5964.0
--762216959	NULL	NULL
--761848023	NULL	NULL
+-762443988	NULL	NULL
 -761848023	f8bmVVkEd2TmeFy7wKq11	NULL
--761324268	mOofw7T57kng3V161Mg4YYK	NULL
+-761010465	W3bnCmB	NULL
+-760793071	NULL	2505.0
 -759733294	1381p1T7376j	NULL
 -759670834	NULL	-5469.0
--759561469	NULL	9835.0
+-757292921	NULL	NULL
 -757292921	FMVqyn08R5kuEv8	NULL
 -756618727	NULL	8381.0
--756134523	v555LQ	NULL
--754845455	NULL	-2737.0
--754555297	P5PT4r2Syq367	-1767.0
--753745605	5h6A0ennI	9677.0
--753518696	NULL	12479.0
--752544676	NULL	-1268.0
+-756618727	3m1iT73ta75bK6Uek0R15bk	8381.0
+-754845455	4emY37V37o2B3dw426G7v	-2737.0
+-753212347	NULL	5815.0
+-752093742	JUrP4	-8130.0
 -750478127	O2aPT	13049.0
--750036400	M22umK0Q1S2Q80358P6	NULL
--749219999	NULL	-15202.0
--749171518	NULL	-948.0
--749140515	NULL	NULL
--746687884	x65DlyX2Q41Xq7AEIS6	5831.0
+-750229909	NULL	-5369.0
+-749367136	vu46n3nUvv7ls2K4k18tvw	NULL
+-749219999	8tw6WvMeBl	-15202.0
+-749140515	t8Lh68DM18aEr4G7J7dX2Ee3	NULL
+-748768326	NULL	NULL
+-748695819	Dtsb7s36eASJVh1Xi32K	NULL
+-748287202	NULL	NULL
+-746687884	NULL	5831.0
+-746397183	NULL	-12964.0
 -745791354	NULL	1517.0
--745791354	5T0k456v4	1517.0
--745089551	NULL	NULL
--745056837	Tt1BcY8q3welBr7o22KI3jF	NULL
--744728348	NULL	NULL
--743039371	NULL	NULL
--742677488	mjO2T3mw	8047.0
+-744216386	c6oaqf0P6yLPl	15524.0
+-742672838	NULL	12499.0
+-742561638	NULL	NULL
+-742416139	NULL	NULL
 -741433118	NULL	-2991.0
--741171393	NULL	NULL
--740823515	NULL	NULL
--740823515	SM7dk420iy847o8hn	NULL
+-741339611	NULL	-7465.0
 -740792160	NULL	-1388.0
--740228725	NULL	208.0
--739895170	NULL	NULL
--739502997	NULL	NULL
--739502997	50J08qKXC44G8HDMu7FF	NULL
--739006691	NULL	-5920.0
--738747840	NULL	NULL
--738747840	vmAT10eeE47fgH20pLi	NULL
--738340092	NULL	NULL
--738306196	NULL	NULL
+-740228725	s1144yNh6c8C172Rt35gs8W	208.0
+-739895170	c333R38QfrwRxL6	NULL
+-739867273	3naCWc31dAKsWl6B	NULL
+-737864729	NULL	NULL
+-737485644	NULL	NULL
 -737485644	OQQgFcOqtpjdsCCejbvAAi	NULL
--735854636	NULL	14061.0
--735849607	NULL	-13345.0
--735694489	NULL	-13377.0
+-737386226	BfGE56ef2ej	NULL
+-736991807	XI2ak7U1yv05DAI71	-9397.0
+-736467451	hrO0S0XuD1W4	9570.0
+-736164643	R0hA3Hq2VsjnFh	9931.0
+-736091351	Y3y7fhrNY0jD3	NULL
+-735935786	NULL	NULL
 -735434221	NULL	NULL
 -735434221	S21x1133h	NULL
--735428232	7MJd7FQgF0U2O	-9305.0
+-735428232	NULL	-9305.0
+-734604102	NULL	NULL
+-733761968	c23S6Ky4w7Ld21lAbB	NULL
+-733170197	NULL	NULL
+-732816018	NULL	-11484.0
 -732816018	2SDuH1XKN0	-11484.0
+-732307278	14272peG	NULL
 -731427364	NULL	NULL
--731427364	cb33ksHDf3lMrp0OW4dMdvos	NULL
 -730289443	2n2cwjWAp2R56c2GYtKHQf0i	NULL
--730076015	NULL	477.0
--730076015	ss	477.0
+-730274540	NULL	184.0
+-730200970	NULL	NULL
 -729075167	m3itBVH5	NULL
--727471145	NULL	NULL
 -727471145	MgMjEMssUEN1	NULL
--727158360	0uA7It5CJu16eJ4JS1uuxNJ	NULL
--725416692	Ja872lhYn6T31tPIOB85eb	NULL
--724156789	NULL	NULL
--724156789	ANpel663M	NULL
--724060262	NULL	-3214.0
+-727408446	NULL	-12375.0
+-727158360	NULL	NULL
+-726473298	NULL	NULL
+-725473374	2y2n4Oh0B5PHX8mAMXq4wId2	-7961.0
+-725093321	NULL	5204.0
+-725009730	NULL	6867.0
+-723614366	NULL	NULL
+-723614366	5UbQg8TK4M8M71HeMyjKE46W	NULL
+-723592170	NULL	-14014.0
+-722944609	NULL	NULL
 -722944609	71rC651of3swM7w13027216	NULL
--722873402	8GloEukQ0c68JDmnYL53	NULL
+-720557696	l8a3n6TRqVKuh0j14h3	-4213.0
 -720277866	M462UC	NULL
 -719840187	Wg1pcPx06	NULL
--718594328	NULL	-6352.0
--718299286	NULL	-14224.0
--718063540	1wb02g3mc	NULL
--716198125	NULL	4943.0
--714107996	806X4jKS0Lo7cO	NULL
+-719612366	NULL	2570.0
+-718863675	NULL	NULL
+-718719178	6IVP5k05jNwj1Jqr8UAPD1r	NULL
+-718664327	NULL	NULL
+-715566961	NULL	NULL
+-715566961	AuQ7FrUgXua	NULL
+-714487901	NULL	NULL
 -712811861	NULL	NULL
--712573435	NULL	NULL
 -711795817	NULL	NULL
--711795817	4hMaavAE	NULL
--711465111	NULL	-13228.0
--710765959	JJIVc80Pgv	16242.0
--709987288	NULL	-14159.0
--709701040	Nd6hm74FA4k65m2A	2326.0
+-711088427	NULL	3709.0
+-709936547	NULL	NULL
+-709936547	YXbTksK2YAt32i4vi6xyT2	NULL
 -708939757	4t88O3hdap24Qp4182u1	-11906.0
 -708830292	NULL	8825.0
--706227781	NULL	NULL
--704909057	NULL	-10278.0
--704909057	04m0G4	-10278.0
--703928918	NULL	NULL
--703928918	2fbAP8EJ4D5sArmrfUo3r	NULL
--701166275	46Y3G8Rf12bRc7KcY	NULL
--700300206	NULL	NULL
--699797732	NULL	4012.0
+-708830292	NeXCu	8825.0
+-707000433	NULL	NULL
+-707000433	316t3Sw	NULL
+-706227781	jO055kB85qLIyl5VJVkj8	NULL
+-706163634	V4Rn66rM3aHx5	13366.0
+-705207660	m1cWNMV8fcdiJAmDPPLg3y	NULL
+-703039722	NULL	NULL
+-703039722	7WYO11kWn6fT2pOlh5sTDIwG	NULL
+-701824447	cL5mDs1nJgQ0IbgBH	13246.0
+-701166275	NULL	NULL
+-701037296	NULL	-4190.0
+-698529907	NULL	NULL
 -697609216	jxkVe1YhhX3	NULL
--697488741	NULL	5417.0
--695529452	7s6O45GD7p4ASq08a26v8	NULL
--695504237	5314P0Xu85GA60lJaVPd10	NULL
--694015335	NULL	9540.0
+-697488741	vl31hFdNGwaI	5417.0
+-697278196	W4evHL60eNc8P3HVs	15038.0
 -693906915	NULL	NULL
--693906915	4j16o2bV34xFa36	NULL
 -693724726	NULL	NULL
--693724726	23R287wx8g5N22kp034161	NULL
--692803121	V6IvSow	NULL
--692700240	NULL	10368.0
+-693113839	NULL	NULL
 -691793383	40i6Qf07	NULL
+-691500474	r1RYHxl1G1um8	NULL
 -690377505	NULL	NULL
--690377505	QuuIO6rBsRCOs7AcM2	NULL
--689498872	8ndB1604	NULL
--689159238	MjI4i6E	657.0
--688450515	NULL	-14946.0
+-689268099	NULL	5478.0
+-689268099	5N2rSTIXMp1	5478.0
+-689159238	NULL	657.0
+-687787721	cvqc36vwri7R6kbXKO	NULL
 -687741322	NULL	5948.0
--687741322	v782YnRD5	5948.0
 -687691627	NULL	NULL
--687470971	NULL	NULL
+-686726503	NULL	-15432.0
 -686436142	NULL	NULL
+-686436142	61shR2LjQ	NULL
+-685079469	NULL	1970.0
+-684842867	NULL	NULL
 -684842867	1kFnQ8Xw3	NULL
 -684471798	0Fx62li4	9588.0
 -684231619	13YQWi5	-15534.0
--683520575	NULL	NULL
--682804669	4Y6F2QEy0v68	NULL
 -681738484	NULL	867.0
--681738484	AH6e820tOV6HSThd30w	867.0
--680963583	WBT2XnSX5c176OF	-6789.0
--680871647	f0QmOLoGtou7gq42fy01Brn	NULL
--680526056	NULL	NULL
--680526056	3R4fUi3r5212N4L05I47VU3	NULL
--680152656	NULL	NULL
+-681570624	NULL	5989.0
+-681570624	VXXGafnyn1mkpSpsOd8	5989.0
+-680417016	NULL	14099.0
 -678315326	pMb26nLwOep46S63x1WjPC	2480.0
--677971807	mnfiV3	NULL
--677042919	4YJx505OYOoh0r6SnMF6UF8	1258.0
+-677971807	NULL	NULL
 -676939616	8YHG1	4661.0
--676680436	NULL	7751.0
+-676680436	6y204sjgbO	7751.0
 -675551396	NULL	NULL
--675249658	NULL	13618.0
--673848121	gjsL355dId0aH1mj0yGky1	NULL
--673181993	IblvAnYcnAwTiEM	NULL
+-675249658	87SexCLsDwtqFHL73T6255	13618.0
+-674846687	NULL	NULL
+-674846687	8l433e5J6I0fj0PM	NULL
+-674384350	NULL	12220.0
+-674384350	FqW3gSD2	12220.0
+-673848121	NULL	NULL
+-672191091	NULL	13358.0
 -671940285	NULL	15076.0
--671342269	3DE7EQo4KyT0hS	-16274.0
--670969300	NULL	1187.0
--670497702	NULL	NULL
 -670376861	NULL	NULL
--670376861	uRcc7	NULL
 -669373262	NULL	NULL
--667926140	vkbGEG4q11J550U7u5EnSs	NULL
--666649586	8308ogefQEebr48	-11776.0
+-667036345	bX48CaI1txU5AGn2AmEuKj	NULL
 -666325620	a5MyXRAIwPX1CO3w53Rar8wf	NULL
--665315088	NULL	-11774.0
--664084238	NULL	-2477.0
--664049013	s3Q3nW2K1uFid4x1NeDVn5	2663.0
--663707772	M76D058tDDD25v3g	NULL
--663328541	NULL	-5198.0
--663328541	D7G7Ubc64866fFh	-5198.0
+-664764100	3yeq763N	NULL
+-664341725	64K51WMTs	NULL
 -663027791	053saXP1gR5mg06644Qd	NULL
--662882243	V5oM8YBx2Kq63oy0um7	NULL
+-662882243	NULL	NULL
 -662503053	NULL	NULL
--662294896	NULL	-14518.0
+-661755475	NULL	NULL
+-661755475	05RA7lJ5odEHh13Uj8JkO15D	NULL
+-660286687	NULL	1012.0
+-660286687	4f8ynytRB62xY5AoVfELTku	1012.0
+-660174857	NULL	NULL
+-660093358	NULL	NULL
 -660093358	jH7VH38C77M08h5GNPp8M	NULL
+-659859636	NULL	10289.0
 -659859636	kStdI4lGTUx	10289.0
--659186324	QDK4Rtj7CX01p	NULL
+-659068128	13q2kEQ65Y8EY0S88y7uFa5q	12214.0
 -659065840	NULL	NULL
--658968870	NULL	NULL
+-658968870	5UuE7jmo6vi40e7	NULL
+-657828756	NULL	-5958.0
+-657225349	NULL	NULL
+-656987896	NULL	NULL
+-656987896	NULL	NULL
 -656621483	NULL	11248.0
--656149143	NULL	NULL
--656149143	M10C4DWJ0Gn	NULL
--655795794	NULL	4090.0
 -655733894	NULL	NULL
--654830637	NULL	NULL
+-654231359	NULL	-3640.0
 -654132946	NULL	NULL
--653871722	NULL	13268.0
+-653871722	7v1FU	13268.0
+-652756870	3N1o1bou84BHA70	NULL
 -652391262	NULL	4943.0
--651131620	NULL	1385.0
--650579342	4p32f3dqm6X0Vyd	NULL
+-651266779	sr5s7Tu8	NULL
 -650239890	3080Y5smP4JT6	-9841.0
--650027443	NULL	NULL
+-649760889	NULL	-2305.0
 -648704945	NULL	NULL
--648704945	02v8WnLuYDos3Cq	NULL
 -648392003	eWc3t8r71Mlq	-12374.0
--646477070	NULL	NULL
--646295381	NULL	NULL
--645108590	NULL	-1309.0
+-647247257	NULL	NULL
+-647247257	2C1S7MUYL5NWPARvQU	NULL
+-646339276	2yd00UDPJUO37S4qfT0gHyg	NULL
+-645781572	278v67J	NULL
 -645108590	hnyI5T	-1309.0
--644743845	NULL	-9934.0
--643109215	KPS5d134FEJJu	NULL
--642352375	NULL	NULL
--642242459	NULL	-228.0
+-644125466	NULL	-8040.0
+-643591379	NULL	-14133.0
+-640911032	04Yu8RntCU7amJtj	NULL
 -640155079	Jh7KP0	13878.0
 -639730180	LD1u8eTfXl	NULL
--639661074	NULL	-5544.0
--638825747	ox4gTH52	NULL
--638494713	NULL	-16168.0
+-638546466	NULL	NULL
 -638371995	7Sb0367	NULL
--637617059	NULL	-9886.0
 -637615240	NULL	7029.0
--637485072	NULL	-8346.0
+-637588182	NULL	9962.0
+-637588182	e4rLBwDgWm1S4fl264fmpC	9962.0
+-637305415	NULL	NULL
 -637039550	NULL	10429.0
--637039550	W3P5WMsmv6UJnfph5D	10429.0
--633442328	K5OgpFUUHCnm3oif6f	NULL
--632554773	jc3G2mefLm8mpl8tua3b3	236.0
--632107906	4tFQX5	9390.0
--631010149	6c6b1XPMiEw5	-8731.0
--629475503	X1cNlHRHJ5h6H8qs832	NULL
+-634659237	NULL	-5194.0
+-634659237	r01Hdc6b2CRo	-5194.0
+-631010149	NULL	-8731.0
+-629867172	NULL	-3277.0
+-629475503	NULL	NULL
 -629330638	NULL	NULL
--629254416	f6f4h5NY5Ffi	2017.0
--624769630	NULL	NULL
--624769630	1063cEnGjSal	NULL
--623381272	NULL	NULL
--623012636	m1Bd53TD	5512.0
--622956305	NULL	NULL
--621783323	NULL	-8459.0
+-629330638	hhb12d5EV7	NULL
+-626932448	NULL	-1546.0
+-626424514	NULL	NULL
+-625837902	NULL	-5836.0
+-622859701	NULL	1388.0
+-622859701	sFfOv7WlW1b4ANUm01Xq	1388.0
+-621149015	NULL	-5490.0
 -620996505	Tx2ghNxT1b	-9677.0
--620782562	NULL	-450.0
+-620295346	NULL	-2011.0
 -620140340	YBRSCj3Qdb24l1MnE5IIr	NULL
--619943931	NULL	NULL
--619943931	iASE7cWnCT4NRf	NULL
+-619571504	NULL	2776.0
 -618935259	NULL	NULL
 -618456924	4E0nI655Vd0uNE31pU8x4SD	7628.0
--617263915	NULL	NULL
--617263915	8IgBmN0xkLDIlj2y	NULL
--617025388	PLFB86o84end3tdsS2hVL	NULL
--616680895	0AgcEEPHf4vXNU	-16149.0
--615585213	NULL	10268.0
--614727924	ARECS	NULL
--614265907	NULL	NULL
--614168073	6p2vWrdBsj30fSy0c7o5X7m5	15740.0
--614043298	e035q4Ba4721NL1l	NULL
--613772247	NULL	NULL
--611994002	12Y88CFE3600p4daxwcd1x	NULL
--610854924	0T08CcDm0fDWR25u	NULL
+-617998763	NULL	1373.0
+-614828184	NULL	-5241.0
+-614043298	NULL	NULL
+-614035346	NULL	-13154.0
 -610692263	NULL	NULL
--610692263	IAX1cjB8p2	NULL
+-610644732	FKDPbFp241	NULL
+-610433121	NULL	9774.0
 -609917990	3h8mD2F76eq4mS	NULL
--609818054	NULL	NULL
--609075254	NULL	-7555.0
--609074876	EcM71	NULL
--608412235	NULL	NULL
--607145105	NULL	NULL
--606964047	sW5pS8s02FERo5xGn0p	-5282.0
--606187635	NULL	-9076.0
--605065222	GciA5Y0kP	NULL
--603601682	poE6hx8xV36vG	NULL
--602670850	XD4Ss	-7980.0
--602640740	NULL	NULL
--602640740	s1K04o1	NULL
--602583536	NULL	13167.0
+-609095216	NULL	5607.0
+-609095216	51pI6Y6pcEoC4	5607.0
+-608412235	iINw0m	NULL
+-607308279	NULL	2234.0
+-607145105	0rtl1C	NULL
+-606705834	NULL	NULL
+-603844681	NULL	-6622.0
+-603645790	NULL	NULL
+-603332229	NULL	-12127.0
+-602029849	NULL	NULL
 -602029849	u8PxNYK4	NULL
--601825532	NULL	11021.0
--601697788	d64pbe5ih0aYr8gR77	15349.0
+-601825532	v4gQqo0bxX256o7EEN42lSoU	11021.0
+-601502867	M152O	NULL
+-601007307	NULL	NULL
+-601007307	nF0c6J04lo3lD0GhK8b7n3g	NULL
 -600048425	rWCcVpLiV5bqW	-1079.0
+-599017697	NULL	3629.0
 -598790130	iggCGFADtrd6k25FD4r4375I	11461.0
--598592411	NULL	3684.0
--598077215	NULL	4953.0
 -598015213	X75olERkL08uR	12481.0
 -598010006	NULL	NULL
 -598010006	7bD30suWFdI4o5Jp6m	NULL
 -596698349	142kQq4fbeX3mT	NULL
--596597402	NULL	2162.0
--595551350	L0if56g18jb2G4ThBy8FLD	NULL
--593723498	NULL	-704.0
--593723498	713lDu43	-704.0
+-595628522	NULL	NULL
+-595551350	NULL	NULL
+-595277064	NULL	NULL
+-594835352	NULL	NULL
+-593460075	NULL	NULL
 -593069569	NULL	14827.0
--593069569	x71s6pP2W5A7O0H35Up1cD46	14827.0
--591488718	NULL	NULL
+-592858113	NULL	1936.0
+-592237581	NULL	NULL
 -591135184	NULL	-14843.0
--590989147	8FpQRPC5B82ow502W46FQB	NULL
--590047093	NULL	15540.0
--589056165	NULL	-5524.0
--589056165	AFhn1et6NTnUO3F81D1i	-5524.0
 -589040469	NULL	-1587.0
 -589040469	YpM63	-1587.0
 -588409997	NULL	NULL
+-586956961	NULL	8524.0
+-586956961	2uE6vb52q	8524.0
 -586805970	NULL	-9367.0
--586687086	pr5tSeG7X	NULL
--586171860	A1h6G3bgyRxxvyhyWhVL	NULL
+-586171860	NULL	NULL
+-585770596	NULL	NULL
 -585770596	ss2PoJAipj6B1tn75O	NULL
--585595718	NULL	NULL
--585595718	cbo7HQc	NULL
--584928290	e8HP8Yt7uoB	NULL
--584661738	NULL	NULL
--583737386	GEwSJy0Bk1KRf1JxHqY	NULL
+-584874573	NULL	-9301.0
+-584234175	hSOv2xDX05WjxI13	16058.0
+-583576221	xOSHRK0e6243CG0Q	NULL
+-581868488	NULL	15218.0
 -581868488	xqa4i5EAo4CbOQjD	15218.0
--580766784	NULL	-212.0
--580175448	kmVtK172xdC862vqYE468bJm	NULL
+-580630856	NULL	NULL
+-580105109	JogdA3We8QF5qf65v1	NULL
+-580039747	NULL	-7157.0
 -579727578	NULL	-7768.0
--578805115	Q2TIySPl735	-7161.0
--578167934	VqevY22vG478444ob4XCKnb	NULL
--577599727	Q82FD1RrW	5860.0
--577517220	NULL	NULL
+-579044960	NULL	NULL
+-579044960	6o50QhXglfo0TlCF	NULL
+-578805115	NULL	-7161.0
+-578167934	NULL	NULL
+-576843680	NULL	NULL
 -576843680	6xn1INe8xSG0487IUAaMYRH1	NULL
--575848794	NULL	NULL
--575848794	H37833CDTytf1mp4	NULL
--573398708	NULL	-9437.0
--573051430	NULL	11500.0
--572511045	gm1ouRn6LL8IvrB	4610.0
--572083301	NULL	NULL
+-576835993	NULL	-16026.0
+-576704225	NULL	NULL
+-575703053	NULL	NULL
+-575167266	NULL	1949.0
+-573122597	NULL	NULL
+-572547597	7k0Ypeij4V2jcvT66TW5	175.0
+-572260818	NULL	1113.0
+-572083301	WBCaAb0o2Lsob4aiUHhvDx	NULL
 -571605313	NULL	NULL
--571440987	Wu3285CX753	NULL
--570151156	a3sk76Jt1SL	NULL
--569743570	OVJrt7Ag4JY573PrTY	NULL
+-570629906	x4LAd835KaljPah2WG3	11470.0
+-570151156	NULL	NULL
 -569386581	NULL	NULL
 -569386581	83tP8	NULL
--568012450	8F3j56	NULL
+-568687194	Sago0hfsWqeGkVo8n38Hh5eC	-9519.0
+-568012450	NULL	NULL
+-567457790	NULL	13331.0
 -566868938	NULL	NULL
--564927612	NULL	-13555.0
--562702081	gLGK7D0V	11865.0
--561168205	NULL	-2015.0
--560827082	NULL	NULL
--560827082	1H6wGP	NULL
--560393762	OSc0r	NULL
--559669968	NULL	NULL
--559669968	R8B6PMUCp8Fuw	NULL
--558226014	Iy2ED	10728.0
--557177923	NULL	-6843.0
--557055309	NULL	3385.0
+-564905383	NULL	8700.0
+-564695076	NULL	NULL
+-562397414	NULL	8704.0
+-562397414	5001TmV0w	8704.0
+-562131910	w1e0uUD0wHF0W8	NULL
+-562088249	NULL	NULL
+-560500151	1kYyjHtA0	NULL
+-558159025	87oee8IK	2372.0
 -556504948	NULL	NULL
--554456306	6JLTA0I2Jx60HU470LO	NULL
+-556504948	Sd20gdOoONPhK2OX4	NULL
+-556354572	NULL	-11000.0
+-556329510	rqvN5KT0jA11w080At	NULL
+-554889674	mbHrOP6Hk6j5g3U41ml846d	NULL
 -554094419	4GEqmyTpaQ	NULL
--553779656	weQ0d24K116Y0	11147.0
 -553103982	NULL	-8790.0
--552944417	NULL	NULL
--552944417	y6LhmEv	NULL
--552461106	NULL	NULL
--551235732	NULL	10141.0
--546268530	77E8Xqg4LgN6ShBGOC4	NULL
+-553103982	5Wn74X54OPT5nIbTVM	-8790.0
+-551996785	NULL	-5458.0
+-550042370	NULL	NULL
+-550042370	ibR7QuG2aL3O	NULL
+-548767061	NULL	NULL
+-546972460	sQxf42aO2QdVO4glN0	NULL
 -546115224	NULL	NULL
--546115224	YG6upJAu1AHo1g85T	NULL
--545520854	5b7222ls0wgFVAff7D	NULL
--544928158	NULL	-12861.0
+-545520854	NULL	NULL
+-544971608	NULL	7040.0
+-544928158	G8l7gR7rrC80rk	-12861.0
 -542362651	NULL	NULL
--539981927	NULL	NULL
+-539892577	NULL	3100.0
 -539892577	Tw06W0Qga0	3100.0
--538982534	NULL	2464.0
--538982534	VrRTMth0WY7T	2464.0
--538700123	2MXQgy3CnV528om4I77x51i7	NULL
--538151009	NULL	8892.0
+-538836966	SQ11E10EY5RbywY480mmc1P8	2047.0
 -538050258	NULL	-15017.0
--537988055	5nAPf8Jm	12793.0
--537167684	38Y2u	-5884.0
--535991858	NULL	NULL
--534924789	X5oShc74RP	NULL
--533588831	NULL	12800.0
+-537374580	e542YmP0Fu1hw25eP263UA	9436.0
+-534924789	NULL	NULL
+-533588831	0Ryd7J0wt3N80Yc64GCpr1	12800.0
 -532800347	40CP0hDas6g7m	NULL
--530519974	ss	12329.0
--529472391	NULL	NULL
--528897930	NULL	NULL
--527994943	NULL	13691.0
+-530687964	NULL	NULL
+-530687964	gk0kJenBW237uQoxGBx36	NULL
+-530519974	NULL	12329.0
+-529304330	Y6d74Lf1ji3v	9661.0
+-529058223	NULL	NULL
+-528532585	ijU4c	NULL
 -527426311	NULL	NULL
--523321995	pERC8ns	NULL
--522373381	NULL	NULL
--522000585	A1g0Myv7	858.0
--521698157	NULL	NULL
--520054643	wc4Ae163B5VxG2L	301.0
--519969910	gVS43C76q67h70Yi	NULL
+-527426311	5snabe7BNqKyRv3Pel77rG	NULL
+-525915405	720r2q1xoXc3Kcf3	-8554.0
+-525793386	K4Npj34S8iAOa6qRd7y88Sb	NULL
+-523681673	UQv8T28745qO62T	NULL
+-522373381	0AkI4K24GeFC1Aa2Sr6	NULL
+-521971005	0HTm73B	2533.0
+-519653089	NULL	-4319.0
 -519653089	JRN4nLo30dv0bRtsrJa	-4319.0
--518918140	ugq0uAy0qXj2D0fX	5245.0
--516660759	NULL	5215.0
--516349200	5OOnLN015tAyeCnl6	10183.0
--516041254	NULL	NULL
--516041254	Tqar00A	NULL
--515722466	NULL	-6296.0
--515203523	NULL	NULL
--510636860	NULL	NULL
--510510347	NULL	6866.0
--509342542	NULL	7161.0
--509337580	2UTX78oBg574jiOyOy2	NULL
--506702601	3t3EB	15847.0
--506688723	NULL	NULL
--505970378	r121C	11387.0
+-516660759	d57LuTxW0Pk5cXu	5215.0
+-515722466	1gEDdyI	-6296.0
+-515203523	P2DNeo00PA7DJF0	NULL
+-514493171	NULL	517.0
+-514493171	M6bPuQa0qryvlavpXdYX7	517.0
+-514165397	NULL	NULL
+-512709861	5vYQ13d84b7f1326iS6	-2081.0
+-512621098	0p5PiWBMN2nO0y88tnHcw	NULL
+-511447734	NULL	-6472.0
+-509337580	NULL	NULL
+-509060047	N62KU05S73f5I0F77DK	NULL
+-505970378	NULL	11387.0
 -504649401	NULL	-7091.0
 -504479350	M0JtV	-13306.0
 -503229939	NULL	2613.0
--503229939	2GN33486Eatu7tJi2832NSx5	2613.0
--501914557	NULL	NULL
+-502819345	BxH575uxOuCE6sxn6frt	NULL
+-500301311	NULL	-8969.0
+-500301311	27lDtVbT38gR	-8969.0
+-500206504	NULL	2020.0
 -499831750	5Jwa8e3	-15423.0
--497812675	NULL	8541.0
+-499007135	NULL	-8208.0
+-498103625	NULL	15863.0
 -497620057	NULL	-15212.0
+-497517726	3R68Yksg5JRtKk	NULL
 -497211600	m4eSLx4qihVg1e32	NULL
+-495299487	NULL	16341.0
+-495299487	w72D5glR5VAi3S7	16341.0
 -495094625	NULL	460.0
--494092730	I3w7NEK56OB4G26h7MU	-79.0
+-494932782	NULL	NULL
+-494932782	651rcX4uUheL07lI5m7	NULL
+-494505216	NULL	NULL
+-494092730	NULL	-79.0
 -493670740	7et28dsw03son237	-15298.0
--491589443	0Y641jaPl	NULL
--491184664	NULL	NULL
--488515173	NULL	NULL
--487161292	46X778w0r1Ueuv052rvegFJi	13332.0
--485297539	NULL	12605.0
--485297539	UR83Iqx405t0jOOhF	12605.0
--485104169	NULL	NULL
--484905228	F5n0SfL8CT53dFr51vvW0S3	4432.0
--484306883	ip3Y6RAg87Hgr3u	-12137.0
--484174274	NULL	NULL
+-493656327	4e1D6b2moaJ2LPJ70u	7988.0
+-491708622	n2W51l	NULL
+-491651559	dYqT7Ci8R0	NULL
+-486415983	NULL	NULL
+-485104169	aecE60o4	NULL
+-484905228	NULL	4432.0
+-484174274	3P8kF2E1f68xG6sWx8	NULL
+-483988889	NULL	NULL
 -483017884	NULL	NULL
--480396900	NULL	8848.0
--479902149	2jpKwIdt6T	-13331.0
--478114375	4kyK2032wUS2iyU28i	8061.0
--477593990	NULL	NULL
--477267518	5I8oh5Sb56pDl2V05R02	1804.0
+-482913182	kKNkv78jp3Mj522njGl4E7YY	13554.0
+-481987039	NULL	13298.0
+-481954032	NULL	-7666.0
+-480396900	vXdw480bs0o1HQK3BLhb4A2	8848.0
+-479620735	6GpbwQ3mT	NULL
+-479548677	8pbggxc	-3914.0
+-478114375	NULL	8061.0
+-477842346	NULL	12070.0
+-477593990	24jbgb42dtP	NULL
+-477267518	NULL	1804.0
+-476662691	NULL	NULL
 -476163172	NULL	NULL
--476031993	6m3p4wd4i7GCSm0PCO	14835.0
--475787560	NULL	-10320.0
--475776796	NULL	NULL
--475707077	NULL	NULL
--475707077	qPiV0J6QDu	NULL
--474621692	NULL	NULL
--474621692	3vB11S	NULL
--474526814	NULL	6719.0
--473904084	NULL	NULL
--473444294	NULL	-8114.0
--473171480	NULL	10859.0
+-476163172	1LRgweD3Na	NULL
+-475787560	3fAi1N4CaJf1CpL2oIV	-10320.0
+-474791715	T712Py4Bg5in472VXtSC	4016.0
+-474680993	5p73w4mBKifB5	NULL
+-473387081	NULL	NULL
+-473387081	3afvyfFbo6GH6JS416cesO	NULL
 -472811852	NULL	NULL
--472464142	NULL	-9370.0
--471640869	NULL	NULL
+-472524805	8lALowC26N0kJ371	NULL
+-472298177	H7KCa0l6TRDuEG0	NULL
 -471640869	XeI6xQ2v1E	NULL
+-471042199	6lv8V	-11234.0
 -470177692	Y6n3LVp5tIlVm3kc	NULL
--469581869	NULL	NULL
--468160946	NULL	6722.0
--468160946	eXJSaD2y6i8Cr2wwmc	6722.0
--467644956	NULL	-9158.0
--467644956	bMyM0QL	-9158.0
--466687333	NULL	-1379.0
--466215267	NULL	14936.0
+-469588679	NULL	5326.0
+-468260022	NULL	NULL
+-468252992	6D4H88YldHdj0	-11273.0
+-468172300	V2Dy80R4bnQX8s	-8994.0
+-466883304	NULL	-3335.0
 -466059793	NULL	-8567.0
--465994327	NULL	-7307.0
--465994327	HXUyE4BVO5tji6	-7307.0
+-465602858	NULL	NULL
 -465378001	ILCAW28PE	5674.0
--465298892	NULL	-12819.0
--465036867	NULL	NULL
--465036867	41OuKHD4wRu238388Cq	NULL
+-464780802	VbPmiEv5SDp	NULL
 -464361432	Ayw2CUsH0QjG64m2cmDy	NULL
--462839731	NULL	NULL
+-463071567	m2Y8B81106O	15489.0
+-462771041	3mM337C	NULL
 -462052517	ppK2D7Hurv4FEpES74	NULL
--460130999	704TqKdO554m38WDk0W2g	NULL
--459602806	NULL	NULL
--458141412	8x33aIF0uGR	-14268.0
--457111770	NULL	NULL
--457078324	NULL	15647.0
+-459860378	5BO6u6	NULL
 -457078324	hn35LQWu0t6	15647.0
--456758172	o8BJbkeG3228	13500.0
--456032481	NULL	NULL
+-456955151	t13ARgIU57	NULL
 -454967666	NULL	NULL
--453860130	nySmD256M7wH3o	-3486.0
--453047708	NULL	NULL
--452995064	Wq28q24Of	-1608.0
+-453860130	NULL	-3486.0
+-453450252	NULL	15239.0
+-453450252	GNN83p7	15239.0
+-453432177	NULL	NULL
 -452599200	NULL	8757.0
--451592563	NULL	NULL
--451168080	CqVN87Pm5hyraKaq45O	1005.0
--450682274	NULL	-1364.0
--450036866	NULL	NULL
--449228789	eis5ky6Km	15466.0
--446674576	33woPLwH3MFmK	NULL
--445131275	SgVxsU2832X4w	NULL
--445000613	4kUFI473BsE2rgG	NULL
--444756572	NULL	NULL
--444063458	NULL	15125.0
--443615712	LFo3Ls	-15303.0
--443023828	NULL	NULL
+-451592563	0AaJ5c3bS7m2i	NULL
+-449708868	NULL	-156.0
+-448325367	v0uSTRyX5A4W	NULL
+-448180672	BJTr1JVEjCQMQ0	NULL
+-446738656	NULL	-11493.0
+-446738656	eaju2o4x863Hs4pskfDBRYnp	-11493.0
+-446674576	NULL	NULL
+-445614260	NULL	NULL
+-445000613	NULL	NULL
+-444996737	oAYFcgT5	NULL
+-443023828	5kiN628ldFC6	NULL
 -441306270	NULL	NULL
--437228896	NULL	-369.0
--437013589	NULL	NULL
--436982628	NULL	2786.0
--436323820	p3DvmcsqP6xMf	NULL
+-440645306	NULL	-2129.0
+-439810061	J6S681J6JPB2SD6Uc08U1	NULL
+-439100651	1324Nbqc0C7h6niurp77wT	NULL
+-438587970	67CifPaaWjudYUDTB0IU	NULL
+-437013589	27pDBUla2gH6KpsN0O0g	NULL
+-436791598	1oiwKGMsFXabXo	NULL
 -436171992	1I0750N5l6vsLXoySV	NULL
--435678004	ExWpHq2H5O0nP	-3977.0
--435225012	bU42b017V0K1G5v1L3B	NULL
--435127410	0CkUHn44bl6xbyYLk	NULL
+-435678004	NULL	-3977.0
+-435246644	sFRsqLf	NULL
+-435099391	NULL	NULL
 -434808886	B257X5x	16191.0
--434301965	p568R4q2d3342ejH4	NULL
+-434688961	NULL	3492.0
+-434511775	jLX0SrR6OP	-12264.0
+-434358576	NULL	NULL
+-434358576	NEGa0N8MJ2dnn3MKAfl6u	NULL
+-434105688	LM30M	-3544.0
 -434024748	E1fHP15nPQXjBxCo3u	-12098.0
--433657233	NULL	-12040.0
--433149581	NULL	6723.0
--431383655	40PQ82QY6	NULL
+-433657233	63QHPb4LMH52Rr52	-12040.0
+-433149581	qtkJR2MeV1	6723.0
+-433146870	mw3S8	NULL
+-431302157	NULL	-14975.0
 -431086633	48fOGR7H6oNnh7m3Y	NULL
--430900389	NULL	-8391.0
 -430590982	3B3ubgg3B6a	14468.0
--429107590	NULL	NULL
--428789177	NULL	-10558.0
--428789177	rUMy375oEX854bi6Q8VU0Wl	-10558.0
--426519728	NULL	-16221.0
--426394849	JUm3vwG65q33	NULL
--426300618	o085ifc06u6558WpyJX0	NULL
--425961561	QOh77Nn0071FMlBWw	15897.0
--425849690	NULL	NULL
--425555896	NULL	-11074.0
--425233772	NULL	NULL
+-429538643	NULL	NULL
+-427699518	ur4i65Ehv8Yr	-15390.0
+-426519728	J6fBeMaj7b6M8	-16221.0
 -424953123	eX01IDE0Y7qmepEq57Gh6x2	-7123.0
--424190481	NULL	5770.0
--422969530	NULL	-12585.0
--422035309	NULL	NULL
--421649126	p0s376hDu	-14817.0
--421513283	NULL	-6328.0
--421513283	T7eUGy8NktrfLCyXKIK	-6328.0
--421492474	Sv5fP736jr43u8dlx10lIOwi	-6764.0
--421277688	MXefAh62BQEYn6T54AuUf	NULL
--420460509	4s1k1B653oP	-4657.0
--420135468	6Fd38ih	-34.0
--419494681	NULL	12819.0
+-424190481	g5su4Pm4QR6jx	5770.0
+-422969530	Q1klq3EyXKfX3523gIQ5n4f	-12585.0
+-422035309	LADu77ed6bPf	NULL
+-420674961	NULL	NULL
+-419106330	NULL	-14776.0
+-419106330	6U50ut7NIQ	-14776.0
+-418168174	NULL	NULL
 -417554494	6v1086YVc6I73mp	NULL
--417159357	cAULCRDJ	-246.0
--416995183	NULL	NULL
--415983930	WL65H3J	-13307.0
--415276695	NULL	-14790.0
+-416795744	NULL	NULL
+-416795744	qDPElvv37s4rDkebaA	NULL
+-415509551	NULL	9417.0
+-415089543	Crlnej6pMKb	-748.0
 -413553449	NULL	NULL
+-413196097	NULL	NULL
 -412772386	uO4aN4J0dKv3717r8fPG	-11809.0
--411689727	l616H6JH2J6U4263R41sP4	5263.0
--411535469	DUSKf88a	6764.0
--409413973	NULL	-16109.0
--409413973	gA0M8GmMH6TcQCGdQi40Mj	-16109.0
--408970065	NULL	NULL
--408799577	bHf404	15823.0
--408205889	0jP5vF5FAwp	NULL
--407328434	66wWE8r6	-3065.0
+-412033691	NULL	9318.0
+-409200773	NULL	NULL
+-408625683	NULL	-7021.0
+-406241306	n2nf0ncE1Vj	NULL
+-406033828	NULL	NULL
 -406033828	au3q16lrAbWbHFqF	NULL
+-405352567	NULL	8058.0
 -405352567	7qYP01VYV7LgSn3bdxRcv6RI	8058.0
--405122882	54GiCgon04NXfnms6b5WRj3W	NULL
--404012579	NULL	-15055.0
+-405122882	NULL	NULL
+-403337575	NULL	NULL
+-402916083	NULL	NULL
+-402916083	qbIAK5kn5p6x57grQne	NULL
+-402903993	NULL	NULL
 -402903993	SIUKQ52i702FMVn5	NULL
--401213271	NULL	-4574.0
--398120138	6IWllEnT	NULL
+-401887816	snx0x	-5482.0
+-398718046	kTajVEl2cQ7Wbn6j	14449.0
+-398182230	NULL	NULL
+-397887654	J1kjNdL12V8	NULL
+-396971948	NULL	NULL
 -396971948	e2m8waBVlVU	NULL
--396656886	NULL	NULL
 -396656886	XtF80FdC1a3Uw22G6GIPr	NULL
--394531032	NULL	NULL
--392722012	B2pg4xQ01oKud01	7327.0
--391657207	NULL	8482.0
+-396113894	NULL	1964.0
+-394291812	514eg00Ro1RtB8GGeUCHYAqS	NULL
+-392722012	NULL	7327.0
+-391621749	xqiJqgi4N1AR18yC464f1FC	NULL
 -391432229	NULL	NULL
+-391432229	00k3yt70n476d6UQA	NULL
 -390984182	NULL	NULL
--390984182	gew1eby3AlYSvPICC3	NULL
--390244123	NULL	NULL
--389868111	NULL	2322.0
 -389868111	He570RJQUrj7VmG	2322.0
--389586882	NULL	NULL
--389556832	NULL	NULL
--389049392	NULL	13877.0
--388258881	EjY6DSn57x1v5h	NULL
--387828644	NULL	NULL
--387744292	NULL	NULL
--387057742	gu1GY0	-2481.0
+-389586882	npJMhV2W	NULL
+-387378001	NULL	NULL
+-387057742	NULL	-2481.0
 -386882338	NULL	16141.0
--386882338	p0L6EI7X5jX66cV	16141.0
--386298671	NULL	-8256.0
--386083106	NULL	NULL
--385971882	V0w3pYUxg4Pe85bSga6	NULL
--384309925	cL4J4B	15260.0
+-386083106	hRUvK70d5B4F	NULL
+-385971882	NULL	NULL
+-385352499	NULL	NULL
+-385352499	Vk0CBX0oP	NULL
 -383529039	NULL	NULL
--383527791	fEU8HAO6NWJjF44X87	-695.0
--383248491	NULL	NULL
--382713185	NULL	NULL
--382359353	NULL	-10760.0
--382041363	NULL	3907.0
+-383319539	0m6YOPivJ0VtmA4R6	NULL
 -382041363	CRP2ah1peUgDrj750RU53l	3907.0
 -381420136	3G0hB0J4W5	NULL
--379279396	NULL	NULL
+-381027711	VU42OCI8nDXA0M	NULL
+-380733719	t7s5did	-2120.0
+-380359762	bfE8u5XQPK7ie4o6wE1Tfv	NULL
 -379279396	n3WIT2YtCj	NULL
--378716466	RR75iYIk1Ni2005Ua74s58cY	-807.0
+-378499098	NULL	328.0
+-378499098	1470P	328.0
+-378213344	NULL	-16269.0
 -378082477	G3yY14P0epy8DUS5KR	10152.0
--377908428	NULL	NULL
+-377568943	8Fx0J88	NULL
 -377167247	NULL	7468.0
+-377167247	0rtwy7qvCV34lod33	7468.0
+-376284418	NULL	NULL
+-376052893	NULL	NULL
 -375983250	KG2X4bEy5bahXgT7OPn	-10416.0
--375824013	83d6qEj647pMQC7	-13439.0
--375807166	NULL	NULL
 -375807166	K2uHR7U36540Kx6tC	NULL
+-375807036	NULL	NULL
 -375550719	a58Ux	8558.0
--373584666	NULL	-11521.0
+-374000216	2M106hVFEhu	NULL
 -373584666	2Mf0x4c2BF24c2w734t1EY72	-11521.0
--372530019	NULL	NULL
 -372506148	NULL	-12525.0
+-372474751	NULL	2052.0
 -372474751	5Q1O33oqrTMit1GsEy7h	2052.0
--371793957	NULL	NULL
--371592167	NULL	-11546.0
--371592167	oi8Ci6j3bY6b417nURA	-11546.0
+-372247894	NULL	-5423.0
 -371174938	NULL	NULL
--370919370	Ybpj38RTTYl7CnJXPNx1g4C	NULL
--369004155	r55X6tJ4eKvh	NULL
--368633061	NULL	1806.0
+-370618115	214UsrYtB1W4GJ	-11995.0
+-370303316	NULL	-1541.0
+-370303042	NULL	NULL
+-369233503	4S44vF	NULL
+-369004155	NULL	NULL
+-367417430	NULL	NULL
 -367417430	2sF6Qdn5w5qO805cSaFV	NULL
 -367195514	NULL	-13339.0
--366013983	Jm1d3h3OxQE	NULL
--366008709	NULL	NULL
--365823160	NULL	-9188.0
--365558923	5MU66wbAk41JUMg0055Nlv	14841.0
--364367902	NULL	NULL
+-367195514	t5805L0xlU0YM	-13339.0
+-365823160	g4teBBvh	-9188.0
 -364224586	NULL	NULL
--364224586	7AJH2574A48M0I1wN	NULL
+-363618814	NULL	10225.0
 -363618814	akSq5ElsFg	10225.0
--363405691	NULL	-6280.0
--363405691	TD5Y632oD1u	-6280.0
--363080167	NULL	-1997.0
--362866190	NULL	NULL
+-363596446	8M42dX6x214GLI	7956.0
+-363032626	0f4422CBSl	NULL
+-362835731	NULL	NULL
 -362835731	10V3pN5r5lI2qWl2lG103	NULL
--362365213	NULL	-6239.0
--362048030	NULL	-5536.0
--362048030	N7L608vFx24p0uNVwJr2o6G	-5536.0
--361425507	SbaXC0mXWAJCc	1294.0
--358815699	NULL	NULL
--358815699	aCU4m258	NULL
--356345328	NULL	-1687.0
--356069467	NULL	NULL
--355846558	CtU2PW66tBCk0swxglxDIp2F	NULL
+-362733967	NULL	-7959.0
+-362733967	tUi8QYP4S53YPcw	-7959.0
+-360475292	NULL	-1007.0
+-356345328	J4m3I	-1687.0
+-356069467	pQ7nxHn7Yl4avHfP7	NULL
+-355812913	sl0k3J45	-12657.0
+-355493507	NULL	NULL
 -355426292	74KfTA5ji7V0	NULL
--354874566	NULL	9917.0
--353397036	3LWXOlGelGXQu64Lxws	NULL
--352637533	NULL	NULL
--352637533	1Lh6Uoq3WhNtOqQHu7WN7U	NULL
+-354874566	o7QfkIJkvGnvlntbH0Ul417F	9917.0
+-353919302	EHS5Xo4	14502.0
+-352430030	NULL	NULL
+-352430030	8k6Lo3U	NULL
+-352033194	NULL	NULL
+-351639708	NULL	-13240.0
 -350786813	S802T685lde	NULL
--349776081	NULL	-8278.0
--349618829	NULL	NULL
+-349776081	11gEw8B737tUg	-8278.0
 -349193245	kmK1pk	NULL
+-348877654	NULL	3251.0
 -348808299	NULL	-4882.0
--348808299	5DDtS4Q	-4882.0
--348676458	NULL	-3627.0
+-348315046	NULL	NULL
 -347968026	NULL	-9643.0
 -347968026	XMd2TpQd0MJ2Kjh1d4Pf5	-9643.0
 -345967358	NULL	-14942.0
--344846856	7bv4R8	9296.0
--341460675	NULL	-5226.0
--341395520	7uEJE7MbCywRC46tr	NULL
+-345811438	f8iUpkOj7	-4893.0
+-345044452	UFwddOjC38Fj	NULL
+-343728006	NULL	1160.0
+-341993895	NULL	NULL
+-341460675	626YHDK48bST5D6KNHL3	-5226.0
 -340961376	NULL	-12409.0
--339581189	NULL	7657.0
--339244391	cQ8To	-11827.0
--339214974	NULL	NULL
--338184935	86C34fOeI	6113.0
--337975743	NULL	NULL
--337874812	NULL	NULL
--334595454	u5C7glqT5XqtO0JE2686lk1	NULL
--333549746	6tnH37n7Ow3sLtJBwoGs	NULL
--333146464	NULL	14373.0
--333146464	40n4Pw3EiSUL2e0	14373.0
--332860300	4LtlcjfB4	-5811.0
+-340178543	57WA7Sm6RuEiouyjK3	NULL
+-339214974	UtriJV4U5N2J7M	NULL
+-338184935	NULL	6113.0
+-337243024	u6CLfg	10572.0
+-335832881	NULL	-14905.0
+-335475138	NULL	NULL
+-335475138	TrVt3076w4QSXF83Io	NULL
+-334622891	NULL	NULL
+-334533462	oTEu1ql	4111.0
+-333818276	NULL	NULL
+-333818276	Yc6gaH2OFF7cymt8q23Fr	NULL
+-333105007	NULL	NULL
+-332860300	NULL	-5811.0
+-332797811	NULL	NULL
 -332797811	1v6A2yY2i	NULL
--331560663	imH3YwNd33DOtJ	2546.0
--331193390	UlWG4BWte66	-9374.0
+-331821892	NULL	NULL
+-331560663	NULL	2546.0
+-331193390	NULL	-9374.0
 -330939696	NULL	-1295.0
 -330939696	wa56XmVPK66nC1ob3	-1295.0
--329995234	1Jq7kLUa3loRL	NULL
--329126843	NULL	NULL
+-329940514	Nxy6uK6mWCk	NULL
 -328823470	NULL	4888.0
--328252175	NULL	NULL
+-328662044	8EPG0Xi307qd	NULL
 -328252175	h1xHE	NULL
--327724567	NULL	NULL
--327724567	41MRiDLLRHaL18	NULL
--327697565	01oQGbtfGX	678.0
--325987371	NULL	NULL
--325987371	nbcHJDu3	NULL
--325931647	2a7V63IL7jK3o	NULL
+-327114456	NULL	NULL
 -325667461	nk8ff5B5H5R7Si	NULL
+-325539648	NULL	-4990.0
+-325530724	NULL	NULL
+-325530724	l8S5nFITuHXS5347	NULL
+-325401718	NULL	NULL
+-324181296	8o0l440qDP1	NULL
 -323362404	NULL	NULL
--321376847	1jDB0	-8984.0
+-323362404	2h2qsp14cr	NULL
+-322274850	NULL	-8352.0
+-322274850	dun2EEixI701imr3d6a	-8352.0
+-322116576	NULL	NULL
+-321376847	NULL	-8984.0
 -321005021	NULL	-15816.0
--321005021	2xgkuN5E8h7t51	-15816.0
--319890654	NULL	-16187.0
--319812965	NULL	-12602.0
--319812965	xmG2iGNF6M6oc	-12602.0
--319437654	NULL	-10606.0
+-320414826	NULL	2823.0
+-319901788	NULL	NULL
 -319437654	1Sq6q2cfuq8	-10606.0
--319256521	NULL	NULL
--317846687	NULL	NULL
--317846687	07rw6mP4WPoYcTNy1R	NULL
--316718275	NULL	6544.0
+-317823566	NULL	NULL
+-317823566	31RpuaAqBaH5ILfc	NULL
+-317752836	NULL	NULL
+-316804368	NULL	-8762.0
+-315584449	NULL	NULL
+-315326047	NULL	NULL
+-315326047	Iit87iX	NULL
+-315135285	NULL	-4683.0
 -314292799	NULL	NULL
--313936109	JDWi48mC38uf	12470.0
+-313936109	NULL	12470.0
+-313351465	NULL	-11724.0
 -312922774	myW247hI5iQQ4U37x5hK	NULL
--312734094	lEXXcvYRGqGd31V5R7paYE5	1225.0
+-311529984	NULL	NULL
 -311497752	jXnS0M0vmQSg1Y61g	NULL
--311401114	K7tGy146ydka	-1236.0
--309792162	NULL	NULL
--309792162	bXNd8y50350i1Chtw	NULL
--309039348	NULL	12608.0
--308199490	NULL	9289.0
+-306404797	q55wm56Wx110J	12378.0
 -305961377	eu3X5Qfp4sHv5H	NULL
 -305278652	XMFgr8DLLoX7m2en6X	-10476.0
--304943885	NULL	NULL
--304150435	3mQI8u6Qx0sf2b03t86084	NULL
--303315524	NULL	NULL
--303254000	NULL	NULL
--303254000	DHy1oyJ2887Mr5	NULL
--300868770	NULL	-15470.0
--300487502	NULL	NULL
+-304943885	tC57X	NULL
+-302527324	woeLEb	NULL
+-302457546	NULL	NULL
+-302439189	hd5NMHtI3AWTCX01GJU	-1961.0
+-300868770	xaF6s1Ylv03U7K61yqo	-15470.0
 -300005579	NULL	-7075.0
--299535011	VhrdQM4gb5	-12453.0
--294794385	HTe03	-12466.0
--293920788	T8764UNruF67h3	3720.0
--293193244	NULL	NULL
+-298937261	AyXm00Txvx0L5CyvWXQtsyAG	10536.0
+-297978563	NULL	NULL
+-293245811	cR5KqKwc60t	6008.0
 -292743071	NULL	15879.0
--292729794	NULL	NULL
--292729794	jSqRIf7HS	NULL
--292105999	0ne4VG	NULL
 -291979841	NULL	1926.0
+-291937012	ga113oX5cQ3BKfs	11118.0
 -291912800	NULL	-115.0
--291820669	84CIr82	-7357.0
--291738291	BeCJRnF7x42QV53G	-10424.0
+-291911540	NULL	NULL
+-291820669	NULL	-7357.0
+-291774763	W4G22U32r8Ck	NULL
+-291703241	1o5T8oXJi5CAYe8540C	NULL
+-291460153	TgS6dAlI2w4y	NULL
 -291180836	h2Sf5Q335KntN1ee1WHT	NULL
--291173815	NULL	NULL
--289655108	NULL	NULL
--289221373	vRRg2BqTsJEV	NULL
--285915852	w3KFMs0WYfmy3vmXIoR5K	-8315.0
--285355633	NULL	NULL
--284981473	H3Nyq7H1t221	NULL
--282491807	YCY6SM1FK83x0XYANbo	NULL
--282335546	lb51aPvl6DbQ3xUpY1ce58	NULL
+-289892421	NULL	NULL
+-289221373	NULL	NULL
+-286135520	NULL	NULL
+-285685896	NULL	NULL
+-285685896	f6WR6jF	NULL
+-284181298	0o5aasUct374Q	NULL
+-283085344	NULL	8269.0
 -280186008	NULL	6392.0
--279446199	P64485rj	-11565.0
--279443756	P5fGyI5L8Slr	6036.0
--279424983	NULL	NULL
--278441506	2vdVp	-11832.0
--277497288	NULL	NULL
--276841727	Y5ls7N3Qy30h43866R3cL53	NULL
--276841263	8w7oRLS1	15861.0
+-279987023	NULL	NULL
+-279520896	7e8cuG44	NULL
+-279113105	Gk7eAq875sHou	10475.0
+-278512571	NULL	NULL
+-278441506	NULL	-11832.0
+-277828168	NULL	NULL
+-277497288	CKln3JQk346jaT47ns	NULL
+-277492461	U68Np7DCKJO8	NULL
+-277280197	hweo7wU2YAcJFa0axo	13266.0
+-276919136	NULL	NULL
+-276642546	NULL	NULL
+-276178451	0h45LRqh8jhT7sxcubL	-7382.0
 -275395091	NULL	NULL
--275345690	D47gT3qx6tQ51hCO	-12242.0
--274506971	NULL	-4483.0
--274500674	NULL	12004.0
--273130047	NULL	-7794.0
--272624632	q0YasY0Y17250cD	NULL
+-274506971	3yaploii6645LP604gTB0	-4483.0
+-274500674	a	12004.0
+-273802324	UA0H368kj	NULL
+-272944183	PQ71uI1bCFcvHK7	-13872.0
+-272663531	NULL	NULL
 -272589516	Hf8123hK0	NULL
 -272378722	NULL	NULL
--271972718	NULL	14459.0
--270753820	NULL	NULL
--269689350	NULL	2401.0
+-271665804	gXu3tUhVtYp	NULL
+-271507814	pek1nHrGOn8u4tof80T	NULL
+-270456142	hANtHaOf	NULL
+-269885388	NULL	NULL
+-269885388	Sg1FGtK367wF7noky2	NULL
+-269689350	b	2401.0
+-269215897	NULL	NULL
 -269215897	7LdfF1415i51qpmHQI	NULL
--268608970	XKb3MvO6I8a656xQv2ikTV	7803.0
--268190799	0AKcTvbG7	4608.0
+-268579842	NULL	12690.0
+-268190799	NULL	4608.0
 -268085738	f7oB3Nx8	4660.0
 -267883232	NULL	NULL
 -267883232	IgMk407Y	NULL
+-267385302	El5RUByTr1xve1tM	NULL
 -266645029	NULL	-6767.0
 -266323750	rss1vw14N	NULL
--265220686	NULL	7270.0
--264809208	v56YAf71SP32	7519.0
--264128642	T0rmM12M1kobD2yqIsO	NULL
--263093466	NULL	NULL
--262998236	NULL	NULL
+-266176646	NULL	7876.0
+-266176646	6dGA0	7876.0
+-266042626	NULL	-16102.0
+-265252976	xAkpE41B	NULL
+-265087814	s5f66QOgSu0h0M3C8NfX2581	6971.0
+-263093466	72dKfCFk5Ec	NULL
 -262884790	VC5R8kT0F7y3Y	NULL
--262730120	NULL	15555.0
--262516610	nmin10bW3n3x5JdK	-12357.0
--260816304	Ik28kU0xl50FU3Uk4opJYBA	5218.0
+-262516610	NULL	-12357.0
 -260528967	NULL	NULL
--258933358	NULL	NULL
--258933358	314nQ6nVj	NULL
+-258812751	NULL	-12074.0
+-257849524	cU6HuP4A323	NULL
 -257468784	I50781U82Bk0	575.0
--255758222	NULL	8173.0
--255758222	p8wdUiqcj165fVm	8173.0
--254706225	06geS0K71heCEffYM	NULL
--254223511	NULL	-7788.0
--253733916	QL665K2OF6nQ7Agd6Q	NULL
--253553869	NULL	-11158.0
--253553869	AGI4mak	-11158.0
--251321091	kkHRoY7	NULL
--249787360	NULL	-2583.0
--249248450	j1lyplu58dBa	NULL
--248403123	7CKu35ao6U121E3o	NULL
+-257465409	NULL	8115.0
+-257187270	M6fqXU5eC	-262.0
+-256767096	NULL	-7238.0
+-254620858	NULL	NULL
+-253880120	NULL	11437.0
+-253677296	x7psT1pPat	-6940.0
+-252726992	NULL	NULL
+-250205659	7VFqt831tqF8B74sT06h5	1396.0
+-249173622	NULL	NULL
+-249173622	818vxXu11	NULL
+-248894637	1um44A551e	-10887.0
+-248730234	XBfrKWaX68o7HCfKf	NULL
+-248449790	ce6C1MhLw	NULL
+-248095285	NULL	5698.0
 -248095285	5V15opaByT3DY4	5698.0
--247337613	NULL	NULL
--247297647	NULL	NULL
--247083698	KRm0RfHnXwI5lA0VO5k7e	6088.0
--244631104	NULL	NULL
+-247337613	NOl00pk86Qix8KT3QA0pva	NULL
+-247083698	NULL	6088.0
+-244295604	m80sprxq3O4J4YC6gh	NULL
+-243641076	NULL	NULL
 -243641076	x535B4s3elsi8Cguc2432Xw	NULL
--242005800	NULL	2724.0
--241696305	xPJN71vYb00l2QRpr0A8128	-14164.0
 -240770611	NULL	NULL
--240770611	sE158DS55	NULL
--240134636	NULL	-12207.0
+-240222599	8qhEui604mB8	NULL
 -239791677	76Xl5E7ttiejsqcvfJmtNB0	NULL
--236448021	Xxk00X	NULL
+-238517065	NULL	NULL
+-238517065	7xh48cBvt34812U1at	NULL
 -236279683	NULL	NULL
--234579282	NULL	NULL
--234010772	x0JhWPrCmV0Vr2Ss8BO	4411.0
+-236279683	aEvOE7hUNO0d67AM3V7BwUCK	NULL
+-234926605	NULL	-9078.0
+-234926605	DX2rT	-9078.0
+-234010772	NULL	4411.0
 -232865856	Ocv25R6uD751tb7f2	-3657.0
--231906343	aC14b1kcXO	15284.0
--231833850	Ub176WlT6f78Y5s	NULL
--229080680	8Lh4G52x4	NULL
+-231777635	NULL	NULL
+-231777635	O7mH0141NeSt21	NULL
+-230394617	NULL	125.0
 -228907811	NULL	1382.0
--227080564	NULL	10581.0
--226923315	NULL	NULL
+-228907811	smOO3dT6d2rlivDo0LD	1382.0
+-227041671	NULL	NULL
+-227041671	na3L437oF2C7446q567dQp3	NULL
+-226923315	3cQp060	NULL
+-225865605	NULL	-14709.0
+-225822131	WaK84Y0Qn4HE1V0SH8akT3j	14909.0
+-225715729	V0O4tCF2N	-15167.0
+-224982624	058p4c1	-13574.0
+-223450003	NULL	-5568.0
 -223315484	NULL	14124.0
--222793813	NULL	-5796.0
--222632007	NULL	-651.0
--222249017	BuPfkehWx0mcq26yta7bf	-16201.0
+-222723761	snSGGLkgC1Hlj8a6UKblKu4	NULL
 -221475929	NULL	10520.0
--221475929	PK1Ato	10520.0
--220482197	j0Sw233w51d1PQ	-11142.0
 -219095239	NULL	-4866.0
--218835680	NULL	NULL
--217767379	840ng7eC1Ap8bgNEgSAVnwas	5625.0
--217528596	MDHRWctP3rjjvG0eio7SJ	-1316.0
--217304850	NULL	5698.0
+-217601730	NULL	1908.0
+-217601730	jwC0SLy5G46s	1908.0
 -217304850	Wv6BkKRpxN	5698.0
 -217068969	NULL	4025.0
--216817113	H1wKsxw3t00r7	9040.0
+-216861328	NULL	NULL
+-216817113	NULL	9040.0
 -216449975	NULL	-15666.0
--216272270	NULL	12505.0
--215807367	w56Uy63x23B4T04	-15785.0
--212807763	pYC01XWbNcD	2081.0
--211161323	pc0F7	-14270.0
+-216449975	F88n72F	-15666.0
+-216272270	6TgaX4LO	12505.0
+-215807367	NULL	-15785.0
+-215053412	NULL	-577.0
+-214524029	NULL	NULL
+-214524029	5Vypcl14RV5OcLe	NULL
+-209526737	Qcgkl434Q8113uls	NULL
+-209250585	NULL	10133.0
 -209250585	UExcNQO	10133.0
--208218331	NULL	-13368.0
 -207371911	4Uh5kCybH	-15867.0
--207143115	NULL	NULL
--206105661	7w4U48Dkch7l6d2sr3PpVP	NULL
--205754732	NULL	NULL
--205395916	NULL	NULL
--205207300	riW64mY710pF87mVeIh8	NULL
--204497854	C30EryLS	-6.0
+-207143115	11sV8qlJk	NULL
+-207014540	NULL	NULL
+-206798844	NULL	NULL
+-206137305	6oAU0mBFKtwXOIAp7Yqi75H7	NULL
+-206105661	NULL	NULL
+-205296894	Bbow1DFvD65Sx6	7182.0
+-204497854	NULL	-6.0
+-204467845	NULL	11558.0
 -204467845	6x1C4Y57mY3	11558.0
--199287411	pxUt0f57qNtt3	NULL
+-203460029	72F3g4s43q208a2	NULL
+-202629650	NULL	10537.0
+-202022029	NULL	-9296.0
+-201822155	PxgAPl26H6hsU47TPD	-12794.0
+-199287411	NULL	NULL
+-198739996	NULL	-14709.0
+-198739996	uxnt0fsrBtPD807	-14709.0
+-198665379	6kTCAoN08A	NULL
+-198550246	NULL	-9263.0
 -198550246	05qf7K4cL0	-9263.0
--198215530	NULL	8984.0
--197635456	NULL	NULL
+-197818528	NULL	NULL
+-195883192	NULL	NULL
+-195779462	NULL	NULL
+-195669126	NULL	-6669.0
+-195610877	j83cOtj22H5Aje7H3	NULL
+-195289510	lOd6JubI7m75B4WJBuPkn	NULL
 -195238744	NULL	-7352.0
--195238744	KA2M874c7v83T	-7352.0
--194083213	NULL	NULL
+-194980107	315P3EH1I6vi6	-13893.0
 -194042802	XqKG6hVEyI5D	NULL
 -193820010	NULL	7841.0
--193820010	ocqmW20m5	7841.0
--192762939	NULL	NULL
--191606236	WML05unAVOf1F5IDw1S1Yv1	NULL
 -190561683	NULL	1042.0
--190313992	NULL	-8636.0
--189798695	NULL	-985.0
--188910187	NULL	NULL
--188493874	sodtQ7I41ON4	NULL
--188335239	NULL	-7285.0
--188165330	NULL	NULL
--186879703	6qFCTec4H4fY5YnL4esu7	-7609.0
--186109218	NULL	NULL
--185078755	D63exrPA1TG2XQd6406tA	-12593.0
--184697009	0OtfuTVJM42tR837710A7u	NULL
--184451020	xjk22HQH0F0E161	NULL
--184384635	OUUn180cqH5Gf1sO	NULL
--183956512	rwwp4SB	-13597.0
--183551804	AU1Wbf	5617.0
--182575358	NULL	NULL
+-190245677	l35W8012cM77E227Ts	NULL
+-189033607	4j1R8ITWf5JSIWbP6b	14617.0
+-188493874	NULL	NULL
+-186879703	NULL	-7609.0
+-185626432	NULL	5245.0
+-185078755	NULL	-12593.0
+-183227908	NULL	12526.0
+-183227908	yi8rqTW8DO5Iw3NDr	12526.0
+-182794914	EqAU5Jit8kJfgutgf0U7Ren5	NULL
 -181975317	NULL	NULL
 -181975317	Le1vfH	NULL
 -180649774	NULL	NULL
--177894354	8A3dS	10195.0
--176999609	NULL	NULL
--176461172	2dj7o	NULL
+-180100086	NULL	NULL
+-180100086	37nx5s6QE3F	NULL
+-177458134	fbR231f	NULL
+-176478809	NULL	NULL
 -175735614	NULL	950.0
--173905228	1MJ884f1w6B38WBeya	-2575.0
--172458795	NULL	NULL
--172458795	0M6LCA6u038J33jdFuHfF0AS	NULL
--171758919	NULL	-15018.0
--171639825	NULL	-5612.0
+-175735614	b17euUA	950.0
+-175656177	NULL	NULL
+-175656177	KB3sgv2UcA152	NULL
+-173590840	NULL	NULL
+-173590840	C77Mm2Bv5tV32bB3IHK	NULL
+-173590468	NULL	12520.0
+-173590468	S7UM6KgdxTofi6rwXBFa2a	12520.0
+-172496742	NULL	NULL
+-171758919	kx8M55yd88Iu5Hs0	-15018.0
 -171639825	Sn4Y23KEE20LV	-5612.0
--171103336	NULL	NULL
--169899674	NULL	NULL
--168704131	0m8aHX5yF5muTQW	NULL
--167198275	NULL	-8068.0
+-171103336	5ocI6aD	NULL
+-170811446	NULL	NULL
+-170445000	NULL	NULL
+-169899674	3OpBF	NULL
+-169706155	TNxkTGadB87QTkpe177	NULL
+-169638960	NULL	4163.0
+-167198275	CN30RbmhOI5ipQ6x47ca5gK	-8068.0
+-167063926	3EYb6FUI5ckmAd24bR7Juc0	NULL
 -166049169	NULL	NULL
--165138715	Pi82o7b1r22Q0miJ2HPet	498.0
--164144678	14UXn3xvdW88b	-4029.0
+-165394212	NULL	10663.0
+-164254265	NULL	-15139.0
+-164254265	CDxPimlul3S23D	-15139.0
+-164144678	NULL	-4029.0
+-164031131	NULL	NULL
 -163857342	NULL	7413.0
--163102235	07x1c	NULL
--162505703	QAHN2k5a5UY046x7ae	15734.0
 -161643982	iDlPQmQC7RSxNA	-16004.0
--161202090	NULL	NULL
--160666024	NULL	-8576.0
--159396265	8W3nO2rOr026L8	6672.0
--159188124	NULL	NULL
+-161314297	BJPV6JwJ8p	11614.0
+-161048725	NULL	1145.0
+-161048725	7noHlf7x0E4t	1145.0
+-160284270	NULL	NULL
+-160135339	NULL	NULL
+-160135339	225vmIW8L75bEWVwFc	NULL
+-158749945	NULL	8744.0
 -157295768	NULL	NULL
--156439782	NULL	-2489.0
+-157295768	O1Kq8bfOEoDR	NULL
 -155766911	7EOTdCSaFwhwSd1xuwGp6T6e	NULL
--155139046	sL1ht23v3HEF8RT2fJcrb	9519.0
--154870406	Oi00P6K0mQf07v7j66QXRb4	NULL
--154730927	NULL	-3581.0
+-154730927	q2EuT	-3581.0
 -153945621	NULL	NULL
--153888210	aEi5JQHQPd4Y8	NULL
--153650293	NULL	NULL
--153460722	NULL	-13517.0
+-153844323	NULL	-10502.0
+-153844323	6mDJr6FCiu6d12VCj	-10502.0
+-153246219	NULL	9692.0
 -153199179	NULL	-1841.0
--151602800	LH7Gx2g0V3EV2Y1J17	14028.0
--151596142	NULL	15662.0
--151081820	4HI5bS2f78nG4Ig1l7	NULL
--150805445	NULL	2175.0
+-153191589	NULL	NULL
+-151596142	2kWQ1XKrr6K5THWA3ck250ab	15662.0
+-150822571	6Qjs3Ih3xykeT0	-9034.0
 -150105259	NULL	8773.0
--149220746	NULL	-12860.0
+-150105259	27Xm6ui	8773.0
 -149106503	NULL	11393.0
--149106503	q7GeFu8AaI0XBU5P0I3fGJJ	11393.0
 -148703640	NULL	NULL
--147421454	NULL	-1473.0
--147118989	uN2i0aJe27Js	-11503.0
--146635689	r251rbt884txX2MNq4MM14	-16296.0
+-148284236	NULL	-11863.0
+-148155438	NULL	-7484.0
+-148155438	L2rPI4lTVflM42RL3fu5	-7484.0
+-147194845	NULL	NULL
+-146292937	NULL	-10023.0
 -146022581	NULL	NULL
--146022581	c4jN67LlOd5e0tc333TN0riL	NULL
+-145970409	NULL	NULL
+-145254896	NULL	-14871.0
 -145106201	DOBR48RQx025y13q4767snyt	-5495.0
 -143895980	NULL	15236.0
 -143795356	gMxuFTWhkh5RQ1VJ	-13302.0
+-142742658	NULL	-7070.0
 -142742658	O8cWpb	-7070.0
--141426829	N3K7NJPTO620OUo	-1600.0
--141301844	NULL	354.0
--141301844	Mr3q8uV	354.0
+-141728181	NULL	9052.0
+-141640335	vlxy2c2Igi	NULL
+-140428008	NULL	NULL
+-140428008	LXs6Xx05R8n6Yg	NULL
+-140351494	NULL	-11115.0
+-140207738	NULL	-13539.0
+-139592123	NULL	NULL
 -139592123	x15jGM0RqU	NULL
--139418541	5BkJb	NULL
--139136637	NULL	NULL
--137889725	p2V22B730Pto1t1Q	-10567.0
--137090086	WA6Cb1YeX7TOI7j3jnrh7W	NULL
--135809226	sBGjdF6	-3036.0
--135796062	d6kPi7FNW1Y	8653.0
+-139285049	BU3NV3Jv7pW45knPt8	-13812.0
+-136120674	85s4lIu161r	NULL
+-135816991	NULL	-11828.0
+-135816991	E8p1D7g26MAGrt616dfRC	-11828.0
 -135093782	uS42Umy03u16l1c6	-1943.0
--132662286	NULL	11899.0
--130737625	JbOAgILdJQ	10268.0
--129415058	NULL	NULL
--128522957	NULL	-11273.0
--128253072	NULL	NULL
--128253072	VfD3Byd4aV358l12	NULL
--127334222	EIDkp	-5418.0
--127304786	NULL	-3849.0
--126780346	NULL	NULL
+-134675793	G5gF05ux	-10578.0
+-134658396	NULL	NULL
+-134262608	7g5OT6f7u1A30FLeC06sv	13308.0
+-132996457	56Q41bkHqEF5446pGgJ6Jj	-6455.0
+-132015377	NULL	9019.0
+-129415058	43gX6s3LEYUcX668Ig5y	NULL
+-129128931	NULL	11324.0
+-129128931	L05l0uM5UWt80OvwJ68M88N	11324.0
+-128951545	NULL	-2688.0
+-128951545	EI6S4ARfxC3gTET8r	-2688.0
+-128820361	NULL	8264.0
+-128820361	FVq4l0ohQ6VBFe	8264.0
+-128522957	8B7U2E2o5byWd3KV7i	-11273.0
+-128417177	NULL	-8871.0
+-128417177	ygkC2e2sUm2036Sd1U8kCG62	-8871.0
+-127883982	NULL	NULL
+-127134731	NULL	NULL
+-126585940	NULL	-15775.0
 -126585940	D65SRo	-15775.0
--125085670	NULL	NULL
--124759917	Y3oJ30U4LUuen7U6JjfaexL6	NULL
+-125512355	71KN0p4NhE4xm4ixm	NULL
+-125153778	NULL	-11273.0
+-125153778	RiF2m743j35L16v	-11273.0
+-124623418	NULL	10869.0
+-124623418	yHQAP7hAbHM1I0U3CJS	10869.0
 -123986376	RqGu3	-10583.0
+-123712616	NULL	-221.0
 -122303648	NULL	NULL
--121442810	j51d0i7u3KGhTKavw1C	NULL
--121160645	NULL	NULL
--120483644	NULL	-13334.0
+-121160645	78J23v	NULL
+-120885651	NULL	10854.0
+-120885651	5Y503avvhX3gUECL3	10854.0
+-120483644	d2A5U2557V347stTcy5bb	-13334.0
 -120063765	NULL	NULL
--119612683	NULL	2432.0
--118844684	NULL	NULL
+-118512520	NULL	3594.0
 -117903731	NULL	NULL
--117075001	Xi7kOTT	NULL
--115926110	28MAXOSiX	-10476.0
--115862500	NULL	NULL
--115862500	3ocGWW4eY55A	NULL
+-117903731	eAGNl00o8pA000I48	NULL
+-117755812	kih3Q	NULL
+-115328350	BS8FR	12619.0
+-114647521	NULL	NULL
 -114647521	04Y1mA17	NULL
--114347780	NULL	-8608.0
--112517967	44vcS2S5wu684R05fq01fu	NULL
--109813638	NULL	NULL
+-114515861	NULL	NULL
+-112517967	NULL	NULL
+-110450673	NULL	-8148.0
+-109958777	iS5AY33Qun8O1UqRcPMV	NULL
 -109479877	NULL	NULL
--109176674	NULL	NULL
--105622489	NULL	-15886.0
--104657851	xf1y2WfXYQJ772QYXBH866y	-5550.0
--103135998	0ciu8m3N8Mds44yxps	-3705.0
--102544659	NULL	NULL
+-109479877	4LQe2Pd4m640E58XFA	NULL
+-109176674	fg7BpI	NULL
+-108440988	q4W4dHaEO	NULL
+-104657851	xf1y2WfXYQJ772QYXBH866y	-5550.0
+-104148943	NULL	2248.0
 -102544659	84HS58kw8B32q717TMOCYKx	NULL
--101198972	NULL	-8469.0
+-102085569	NULL	NULL
+-101946985	8jQqh182kkY6	NULL
+-101649504	NULL	-1107.0
+-101177976	NULL	-13174.0
 -101177976	c8b3TkeXYCq0fvRes62t5H	-13174.0
--98755301	kM7800unA1	-161.0
--96444025	4e4RSbbS	-6299.0
--95719039	NULL	NULL
--95719039	0G60dEaeNN2vkI	NULL
--94647961	NULL	NULL
--94325735	NULL	NULL
--93493455	NULL	NULL
--93266641	NULL	NULL
--93266641	QJocgOK5m46i2F1rfSCy	NULL
+-99630018	2SOiwMlQ55T05111LrY5	NULL
+-96049503	NULL	NULL
+-96049503	7SchQY2j74BW7dQNy5G5	NULL
+-95340149	6D3WT	-807.0
+-94325735	62iCPoy17	NULL
+-94241347	Dpx32r5sd2v4Q5rAo64T	14574.0
 -93047063	ewpwJSDQ7V8yVPSl1x2E8ey	NULL
--92464376	NULL	12705.0
--90911544	NULL	9371.0
+-91622333	0TQ0HK5x8	418.0
+-90907517	NULL	-10379.0
 -90905568	IA46V76LhS4etye16E	2402.0
+-89850817	d58e0	9827.0
+-89707941	NULL	-6394.0
+-89563510	NULL	NULL
 -89563510	U70UOCk8B7pI7k	NULL
 -88945006	NULL	-15205.0
--88561978	NULL	-2378.0
--88303756	43h32gpaBvB4T3elN4s	NULL
--87887337	NULL	-13669.0
--87681231	4ieWq56f7mIjQNs783D	NULL
+-88553484	NULL	NULL
+-88553484	pS3ybyjK58d8mK70GXa	NULL
+-87962466	NULL	NULL
+-87887337	fwgu11vt0371iw6	-13669.0
+-87632890	NULL	NULL
+-87632890	wvd3uAAa01J6a6L	NULL
 -87388872	NULL	10039.0
--87388872	veoqj217BlDBBVkN0ei3c	10039.0
--87192706	bXmqr7WJQWrLR271l	-14948.0
--86248570	NULL	NULL
--85760130	NULL	NULL
--84973792	NULL	NULL
 -84925170	NULL	-7700.0
--83972466	h5s74V3xB6SKD71q7tkjXlW	NULL
+-83409169	UB2u4GH6Y51e	12779.0
+-83309996	NULL	NULL
 -83309996	Ktp44q	NULL
--82551006	FwMw41y68NnU0FGJ5k6	NULL
 -80527843	NULL	NULL
--79994624	NULL	-15779.0
--78695871	NULL	6113.0
--78323214	7o0LS1	NULL
+-79463192	rTCHTPRk1t6A2sLxwQVY	-6109.0
+-78661751	NULL	NULL
 -77830367	NULL	NULL
--76560910	KDr0tMRnCJJIBA84	NULL
 -75279452	F4J3N2IsV4JvOl8i0B	-5378.0
--74972257	NULL	1668.0
--73603164	2wRURKtw8	NULL
--72587448	NULL	10201.0
--71645226	Sm7i8BB	NULL
--71635506	036tLb	-9761.0
--70626947	NULL	NULL
--70087205	NULL	-14550.0
+-74839360	wR57mq	-2595.0
+-721

<TRUNCATED>

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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_2.q.out b/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_2.q.out
index 3e8ea6f..9b14b92 100644
--- a/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_2.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_2.q.out
@@ -193,18 +193,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
 2	val_2val_2	1
-4	val_4val_4	1
-8	val_8val_8	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -215,6 +204,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+4	val_4val_4	1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
@@ -224,6 +223,7 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
+8	val_8val_8	1
 9	val_9val_9	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -344,6 +344,18 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+2	val_2val_2	1
+2	val_2val_2	1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 0	val_0val_0	1
 0	val_0val_0	1
 0	val_0val_0	1
@@ -362,22 +374,8 @@ POSTHOOK: Input: default@test_table3@ds=1
 0	val_0val_0	1
 0	val_0val_0	1
 0	val_0val_0	1
-2	val_2val_2	1
-2	val_2val_2	1
 4	val_4val_4	1
 4	val_4val_4	1
-8	val_8val_8	1
-8	val_8val_8	1
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
@@ -396,6 +394,8 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
+8	val_8val_8	1
+8	val_8val_8	1
 9	val_9val_9	1
 9	val_9val_9	1
 PREHOOK: query: EXPLAIN
@@ -517,6 +517,18 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+2	val_2val_2	1
+2	val_2val_2	1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 0	val_0val_0	1
 0	val_0val_0	1
 0	val_0val_0	1
@@ -535,22 +547,8 @@ POSTHOOK: Input: default@test_table3@ds=1
 0	val_0val_0	1
 0	val_0val_0	1
 0	val_0val_0	1
-2	val_2val_2	1
-2	val_2val_2	1
 4	val_4val_4	1
 4	val_4val_4	1
-8	val_8val_8	1
-8	val_8val_8	1
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
@@ -569,6 +567,8 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
+8	val_8val_8	1
+8	val_8val_8	1
 9	val_9val_9	1
 9	val_9val_9	1
 PREHOOK: query: EXPLAIN
@@ -700,18 +700,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
 2	val_2val_2	1
-4	val_4val_4	1
-8	val_8val_8	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -722,6 +711,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+4	val_4val_4	1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
@@ -731,6 +730,7 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
+8	val_8val_8	1
 9	val_9val_9	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -861,18 +861,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
 2	val_2val_2val_2val_2	1
-4	val_4val_4val_4val_4	1
-8	val_8val_8val_8val_8	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -883,6 +872,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+4	val_4val_4val_4val_4	1
 5	val_5val_5val_5val_5	1
 5	val_5val_5val_5val_5	1
 5	val_5val_5val_5val_5	1
@@ -892,6 +891,7 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	val_5val_5val_5val_5	1
 5	val_5val_5val_5val_5	1
 5	val_5val_5val_5val_5	1
+8	val_8val_8val_8val_8	1
 9	val_9val_9val_9val_9	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -1022,17 +1022,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-4	val_2val_2	1
-8	val_4val_4	1
 10	val_5val_5	1
 10	val_5val_5	1
 10	val_5val_5	1
@@ -1042,8 +1031,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 10	val_5val_5	1
 10	val_5val_5	1
 10	val_5val_5	1
-16	val_8val_8	1
-18	val_9val_9	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -1054,3 +1041,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+4	val_2val_2	1
+8	val_4val_4	1
+16	val_8val_8	1
+18	val_9val_9	1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_4.q.out b/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_4.q.out
index faada6f..1633458 100644
--- a/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_4.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_4.q.out
@@ -190,18 +190,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
 2	2	val_2val_2	1
-4	4	val_4val_4	1
-8	8	val_8val_8	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -212,6 +201,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+4	4	val_4val_4	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
@@ -221,6 +220,7 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
+8	8	val_8val_8	1
 9	9	val_9val_9	1
 PREHOOK: query: DROP TABLE test_table3
 PREHOOK: type: DROPTABLE
@@ -393,6 +393,7 @@ POSTHOOK: Input: default@test_table3@ds=1
 2	val_2	1
 4	val_4	1
 8	val_8	1
+9	val_9	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -412,7 +413,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	val_5	1
 5	val_5	1
 5	val_5	1
-9	val_9	1
 PREHOOK: query: DROP TABLE test_table3
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@test_table3

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_6.q.out b/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_6.q.out
index 8282a5a..e4b6703 100644
--- a/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_6.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_6.q.out
@@ -200,16 +200,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 0	1	val_0val_0	1
 0	1	val_0val_0	1
 0	1	val_0val_0	1
@@ -221,6 +211,17 @@ POSTHOOK: Input: default@test_table3@ds=1
 0	1	val_0val_0	1
 2	3	val_2val_2	1
 4	5	val_4val_4	1
+8	9	val_8val_8	1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
@@ -230,7 +231,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
-8	9	val_8val_8	1
 9	10	val_9val_9	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -390,16 +390,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 0	1	val_0val_0	1
 0	1	val_0val_0	1
 0	1	val_0val_0	1
@@ -411,6 +401,17 @@ POSTHOOK: Input: default@test_table3@ds=1
 0	1	val_0val_0	1
 2	3	val_2val_2	1
 4	5	val_4val_4	1
+8	9	val_8val_8	1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
@@ -420,7 +421,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
-8	9	val_8val_8	1
 9	10	val_9val_9	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -824,16 +824,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 0	1	val_0val_0	1
 0	1	val_0val_0	1
 0	1	val_0val_0	1
@@ -845,6 +835,17 @@ POSTHOOK: Input: default@test_table3@ds=1
 0	1	val_0val_0	1
 2	3	val_2val_2	1
 4	5	val_4val_4	1
+8	9	val_8val_8	1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
@@ -854,7 +855,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
-8	9	val_8val_8	1
 9	10	val_9val_9	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -1026,16 +1026,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 0	1	val_0val_0	1
 0	1	val_0val_0	1
 0	1	val_0val_0	1
@@ -1047,6 +1037,17 @@ POSTHOOK: Input: default@test_table3@ds=1
 0	1	val_0val_0	1
 2	3	val_2val_2	1
 4	5	val_4val_4	1
+8	9	val_8val_8	1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
@@ -1056,7 +1057,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
-8	9	val_8val_8	1
 9	10	val_9val_9	1
 PREHOOK: query: CREATE TABLE test_table4 (key INT, key2 INT, value STRING) PARTITIONED BY (ds STRING)
 CLUSTERED BY (key, key2) SORTED BY (key DESC, key2 DESC) INTO 2 BUCKETS

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_7.q.out b/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_7.q.out
index 192689a..9b8e835 100644
--- a/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_7.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_7.q.out
@@ -173,15 +173,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -192,6 +183,15 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
@@ -330,15 +330,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -349,6 +340,15 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
@@ -491,15 +491,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -510,6 +501,15 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_8.q.out b/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_8.q.out
index 2198dc2..864c3ff 100644
--- a/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_8.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_8.q.out
@@ -198,18 +198,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
 2	2	val_2val_2	1
-4	4	val_4val_4	1
-8	8	val_8val_8	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -220,6 +209,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+4	4	val_4val_4	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
@@ -229,6 +228,7 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
+8	8	val_8val_8	1
 9	9	val_9val_9	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -376,18 +376,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
 2	2	val_2val_2	1
-4	4	val_4val_4	1
-8	8	val_8val_8	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -398,6 +387,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+4	4	val_4val_4	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
@@ -407,4 +406,5 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
+8	8	val_8val_8	1
 9	9	val_9val_9	1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/cbo_semijoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/cbo_semijoin.q.out b/ql/src/test/results/clientpositive/spark/cbo_semijoin.q.out
index 6f79549..e7d2da4 100644
--- a/ql/src/test/results/clientpositive/spark/cbo_semijoin.q.out
+++ b/ql/src/test/results/clientpositive/spark/cbo_semijoin.q.out
@@ -82,6 +82,8 @@ POSTHOOK: Input: default@cbo_t3
 1.0	1	 1
 1.0	1	 1 
 1.0	1	 1 
+1.0	1	1 
+1.0	1	1 
 1.0	1	1
 1.0	1	1
 1.0	1	1
@@ -94,8 +96,6 @@ POSTHOOK: Input: default@cbo_t3
 1.0	1	1
 1.0	1	1
 1.0	1	1
-1.0	1	1 
-1.0	1	1 
 PREHOOK: query: select * from (select cbo_t3.c_int, cbo_t1.c, b from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1  where (cbo_t1.c_int + 1 = 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2  where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p left outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t3.c_int  == 2) and (b > 0 or c_int >= 0)) R where  (R.c_int + 1 = 2) and (R.b > 0 or c_int >= 0)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cbo_t1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/ctas.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/ctas.q.out b/ql/src/test/results/clientpositive/spark/ctas.q.out
index c781688..0b5027e 100644
--- a/ql/src/test/results/clientpositive/spark/ctas.q.out
+++ b/ql/src/test/results/clientpositive/spark/ctas.q.out
@@ -148,6 +148,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	96                  
@@ -298,6 +299,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	96                  
@@ -448,6 +450,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	120                 
@@ -511,6 +514,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	120                 
@@ -662,6 +666,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	96                  

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/disable_merge_for_bucketing.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/disable_merge_for_bucketing.q.out b/ql/src/test/results/clientpositive/spark/disable_merge_for_bucketing.q.out
index a7af4bc..ffaec7d 100644
--- a/ql/src/test/results/clientpositive/spark/disable_merge_for_bucketing.q.out
+++ b/ql/src/test/results/clientpositive/spark/disable_merge_for_bucketing.q.out
@@ -56,6 +56,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'
@@ -78,6 +79,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'
@@ -120,6 +122,7 @@ STAGE PLANS:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                         bucket_count 2
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -153,6 +156,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -252,104 +256,93 @@ POSTHOOK: query: select * from bucket2_1 tablesample (bucket 1 out of 2) s order
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucket2_1
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-0	val_0
-0	val_0
-0	val_0
 2	val_2
-4	val_4
-8	val_8
 10	val_10
-12	val_12
-12	val_12
-18	val_18
-18	val_18
+17	val_17
+19	val_19
 20	val_20
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
+27	val_27
 30	val_30
-34	val_34
-42	val_42
-42	val_42
-44	val_44
+41	val_41
+43	val_43
+51	val_51
+51	val_51
 54	val_54
+57	val_57
 58	val_58
 58	val_58
 64	val_64
-66	val_66
+65	val_65
+67	val_67
+67	val_67
+69	val_69
 70	val_70
 70	val_70
 70	val_70
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-78	val_78
+77	val_77
 80	val_80
-82	val_82
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
 86	val_86
 90	val_90
 90	val_90
 90	val_90
-92	val_92
 96	val_96
+97	val_97
+97	val_97
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-104	val_104
-104	val_104
-114	val_114
+105	val_105
+113	val_113
+113	val_113
 116	val_116
-118	val_118
-118	val_118
-120	val_120
-120	val_120
+119	val_119
+119	val_119
+119	val_119
 126	val_126
-128	val_128
-128	val_128
-128	val_128
+133	val_133
 134	val_134
 134	val_134
-136	val_136
-138	val_138
-138	val_138
-138	val_138
-138	val_138
+137	val_137
+137	val_137
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
+149	val_149
+149	val_149
+153	val_153
 156	val_156
+157	val_157
 158	val_158
-160	val_160
 162	val_162
+163	val_163
 164	val_164
 164	val_164
-166	val_166
-168	val_168
-170	val_170
-172	val_172
-172	val_172
-174	val_174
-174	val_174
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+177	val_177
 178	val_178
-180	val_180
-186	val_186
+181	val_181
+187	val_187
+187	val_187
+187	val_187
 190	val_190
-192	val_192
-194	val_194
-196	val_196
-200	val_200
-200	val_200
+191	val_191
+191	val_191
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+199	val_199
+199	val_199
+199	val_199
+201	val_201
 202	val_202
 208	val_208
 208	val_208
@@ -357,63 +350,60 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 214	val_214
 216	val_216
 216	val_216
-218	val_218
-222	val_222
-224	val_224
-224	val_224
+221	val_221
+221	val_221
 226	val_226
-228	val_228
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
-242	val_242
-242	val_242
+239	val_239
+239	val_239
 244	val_244
 248	val_248
+249	val_249
 252	val_252
+255	val_255
+255	val_255
 256	val_256
 256	val_256
-258	val_258
 260	val_260
-262	val_262
 266	val_266
 272	val_272
 272	val_272
-274	val_274
-278	val_278
-278	val_278
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 286	val_286
-288	val_288
-288	val_288
+287	val_287
+289	val_289
+291	val_291
 292	val_292
-296	val_296
-298	val_298
-298	val_298
-298	val_298
-302	val_302
-306	val_306
+307	val_307
+307	val_307
 308	val_308
 310	val_310
+311	val_311
+311	val_311
+311	val_311
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-322	val_322
-322	val_322
+317	val_317
+317	val_317
+325	val_325
+325	val_325
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 336	val_336
 338	val_338
+339	val_339
+341	val_341
 342	val_342
 342	val_342
 344	val_344
@@ -423,79 +413,89 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 348	val_348
 348	val_348
 348	val_348
-356	val_356
+351	val_351
+353	val_353
+353	val_353
 360	val_360
 362	val_362
 364	val_364
-366	val_366
+365	val_365
 368	val_368
-374	val_374
+369	val_369
+369	val_369
+369	val_369
+377	val_377
 378	val_378
-382	val_382
-382	val_382
 384	val_384
 384	val_384
 384	val_384
 386	val_386
 392	val_392
+393	val_393
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
 402	val_402
 404	val_404
 404	val_404
-406	val_406
-406	val_406
-406	val_406
-406	val_406
+407	val_407
+409	val_409
+409	val_409
+409	val_409
+411	val_411
 414	val_414
 414	val_414
-418	val_418
-424	val_424
-424	val_424
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+427	val_427
 430	val_430
 430	val_430
 430	val_430
 432	val_432
-436	val_436
-438	val_438
-438	val_438
-438	val_438
+435	val_435
+437	val_437
+443	val_443
 444	val_444
 446	val_446
-448	val_448
+449	val_449
 452	val_452
+453	val_453
 454	val_454
 454	val_454
 454	val_454
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
+459	val_459
+459	val_459
+463	val_463
+463	val_463
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-470	val_470
+467	val_467
 472	val_472
 478	val_478
 478	val_478
+479	val_479
 480	val_480
 480	val_480
 480	val_480
 482	val_482
+483	val_483
 484	val_484
+485	val_485
 490	val_490
-492	val_492
-492	val_492
-494	val_494
-496	val_496
+491	val_491
+495	val_495
+497	val_497
 498	val_498
 498	val_498
 498	val_498

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/disable_merge_for_bucketing.q.out_spark
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/disable_merge_for_bucketing.q.out_spark b/ql/src/test/results/clientpositive/spark/disable_merge_for_bucketing.q.out_spark
index 8918d95..c0d147d 100644
--- a/ql/src/test/results/clientpositive/spark/disable_merge_for_bucketing.q.out_spark
+++ b/ql/src/test/results/clientpositive/spark/disable_merge_for_bucketing.q.out_spark
@@ -56,6 +56,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'
@@ -77,6 +78,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'
@@ -118,6 +120,7 @@ STAGE PLANS:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                         bucket_count 2
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -150,6 +153,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -248,104 +252,93 @@ POSTHOOK: query: select * from bucket2_1 tablesample (bucket 1 out of 2) s order
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucket2_1
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
 2	val_2
-4	val_4
-8	val_8
 10	val_10
-12	val_12
-12	val_12
-18	val_18
-18	val_18
+17	val_17
+19	val_19
 20	val_20
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
+27	val_27
 30	val_30
-34	val_34
-42	val_42
-42	val_42
-44	val_44
+41	val_41
+43	val_43
+51	val_51
+51	val_51
 54	val_54
+57	val_57
 58	val_58
 58	val_58
 64	val_64
-66	val_66
+65	val_65
+67	val_67
+67	val_67
+69	val_69
 70	val_70
 70	val_70
 70	val_70
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-78	val_78
+77	val_77
 80	val_80
-82	val_82
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
 86	val_86
 90	val_90
 90	val_90
 90	val_90
-92	val_92
 96	val_96
+97	val_97
+97	val_97
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-104	val_104
-104	val_104
-114	val_114
+105	val_105
+113	val_113
+113	val_113
 116	val_116
-118	val_118
-118	val_118
-120	val_120
-120	val_120
+119	val_119
+119	val_119
+119	val_119
 126	val_126
-128	val_128
-128	val_128
-128	val_128
+133	val_133
 134	val_134
 134	val_134
-136	val_136
-138	val_138
-138	val_138
-138	val_138
-138	val_138
+137	val_137
+137	val_137
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
+149	val_149
+149	val_149
+153	val_153
 156	val_156
+157	val_157
 158	val_158
-160	val_160
 162	val_162
+163	val_163
 164	val_164
 164	val_164
-166	val_166
-168	val_168
-170	val_170
-172	val_172
-172	val_172
-174	val_174
-174	val_174
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+177	val_177
 178	val_178
-180	val_180
-186	val_186
+181	val_181
+187	val_187
+187	val_187
+187	val_187
 190	val_190
-192	val_192
-194	val_194
-196	val_196
-200	val_200
-200	val_200
+191	val_191
+191	val_191
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+199	val_199
+199	val_199
+199	val_199
+201	val_201
 202	val_202
 208	val_208
 208	val_208
@@ -353,63 +346,60 @@ POSTHOOK: Input: default@bucket2_1
 214	val_214
 216	val_216
 216	val_216
-218	val_218
-222	val_222
-224	val_224
-224	val_224
+221	val_221
+221	val_221
 226	val_226
-228	val_228
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
-242	val_242
-242	val_242
+239	val_239
+239	val_239
 244	val_244
 248	val_248
+249	val_249
 252	val_252
+255	val_255
+255	val_255
 256	val_256
 256	val_256
-258	val_258
 260	val_260
-262	val_262
 266	val_266
 272	val_272
 272	val_272
-274	val_274
-278	val_278
-278	val_278
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 286	val_286
-288	val_288
-288	val_288
+287	val_287
+289	val_289
+291	val_291
 292	val_292
-296	val_296
-298	val_298
-298	val_298
-298	val_298
-302	val_302
-306	val_306
+307	val_307
+307	val_307
 308	val_308
 310	val_310
+311	val_311
+311	val_311
+311	val_311
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-322	val_322
-322	val_322
+317	val_317
+317	val_317
+325	val_325
+325	val_325
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 336	val_336
 338	val_338
+339	val_339
+341	val_341
 342	val_342
 342	val_342
 344	val_344
@@ -419,79 +409,89 @@ POSTHOOK: Input: default@bucket2_1
 348	val_348
 348	val_348
 348	val_348
-356	val_356
+351	val_351
+353	val_353
+353	val_353
 360	val_360
 362	val_362
 364	val_364
-366	val_366
+365	val_365
 368	val_368
-374	val_374
+369	val_369
+369	val_369
+369	val_369
+377	val_377
 378	val_378
-382	val_382
-382	val_382
 384	val_384
 384	val_384
 384	val_384
 386	val_386
 392	val_392
+393	val_393
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
 402	val_402
 404	val_404
 404	val_404
-406	val_406
-406	val_406
-406	val_406
-406	val_406
+407	val_407
+409	val_409
+409	val_409
+409	val_409
+411	val_411
 414	val_414
 414	val_414
-418	val_418
-424	val_424
-424	val_424
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+427	val_427
 430	val_430
 430	val_430
 430	val_430
 432	val_432
-436	val_436
-438	val_438
-438	val_438
-438	val_438
+435	val_435
+437	val_437
+443	val_443
 444	val_444
 446	val_446
-448	val_448
+449	val_449
 452	val_452
+453	val_453
 454	val_454
 454	val_454
 454	val_454
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
+459	val_459
+459	val_459
+463	val_463
+463	val_463
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-470	val_470
+467	val_467
 472	val_472
 478	val_478
 478	val_478
+479	val_479
 480	val_480
 480	val_480
 480	val_480
 482	val_482
+483	val_483
 484	val_484
+485	val_485
 490	val_490
-492	val_492
-492	val_492
-494	val_494
-496	val_496
+491	val_491
+495	val_495
+497	val_497
 498	val_498
 498	val_498
 498	val_498

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/filter_join_breaktask.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/filter_join_breaktask.q.out b/ql/src/test/results/clientpositive/spark/filter_join_breaktask.q.out
index 9287d78..547f9e0 100644
--- a/ql/src/test/results/clientpositive/spark/filter_join_breaktask.q.out
+++ b/ql/src/test/results/clientpositive/spark/filter_join_breaktask.q.out
@@ -98,6 +98,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 
@@ -174,6 +175,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 
@@ -249,6 +251,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/ac6b2a3f/ql/src/test/results/clientpositive/spark/groupby_map_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/groupby_map_ppr.q.out b/ql/src/test/results/clientpositive/spark/groupby_map_ppr.q.out
index d1fcd48..4a073d9 100644
--- a/ql/src/test/results/clientpositive/spark/groupby_map_ppr.q.out
+++ b/ql/src/test/results/clientpositive/spark/groupby_map_ppr.q.out
@@ -93,6 +93,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'
@@ -141,6 +142,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'
@@ -185,6 +187,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","key":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,c1,c2
                           columns.comments 
@@ -216,6 +219,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,c1,c2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/groupby_map_ppr_multi_distinct.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/groupby_map_ppr_multi_distinct.q.out b/ql/src/test/results/clientpositive/spark/groupby_map_ppr_multi_distinct.q.out
index 30e5daa..cdac070 100644
--- a/ql/src/test/results/clientpositive/spark/groupby_map_ppr_multi_distinct.q.out
+++ b/ql/src/test/results/clientpositive/spark/groupby_map_ppr_multi_distinct.q.out
@@ -93,6 +93,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'
@@ -141,6 +142,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'
@@ -185,6 +187,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","c3":"true","c4":"true","key":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,c1,c2,c3,c4
                           columns.comments 
@@ -216,6 +219,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","c3":"true","c4":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,c1,c2,c3,c4
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/groupby_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/groupby_ppr.q.out b/ql/src/test/results/clientpositive/spark/groupby_ppr.q.out
index 16543c6..7cd32f9 100644
--- a/ql/src/test/results/clientpositive/spark/groupby_ppr.q.out
+++ b/ql/src/test/results/clientpositive/spark/groupby_ppr.q.out
@@ -87,6 +87,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'
@@ -135,6 +136,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'
@@ -179,6 +181,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","key":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,c1,c2
                           columns.comments 
@@ -210,6 +213,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,c1,c2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/groupby_ppr_multi_distinct.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/groupby_ppr_multi_distinct.q.out b/ql/src/test/results/clientpositive/spark/groupby_ppr_multi_distinct.q.out
index d350f13..61579a4 100644
--- a/ql/src/test/results/clientpositive/spark/groupby_ppr_multi_distinct.q.out
+++ b/ql/src/test/results/clientpositive/spark/groupby_ppr_multi_distinct.q.out
@@ -87,6 +87,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'
@@ -135,6 +136,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'
@@ -179,6 +181,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","c3":"true","c4":"true","key":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,c1,c2,c3,c4
                           columns.comments 
@@ -210,6 +213,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","c3":"true","c4":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,c1,c2,c3,c4
                 columns.comments 
@@ -356,6 +360,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'
@@ -404,6 +409,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'
@@ -448,6 +454,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,c1,c2,c3,c4
                           columns.comments 
@@ -479,6 +486,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,c1,c2,c3,c4
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/groupby_sort_1_23.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/groupby_sort_1_23.q.out b/ql/src/test/results/clientpositive/spark/groupby_sort_1_23.q.out
index d0bb3b4..85595ca 100644
--- a/ql/src/test/results/clientpositive/spark/groupby_sort_1_23.q.out
+++ b/ql/src/test/results/clientpositive/spark/groupby_sort_1_23.q.out
@@ -85,6 +85,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,cnt
                                 columns.comments 
@@ -118,6 +119,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -141,6 +143,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -172,6 +175,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -286,6 +290,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -309,6 +314,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -355,6 +361,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,cnt
                           columns.comments 
@@ -386,6 +393,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -486,6 +494,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,cnt
                                 columns.comments 
@@ -519,6 +528,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -542,6 +552,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -573,6 +584,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -671,6 +683,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,cnt
                                 columns.comments 
@@ -704,6 +717,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -727,6 +741,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -758,6 +773,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -864,6 +880,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key1,key2,cnt
                                 columns.comments 
@@ -897,6 +914,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -920,6 +938,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -951,6 +970,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -1066,6 +1086,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -1089,6 +1110,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -1135,6 +1157,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,key3,cnt
                           columns.comments 
@@ -1166,6 +1189,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -1275,6 +1299,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -1298,6 +1323,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -1344,6 +1370,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,cnt
                           columns.comments 
@@ -1375,6 +1402,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -1496,6 +1524,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -1519,6 +1548,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -1565,6 +1595,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,cnt
                           columns.comments 
@@ -1596,6 +1627,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -1706,6 +1738,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,cnt
                                 columns.comments 
@@ -1739,6 +1772,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -1762,6 +1796,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -1814,6 +1849,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,cnt
                                 columns.comments 
@@ -1847,6 +1883,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -1870,6 +1907,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -1901,6 +1939,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -2022,6 +2061,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,cnt
                                 columns.comments 
@@ -2055,6 +2095,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -2078,6 +2119,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -2136,6 +2178,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -2159,6 +2202,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -2209,6 +2253,7 @@ STAGE PLANS:
                           properties:
                             COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,cnt
                             columns.comments 
@@ -2240,6 +2285,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -2367,6 +2413,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -2390,6 +2437,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -2448,6 +2496,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -2471,6 +2520,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -2518,6 +2568,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,cnt
                           columns.comments 
@@ -2549,6 +2600,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -2669,6 +2721,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -2692,6 +2745,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -2750,6 +2804,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -2773,6 +2828,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -2931,6 +2987,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -2954,6 +3011,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -3000,6 +3058,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,cnt
                           columns.comments 
@@ -3031,6 +3090,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -3129,6 +3189,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key1,key2,key3,cnt
                                 columns.comments 
@@ -3162,6 +3223,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -3185,6 +3247,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -3216,6 +3279,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -3325,6 +3389,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key1,key2,key3,key4,cnt
                                 columns.comments 
@@ -3358,6 +3423,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -3381,6 +3447,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -3412,6 +3479,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,key4,cnt
                 columns.comments 
@@ -3520,6 +3588,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key1,key2,key3,cnt
                                 columns.comments 
@@ -3553,6 +3622,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -3576,6 +3646,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -3607,6 +3678,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -3722,6 +3794,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key1,key2,key3,cnt
                                 columns.comments 
@@ -3755,6 +3828,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -3778,6 +3852,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -3809,6 +3884,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/vector_windowing_range_multiorder.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_windowing_range_multiorder.q.out b/ql/src/test/results/clientpositive/llap/vector_windowing_range_multiorder.q.out
index 256b80d..9acbf2e 100644
--- a/ql/src/test/results/clientpositive/llap/vector_windowing_range_multiorder.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_windowing_range_multiorder.q.out
@@ -900,10005 +900,10005 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@over10k
 #### A masked pattern was here ####
 s	si	i	avg_window_0
-alice falkner	323	65669	65695.76470588235
 alice falkner	477	65722	65695.76470588235
-alice falkner	455	65718	65695.76470588235
-alice falkner	481	65709	65695.76470588235
-alice falkner	345	65773	65695.76470588235
-alice falkner	280	65597	65695.76470588235
-alice falkner	500	65775	65695.76470588235
 alice falkner	339	65785	65695.76470588235
-alice falkner	452	65596	65695.76470588235
-alice falkner	382	65690	65695.76470588235
 alice falkner	382	65622	65695.76470588235
 alice falkner	393	65611	65695.76470588235
+alice falkner	389	65699	65695.76470588235
+alice falkner	500	65775	65695.76470588235
+alice falkner	371	65710	65695.76470588235
+alice falkner	481	65709	65695.76470588235
+alice falkner	452	65596	65695.76470588235
+alice falkner	323	65669	65695.76470588235
+alice falkner	382	65690	65695.76470588235
+alice falkner	455	65718	65695.76470588235
 alice falkner	393	65685	65695.76470588235
-alice falkner	342	65752	65695.76470588235
 alice falkner	311	65715	65695.76470588235
-alice falkner	371	65710	65695.76470588235
-alice falkner	389	65699	65695.76470588235
-alice ichabod	366	65590	65654.95454545454
+alice falkner	280	65597	65695.76470588235
+alice falkner	342	65752	65695.76470588235
+alice falkner	345	65773	65695.76470588235
+alice ichabod	292	65788	65654.95454545454
 alice ichabod	458	65550	65654.95454545454
+alice ichabod	412	65718	65654.95454545454
+alice ichabod	303	65692	65654.95454545454
+alice ichabod	300	65704	65654.95454545454
+alice ichabod	366	65590	65654.95454545454
+alice ichabod	301	65693	65654.95454545454
+alice ichabod	398	65659	65654.95454545454
+alice ichabod	292	65585	65654.95454545454
+alice ichabod	305	65617	65654.95454545454
 alice ichabod	436	65738	65654.95454545454
-alice ichabod	315	65772	65654.95454545454
+alice ichabod	440	65725	65654.95454545454
 alice ichabod	453	65780	65654.95454545454
+alice ichabod	398	65785	65654.95454545454
 alice ichabod	347	65547	65654.95454545454
-alice ichabod	398	65659	65654.95454545454
-alice ichabod	338	65538	65654.95454545454
-alice ichabod	440	65725	65654.95454545454
 alice ichabod	320	65622	65654.95454545454
-alice ichabod	412	65718	65654.95454545454
-alice ichabod	305	65617	65654.95454545454
-alice ichabod	292	65585	65654.95454545454
-alice ichabod	303	65692	65654.95454545454
-alice ichabod	338	65545	65654.95454545454
 alice ichabod	398	65680	65654.95454545454
+alice ichabod	315	65772	65654.95454545454
 alice ichabod	416	65536	65654.95454545454
+alice ichabod	338	65545	65654.95454545454
 alice ichabod	344	65545	65654.95454545454
-alice ichabod	300	65704	65654.95454545454
-alice ichabod	292	65788	65654.95454545454
-alice ichabod	398	65785	65654.95454545454
-alice ichabod	301	65693	65654.95454545454
-alice polk	443	65734	65661.57142857143
-alice polk	444	65564	65661.57142857143
-alice polk	357	65550	65661.57142857143
-alice polk	321	65744	65661.57142857143
-alice polk	273	65548	65661.57142857143
-alice polk	366	65595	65661.57142857143
-alice polk	285	65761	65661.57142857143
-alice polk	466	65561	65661.57142857143
-alice polk	324	65749	65661.57142857143
-alice polk	487	65746	65661.57142857143
-alice polk	378	65598	65661.57142857143
-alice polk	395	65751	65661.57142857143
-alice polk	407	65617	65661.57142857143
-alice polk	507	65744	65661.57142857143
-alice young	468	65649	65706.63636363637
-alice young	489	65646	65706.63636363637
-alice young	286	65705	65706.63636363637
-alice young	447	65789	65706.63636363637
-alice young	425	65677	65706.63636363637
-alice young	282	65671	65706.63636363637
-alice young	351	65776	65706.63636363637
-alice young	308	65776	65706.63636363637
-alice young	314	65791	65706.63636363637
-alice young	419	65735	65706.63636363637
-alice young	383	65558	65706.63636363637
-bob falkner	394	65648	65674.17647058824
-bob falkner	414	65587	65674.17647058824
-bob falkner	389	65738	65674.17647058824
-bob falkner	302	65711	65674.17647058824
-bob falkner	390	65556	65674.17647058824
-bob falkner	357	65566	65674.17647058824
-bob falkner	264	65693	65674.17647058824
-bob falkner	329	65720	65674.17647058824
-bob falkner	317	65624	65674.17647058824
-bob falkner	258	65551	65674.17647058824
-bob falkner	410	65749	65674.17647058824
-bob falkner	330	65727	65674.17647058824
-bob falkner	474	65734	65674.17647058824
-bob falkner	260	65595	65674.17647058824
-bob falkner	459	65746	65674.17647058824
-bob falkner	406	65727	65674.17647058824
-bob falkner	291	65789	65674.17647058824
-bob garcia	422	65655	65675.86666666667
-bob garcia	279	65754	65675.86666666667
-bob garcia	466	65673	65675.86666666667
-bob garcia	416	65582	65675.86666666667
-bob garcia	418	65598	65675.86666666667
-bob garcia	344	65738	65675.86666666667
-bob garcia	320	65585	65675.86666666667
-bob garcia	315	65782	65675.86666666667
-bob garcia	444	65789	65675.86666666667
-bob garcia	354	65687	65675.86666666667
-bob garcia	480	65567	65675.86666666667
-bob garcia	332	65642	65675.86666666667
-bob garcia	361	65737	65675.86666666667
-bob garcia	398	65697	65675.86666666667
-bob garcia	421	65652	65675.86666666667
-bob laertes	423	65663	65671.23529411765
-bob laertes	303	65646	65671.23529411765
-bob laertes	429	65591	65671.23529411765
-bob laertes	446	65602	65671.23529411765
-bob laertes	341	65554	65671.23529411765
-bob laertes	267	65646	65671.23529411765
-bob laertes	376	65602	65671.23529411765
-bob laertes	362	65667	65671.23529411765
-bob laertes	285	65567	65671.23529411765
-bob laertes	437	65729	65671.23529411765
-bob laertes	487	65720	65671.23529411765
-bob laertes	406	65773	65671.23529411765
-bob laertes	405	65752	65671.23529411765
-bob laertes	406	65726	65671.23529411765
-bob laertes	456	65650	65671.23529411765
-bob laertes	440	65751	65671.23529411765
-bob laertes	482	65772	65671.23529411765
-bob polk	434	65731	65660.4
-bob polk	264	65776	65660.4
-bob polk	420	65599	65660.4
-bob polk	433	65767	65660.4
-bob polk	325	65594	65660.4
-bob polk	310	65599	65660.4
-bob polk	316	65778	65660.4
-bob polk	436	65569	65660.4
-bob polk	511	65582	65660.4
-bob polk	423	65609	65660.4
-bob young	317	65758	65684.17647058824
-bob young	263	65778	65684.17647058824
-bob young	415	65635	65684.17647058824
-bob young	468	65654	65684.17647058824
-bob young	488	65668	65684.17647058824
-bob young	410	65758	65684.17647058824
-bob young	348	65556	65684.17647058824
-bob young	494	65629	65684.17647058824
-bob young	504	65694	65684.17647058824
-bob young	453	65735	65684.17647058824
-bob young	448	65726	65684.17647058824
-bob young	321	65727	65684.17647058824
-bob young	288	65599	65684.17647058824
-bob young	459	65727	65684.17647058824
-bob young	349	65777	65684.17647058824
-bob young	449	65589	65684.17647058824
-bob young	299	65621	65684.17647058824
-calvin allen	351	65701	65671.81818181818
-calvin allen	466	65747	65671.81818181818
-calvin allen	360	65575	65671.81818181818
-calvin allen	443	65681	65671.81818181818
-calvin allen	499	65665	65671.81818181818
-calvin allen	479	65751	65671.81818181818
-calvin allen	432	65669	65671.81818181818
-calvin allen	309	65538	65671.81818181818
-calvin allen	276	65661	65671.81818181818
-calvin allen	437	65726	65671.81818181818
-calvin allen	326	65676	65671.81818181818
-calvin carson	447	65546	65651.94117647059
-calvin carson	464	65543	65651.94117647059
-calvin carson	341	65697	65651.94117647059
-calvin carson	344	65557	65651.94117647059
-calvin carson	507	65595	65651.94117647059
-calvin carson	295	65663	65651.94117647059
-calvin carson	435	65637	65651.94117647059
-calvin carson	389	65682	65651.94117647059
-calvin carson	401	65613	65651.94117647059
-calvin carson	450	65688	65651.94117647059
-calvin carson	440	65778	65651.94117647059
-calvin carson	264	65614	65651.94117647059
-calvin carson	310	65686	65651.94117647059
-calvin carson	397	65668	65651.94117647059
-calvin carson	373	65728	65651.94117647059
-calvin carson	440	65781	65651.94117647059
-calvin carson	333	65607	65651.94117647059
-calvin davidson	264	65564	65671.71428571429
-calvin davidson	258	65780	65671.71428571429
-calvin davidson	309	65689	65671.71428571429
-calvin davidson	506	65632	65671.71428571429
-calvin davidson	466	65541	65671.71428571429
-calvin davidson	337	65547	65671.71428571429
-calvin davidson	478	65775	65671.71428571429
-calvin davidson	360	65771	65671.71428571429
-calvin davidson	347	65578	65671.71428571429
-calvin davidson	468	65583	65671.71428571429
-calvin davidson	411	65772	65671.71428571429
-calvin davidson	427	65704	65671.71428571429
-calvin davidson	389	65752	65671.71428571429
-calvin davidson	301	65716	65671.71428571429
-calvin hernandez	507	65779	65690.94117647059
-calvin hernandez	283	65788	65690.94117647059
-calvin hernandez	345	65765	65690.94117647059
-calvin hernandez	369	65546	65690.94117647059
-calvin hernandez	288	65578	65690.94117647059
-calvin hernandez	376	65665	65690.94117647059
-calvin hernandez	422	65589	65690.94117647059
-calvin hernandez	460	65688	65690.94117647059
-calvin hernandez	464	65716	65690.94117647059
-calvin hernandez	372	65728	65690.94117647059
-calvin hernandez	313	65687	65690.94117647059
-calvin hernandez	415	65785	65690.94117647059
-calvin hernandez	506	65745	65690.94117647059
-calvin hernandez	313	65672	65690.94117647059
-calvin hernandez	446	65588	65690.94117647059
-calvin hernandez	443	65706	65690.94117647059
-calvin hernandez	434	65721	65690.94117647059
-calvin ichabod	385	65713	65691.76923076923
-calvin ichabod	273	65760	65691.76923076923
-calvin ichabod	324	65721	65691.76923076923
-calvin ichabod	505	65643	65691.76923076923
-calvin ichabod	467	65687	65691.76923076923
-calvin ichabod	431	65635	65691.76923076923
-calvin ichabod	322	65543	65691.76923076923
-calvin ichabod	271	65619	65691.76923076923
-calvin ichabod	268	65720	65691.76923076923
-calvin ichabod	497	65778	65691.76923076923
-calvin ichabod	432	65759	65691.76923076923
-calvin ichabod	317	65671	65691.76923076923
-calvin ichabod	453	65744	65691.76923076923
-calvin king	311	65777	65684.35294117648
-calvin king	443	65624	65684.35294117648
-calvin king	344	65605	65684.35294117648
-calvin king	400	65624	65684.35294117648
-calvin king	290	65670	65684.35294117648
-calvin king	280	65596	65684.35294117648
-calvin king	328	65684	65684.35294117648
-calvin king	423	65751	65684.35294117648
-calvin king	424	65756	65684.35294117648
-calvin king	263	65725	65684.35294117648
-calvin king	348	65645	65684.35294117648
-calvin king	443	65724	65684.35294117648
-calvin king	372	65556	65684.35294117648
-calvin king	275	65692	65684.35294117648
-calvin king	503	65724	65684.35294117648
-calvin king	467	65708	65684.35294117648
-calvin king	467	65773	65684.35294117648
-calvin steinbeck	325	65575	65666.93333333333
-calvin steinbeck	432	65692	65666.93333333333
-calvin steinbeck	400	65740	65666.93333333333
-calvin steinbeck	429	65777	65666.93333333333
-calvin steinbeck	273	65779	65666.93333333333
-calvin steinbeck	355	65548	65666.93333333333
-calvin steinbeck	306	65667	65666.93333333333
-calvin steinbeck	323	65612	65666.93333333333
-calvin steinbeck	476	65563	65666.93333333333
-calvin steinbeck	477	65680	65666.93333333333
-calvin steinbeck	479	65649	65666.93333333333
-calvin steinbeck	381	65687	65666.93333333333
-calvin steinbeck	467	65658	65666.93333333333
-calvin steinbeck	282	65615	65666.93333333333
-calvin steinbeck	258	65762	65666.93333333333
-calvin van buren	501	65782	65685.86666666667
-calvin van buren	329	65684	65685.86666666667
-calvin van buren	486	65588	65685.86666666667
-calvin van buren	430	65729	65685.86666666667
-calvin van buren	352	65752	65685.86666666667
-calvin van buren	296	65738	65685.86666666667
-calvin van buren	426	65664	65685.86666666667
-calvin van buren	363	65745	65685.86666666667
-calvin van buren	417	65717	65685.86666666667
-calvin van buren	313	65678	65685.86666666667
-calvin van buren	411	65574	65685.86666666667
-calvin van buren	447	65557	65685.86666666667
-calvin van buren	420	65771	65685.86666666667
-calvin van buren	417	65552	65685.86666666667
-calvin van buren	474	65757	65685.86666666667
-calvin xylophone	507	65699	65674.27777777778
-calvin xylophone	407	65740	65674.27777777778
-calvin xylophone	491	65727	65674.27777777778
-calvin xylophone	313	65726	65674.27777777778
-calvin xylophone	260	65621	65674.27777777778
-calvin xylophone	457	65722	65674.27777777778
-calvin xylophone	318	65742	65674.27777777778
-calvin xylophone	305	65767	65674.27777777778
-calvin xylophone	433	65624	65674.27777777778
-calvin xylophone	483	65713	65674.27777777778
-calvin xylophone	322	65645	65674.27777777778
-calvin xylophone	275	65596	65674.27777777778
-calvin xylophone	262	65580	65674.27777777778
-calvin xylophone	370	65631	65674.27777777778
-calvin xylophone	366	65667	65674.27777777778
-calvin xylophone	438	65575	65674.27777777778
-calvin xylophone	462	65699	65674.27777777778
-calvin xylophone	398	65663	65674.27777777778
-david davidson	423	65754	65669.61538461539
-david davidson	423	65649	65669.61538461539
-david davidson	271	65627	65669.61538461539
-david davidson	341	65756	65669.61538461539
-david davidson	311	65762	65669.61538461539
-david davidson	363	65569	65669.61538461539
-david davidson	308	65559	65669.61538461539
-david davidson	271	65620	65669.61538461539
-david davidson	502	65584	65669.61538461539
-david davidson	382	65779	65669.61538461539
-david davidson	256	65778	65669.61538461539
-david davidson	443	65664	65669.61538461539
-david davidson	276	65604	65669.61538461539
-david garcia	259	65789	65691.26666666666
-david garcia	485	65684	65691.26666666666
-david garcia	258	65582	65691.26666666666
-david garcia	347	65600	65691.26666666666
-david garcia	275	65707	65691.26666666666
-david garcia	396	65770	65691.26666666666
-david garcia	496	65716	65691.26666666666
-david garcia	332	65750	65691.26666666666
-david garcia	486	65771	65691.26666666666
-david garcia	479	65603	65691.26666666666
-david garcia	290	65692	65691.26666666666
-david garcia	411	65576	65691.26666666666
-david garcia	424	65728	65691.26666666666
-david garcia	425	65752	65691.26666666666
-david garcia	324	65649	65691.26666666666
-david johnson	409	65577	65637.07142857143
-david johnson	277	65565	65637.07142857143
-david johnson	286	65536	65637.07142857143
-david johnson	482	65634	65637.07142857143
-david johnson	497	65671	65637.07142857143
-david johnson	314	65685	65637.07142857143
-david johnson	491	65598	65637.07142857143
-david johnson	455	65703	65637.07142857143
-david johnson	260	65708	65637.07142857143
-david johnson	433	65582	65637.07142857143
-david johnson	341	65724	65637.07142857143
-david johnson	333	65624	65637.07142857143
-david johnson	301	65719	65637.07142857143
-david johnson	480	65593	65637.07142857143
-david king	439	65545	65649.2
-david king	425	65732	65649.2
-david king	305	65689	65649.2
-david king	368	65657	65649.2
-david king	436	65764	65649.2
-david king	412	65564	65649.2
-david king	379	65603	65649.2
-david king	262	65555	65649.2
-david king	427	65598	65649.2
-david king	442	65576	65649.2
-david king	270	65725	65649.2
-david king	274	65780	65649.2
-david king	291	65644	65649.2
-david king	382	65633	65649.2
-david king	447	65673	65649.2
-david ovid	392	65709	65683.625
-david ovid	315	65619	65683.625
-david ovid	410	65571	65683.625
-david ovid	270	65755	65683.625
-david ovid	329	65628	65683.625
-david ovid	264	65587	65683.625
-david ovid	359	65695	65683.625
-david ovid	382	65623	65683.625
-david ovid	411	65743	65683.625
-david ovid	438	65664	65683.625
-david ovid	299	65741	65683.625
-david ovid	475	65777	65683.625
-david ovid	396	65762	65683.625
-david ovid	356	65765	65683.625
-david ovid	332	65721	65683.625
-david ovid	336	65578	65683.625
-david polk	441	65659	65653.72727272728
-david polk	496	65605	65653.72727272728
-david polk	460	65709	65653.72727272728
-david polk	470	65735	65653.72727272728
-david polk	266	65693	65653.72727272728
-david polk	361	65551	65653.72727272728
-david polk	402	65732	65653.72727272728
-david polk	415	65715	65653.72727272728
-david polk	277	65539	65653.72727272728
-david polk	318	65560	65653.72727272728
-david polk	486	65693	65653.72727272728
-ethan davidson	317	65769	65678.92857142857
-ethan davidson	319	65620	65678.92857142857
-ethan davidson	411	65624	65678.92857142857
-ethan davidson	470	65589	65678.92857142857
-ethan davidson	442	65604	65678.92857142857
-ethan davidson	308	65767	65678.92857142857
-ethan davidson	262	65734	65678.92857142857
-ethan davidson	379	65749	65678.92857142857
-ethan davidson	485	65617	65678.92857142857
-ethan davidson	490	65600	65678.92857142857
-ethan davidson	322	65748	65678.92857142857
-ethan davidson	436	65695	65678.92857142857
-ethan davidson	383	65758	65678.92857142857
-ethan davidson	271	65631	65678.92857142857
-ethan johnson	490	65627	65617.27272727272
-ethan johnson	261	65550	65617.27272727272
-ethan johnson	431	65658	65617.27272727272
-ethan johnson	454	65617	65617.27272727272
-ethan johnson	352	65731	65617.27272727272
-ethan johnson	497	65558	65617.27272727272
-ethan johnson	301	65536	65617.27272727272
-ethan johnson	483	65578	65617.27272727272
-ethan johnson	492	65690	65617.27272727272
-ethan johnson	473	65630	65617.27272727272
-ethan johnson	283	65615	65617.27272727272
-ethan polk	417	65786	65677.25
-ethan polk	487	65749	65677.25
-ethan polk	329	65572	65677.25
-ethan polk	323	65617	65677.25
-ethan polk	283	65695	65677.25
-ethan polk	402	65622	65677.25
-ethan polk	421	65769	65677.25
-ethan polk	260	65589	65677.25
-ethan polk	378	65695	65677.25
-ethan polk	302	65615	65677.25
-ethan polk	302	65683	65677.25
-ethan polk	257	65712	65677.25
-ethan polk	431	65592	65677.25
-ethan polk	367	65785	65677.25
-ethan polk	468	65733	65677.25
-ethan polk	463	65622	65677.25
-ethan zipper	387	65740	65681.64285714286
-ethan zipper	400	65707	65681.64285714286
-ethan zipper	390	65769	65681.64285714286
-ethan zipper	354	65593	65681.64285714286
-ethan zipper	378	65555	65681.64285714286
-ethan zipper	435	65645	65681.64285714286
-ethan zipper	269	65779	65681.64285714286
-ethan zipper	491	65575	65681.64285714286
-ethan zipper	364	65767	65681.64285714286
-ethan zipper	366	65759	65681.64285714286
-ethan zipper	288	65764	65681.64285714286
-ethan zipper	411	65680	65681.64285714286
-ethan zipper	343	65605	65681.64285714286
-ethan zipper	506	65605	65681.64285714286
-fred carson	361	65617	65671.22222222222
-fred carson	443	65593	65671.22222222222
-fred carson	312	65739	65671.22222222222
-fred carson	320	65716	65671.22222222222
-fred carson	463	65554	65671.22222222222
-fred carson	361	65679	65671.22222222222
-fred carson	308	65726	65671.22222222222
-fred carson	320	65709	65671.22222222222
-fred carson	383	65708	65671.22222222222
-fred nixon	374	65725	65674.52631578948
-fred nixon	334	65542	65674.52631578948
-fred nixon	389	65718	65674.52631578948
-fred nixon	427	65596	65674.52631578948
-fred nixon	497	65612	65674.52631578948
-fred nixon	463	65718	65674.52631578948
-fred nixon	473	65719	65674.52631578948
-fred nixon	359	65560	65674.52631578948
-fred nixon	262	65649	65674.52631578948
-fred nixon	362	65686	65674.52631578948
-fred nixon	473	65787	65674.52631578948
-fred nixon	291	65734	65674.52631578948
-fred nixon	274	65705	65674.52631578948
-fred nixon	403	65735	65674.52631578948
-fred nixon	322	65582	65674.52631578948
-fred nixon	467	65718	65674.52631578948
-fred nixon	317	65702	65674.52631578948
-fred nixon	317	65703	65674.52631578948
-fred nixon	372	65625	65674.52631578948
-fred robinson	422	65586	65655.23529411765
-fred robinson	423	65594	65655.23529411765
-fred robinson	358	65627	65655.23529411765
-fred robinson	345	65760	65655.23529411765
-fred robinson	363	65706	65655.23529411765
-fred robinson	493	65723	65655.23529411765
-fred robinson	371	65719	65655.23529411765
-fred robinson	286	65554	65655.23529411765
-fred robinson	323	65611	65655.23529411765
-fred robinson	474	65638	65655.23529411765
-fred robinson	495	65785	65655.23529411765
-fred robinson	436	65623	65655.23529411765
-fred robinson	409	65670	65655.23529411765
-fred robinson	297	65566	65655.23529411765
-fred robinson	391	65583	65655.23529411765
-fred robinson	428	65673	65655.23529411765
-fred robinson	453	65721	65655.23529411765
-fred van buren	482	65658	65669.41176470589
-fred van buren	277	65620	65669.41176470589
-fred van buren	403	65670	65669.41176470589
-fred van buren	279	65745	65669.41176470589
-fred van buren	309	65648	65669.41176470589
-fred van buren	332	65758	65669.41176470589
-fred van buren	391	65615	65669.41176470589
-fred van buren	291	65670	65669.41176470589
-fred van buren	337	65606	65669.41176470589
-fred van buren	485	65764	65669.41176470589
-fred van buren	266	65786	65669.41176470589
-fred van buren	503	65624	65669.41176470589
-fred van buren	318	65789	65669.41176470589
-fred van buren	302	65655	65669.41176470589
-fred van buren	329	65561	65669.41176470589
-fred van buren	501	65674	65669.41176470589
-fred van buren	458	65537	65669.41176470589
-fred xylophone	385	65644	65696.36363636363
-fred xylophone	282	65605	65696.36363636363
-fred xylophone	463	65701	65696.36363636363
-fred xylophone	316	65751	65696.36363636363
-fred xylophone	320	65753	65696.36363636363
-fred xylophone	289	65617	65696.36363636363
-fred xylophone	284	65614	65696.36363636363
-fred xylophone	327	65753	65696.36363636363
-fred xylophone	508	65778	65696.36363636363
-fred xylophone	416	65684	65696.36363636363
-fred xylophone	450	65760	65696.36363636363
-fred zipper	333	65666	65662.84615384616
-fred zipper	299	65735	65662.84615384616
-fred zipper	302	65743	65662.84615384616
-fred zipper	257	65756	65662.84615384616
-fred zipper	366	65555	65662.84615384616
-fred zipper	405	65779	65662.84615384616
-fred zipper	317	65543	65662.84615384616
-fred zipper	434	65553	65662.84615384616
-fred zipper	455	65601	65662.84615384616
-fred zipper	300	65553	65662.84615384616
-fred zipper	270	65744	65662.84615384616
-fred zipper	265	65674	65662.84615384616
-fred zipper	510	65715	65662.84615384616
-gabriella allen	503	65677	65645.71428571429
-gabriella allen	410	65569	65645.71428571429
-gabriella allen	316	65646	65645.71428571429
-gabriella allen	452	65704	65645.71428571429
-gabriella allen	471	65624	65645.71428571429
-gabriella allen	402	65725	65645.71428571429
-gabriella allen	282	65575	65645.71428571429
-gabriella brown	376	65739	65696.47368421052
-gabriella brown	460	65731	65696.47368421052
-gabriella brown	326	65758	65696.47368421052
-gabriella brown	297	65704	65696.47368421052
-gabriella brown	472	65715	65696.47368421052
-gabriella brown	304	65733	65696.47368421052
-gabriella brown	475	65766	65696.47368421052
-gabriella brown	416	65666	65696.47368421052
-gabriella brown	498	65587	65696.47368421052
-gabriella brown	328	65565	65696.47368421052
-gabriella brown	343	65702	65696.47368421052
-gabriella brown	471	65583	65696.47368421052
-gabriella brown	488	65723	65696.47368421052
-gabriella brown	284	65753	65696.47368421052
-gabriella brown	297	65712	65696.47368421052
-gabriella brown	270	65698	65696.47368421052
-gabriella brown	498	65751	65696.47368421052
-gabriella brown	462	65627	65696.47368421052
-gabriella brown	487	65720	65696.47368421052
-gabriella ellison	466	65574	65655.85
-gabriella ellison	306	65559	65655.85
-gabriella ellison	474	65704	65655.85
-gabriella ellison	495	65561	65655.85
-gabriella ellison	404	65621	65655.85
-gabriella ellison	280	65716	65655.85
-gabriella ellison	457	65573	65655.85
-gabriella ellison	315	65550	65655.85
-gabriella ellison	284	65673	65655.85
-gabriella ellison	378	65771	65655.85
-gabriella ellison	283	65666	65655.85
-gabriella ellison	310	65737	65655.85
-gabriella ellison	429	65682	65655.85
-gabriella ellison	452	65605	65655.85
-gabriella ellison	271	65715	65655.85
-gabriella ellison	422	65774	65655.85
-gabriella ellison	396	65760	65655.85
-gabriella ellison	351	65586	65655.85
-gabriella ellison	327	65706	65655.85
-gabriella ellison	257	65584	65655.85
-gabriella falkner	398	65678	65678.8125
-gabriella falkner	259	65767	65678.8125
-gabriella falkner	268	65676	65678.8125
-gabriella falkner	330	65649	65678.8125
-gabriella falkner	391	65745	65678.8125
-gabriella falkner	413	65623	65678.8125
-gabriella falkner	301	65638	65678.8125
-gabriella falkner	504	65751	65678.8125
-gabriella falkner	294	65754	65678.8125
-gabriella falkner	263	65690	65678.8125
-gabriella falkner	462	65635	65678.8125
-gabriella falkner	283	65711	65678.8125
-gabriella falkner	256	65731	65678.8125
-gabriella falkner	267	65596	65678.8125
-gabriella falkner	384	65644	65678.8125
-gabriella falkner	324	65573	65678.8125
-gabriella garcia	431	65743	65676.4
-gabriella garcia	395	65788	65676.4
-gabriella garcia	306	65571	65676.4
-gabriella garcia	444	65611	65676.4
-gabriella garcia	485	65788	65676.4
-gabriella garcia	355	65687	65676.4
-gabriella garcia	495	65787	65676.4
-gabriella garcia	271	65665	65676.4
-gabriella garcia	303	65721	65676.4
-gabriella garcia	288	65536	65676.4
-gabriella garcia	391	65738	65676.4
-gabriella garcia	261	65645	65676.4
-gabriella garcia	446	65672	65676.4
-gabriella garcia	272	65555	65676.4
-gabriella garcia	273	65639	65676.4
-gabriella hernandez	323	65701	65631.78947368421
-gabriella hernandez	413	65540	65631.78947368421
-gabriella hernandez	432	65592	65631.78947368421
-gabriella hernandez	427	65570	65631.78947368421
-gabriella hernandez	340	65596	65631.78947368421
-gabriella hernandez	352	65628	65631.78947368421
-gabriella hernandez	273	65615	65631.78947368421
-gabriella hernandez	289	65706	65631.78947368421
-gabriella hernandez	506	65647	65631.78947368421
-gabriella hernandez	372	65587	65631.78947368421
-gabriella hernandez	302	65701	65631.78947368421
-gabriella hernandez	457	65594	65631.78947368421
-gabriella hernandez	350	65717	65631.78947368421
-gabriella hernandez	483	65584	65631.78947368421
-gabriella hernandez	491	65744	65631.78947368421
-gabriella hernandez	454	65645	65631.78947368421
-gabriella hernandez	503	65609	65631.78947368421
-gabriella hernandez	384	65634	65631.78947368421
-gabriella hernandez	269	65594	65631.78947368421
-gabriella johnson	368	65752	65637.5
-gabriella johnson	284	65553	65637.5
-gabriella johnson	278	65538	65637.5
-gabriella johnson	390	65544	65637.5
-gabriella johnson	424	65768	65637.5
-gabriella johnson	292	65669	65637.5
-gabriella johnson	408	65683	65637.5
-gabriella johnson	466	65593	65637.5
-gabriella miller	463	65646	65673.16666666667
-gabriella miller	370	65631	65673.16666666667
-gabriella miller	454	65735	65673.16666666667
-gabriella miller	458	65716	65673.16666666667
-gabriella miller	311	65700	65673.16666666667
-gabriella miller	280	65611	65673.16666666667
-gabriella steinbeck	399	65652	65669.61111111111
-gabriella steinbeck	263	65582	65669.61111111111
-gabriella steinbeck	301	65603	65669.61111111111
-gabriella steinbeck	420	65594	65669.61111111111
-gabriella steinbeck	305	65780	65669.61111111111
-gabriella steinbeck	334	65653	65669.61111111111
-gabriella steinbeck	485	65680	65669.61111111111
-gabriella steinbeck	367	65717	65669.61111111111
-gabriella steinbeck	291	65661	65669.61111111111
-gabriella steinbeck	393	65786	65669.61111111111
-gabriella steinbeck	423	65758	65669.61111111111
-gabriella steinbeck	495	65626	65669.61111111111
-gabriella steinbeck	493	65630	65669.61111111111
-gabriella steinbeck	491	65594	65669.61111111111
-gabriella steinbeck	510	65632	65669.61111111111
-gabriella steinbeck	467	65713	65669.61111111111
-gabriella steinbeck	443	65613	65669.61111111111
-gabriella steinbeck	340	65779	65669.61111111111
-gabriella xylophone	424	65784	65703.16666666667
-gabriella xylophone	480	65693	65703.16666666667
-gabriella xylophone	428	65790	65703.16666666667
-gabriella xylophone	266	65586	65703.16666666667
-gabriella xylophone	354	65714	65703.16666666667
-gabriella xylophone	481	65729	65703.16666666667
-gabriella xylophone	333	65724	65703.16666666667
-gabriella xylophone	467	65745	65703.16666666667
-gabriella xylophone	322	65598	65703.16666666667
-gabriella xylophone	403	65748	65703.16666666667
-gabriella xylophone	285	65669	65703.16666666667
-gabriella xylophone	383	65658	65703.16666666667
-gabriella young	403	65547	65636.0
-gabriella young	498	65774	65636.0
-gabriella young	405	65598	65636.0
-gabriella young	313	65699	65636.0
-gabriella young	258	65573	65636.0
-gabriella young	455	65571	65636.0
-gabriella young	379	65736	65636.0
-gabriella young	295	65590	65636.0
-holly brown	478	65599	65636.11111111111
-holly brown	301	65583	65636.11111111111
-holly brown	417	65569	65636.11111111111
-holly brown	279	65774	65636.11111111111
-holly brown	451	65567	65636.11111111111
-holly brown	261	65632	65636.11111111111
-holly brown	353	65668	65636.11111111111
-holly brown	385	65714	65636.11111111111
-holly brown	346	65619	65636.11111111111
-holly falkner	310	65553	65659.79166666667
-holly falkner	407	65742	65659.79166666667
-holly falkner	407	65682	65659.79166666667
-holly falkner	369	65674	65659.79166666667
-holly falkner	423	65718	65659.79166666667
-holly falkner	289	65746	65659.79166666667
-holly falkner	319	65633	65659.79166666667
-holly falkner	448	65775	65659.79166666667
-holly falkner	411	65623	65659.79166666667
-holly falkner	473	65720	65659.79166666667
-holly falkner	383	65597	65659.79166666667
-holly falkner	390	65552	65659.79166666667
-holly falkner	470	65746	65659.79166666667
-holly falkner	474	65721	65659.79166666667
-holly falkner	452	65557	65659.79166666667
-holly falkner	368	65617	65659.79166666667
-holly falkner	480	65711	65659.79166666667
-holly falkner	443	65542	65659.79166666667
-holly falkner	434	65629	65659.79166666667
-holly falkner	461	65719	65659.79166666667
-holly falkner	268	65632	65659.79166666667
-holly falkner	479	65538	65659.79166666667
-holly falkner	388	65719	65659.79166666667
-holly falkner	377	65689	65659.79166666667
-holly hernandez	463	65767	65680.33333333333
-holly hernandez	496	65699	65680.33333333333
-holly hernandez	377	65597	65680.33333333333
-holly hernandez	329	65788	65680.33333333333
-holly hernandez	385	65623	65680.33333333333
-holly hernandez	346	65787	65680.33333333333
-holly hernandez	458	65538	65680.33333333333
-holly hernandez	426	65602	65680.33333333333
-holly hernandez	396	65635	65680.33333333333
-holly hernandez	461	65686	65680.33333333333
-holly hernandez	350	65615	65680.33333333333
-holly hernandez	481	65750	65680.33333333333
-holly hernandez	374	65748	65680.33333333333
-holly hernandez	356	65564	65680.33333333333
-holly hernandez	416	65554	65680.33333333333
-holly hernandez	434	65755	65680.33333333333
-holly hernandez	411	65791	65680.33333333333
-holly hernandez	486	65747	65680.33333333333
-holly nixon	260	65605	65640.08333333333
-holly nixon	467	65548	65640.08333333333
-holly nixon	419	65773	65640.08333333333
-holly nixon	449	65778	65640.08333333333
-holly nixon	447	65680	65640.08333333333
-holly nixon	396	65549	65640.08333333333
-holly nixon	505	65565	65640.08333333333
-holly nixon	393	65764	65640.08333333333
-holly nixon	331	65539	65640.08333333333
-holly nixon	288	65658	65640.08333333333
-holly nixon	272	65571	65640.08333333333
-holly nixon	293	65651	65640.08333333333
-holly quirinius	404	65638	65633.3125
-holly quirinius	486	65619	65633.3125
-holly quirinius	352	65778	65633.3125
-holly quirinius	379	65637	65633.3125
-holly quirinius	363	65558	65633.3125
-holly quirinius	299	65650	65633.3125
-holly quirinius	287	65674	65633.3125
-holly quirinius	482	65642	65633.3125
-holly quirinius	399	65597	65633.3125
-holly quirinius	454	65537	65633.3125
-holly quirinius	278	65569	65633.3125
-holly quirinius	476	65696	65633.3125
-holly quirinius	291	65635	65633.3125
-holly quirinius	270	65694	65633.3125
-holly quirinius	279	65546	65633.3125
-holly quirinius	274	65663	65633.3125
-irene carson	274	65755	65638.22222222222
-irene carson	509	65574	65638.22222222222
-irene carson	450	65604	65638.22222222222
-irene carson	421	65786	65638.22222222222
-irene carson	447	65566	65638.22222222222
-irene carson	327	65564	65638.22222222222
-irene carson	317	65570	65638.22222222222
-irene carson	283	65589	65638.22222222222
-irene carson	313	65635	65638.22222222222
-irene carson	376	65640	65638.22222222222
-irene carson	310	65651	65638.22222222222
-irene carson	481	65590	65638.22222222222
-irene carson	504	65618	65638.22222222222
-irene carson	403	65728	65638.22222222222
-irene carson	428	65590	65638.22222222222
-irene carson	434	65672	65638.22222222222
-irene carson	370	65766	65638.22222222222
-irene carson	415	65590	65638.22222222222
-irene ellison	381	65569	65683.875
-irene ellison	287	65725	65683.875
-irene ellison	424	65742	65683.875
-irene ellison	481	65659	65683.875
-irene ellison	458	65696	65683.875
-irene ellison	352	65745	65683.875
-irene ellison	442	65659	65683.875
-irene ellison	418	65744	65683.875
-irene ellison	349	65674	65683.875
-irene ellison	350	65697	65683.875
-irene ellison	510	65651	65683.875
-irene ellison	321	65791	65683.875
-irene ellison	458	65542	65683.875
-irene ellison	279	65732	65683.875
-irene ellison	312	65654	65683.875
-irene ellison	404	65662	65683.875
-irene falkner	382	65601	65673.9375
-irene falkner	508	65593	65673.9375
-irene falkner	438	65737	65673.9375
-irene falkner	471	65567	65673.9375
-irene falkner	352	65584	65673.9375
-irene falkner	486	65672	65673.9375
-irene falkner	399	65682	65673.9375
-irene falkner	284	65665	65673.9375
-irene falkner	469	65661	65673.9375
-irene falkner	326	65750	65673.9375
-irene falkner	453	65759	65673.9375
-irene falkner	405	65785	65673.9375
-irene falkner	305	65771	65673.9375
-irene falkner	472	65620	65673.9375
-irene falkner	440	65686	65673.9375
-irene falkner	441	65650	65673.9375
-irene garcia	423	65597	65672.6
-irene garcia	427	65787	65672.6
-irene garcia	344	65712	65672.6
-irene garcia	425	65660	65672.6
-irene garcia	456	65640	65672.6
-irene garcia	392	65711	65672.6
-irene garcia	464	65683	65672.6
-irene garcia	290	65744	65672.6
-irene garcia	332	65756	65672.6
-irene garcia	486	65684	65672.6
-irene garcia	267	65700	65672.6
-irene garcia	324	65625	65672.6
-irene garcia	292	65540	65672.6
-irene garcia	440	65701	65672.6
-irene garcia	272	65549	65672.6
-irene miller	451	65776	65686.1875
-irene miller	331	65689	65686.1875
-irene miller	353	65577	65686.1875
-irene miller	415	65734	65686.1875
-irene miller	503	65789	65686.1875
-irene miller	507	65769	65686.1875
-irene miller	362	65712	65686.1875
-irene miller	376	65593	65686.1875
-irene miller	387	65556	65686.1875
-irene miller	437	65675	65686.1875
-irene miller	464	65756	65686.1875
-irene miller	385	65730	65686.1875
-irene miller	346	65751	65686.1875
-irene miller	385	65685	65686.1875
-irene miller	427	65599	65686.1875
-irene miller	500	65588	65686.1875
-irene nixon	338	65614	65692.35294117648
-irene nixon	321	65764	65692.35294117648
-irene nixon	488	65779	65692.35294117648
-irene nixon	341	65684	65692.35294117648
-irene nixon	324	65677	65692.35294117648
-irene nixon	399	65583	65692.35294117648
-irene nixon	339	65710	65692.35294117648
-irene nixon	438	65741	65692.35294117648
-irene nixon	454	65771	65692.35294117648
-irene nixon	269	65568	65692.35294117648
-irene nixon	298	65653	65692.35294117648
-irene nixon	482	65785	65692.35294117648
-irene nixon	281	65643	65692.35294117648
-irene nixon	476	65631	65692.35294117648
-irene nixon	443	65787	65692.35294117648
-irene nixon	509	65648	65692.35294117648
-irene nixon	345	65732	65692.35294117648
-irene thompson	277	65723	65670.75
-irene thompson	400	65705	65670.75
-irene thompson	507	65722	65670.75
-irene thompson	430	65598	65670.75
-irene thompson	303	65603	65670.75
-irene thompson	385	65604	65670.75
-irene thompson	404	65598	65670.75
-irene thompson	271	65754	65670.75
-irene thompson	418	65706	65670.75
-irene thompson	442	65585	65670.75
-irene thompson	341	65691	65670.75
-irene thompson	352	65720	65670.75
-irene thompson	413	65706	65670.75
-irene thompson	264	65688	65670.75
-irene thompson	325	65614	65670.75
-irene thompson	393	65715	65670.75
-irene young	288	65785	65678.0
-irene young	507	65625	65678.0
-irene young	484	65552	65678.0
-irene young	369	65642	65678.0
-irene young	458	65679	65678.0
-irene young	337	65729	65678.0
-irene young	459	65785	65678.0
-irene young	304	65568	65678.0
-irene young	511	65578	65678.0
-irene young	406	65769	65678.0
-irene young	257	65654	65678.0
-irene young	510	65770	65678.0
-irene zipper	348	65752	65683.71428571429
-irene zipper	479	65689	65683.71428571429
-irene zipper	290	65684	65683.71428571429
-irene zipper	503	65583	65683.71428571429
-irene zipper	365	65658	65683.71428571429
-irene zipper	404	65706	65683.71428571429
-irene zipper	412	65714	65683.71428571429
-jessica allen	348	65622	65669.16666666667
-jessica allen	420	65751	65669.16666666667
-jessica allen	347	65587	65669.16666666667
-jessica allen	449	65576	65669.16666666667
-jessica allen	492	65769	65669.16666666667
-jessica allen	357	65645	65669.16666666667
-jessica allen	307	65704	65669.16666666667
-jessica allen	450	65678	65669.16666666667
-jessica allen	407	65647	65669.16666666667
-jessica allen	362	65726	65669.16666666667
-jessica allen	408	65705	65669.16666666667
-jessica allen	329	65620	65669.16666666667
-jessica brown	288	65789	65679.5625
-jessica brown	467	65672	65679.5625
-jessica brown	346	65641	65679.5625
-jessica brown	300	65762	65679.5625
-jessica brown	420	65726	65679.5625
-jessica brown	472	65707	65679.5625
-jessica brown	388	65635	65679.5625
-jessica brown	388	65642	65679.5625
-jessica brown	370	65691	65679.5625
-jessica brown	341	65588	65679.5625
-jessica brown	345	65646	65679.5625
-jessica brown	455	65625	65679.5625
-jessica brown	444	65760	65679.5625
-jessica brown	510	65695	65679.5625
-jessica brown	496	65595	65679.5625
-jessica brown	410	65699	65679.5625
-jessica falkner	349	65683	65670.5
-jessica falkner	447	65687	65670.5
-jessica falkner	412	65706	65670.5
-jessica falkner	290	65560	65670.5
-jessica falkner	342	65730	65670.5
-jessica falkner	336	65638	65670.5
-jessica falkner	352	65655	65670.5
-jessica falkner	432	65701	65670.5
-jessica falkner	258	65761	65670.5
-jessica falkner	347	65584	65670.5
-jessica laertes	403	65677	65709.7
-jessica laertes	433	65786	65709.7
-jessica laertes	454	65738	65709.7
-jessica laertes	258	65617	65709.7
-jessica laertes	457	65760	65709.7
-jessica laertes	400	65790	65709.7
-jessica laertes	368	65691	65709.7
-jessica laertes	481	65694	65709.7
-jessica laertes	447	65713	65709.7
-jessica laertes	257	65631	65709.7
-jessica nixon	307	65624	65675.5
-jessica nixon	440	65677	65675.5
-jessica nixon	303	65733	65675.5
-jessica nixon	345	65769	65675.5
-jessica nixon	315	65678	65675.5
-jessica nixon	411	65589	65675.5
-jessica nixon	510	65694	65675.5
-jessica nixon	449	65769	65675.5
-jessica nixon	385	65595	65675.5
-jessica nixon	423	65677	65675.5
-jessica nixon	390	65692	65675.5
-jessica nixon	350	65746	65675.5
-jessica nixon	416	65658	65675.5
-jessica nixon	280	65774	65675.5
-jessica nixon	442	65660	65675.5
-jessica nixon	341	65573	65675.5
-jessica nixon	294	65590	65675.5
-jessica nixon	434	65661	65675.5
-jessica van buren	361	65572	65608.44444444444
-jessica van buren	460	65549	65608.44444444444
-jessica van buren	366	65548	65608.44444444444
-jessica van buren	350	65665	65608.44444444444
-jessica van buren	284	65680	65608.44444444444
-jessica van buren	478	65615	65608.44444444444
-jessica van buren	408	65657	65608.44444444444
-jessica van buren	263	65622	65608.44444444444
-jessica van buren	346	65568	65608.44444444444
-jessica white	329	65611	65661.79166666667
-jessica white	362	65709	65661.79166666667
-jessica white	344	65786	65661.79166666667
-jessica white	352	65750	65661.79166666667
-jessica white	284	65566	65661.79166666667
-jessica white	460	65570	65661.79166666667
-jessica white	488	65726	65661.79166666667
-jessica white	294	65779	65661.79166666667
-jessica white	423	65673	65661.79166666667
-jessica white	299	65639	65661.79166666667
-jessica white	311	65721	65661.79166666667
-jessica white	434	65681	65661.79166666667
-jessica white	409	65674	65661.79166666667
-jessica white	268	65578	65661.79166666667
-jessica white	485	65546	65661.79166666667
-jessica white	346	65610	65661.79166666667
-jessica white	314	65707	65661.79166666667
-jessica white	305	65739	65661.79166666667
-jessica white	301	65677	65661.79166666667
-jessica white	417	65727	65661.79166666667
-jessica white	452	65544	65661.79166666667
-jessica white	357	65563	65661.79166666667
-jessica white	354	65713	65661.79166666667
-jessica white	450	65594	65661.79166666667
-jessica young	491	65711	65704.76923076923
-jessica young	346	65748	65704.76923076923
-jessica young	461	65671	65704.76923076923
-jessica young	474	65788	65704.76923076923
-jessica young	415	65767	65704.76923076923
-jessica young	300	65729	65704.76923076923
-jessica young	419	65703	65704.76923076923
-jessica young	304	65748	65704.76923076923
-jessica young	266	65660	65704.76923076923
-jessica young	417	65692	65704.76923076923
-jessica young	499	65623	65704.76923076923
-jessica young	417	65683	65704.76923076923
-jessica young	307	65639	65704.76923076923
-katie allen	462	65750	65674.8
-katie allen	404	65772	65674.8
-katie allen	281	65649	65674.8
-katie allen	408	65658	65674.8
-katie allen	511	65713	65674.8
-katie allen	409	65766	65674.8
-katie allen	407	65607	65674.8
-katie allen	295	65553	65674.8
-katie allen	258	65565	65674.8
-katie allen	454	65542	65674.8
-katie allen	378	65784	65674.8
-katie allen	334	65730	65674.8
-katie allen	445	65756	65674.8
-katie allen	420	65594	65674.8
-katie allen	441	65683	65674.8
-katie carson	311	65710	65662.81818181818
-katie carson	307	65592	65662.81818181818
-katie carson	306	65589	65662.81818181818
-katie carson	259	65648	65662.81818181818
-katie carson	314	65690	65662.81818181818
-katie carson	369	65709	65662.81818181818
-katie carson	506	65626	65662.81818181818
-katie carson	286	65743	65662.81818181818
-katie carson	279	65663	65662.81818181818
-katie carson	263	65622	65662.81818181818
-katie carson	393	65699	65662.81818181818
-katie laertes	388	65728	65644.8125
-katie laertes	419	65541	65644.8125
-katie laertes	260	65707	65644.8125
-katie laertes	451	65745	65644.8125
-katie laertes	392	65643	65644.8125
-katie laertes	475	65663	65644.8125
-katie laertes	465	65662	65644.8125
-katie laertes	483	65648	65644.8125
-katie laertes	414	65559	65644.8125
-katie laertes	406	65545	65644.8125
-katie laertes	287	65773	65644.8125
-katie laertes	496	65553	65644.8125
-katie laertes	352	65687	65644.8125
-katie laertes	462	65606	65644.8125
-katie laertes	379	65705	65644.8125
-katie laertes	344	65552	65644.8125
-katie ovid	383	65737	65688.5
-katie ovid	353	65744	65688.5
-katie ovid	464	65703	65688.5
-katie ovid	464	65694	65688.5
-katie ovid	501	65643	65688.5
-katie ovid	308	65628	65688.5
-katie ovid	320	65598	65688.5
-katie ovid	295	65708	65688.5
-katie ovid	495	65764	65688.5
-katie ovid	382	65788	65688.5
-katie ovid	338	65681	65688.5
-katie ovid	434	65710	65688.5
-katie ovid	360	65706	65688.5
-katie ovid	502	65659	65688.5
-katie ovid	448	65609	65688.5
-katie ovid	334	65644	65688.5
-katie white	470	65763	65682.5294117647
-katie white	405	65719	65682.5294117647
-katie white	458	65722	65682.5294117647
-katie white	275	65743	65682.5294117647
-katie white	422	65656	65682.5294117647
-katie white	336	65627	65682.5294117647
-katie white	279	65635	65682.5294117647
-katie white	481	65610	65682.5294117647
-katie white	477	65640	65682.5294117647
-katie white	413	65724	65682.5294117647
-katie white	355	65705	65682.5294117647
-katie white	378	65747	65682.5294117647
-katie white	391	65620	65682.5294117647
-katie white	502	65705	65682.5294117647
-katie white	347	65731	65682.5294117647
-katie white	496	65684	65682.5294117647
-katie white	434	65572	65682.5294117647
-katie zipper	314	65556	65647.64705882352
-katie zipper	353	65621	65647.64705882352
-katie zipper	390	65631	65647.64705882352
-katie zipper	259	65674	65647.64705882352
-katie zipper	280	65772	65647.64705882352
-katie zipper	398	65577	65647.64705882352
-katie zipper	468	65611	65647.64705882352
-katie zipper	388	65661	65647.64705882352
-katie zipper	341	65733	65647.64705882352
-katie zipper	405	65555	65647.64705882352
-katie zipper	318	65691	65647.64705882352
-katie zipper	360	65736	65647.64705882352
-katie zipper	379	65684	65647.64705882352
-katie zipper	338	65731	65647.64705882352
-katie zipper	430	65605	65647.64705882352
-katie zipper	309	65568	65647.64705882352
-katie zipper	421	65604	65647.64705882352
-luke falkner	270	65623	65666.22222222222
-luke falkner	373	65589	65666.22222222222
-luke falkner	335	65653	65666.22222222222
-luke falkner	338	65577	65666.22222222222
-luke falkner	311	65652	65666.22222222222
-luke falkner	308	65595	65666.22222222222
-luke falkner	430	65760	65666.22222222222
-luke falkner	268	65655	65666.22222222222
-luke falkner	491	65618	65666.22222222222
-luke falkner	293	65566	65666.22222222222
-luke falkner	482	65747	65666.22222222222
-luke falkner	340	65781	65666.22222222222
-luke falkner	441	65789	65666.22222222222
-luke falkner	257	65694	65666.22222222222
-luke falkner	344	65609	65666.22222222222
-luke falkner	401	65615	65666.22222222222
-luke falkner	472	65693	65666.22222222222
-luke falkner	322	65776	65666.22222222222
-luke polk	484	65552	65683.17647058824
-luke polk	380	65564	65683.17647058824
-luke polk	420	65750	65683.17647058824
-luke polk	433	65669	65683.17647058824
-luke polk	348	65645	65683.17647058824
-luke polk	417	65742	65683.17647058824
-luke polk	397	65725	65683.17647058824
-luke polk	440	65742	65683.17647058824
-luke polk	477	65789	65683.17647058824
-luke polk	331	65579	65683.17647058824
-luke polk	274	65658	65683.17647058824
-luke polk	298	65784	65683.17647058824
-luke polk	480	65776	65683.17647058824
-luke polk	353	65635	65683.17647058824
-luke polk	490	65623	65683.17647058824
-luke polk	457	65705	65683.17647058824
-luke polk	447	65676	65683.17647058824
-luke robinson	403	65763	65674.27272727272
-luke robinson	462	65560	65674.27272727272
-luke robinson	500	65690	65674.27272727272
-luke robinson	475	65737	65674.27272727272
-luke robinson	261	65718	65674.27272727272
-luke robinson	392	65634	65674.27272727272
-luke robinson	391	65656	65674.27272727272
-luke robinson	425	65772	65674.27272727272
-luke robinson	308	65552	65674.27272727272
-luke robinson	341	65627	65674.27272727272
-luke robinson	309	65576	65674.27272727272
-luke robinson	428	65587	65674.27272727272
-luke robinson	326	65704	65674.27272727272
-luke robinson	374	65783	65674.27272727272
-luke robinson	408	65628	65674.27272727272
-luke robinson	461	65748	65674.27272727272
-luke robinson	389	65584	65674.27272727272
-luke robinson	341	65709	65674.27272727272
-luke robinson	364	65789	65674.27272727272
-luke robinson	333	65687	65674.27272727272
-luke robinson	443	65571	65674.27272727272
-luke robinson	502	65759	65674.27272727272
-luke van buren	377	65759	65693.1875
-luke van buren	282	65636	65693.1875
-luke van buren	388	65769	65693.1875
-luke van buren	450	65576	65693.1875
-luke van buren	402	65699	65693.1875
-luke van buren	436	65678	65693.1875
-luke van buren	270	65677	65693.1875
-luke van buren	304	65741	65693.1875
-luke van buren	444	65725	65693.1875
-luke van buren	476	65624	65693.1875
-luke van buren	409	65773	65693.1875
-luke van buren	363	65673	65693.1875
-luke van buren	274	65669	65693.1875
-luke van buren	301	65716	65693.1875
-luke van buren	407	65683	65693.1875
-luke van buren	398	65693	65693.1875
-luke white	397	65725	65695.0
-luke white	279	65715	65695.0
-luke white	323	65701	65695.0
-luke white	437	65538	65695.0
-luke white	360	65721	65695.0
-luke white	352	65684	65695.0
-luke white	304	65702	65695.0
-luke white	391	65715	65695.0
-luke white	509	65719	65695.0
-luke white	347	65732	65695.0
-luke white	346	65693	65695.0
-mike davidson	267	65752	65671.75
-mike davidson	410	65662	65671.75
-mike davidson	346	65621	65671.75
-mike davidson	307	65548	65671.75
-mike davidson	347	65768	65671.75
-mike davidson	491	65618	65671.75
-mike davidson	321	65658	65671.75
-mike davidson	344	65759	65671.75
-mike davidson	511	65588	65671.75
-mike davidson	362	65548	65671.75
-mike davidson	398	65752	65671.75
-mike davidson	436	65787	65671.75
-mike falkner	276	65562	65642.27272727272
-mike falkner	339	65715	65642.27272727272
-mike falkner	510	65646	65642.27272727272
-mike falkner	318	65734	65642.27272727272
-mike falkner	305	65662	65642.27272727272
-mike falkner	503	65554	65642.27272727272
-mike falkner	383	65600	65642.27272727272
-mike falkner	453	65624	65642.27272727272
-mike falkner	405	65609	65642.27272727272
-mike falkner	297	65675	65642.27272727272
-mike falkner	287	65684	65642.27272727272
-mike garcia	300	65635	65651.25
-mike garcia	477	65571	65651.25
-mike garcia	314	65770	65651.25
-mike garcia	387	65669	65651.25
-mike garcia	364	65550	65651.25
-mike garcia	354	65753	65651.25
-mike garcia	468	65640	65651.25
-mike garcia	332	65557	65651.25
-mike garcia	390	65641	65651.25
-mike garcia	343	65719	65651.25
-mike garcia	398	65701	65651.25
-mike garcia	345	65686	65651.25
-mike garcia	358	65683	65651.25
-mike garcia	415	65544	65651.25
-mike garcia	364	65650	65651.25
-mike garcia	495	65783	65651.25
-mike garcia	261	65600	65651.25
-mike garcia	415	65644	65651.25
-mike garcia	313	65537	65651.25
-mike garcia	469	65692	65651.25
-mike ichabod	286	65621	65649.26666666666
-mike ichabod	288	65602	65649.26666666666
-mike ichabod	416	65631	65649.26666666666
-mike ichabod	473	65583	65649.26666666666
-mike ichabod	392	65588	65649.26666666666
-mike ichabod	371	65671	65649.26666666666
-mike ichabod	434	65696	65649.26666666666
-mike ichabod	301	65788	65649.26666666666
-mike ichabod	334	65733	65649.26666666666
-mike ichabod	282	65630	65649.26666666666
-mike ichabod	310	65588	65649.26666666666
-mike ichabod	287	65571	65649.26666666666
-mike ichabod	465	65651	65649.26666666666
-mike ichabod	397	65783	65649.26666666666
-mike ichabod	478	65603	65649.26666666666
-mike steinbeck	329	65668	65640.69565217392
-mike steinbeck	492	65558	65640.69565217392
-mike steinbeck	284	65758	65640.69565217392
-mike steinbeck	405	65635	65640.69565217392
-mike steinbeck	439	65704	65640.69565217392
-mike steinbeck	468	65758	65640.69565217392
-mike steinbeck	320	65552	65640.69565217392
-mike steinbeck	492	65620	65640.69565217392
-mike steinbeck	266	65747	65640.69565217392
-mike steinbeck	508	65619	65640.69565217392
-mike steinbeck	285	65553	65640.69565217392
-mike steinbeck	392	65539	65640.69565217392
-mike steinbeck	465	65603	65640.69565217392
-mike steinbeck	315	65749	65640.69565217392
-mike steinbeck	504	65564	65640.69565217392
-mike steinbeck	482	65550	65640.69565217392
-mike steinbeck	269	65751	65640.69565217392
-mike steinbeck	461	65582	65640.69565217392
-mike steinbeck	473	65560	65640.69565217392
-mike steinbeck	448	65638	65640.69565217392
-mike steinbeck	429	65769	65640.69565217392
-mike steinbeck	349	65573	65640.69565217392
-mike steinbeck	364	65686	65640.69565217392
-mike zipper	502	65695	65677.0
-mike zipper	285	65740	65677.0
-mike zipper	505	65615	65677.0
-mike zipper	401	65779	65677.0
-mike zipper	400	65542	65677.0
-mike zipper	441	65655	65677.0
-mike zipper	279	65719	65677.0
-mike zipper	500	65648	65677.0
-mike zipper	288	65685	65677.0
-mike zipper	313	65726	65677.0
-mike zipper	455	65768	65677.0
-mike zipper	422	65552	65677.0
-mike zipper	377	65677	65677.0
-nick allen	481	65765	65704.3
-nick allen	287	65554	65704.3
-nick allen	314	65665	65704.3
-nick allen	277	65735	65704.3
-nick allen	364	65704	65704.3
-nick allen	273	65641	65704.3
-nick allen	419	65786	65704.3
-nick allen	385	65702	65704.3
-nick allen	409	65734	65704.3
-nick allen	326	65757	65704.3
-nick brown	490	65790	65646.05263157895
-nick brown	481	65780	65646.05263157895
-nick brown	480	65620	65646.05263157895
-nick brown	341	65587	65646.05263157895
-nick brown	268	65654	65646.05263157895
-nick brown	334	65665	65646.05263157895
-nick brown	443	65599	65646.05263157895
-nick brown	344	65634	65646.05263157895
-nick brown	351	65545	65646.05263157895
-nick brown	436	65597	65646.05263157895
-nick brown	303	65604	65646.05263157895
-nick brown	499	65724	65646.05263157895
-nick brown	315	65713	65646.05263157895
-nick brown	446	65647	65646.05263157895
-nick brown	376	65604	65646.05263157895
-nick brown	400	65717	65646.05263157895
-nick brown	354	65664	65646.05263157895
-nick brown	506	65579	65646.05263157895
-nick brown	291	65552	65646.05263157895
-nick davidson	435	65575	65665.88888888889
-nick davidson	437	65601	65665.88888888889
-nick davidson	297	65726	65665.88888888889
-nick davidson	347	65713	65665.88888888889
-nick davidson	476	65652	65665.88888888889
-nick davidson	257	65752	65665.88888888889
-nick davidson	274	65537	65665.88888888889
-nick davidson	374	65627	65665.88888888889
-nick davidson	502	65716	65665.88888888889
-nick davidson	483	65657	65665.88888888889
-nick davidson	429	65730	65665.88888888889
-nick davidson	338	65650	65665.88888888889
-nick davidson	298	65536	65665.88888888889
-nick davidson	414	65711	65665.88888888889
-nick davidson	376	65696	65665.88888888889
-nick davidson	360	65752	65665.88888888889
-nick davidson	318	65725	65665.88888888889
-nick davidson	355	65630	65665.88888888889
-nick falkner	413	65584	65643.41176470589
-nick falkner	451	65583	65643.41176470589
-nick falkner	489	65620	65643.41176470589
-nick falkner	423	65648	65643.41176470589
-nick falkner	258	65568	65643.41176470589
-nick falkner	306	65752	65643.41176470589
-nick falkner	350	65585	65643.41176470589
-nick falkner	283	65669	65643.41176470589
-nick falkner	510	65696	65643.41176470589
-nick falkner	482	65674	65643.41176470589
-nick falkner	384	65604	65643.41176470589
-nick falkner	362	65604	65643.41176470589
-nick falkner	272	65716	65643.41176470589
-nick falkner	293	65592	65643.41176470589
-nick falkner	273	65578	65643.41176470589
-nick falkner	424	65789	65643.41176470589
-nick falkner	330	65676	65643.41176470589
-nick johnson	495	65554	65637.5
-nick johnson	277	65585	65637.5
-nick johnson	328	65784	65637.5
-nick johnson	335	65547	65637.5
-nick johnson	381	65700	65637.5
-nick johnson	464	65689	65637.5
-nick johnson	302	65702	65637.5
-nick johnson	482	65558	65637.5
-nick johnson	363	65627	65637.5
-nick johnson	422	65629	65637.5
-nick miller	467	65698	65657.84615384616
-nick miller	473	65541	65657.84615384616
-nick miller	373	65652	65657.84615384616
-nick miller	280	65706	65657.84615384616
-nick miller	383	65694	65657.84615384616
-nick miller	353	65695	65657.84615384616
-nick miller	450	65710	65657.84615384616
-nick miller	415	65640	65657.84615384616
-nick miller	259	65757	65657.84615384616
-nick miller	419	65620	65657.84615384616
-nick miller	443	65576	65657.84615384616
-nick miller	277	65576	65657.84615384616
-nick miller	361	65687	65657.84615384616
-nick steinbeck	319	65652	65695.0625
-nick steinbeck	445	65775	65695.0625
-nick steinbeck	445	65764	65695.0625
-nick steinbeck	374	65714	65695.0625
-nick steinbeck	463	65675	65695.0625
-nick steinbeck	400	65617	65695.0625
-nick steinbeck	395	65569	65695.0625
-nick steinbeck	382	65718	65695.0625
-nick steinbeck	371	65622	65695.0625
-nick steinbeck	285	65689	65695.0625
-nick steinbeck	481	65782	65695.0625
-nick steinbeck	462	65673	65695.0625
-nick steinbeck	361	65733	65695.0625
-nick steinbeck	432	65747	65695.0625
-nick steinbeck	284	65615	65695.0625
-nick steinbeck	264	65776	65695.0625
-nick van buren	461	65569	65661.73684210527
-nick van buren	274	65638	65661.73684210527
-nick van buren	461	65541	65661.73684210527
-nick van buren	448	65615	65661.73684210527
-nick van buren	451	65714	65661.73684210527
-nick van buren	465	65745	65661.73684210527
-nick van buren	495	65779	65661.73684210527
-nick van buren	493	65602	65661.73684210527
-nick van buren	338	65775	65661.73684210527
-nick van buren	415	65618	65661.73684210527
-nick van buren	482	65702	65661.73684210527
-nick van buren	371	65603	65661.73684210527
-nick van buren	491	65751	65661.73684210527
-nick van buren	493	65570	65661.73684210527
-nick van buren	294	65745	65661.73684210527
-nick van buren	273	65604	65661.73684210527
-nick van buren	362	65660	65661.73684210527
-nick van buren	353	65634	65661.73684210527
-nick van buren	295	65708	65661.73684210527
-nick white	384	65547	65633.78571428571
-nick white	363	65564	65633.78571428571
-nick white	509	65669	65633.78571428571
-nick white	343	65644	65633.78571428571
-nick white	383	65603	65633.78571428571
-nick white	490	65658	65633.78571428571
-nick white	385	65653	65633.78571428571
-nick white	359	65568	65633.78571428571
-nick white	375	65757	65633.78571428571
-nick white	473	65593	65633.78571428571
-nick white	329	65755	65633.78571428571
-nick white	482	65557	65633.78571428571
-nick white	384	65586	65633.78571428571
-nick white	311	65719	65633.78571428571
-oscar allen	480	65662	65667.88235294117
-oscar allen	425	65578	65667.88235294117
-oscar allen	281	65685	65667.88235294117
-oscar allen	382	65644	65667.88235294117
-oscar allen	488	65629	65667.88235294117
-oscar allen	510	65677	65667.88235294117
-oscar allen	414	65788	65667.88235294117
-oscar allen	418	65743	65667.88235294117
-oscar allen	287	65776	65667.88235294117
-oscar allen	372	65536	65667.88235294117
-oscar allen	499	65643	65667.88235294117
-oscar allen	265	65655	65667.88235294117
-oscar allen	475	65564	65667.88235294117
-oscar allen	353	65742	65667.88235294117
-oscar allen	342	65609	65667.88235294117
-oscar allen	350	65635	65667.88235294117
-oscar allen	471	65788	65667.88235294117
-oscar davidson	274	65743	65670.22222222222
-oscar davidson	496	65698	65670.22222222222
-oscar davidson	427	65581	65670.22222222222
-oscar davidson	360	65539	65670.22222222222
-oscar davidson	301	65662	65670.22222222222
-oscar davidson	355	65556	65670.22222222222
-oscar davidson	432	65646	65670.22222222222
-oscar davidson	448	65734	65670.22222222222
-oscar davidson	292	65665	65670.22222222222
-oscar davidson	437	65773	65670.22222222222
-oscar davidson	314	65745	65670.22222222222
-oscar davidson	380	65709	65670.22222222222
-oscar davidson	281	65677	65670.22222222222
-oscar davidson	277	65628	65670.22222222222
-oscar davidson	290	65736	65670.22222222222
-oscar davidson	478	65695	65670.22222222222
-oscar davidson	493	65651	65670.22222222222
-oscar davidson	471	65626	65670.22222222222
-oscar ellison	413	65725	65673.15789473684
-oscar ellison	491	65717	65673.15789473684
-oscar ellison	290	65630	65673.15789473684
-oscar ellison	335	65750	65673.15789473684
-oscar ellison	481	65616	65673.15789473684
-oscar ellison	367	65657	65673.15789473684
-oscar ellison	427	65653	65673.15789473684
-oscar ellison	472	65747	65673.15789473684
-oscar ellison	347	65689	65673.15789473684
-oscar ellison	351	65737	65673.15789473684
-oscar ellison	507	65762	65673.15789473684
-oscar ellison	300	65709	65673.15789473684
-oscar ellison	447	65650	65673.15789473684
-oscar ellison	391	65691	65673.15789473684
-oscar ellison	471	65552	65673.15789473684
-oscar ellison	290	65630	65673.15789473684
-oscar ellison	448	65651	65673.15789473684
-oscar ellison	471	65617	65673.15789473684
-oscar ellison	289	65607	65673.15789473684
-oscar king	283	65739	65667.4375
-oscar king	496	65742	65667.4375
-oscar king	436	65541	65667.4375
-oscar king	274	65755	65667.4375
-oscar king	298	65683	65667.4375
-oscar king	465	65768	65667.4375
-oscar king	384	65649	65667.4375
-oscar king	390	65638	65667.4375
-oscar king	440	65569	65667.4375
-oscar king	451	65686	65667.4375
-oscar king	318	65675	65667.4375
-oscar king	448	65550	65667.4375
-oscar king	474	65737	65667.4375
-oscar king	497	65573	65667.4375
-oscar king	507	65587	65667.4375
-oscar king	363	65787	65667.4375
-oscar laertes	355	65577	65667.58823529411
-oscar laertes	422	65690	65667.58823529411
-oscar laertes	396	65745	65667.58823529411
-oscar laertes	355	65547	65667.58823529411
-oscar laertes	484	65546	65667.58823529411
-oscar laertes	467	65761	65667.58823529411
-oscar laertes	257	65790	65667.58823529411
-oscar laertes	322	65633	65667.58823529411
-oscar laertes	432	65698	65667.58823529411
-oscar laertes	418	65756	65667.58823529411
-oscar laertes	463	65670	65667.58823529411
-oscar laertes	443	65673	65667.58823529411
-oscar laertes	431	65702	65667.58823529411
-oscar laertes	366	65643	65667.58823529411
-oscar laertes	426	65716	65667.58823529411
-oscar laertes	460	65625	65667.58823529411
-oscar laertes	299	65577	65667.58823529411
-oscar underhill	325	65774	65706.8
-oscar underhill	290	65770	65706.8
-oscar underhill	459	65644	65706.8
-oscar underhill	495	65652	65706.8
-oscar underhill	425	65626	65706.8
-oscar underhill	317	65711	65706.8
-oscar underhill	361	65574	65706.8
-oscar underhill	502	65776	65706.8
-oscar underhill	357	65787	65706.8
-oscar underhill	478	65693	65706.8
-oscar underhill	280	65703	65706.8
-oscar underhill	300	65778	65706.8
-oscar underhill	505	65703	65706.8
-oscar underhill	499	65677	65706.8
-oscar underhill	378	65734	65706.8
-oscar young	404	65623	65667.61538461539
-oscar young	505	65710	65667.61538461539
-oscar young	275	65592	65667.61538461539
-oscar young	324	65730	65667.61538461539
-oscar young	289	65601	65667.61538461539
-oscar young	370	65697	65667.61538461539
-oscar young	257	65557	65667.61538461539
-oscar young	286	65721	65667.61538461539
-oscar young	502	65717	65667.61538461539
-oscar young	471	65778	65667.61538461539
-oscar young	424	65608	65667.61538461539
-oscar young	459	65704	65667.61538461539
-oscar young	425	65641	65667.61538461539
-priscilla allen	441	65641	65670.36842105263
-priscilla allen	341	65724	65670.36842105263
-priscilla allen	394	65712	65670.36842105263
-priscilla allen	452	65710	65670.36842105263
-priscilla allen	511	65665	65670.36842105263
-priscilla allen	289	65585	65670.36842105263
-priscilla allen	433	65744	65670.36842105263
-priscilla allen	394	65717	65670.36842105263
-priscilla allen	503	65790	65670.36842105263
-priscilla allen	511	65764	65670.36842105263
-priscilla allen	439	65547	65670.36842105263
-priscilla allen	281	65698	65670.36842105263
-priscilla allen	301	65550	65670.36842105263
-priscilla allen	403	65565	65670.36842105263
-priscilla allen	399	65734	65670.36842105263
-priscilla allen	381	65619	65670.36842105263
-priscilla allen	368	65633	65670.36842105263
-priscilla allen	439	65667	65670.36842105263
-priscilla allen	395	65672	65670.36842105263
-priscilla davidson	351	65629	65699.91666666667
-priscilla davidson	408	65678	65699.91666666667
-priscilla davidson	305	65735	65699.91666666667
-priscilla davidson	510	65790	65699.91666666667
-priscilla davidson	276	65731	65699.91666666667
-priscilla davidson	470	65657	65699.91666666667
-priscilla davidson	403	65775	65699.91666666667
-priscilla davidson	385	65726	65699.91666666667
-priscilla davidson	421	65729	65699.91666666667
-priscilla davidson	405	65558	65699.91666666667
-priscilla davidson	399	65640	65699.91666666667
-priscilla davidson	491	65751	65699.91666666667
-priscilla falkner	411	65751	65688.86666666667
-priscilla falkner	418	65674	65688.86666666667
-priscilla falkner	277	65709	65688.86666666667
-priscilla falkner	488	65604	65688.86666666667
-priscilla falkner	460	65740	65688.86666666667
-priscilla falkner	450	65712	65688.86666666667
-priscilla falkner	325	65594	65688.86666666667
-priscilla falkner	487	65655	65688.86666666667
-priscilla falkner	458	65761	65688.86666666667
-priscilla falkner	263	65658	65688.86666666667
-priscilla falkner	409	65541	65688.86666666667
-priscilla falkner	447	65762	65688.86666666667
-priscilla falkner	289	65670	65688.86666666667
-priscilla falkner	263	65775	65688.86666666667
-priscilla falkner	297	65727	65688.86666666667
-priscilla king	379	65697	65643.77777777778
-priscilla king	314	65562	65643.77777777778
-priscilla king	396	65629	65643.77777777778
-priscilla king	386	65595	65643.77777777778
-priscilla king	434	65543	65643.77777777778
-priscilla king	470	65568	65643.77777777778
-priscilla king	477	65763	65643.77777777778
-priscilla king	304	65665	65643.77777777778
-priscilla king	437	65789	65643.77777777778
-priscilla king	337	65735	65643.77777777778
-priscilla king	499	65566	65643.77777777778
-priscilla king	314	65709	65643.77777777778
-priscilla king	418	65646	65643.77777777778
-priscilla king	272	65566	65643.77777777778
-priscilla king	484	65645	65643.77777777778
-priscilla king	411	65709	65643.77777777778
-priscilla king	410	65657	65643.77777777778
-priscilla king	285	65544	65643.77777777778
-priscilla nixon	384	65633	65656.57894736843
-priscilla nixon	313	65711	65656.57894736843
-priscilla nixon	335	65591	65656.57894736843
-priscilla nixon	405	65620	65656.57894736843
-priscilla nixon	261	65584	65656.57894736843
-priscilla nixon	467	65598	65656.57894736843
-priscilla nixon	481	65604	65656.57894736843
-priscilla nixon	341	65774	65656.57894736843
-priscilla nixon	499	65677	65656.57894736843
-priscilla nixon	424	65661	65656.57894736843
-priscilla nixon	334	65571	65656.57894736843
-priscilla nixon	284	65775	65656.57894736843
-priscilla nixon	266	65564	65656.57894736843
-priscilla nixon	370	65640	65656.57894736843
-priscilla nixon	318	65788	65656.57894736843
-priscilla nixon	430	65742	65656.57894736843
-priscilla nixon	348	65744	65656.57894736843
-priscilla nixon	264	65600	65656.57894736843
-priscilla nixon	399	65598	65656.57894736843
-priscilla quirinius	395	65625	65659.09090909091
-priscilla quirinius	336	65672	65659.09090909091
-priscilla quirinius	423	65646	65659.09090909091
-priscilla quirinius	326	65624	65659.09090909091
-priscilla quirinius	329	65669	65659.09090909091
-priscilla quirinius	276	65651	65659.09090909091
-priscilla quirinius	397	65658	65659.09090909091
-priscilla quirinius	281	65657	65659.09090909091
-priscilla quirinius	504	65728	65659.09090909091
-priscilla quirinius	504	65760	65659.09090909091
-priscilla quirinius	402	65560	65659.09090909091
-priscilla underhill	440	65742	65662.94444444444
-priscilla underhill	474	65657	65662.94444444444
-priscilla underhill	478	65552	65662.94444444444
-priscilla underhill	323	65655	65662.94444444444
-priscilla underhill	345	65601	65662.94444444444
-priscilla underhill	428	65715	65662.94444444444
-priscilla underhill	488	65640	65662.94444444444
-priscilla underhill	329	65764	65662.94444444444
-priscilla underhill	409	65661	65662.94444444444
-priscilla underhill	487	65641	65662.94444444444
-priscilla underhill	474	65729	65662.94444444444
-priscilla underhill	500	65679	65662.94444444444
-priscilla underhill	389	65745	65662.94444444444
-priscilla underhill	294	65547	65662.94444444444
-priscilla underhill	467	65630	65662.94444444444
-priscilla underhill	258	65669	65662.94444444444
-priscilla underhill	456	65737	65662.94444444444
-priscilla underhill	384	65569	65662.94444444444
-quinn carson	388	65671	65650.33333333333
-quinn carson	496	65624	65650.33333333333
-quinn carson	327	65710	65650.33333333333
-quinn carson	481	65671	65650.33333333333
-quinn carson	375	65577	65650.33333333333
-quinn carson	457	65624	65650.33333333333
-quinn carson	336	65727	65650.33333333333
-quinn carson	314	65723	65650.33333333333
-quinn carson	372	65702	65650.33333333333
-quinn carson	322	65719	65650.33333333333
-quinn carson	382	65573	65650.33333333333
-quinn carson	436	65644	65650.33333333333
-quinn carson	457	65679	65650.33333333333
-quinn carson	361	65539	65650.33333333333
-quinn carson	426	65572	65650.33333333333
-quinn garcia	511	65583	65641.35294117648
-quinn garcia	503	65745	65641.35294117648
-quinn garcia	458	65538	65641.35294117648
-quinn garcia	279	65604	65641.35294117648
-quinn garcia	457	65699	65641.35294117648
-quinn garcia	487	65576	65641.35294117648
-quinn garcia	408	65630	65641.35294117648
-quinn garcia	485	65713	65641.35294117648
-quinn garcia	406	65610	65641.35294117648
-quinn garcia	489	65754	65641.35294117648
-quinn garcia	374	65609	65641.35294117648
-quinn garcia	474	65773	65641.35294117648
-quinn garcia	489	65575	65641.35294117648
-quinn garcia	441	65593	65641.35294117648
-quinn garcia	448	65568	65641.35294117648
-quinn garcia	339	65739	65641.35294117648
-quinn garcia	296	65594	65641.35294117648
-quinn young	438	65605	65673.6
-quinn young	367	65712	65673.6
-quinn young	444	65705	65673.6
-quinn young	271	65647	65673.6
-quinn young	400	65691	65673.6
-quinn young	294	65699	65673.6
-quinn young	455	65543	65673.6
-quinn young	332	65771	65673.6
-quinn young	310	65665	65673.6
-quinn young	307	65698	65673.6
-rachel davidson	363	65617	65652.26315789473
-rachel davidson	335	65635	65652.26315789473
-rachel davidson	278	65608	65652.26315789473
-rachel davidson	337	65647	65652.26315789473
-rachel davidson	370	65556	65652.26315789473
-rachel davidson	306	65700	65652.26315789473
-rachel davidson	507	65728	65652.26315789473
-rachel davidson	316	65706	65652.26315789473
-rachel davidson	366	65544	65652.26315789473
-rachel davidson	295	65575	65652.26315789473
-rachel davidson	484	65684	65652.26315789473
-rachel davidson	386	65570	65652.26315789473
-rachel davidson	362	65635	65652.26315789473
-rachel davidson	487	65710	65652.26315789473
-rachel davidson	447	65755	65652.26315789473
-rachel davidson	421	65684	65652.26315789473
-rachel davidson	416	65732	65652.26315789473
-rachel davidson	411	65696	65652.26315789473
-rachel davidson	288	65611	65652.26315789473
-rachel falkner	263	65717	65680.28571428571
-rachel falkner	272	65668	65680.28571428571
-rachel falkner	398	65608	65680.28571428571
-rachel falkner	438	65730	65680.28571428571
-rachel falkner	448	65693	65680.28571428571
-rachel falkner	260	65612	65680.28571428571
-rachel falkner	379	65616	65680.28571428571
-rachel falkner	269	65577	65680.28571428571
-rachel falkner	269	65681	65680.28571428571
-rachel falkner	421	65764	65680.28571428571
-rachel falkner	388	65642	65680.28571428571
-rachel falkner	375	65717	65680.28571428571
-rachel falkner	289	65766	65680.28571428571
-rachel falkner	274	65733	65680.28571428571
-rachel laertes	322	65629	65643.875
-rachel laertes	448	65675	65643.875
-rachel laertes	332	65670	65643.875
-rachel laertes	285	65646	65643.875
-rachel laertes	464	65776	65643.875
-rachel laertes	397	65639	65643.875
-rachel laertes	440	65611	65643.875
-rachel laertes	482	65624	65643.875
-rachel laertes	474	65776	65643.875
-rachel laertes	302	65579	65643.875
-rachel laertes	503	65562	65643.875
-rachel laertes	449	65689	65643.875
-rachel laertes	364	65709	65643.875
-rachel laertes	267	65610	65643.875
-rachel laertes	289	65539	65643.875
-rachel laertes	511	65568	65643.875
-rachel miller	382	65581	65667.69230769231
-rachel miller	338	65732	65667.69230769231
-rachel miller	477	65683	65667.69230769231
-rachel miller	355	65561	65667.69230769231
-rachel miller	375	65769	65667.69230769231
-rachel miller	353	65714	65667.69230769231
-rachel miller	444	65623	65667.69230769231
-rachel miller	415	65637	65667.69230769231
-rachel miller	505	65782	65667.69230769231
-rachel miller	360	65586	65667.69230769231
-rachel miller	266	65671	65667.69230769231
-rachel miller	292	65744	65667.69230769231
-rachel miller	356	65597	65667.69230769231
-rachel thompson	474	65581	65664.33333333333
-rachel thompson	416	65761	65664.33333333333
-rachel thompson	309	65662	65664.33333333333
-rachel thompson	344	65733	65664.33333333333
-rachel thompson	335	65786	65664.33333333333
-rachel thompson	267	65676	65664.33333333333
-rachel thompson	279	65555	65664.33333333333
-rachel thompson	369	65749	65664.33333333333
-rachel thompson	412	65736	65664.33333333333
-rachel thompson	324	65659	65664.33333333333
-rachel thompson	461	65648	65664.33333333333
-rachel thompson	282	65542	65664.33333333333
-rachel thompson	344	65661	65664.33333333333
-rachel thompson	350	65549	65664.33333333333
-rachel thompson	367	65667	65664.33333333333
-rachel underhill	507	65766	65685.08333333333
-rachel underhill	494	65777	65685.08333333333
-rachel underhill	329	65601	65685.08333333333
-rachel underhill	488	65640	65685.08333333333
-rachel underhill	389	65594	65685.08333333333
-rachel underhill	286	65667	65685.08333333333
-rachel underhill	463	65682	65685.08333333333
-rachel underhill	402	65762	65685.08333333333
-rachel underhill	410	65609	65685.08333333333
-rachel underhill	349	65700	65685.08333333333
-rachel underhill	263	65638	65685.08333333333
-rachel underhill	282	65785	65685.08333333333
-rachel van buren	286	65658	65681.66666666667
-rachel van buren	302	65647	65681.66666666667
-rachel van buren	259	65733	65681.66666666667
-rachel van buren	387	65684	65681.66666666667
-rachel van buren	264	65728	65681.66666666667
-rachel van buren	337	65615	65681.66666666667
-rachel van buren	343	65641	65681.66666666667
-rachel van buren	401	65707	65681.66666666667
-rachel van buren	380	65722	65681.66666666667
-rachel zipper	453	65684	65676.0
-rachel zipper	368	65767	65676.0
-rachel zipper	307	65785	65676.0
-rachel zipper	419	65625	65676.0
-rachel zipper	408	65646	65676.0
-rachel zipper	416	65619	65676.0
-rachel zipper	444	65708	65676.0
-rachel zipper	320	65754	65676.0
-rachel zipper	361	65613	65676.0
-rachel zipper	281	65540	65676.0
-rachel zipper	422	65543	65676.0
-rachel zipper	412	65774	65676.0
-rachel zipper	436	65757	65676.0
-rachel zipper	471	65649	65676.0
-sarah ichabod	297	65537	65651.92307692308
-sarah ichabod	277	65671	65651.92307692308
-sarah ichabod	389	65554	65651.92307692308
-sarah ichabod	306	65655	65651.92307692308
-sarah ichabod	384	65667	65651.92307692308
-sarah ichabod	488	65775	65651.92307692308
-sarah ichabod	493	65757	65651.92307692308
-sarah ichabod	269	65788	65651.92307692308
-sarah ichabod	431	65538	65651.92307692308
-sarah ichabod	386	65648	65651.92307692308
-sarah ichabod	271	65572	65651.92307692308
-sarah ichabod	445	65656	65651.92307692308
-sarah ichabod	292	65657	65651.92307692308
-sarah king	362	65737	65690.71428571429
-sarah king	378	65669	65690.71428571429
-sarah king	302	65721	65690.71428571429
-sarah king	404	65784	65690.71428571429
-sarah king	374	65605	65690.71428571429
-sarah king	310	65695	65690.71428571429
-sarah king	318	65663	65690.71428571429
-sarah king	276	65695	65690.71428571429
-sarah king	303	65572	65690.71428571429
-sarah king	413	65650	65690.71428571429
-sarah king	298	65648	65690.71428571429
-sarah king	326	65743	65690.71428571429
-sarah king	399	65789	65690.71428571429
-sarah king	260	65699	65690.71428571429
-sarah nixon	392	65763	65683.44444444444
-sarah nixon	318	65723	65683.44444444444
-sarah nixon	432	65675	65683.44444444444
-sarah nixon	414	65695	65683.44444444444
-sarah nixon	378	65574	65683.44444444444
-sarah nixon	321	65663	65683.44444444444
-sarah nixon	497	65694	65683.44444444444
-sarah nixon	451	65695	65683.44444444444
-sarah nixon	319	65669	65683.44444444444
-sarah polk	402	65723	65644.78947368421
-sarah polk	418	65653	65644.78947368421
-sarah polk	332	65549	65644.78947368421
-sarah polk	282	65613	65644.78947368421
-sarah polk	493	65579	65644.78947368421
-sarah polk	308	65563	65644.78947368421
-sarah polk	265	65638	65644.78947368421
-sarah polk	499	65548	65644.78947368421
-sarah polk	325	65688	65644.78947368421
-sarah polk	258	65717	65644.78947368421
-sarah polk	366	65749	65644.78947368421
-sarah polk	463	65696	65644.78947368421
-sarah polk	415	65583	65644.78947368421
-sarah polk	394	65630	65644.78947368421
-sarah polk	260	65732	65644.78947368421
-sarah polk	505	65582	65644.78947368421
-sarah polk	275	65786	65644.78947368421
-sarah polk	346	65637	65644.78947368421
-sarah polk	336	65585	65644.78947368421
-sarah robinson	350	65668	65678.55
-sarah robinson	336	65670	65678.55
-sarah robinson	374	65622	65678.55
-sarah robinson	320	65644	65678.55
-sarah robinson	451	65763	65678.55
-sarah robinson	494	65727	65678.55
-sarah robinson	260	65718	65678.55
-sarah robinson	296	65677	65678.55
-sarah robinson	380	65569	65678.55
-sarah robinson	268	65791	65678.55
-sarah robinson	261	65678	65678.55
-sarah robinson	479	65591	65678.55
-sarah robinson	444	65679	65678.55
-sarah robinson	436	65790	65678.55
-sarah robinson	443	65725	65678.55
-sarah robinson	416	65726	65678.55
-sarah robinson	456	65604	65678.55
-sarah robinson	355	65650	65678.55
-sarah robinson	486	65619	65678.55
-sarah robinson	298	65660	65678.55
-sarah xylophone	291	65758	65644.88888888889
-sarah xylophone	379	65650	65644.88888888889
-sarah xylophone	354	65655	65644.88888888889
-sarah xylophone	474	65624	65644.88888888889
-sarah xylophone	334	65584	65644.88888888889
-sarah xylophone	272	65646	65644.88888888889
-sarah xylophone	307	65609	65644.88888888889
-sarah xylophone	507	65548	65644.88888888889
-sarah xylophone	507	65715	65644.88888888889
-sarah xylophone	378	65678	65644.88888888889
-sarah xylophone	446	65725	65644.88888888889
-sarah xylophone	498	65611	65644.88888888889
-sarah xylophone	487	65616	65644.88888888889
-sarah xylophone	324	65773	65644.88888888889
-sarah xylophone	275	65575	65644.88888888889
-sarah xylophone	343	65617	65644.88888888889
-sarah xylophone	419	65568	65644.88888888889
-sarah xylophone	376	65656	65644.88888888889
-sarah young	497	65595	65649.76470588235
-sarah young	398	65707	65649.76470588235
-sarah young	474	65758	65649.76470588235
-sarah young	488	65580	65649.76470588235
-sarah young	280	65660	65649.76470588235
-sarah young	473	65600	65649.76470588235
-sarah young	319	65605	65649.76470588235
-sarah young	376	65723	65649.76470588235
-sarah young	260	65766	65649.76470588235
-sarah young	309	65663	65649.76470588235
-sarah young	264	65698	65649.76470588235
-sarah young	308	65656	65649.76470588235
-sarah young	311	65602	65649.76470588235
-sarah young	434	65722	65649.76470588235
-sarah young	390	65592	65649.76470588235
-sarah young	401	65578	65649.76470588235
-sarah young	307	65541	65649.76470588235
-tom brown	338	65584	65646.06666666667
-tom brown	344	65723	65646.06666666667
-tom brown	442	65645	65646.06666666667
-tom brown	318	65545	65646.06666666667
-tom brown	491	65788	65646.06666666667
-tom brown	385	65695	65646.06666666667
-tom brown	434	65616	65646.06666666667
-tom brown	373	65562	65646.06666666667
-tom brown	383	65720	65646.06666666667
-tom brown	367	65675	65646.06666666667
-tom brown	278	65593	65646.06666666667
-tom brown	499	65622	65646.06666666667
-tom brown	280	65606	65646.06666666667
-tom brown	286	65629	65646.06666666667
-tom brown	419	65688	65646.06666666667
-tom king	318	65657	65662.42857142857
-tom king	320	65649	65662.42857142857
-tom king	324	65610	65662.42857142857
-tom king	278	65790	65662.42857142857
-tom king	496	65576	65662.42857142857
-tom king	442	65715	65662.42857142857
-tom king	262	65640	65662.42857142857
-tom miller	275	65760	65681.07142857143
-tom miller	341	65580	65681.07142857143
-tom miller	325	65585	65681.07142857143
-tom miller	431	65680	65681.07142857143
-tom miller	457	65737	65681.07142857143
-tom miller	400	65757	65681.07142857143
-tom miller	380	65627	65681.07142857143
-tom miller	455	65785	65681.07142857143
-tom miller	350	65704	65681.07142857143
-tom miller	328	65594	65681.07142857143
-tom miller	319	65735	65681.07142857143
-tom miller	335	65603	65681.07142857143
-tom miller	347	65687	65681.07142857143
-tom miller	475	65701	65681.07142857143
-tom ovid	360	65738	65666.88888888889
-tom ovid	445	65695	65666.88888888889
-tom ovid	484	65787	65666.88888888889
-tom ovid	423	65591	65666.88888888889
-tom ovid	265	65762	65666.88888888889
-tom ovid	472	65628	65666.88888888889
-tom ovid	509	65561	65666.88888888889
-tom ovid	306	65585	65666.88888888889
-tom ovid	368	65655	65666.88888888889
-tom underhill	324	65739	65691.5
-tom underhill	511	65739	65691.5
-tom underhill	377	65713	65691.5
-tom underhill	500	65653	65691.5
-tom underhill	458	65725	65691.5
-tom underhill	492	65585	65691.5
-tom underhill	326	65680	65691.5
-tom underhill	363	65776	65691.5
-tom underhill	454	65697	65691.5
-tom underhill	411	65734	65691.5
-tom underhill	498	65621	65691.5
-tom underhill	297	65583	65691.5
-tom underhill	308	65770	65691.5
-tom underhill	347	65666	65691.5
-ulysses allen	310	65728	65671.44444444444
-ulysses allen	342	65645	65671.44444444444
-ulysses allen	306	65654	65671.44444444444
-ulysses allen	443	65589	65671.44444444444
-ulysses allen	470	65673	65671.44444444444
-ulysses allen	400	65740	65671.44444444444
-ulysses allen	304	65778	65671.44444444444
-ulysses allen	317	65628	65671.44444444444
-ulysses allen	447	65608	65671.44444444444
-ulysses johnson	368	65710	65681.33333333333
-ulysses johnson	376	65758	65681.33333333333
-ulysses johnson	271	65710	65681.33333333333
-ulysses johnson	342	65542	65681.33333333333
-ulysses johnson	261	65648	65681.33333333333
-ulysses johnson	334	65776	65681.33333333333
-ulysses johnson	489	65708	65681.33333333333
-ulysses johnson	439	65649	65681.33333333333
-ulysses johnson	410	65759	65681.33333333333
-ulysses johnson	350	65660	65681.33333333333
-ulysses johnson	384	65695	65681.33333333333
-ulysses johnson	370	65561	65681.33333333333
-ulysses miller	495	65616	65655.66666666667
-ulysses miller	291	65770	65655.66666666667
-ulysses miller	402	65623	65655.66666666667
-ulysses miller	376	65787	65655.66666666667
-ulysses miller	427	65674	65655.66666666667
-ulysses miller	327	65600	65655.66666666667
-ulysses miller	448	65637	65655.66666666667
-ulysses miller	334	65610	65655.66666666667
-ulysses miller	421	65600	65655.66666666667
-ulysses miller	419	65707	65655.66666666667
-ulysses miller	362	65711	65655.66666666667
-ulysses miller	319	65664	65655.66666666667
-ulysses miller	461	65560	65655.66666666667
-ulysses miller	471	65600	65655.66666666667
-ulysses miller	470	65676	65655.66666666667
-ulysses nixon	335	65603	65655.58333333333
-ulysses nixon	404	65555	65655.58333333333
-ulysses nixon	307	65756	65655.58333333333
-ulysses nixon	429	65554	65655.58333333333
-ulysses nixon	266	65746	65655.58333333333
-ulysses nixon	288	65790	65655.58333333333
-ulysses nixon	329	65679	65655.58333333333
-ulysses nixon	388	65645	65655.58333333333
-ulysses nixon	297	65554	65655.58333333333
-ulysses nixon	402	65571	65655.58333333333
-ulysses nixon	509	65727	65655.58333333333
-ulysses nixon	462	65687	65655.58333333333
-ulysses zipper	492	65768	65696.625
-ulysses zipper	434	65684	65696.625
-ulysses zipper	328	65737	65696.625
-ulysses zipper	307	65626	65696.625
-ulysses zipper	431	65736	65696.625
-ulysses zipper	284	65730	65696.625
-ulysses zipper	309	65617	65696.625
-ulysses zipper	440	65695	65696.625
-ulysses zipper	279	65581	65696.625
-ulysses zipper	437	65743	65696.625
-ulysses zipper	278	65683	65696.625
-ulysses zipper	279	65759	65696.625
-ulysses zipper	469	65713	65696.625
-ulysses zipper	465	65739	65696.625
-ulysses zipper	270	65647	65696.625
-ulysses zipper	301	65688	65696.625
-victor brown	295	65622	65635.4
-victor brown	493	65555	65635.4
-victor brown	330	65673	65635.4
-victor brown	413	65708	65635.4
-victor brown	342	65550	65635.4
-victor brown	449	65676	65635.4
-victor brown	388	65622	65635.4
-victor brown	429	65739	65635.4
-victor brown	372	65718	65635.4
-victor brown	504	65703	65635.4
-victor brown	406	65654	65635.4
-victor brown	341	65608	65635.4
-victor brown	499	65554	65635.4
-victor brown	269	65567	65635.4
-victor brown	340	65582	65635.4
-victor ellison	500	65641	65650.27272727272
-victor ellison	367	65748	65650.27272727272
-victor ellison	275	65682	65650.27272727272
-victor ellison	370	65636	65650.27272727272
-victor ellison	465	65541	65650.27272727272
-victor ellison	389	65652	65650.27272727272
-victor ellison	330	65569	65650.27272727272
-victor ellison	322	65700	65650.27272727272
-victor ellison	431	65630	65650.27272727272
-victor ellison	326	65782	65650.27272727272
-victor ellison	387	65572	65650.27272727272
-victor johnson	395	65685	65645.57894736843
-victor johnson	487	65691	65645.57894736843
-victor johnson	325	65602	65645.57894736843
-victor johnson	456	65606	65645.57894736843
-victor johnson	450	65607	65645.57894736843
-victor johnson	356	65599	65645.57894736843
-victor johnson	256	65615	65645.57894736843
-victor johnson	315	65607	65645.57894736843
-victor johnson	294	65703	65645.57894736843
-victor johnson	453	65738	65645.57894736843
-victor johnson	389	65652	65645.57894736843
-victor johnson	467	65628	65645.57894736843
-victor johnson	330	65546	65645.57894736843
-victor johnson	296	65680	65645.57894736843
-victor johnson	425	65724	65645.57894736843
-victor johnson	418	65675	65645.57894736843
-victor johnson	420	65536	65645.57894736843
-victor johnson	447	65586	65645.57894736843
-victor johnson	265	65786	65645.57894736843
-victor steinbeck	386	65546	65663.85
-victor steinbeck	441	65773	65663.85
-victor steinbeck	296	65671	65663.85
-victor steinbeck	482	65782	65663.85
-victor steinbeck	391	65661	65663.85
-victor steinbeck	509	65686	65663.85
-victor steinbeck	344	65618	65663.85
-victor steinbeck	290	65600	65663.85
-victor steinbeck	500	65729	65663.85
-victor steinbeck	285	65629	65663.85
-victor steinbeck	321	65658	65663.85
-victor steinbeck	482	65662	65663.85
-victor steinbeck	285	65542	65663.85
-victor steinbeck	312	65628	65663.85
-victor steinbeck	358	65571	65663.85
-victor steinbeck	380	65714	65663.85
-victor steinbeck	294	65659	65663.85
-victor steinbeck	475	65790	65663.85
-victor steinbeck	462	65660	65663.85
-victor steinbeck	509	65698	65663.85
-victor thompson	311	65666	65653.0
-victor thompson	344	65756	65653.0
-victor thompson	320	65564	65653.0
-victor thompson	310	65548	65653.0
-victor thompson	285	65647	65653.0
-victor thompson	256	65651	65653.0
-victor thompson	323	65638	65653.0
-victor thompson	344	65650	65653.0
-victor thompson	281	65633	65653.0
-victor thompson	473	65636	65653.0
-victor thompson	294	65770	65653.0
-victor thompson	262	65630	65653.0
-victor thompson	499	65700	65653.0
-wendy brown	485	65738	65671.76470588235
-wendy brown	331	65650	65671.76470588235
-wendy brown	444	65640	65671.76470588235
-wendy brown	403	65779	65671.76470588235
-wendy brown	369	65775	65671.76470588235
-wendy brown	287	65642	65671.76470588235
-wendy brown	257	65719	65671.76470588235
-wendy brown	300	65654	65671.76470588235
-wendy brown	437	65728	65671.76470588235
-wendy brown	364	65586	65671.76470588235
-wendy brown	479	65749	65671.76470588235
-wendy brown	306	65657	65671.76470588235
-wendy brown	355	65697	65671.76470588235
-wendy brown	263	65571	65671.76470588235
-wendy brown	460	65595	65671.76470588235
-wendy brown	421	65580	65671.76470588235
-wendy brown	346	65660	65671.76470588235
-wendy falkner	302	65595	65635.63636363637
-wendy falkner	366	65790	65635.63636363637
-wendy falkner	289	65604	65635.63636363637
-wendy falkner	389	65608	65635.63636363637
-wendy falkner	500	65747	65635.63636363637
-wendy falkner	284	65572	65635.63636363637
-wendy falkner	443	65635	65635.63636363637
-wendy falkner	417	65625	65635.63636363637
-wendy falkner	422	65609	65635.63636363637
-wendy falkner	322	65635	65635.63636363637
-wendy falkner	310	65572	65635.63636363637
-wendy ichabod	369	65672	65658.0
-wendy ichabod	325	65730	65658.0
-wendy ichabod	466	65620	65658.0
-wendy ichabod	379	65717	65658.0
-wendy ichabod	387	65593	65658.0
-wendy ichabod	431	65640	65658.0
-wendy ichabod	332	65791	65658.0
-wendy ichabod	276	65643	65658.0
-wendy ichabod	384	65725	65658.0
-wendy ichabod	488	65562	65658.0
-wendy ichabod	428	65613	65658.0
-wendy ichabod	289	65557	65658.0
-wendy ichabod	294	65617	65658.0
-wendy ichabod	382	65574	65658.0
-wendy ichabod	307	65649	65658.0
-wendy ichabod	329	65696	65658.0
-wendy ichabod	421	65787	65658.0
-wendy king	394	65586	65678.15789473684
-wendy king	311	65670	65678.15789473684
-wendy king	390	65676	65678.15789473684
-wendy king	429	65664	65678.15789473684
-wendy king	480	65556	65678.15789473684
-wendy king	387	65738	65678.15789473684
-wendy king	299	65667	65678.15789473684
-wendy king	258	65776	65678.15789473684
-wendy king	393	65679	65678.15789473684
-wendy king	391	65751	65678.15789473684
-wendy king	398	65697	65678.15789473684
-wendy king	351	65730	65678.15789473684
-wendy king	273	65734	65678.15789473684
-wendy king	508	65618	65678.15789473684
-wendy king	308	65763	65678.15789473684
-wendy king	464	65602	65678.15789473684
-wendy king	377	65764	65678.15789473684
-wendy king	342	65595	65678.15789473684
-wendy king	473	65619	65678.15789473684
-wendy miller	406	65691	65652.92857142857
-wendy miller	377	65626	65652.92857142857
-wendy miller	316	65764	65652.92857142857
-wendy miller	363	65588	65652.92857142857
-wendy miller	391	65738	65652.92857142857
-wendy miller	345	65582	65652.92857142857
-wendy miller	324	65587	65652.92857142857
-wendy miller	297	65738	65652.92857142857
-wendy miller	443	65665	65652.92857142857
-wendy miller	347	65572	65652.92857142857
-wendy miller	391	65611	65652.92857142857
-wendy miller	489	65642	65652.92857142857
-wendy miller	383	65645	65652.92857142857
-wendy miller	451	65692	65652.92857142857
-wendy nixon	256	65563	65663.44444444444
-wendy nixon	338	65673	65663.44444444444
-wendy nixon	364	65575	65663.44444444444
-wendy nixon	270	65689	65663.44444444444
-wendy nixon	396	65728	65663.44444444444
-wendy nixon	291	65746	65663.44444444444
-wendy nixon	315	65571	65663.44444444444
-wendy nixon	388	65676	65663.44444444444
-wendy nixon	339	65743	65663.44444444444
-wendy nixon	460	65702	65663.44444444444
-wendy nixon	362	65753	65663.44444444444
-wendy nixon	319	65611	65663.44444444444
-wendy nixon	445	65566	65663.44444444444
-wendy nixon	420	65760	65663.44444444444
-wendy nixon	429	65724	65663.44444444444
-wendy nixon	285	65672	65663.44444444444
-wendy nixon	498	65574	65663.44444444444
-wendy nixon	305	65616	65663.44444444444
-wendy quirinius	496	65767	65710.2
-wendy quirinius	273	65738	65710.2
-wendy quirinius	354	65767	65710.2
-wendy quirinius	457	655

<TRUNCATED>

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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/intersect_distinct.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/intersect_distinct.q.out b/ql/src/test/results/clientpositive/llap/intersect_distinct.q.out
index 44362be..fb59f10 100644
--- a/ql/src/test/results/clientpositive/llap/intersect_distinct.q.out
+++ b/ql/src/test/results/clientpositive/llap/intersect_distinct.q.out
@@ -281,315 +281,315 @@ POSTHOOK: query: select * from src intersect distinct select * from src
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-0	val_0
-103	val_103
+104	val_104
 105	val_105
-116	val_116
+113	val_113
+118	val_118
+12	val_12
 120	val_120
-129	val_129
-131	val_131
+133	val_133
 136	val_136
 155	val_155
-157	val_157
+158	val_158
 160	val_160
+162	val_162
+168	val_168
+17	val_17
+170	val_170
+175	val_175
+18	val_18
 180	val_180
-183	val_183
-190	val_190
-191	val_191
-193	val_193
-205	val_205
-207	val_207
-213	val_213
-223	val_223
+186	val_186
+19	val_19
+197	val_197
+200	val_200
+216	val_216
+218	val_218
+222	val_222
+224	val_224
+228	val_228
 235	val_235
-238	val_238
+237	val_237
 239	val_239
-24	val_24
-248	val_248
-260	val_260
+244	val_244
+247	val_247
+256	val_256
+263	val_263
+273	val_273
 28	val_28
+283	val_283
 286	val_286
-298	val_298
-305	val_305
+292	val_292
 306	val_306
-307	val_307
 308	val_308
+327	val_327
+33	val_33
+348	val_348
+353	val_353
+362	val_362
+366	val_366
+396	val_396
+397	val_397
+401	val_401
+409	val_409
+411	val_411
+419	val_419
+427	val_427
+43	val_43
+432	val_432
+436	val_436
+439	val_439
+443	val_443
+453	val_453
+460	val_460
+462	val_462
+47	val_47
+472	val_472
+485	val_485
+496	val_496
+54	val_54
+64	val_64
+70	val_70
+8	val_8
+83	val_83
+84	val_84
+85	val_85
+90	val_90
+0	val_0
+103	val_103
+114	val_114
+125	val_125
+138	val_138
+146	val_146
+150	val_150
+152	val_152
+153	val_153
+156	val_156
+157	val_157
+165	val_165
+172	val_172
+177	val_177
+179	val_179
+187	val_187
+195	val_195
+196	val_196
+217	val_217
+242	val_242
+248	val_248
+252	val_252
+265	val_265
+27	val_27
+272	val_272
+280	val_280
+291	val_291
+305	val_305
+309	val_309
+311	val_311
 315	val_315
 317	val_317
-321	val_321
-33	val_33
-331	val_331
+322	val_322
+333	val_333
+34	val_34
+345	val_345
+35	val_35
 356	val_356
-360	val_360
-366	val_366
-367	val_367
+364	val_364
 368	val_368
+369	val_369
 37	val_37
-378	val_378
-379	val_379
-382	val_382
-389	val_389
-395	val_395
-400	val_400
+373	val_373
+377	val_377
+4	val_4
 402	val_402
-406	val_406
-407	val_407
+404	val_404
+413	val_413
 42	val_42
 430	val_430
-436	val_436
-44	val_44
+431	val_431
+444	val_444
+449	val_449
 452	val_452
+454	val_454
+457	val_457
+463	val_463
 466	val_466
-467	val_467
-472	val_472
-480	val_480
-484	val_484
-485	val_485
-487	val_487
-495	val_495
-496	val_496
-498	val_498
-51	val_51
+470	val_470
+475	val_475
+481	val_481
+489	val_489
+491	val_491
 57	val_57
-58	val_58
 65	val_65
 66	val_66
-69	val_69
-70	val_70
+74	val_74
+76	val_76
 78	val_78
-8	val_8
+9	val_9
 92	val_92
-96	val_96
-104	val_104
-111	val_111
-114	val_114
-118	val_118
-12	val_12
-133	val_133
-138	val_138
-153	val_153
-156	val_156
-162	val_162
-168	val_168
+95	val_95
+100	val_100
+119	val_119
+128	val_128
+129	val_129
+145	val_145
+167	val_167
 174	val_174
-176	val_176
 178	val_178
 181	val_181
-186	val_186
-187	val_187
-192	val_192
-197	val_197
+193	val_193
 199	val_199
-2	val_2
+20	val_20
 201	val_201
-203	val_203
-208	val_208
+213	val_213
 214	val_214
-218	val_218
 219	val_219
-230	val_230
-237	val_237
+221	val_221
+223	val_223
+226	val_226
+233	val_233
+241	val_241
 249	val_249
-256	val_256
-257	val_257
+260	val_260
+262	val_262
 277	val_277
-278	val_278
-284	val_284
-285	val_285
+281	val_281
+287	val_287
+288	val_288
+298	val_298
+302	val_302
 310	val_310
-322	val_322
-327	val_327
-333	val_333
+323	val_323
 336	val_336
-338	val_338
 341	val_341
 344	val_344
-348	val_348
 351	val_351
-362	val_362
-364	val_364
-374	val_374
-392	val_392
-397	val_397
-4	val_4
+375	val_375
+382	val_382
+384	val_384
+393	val_393
+395	val_395
+399	val_399
 403	val_403
-404	val_404
-419	val_419
-421	val_421
-427	val_427
-429	val_429
-437	val_437
-438	val_438
-439	val_439
-454	val_454
+406	val_406
+418	val_418
+435	val_435
 455	val_455
-460	val_460
-463	val_463
-470	val_470
+459	val_459
+477	val_477
 478	val_478
 479	val_479
-489	val_489
-491	val_491
-492	val_492
-53	val_53
+482	val_482
+493	val_493
+494	val_494
+495	val_495
+497	val_497
+5	val_5
+58	val_58
 67	val_67
-82	val_82
-90	val_90
+77	val_77
+80	val_80
+86	val_86
 97	val_97
+98	val_98
 10	val_10
-125	val_125
+11	val_11
+111	val_111
+116	val_116
+126	val_126
+131	val_131
 134	val_134
+137	val_137
 143	val_143
-145	val_145
 149	val_149
-150	val_150
-158	val_158
+15	val_15
 163	val_163
 164	val_164
 166	val_166
-17	val_17
-170	val_170
-172	val_172
+169	val_169
+176	val_176
+183	val_183
 189	val_189
-19	val_19
-195	val_195
-196	val_196
-20	val_20
+190	val_190
+191	val_191
+192	val_192
+194	val_194
+2	val_2
+202	val_202
+203	val_203
+205	val_205
+207	val_207
+208	val_208
 209	val_209
-216	val_216
-217	val_217
-224	val_224
-228	val_228
 229	val_229
-233	val_233
-241	val_241
-244	val_244
-247	val_247
+230	val_230
+238	val_238
+24	val_24
 255	val_255
+257	val_257
 258	val_258
 26	val_26
-263	val_263
-265	val_265
 266	val_266
-272	val_272
-273	val_273
 274	val_274
-281	val_281
-291	val_291
+275	val_275
+278	val_278
+282	val_282
+284	val_284
+285	val_285
+289	val_289
 296	val_296
 30	val_30
-302	val_302
-309	val_309
+307	val_307
 316	val_316
 318	val_318
+321	val_321
 325	val_325
+331	val_331
 332	val_332
 335	val_335
-339	val_339
-342	val_342
-345	val_345
-353	val_353
-369	val_369
-373	val_373
-375	val_375
-377	val_377
-384	val_384
-386	val_386
-394	val_394
-396	val_396
-399	val_399
-401	val_401
-41	val_41
-413	val_413
-414	val_414
-431	val_431
-446	val_446
-448	val_448
-449	val_449
-459	val_459
-462	val_462
-468	val_468
-47	val_47
-482	val_482
-490	val_490
-493	val_493
-494	val_494
-497	val_497
-5	val_5
-54	val_54
-74	val_74
-77	val_77
-80	val_80
-84	val_84
-85	val_85
-87	val_87
-9	val_9
-95	val_95
-100	val_100
-11	val_11
-113	val_113
-119	val_119
-126	val_126
-128	val_128
-137	val_137
-146	val_146
-15	val_15
-152	val_152
-165	val_165
-167	val_167
-169	val_169
-175	val_175
-177	val_177
-179	val_179
-18	val_18
-194	val_194
-200	val_200
-202	val_202
-221	val_221
-222	val_222
-226	val_226
-242	val_242
-252	val_252
-262	val_262
-27	val_27
-275	val_275
-280	val_280
-282	val_282
-283	val_283
-287	val_287
-288	val_288
-289	val_289
-292	val_292
-311	val_311
-323	val_323
-34	val_34
-35	val_35
+338	val_338
+339	val_339
+342	val_342
+360	val_360
 365	val_365
-393	val_393
-409	val_409
-411	val_411
+367	val_367
+374	val_374
+378	val_378
+379	val_379
+386	val_386
+389	val_389
+392	val_392
+394	val_394
+400	val_400
+407	val_407
+41	val_41
+414	val_414
 417	val_417
-418	val_418
+421	val_421
 424	val_424
-43	val_43
-432	val_432
-435	val_435
-443	val_443
-444	val_444
-453	val_453
-457	val_457
+429	val_429
+437	val_437
+438	val_438
+44	val_44
+446	val_446
+448	val_448
 458	val_458
+467	val_467
+468	val_468
 469	val_469
-475	val_475
-477	val_477
-481	val_481
+480	val_480
 483	val_483
-64	val_64
+484	val_484
+487	val_487
+490	val_490
+492	val_492
+498	val_498
+51	val_51
+53	val_53
+69	val_69
 72	val_72
-76	val_76
-83	val_83
-86	val_86
-98	val_98
+82	val_82
+87	val_87
+96	val_96
 PREHOOK: query: explain select * from src intersect distinct select * from src intersect distinct select * from src intersect distinct select * from src
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select * from src intersect distinct select * from src intersect distinct select * from src intersect distinct select * from src
@@ -826,315 +826,315 @@ POSTHOOK: query: select * from src intersect distinct select * from src intersec
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-0	val_0
-103	val_103
+104	val_104
 105	val_105
-116	val_116
+113	val_113
+118	val_118
+12	val_12
 120	val_120
-129	val_129
-131	val_131
+133	val_133
 136	val_136
 155	val_155
-157	val_157
+158	val_158
 160	val_160
+162	val_162
+168	val_168
+17	val_17
+170	val_170
+175	val_175
+18	val_18
 180	val_180
-183	val_183
-190	val_190
-191	val_191
-193	val_193
-205	val_205
-207	val_207
-213	val_213
-223	val_223
+186	val_186
+19	val_19
+197	val_197
+200	val_200
+216	val_216
+218	val_218
+222	val_222
+224	val_224
+228	val_228
 235	val_235
-238	val_238
+237	val_237
 239	val_239
-24	val_24
-248	val_248
-260	val_260
+244	val_244
+247	val_247
+256	val_256
+263	val_263
+273	val_273
 28	val_28
+283	val_283
 286	val_286
-298	val_298
-305	val_305
+292	val_292
 306	val_306
-307	val_307
 308	val_308
+327	val_327
+33	val_33
+348	val_348
+353	val_353
+362	val_362
+366	val_366
+396	val_396
+397	val_397
+401	val_401
+409	val_409
+411	val_411
+419	val_419
+427	val_427
+43	val_43
+432	val_432
+436	val_436
+439	val_439
+443	val_443
+453	val_453
+460	val_460
+462	val_462
+47	val_47
+472	val_472
+485	val_485
+496	val_496
+54	val_54
+64	val_64
+70	val_70
+8	val_8
+83	val_83
+84	val_84
+85	val_85
+90	val_90
+0	val_0
+103	val_103
+114	val_114
+125	val_125
+138	val_138
+146	val_146
+150	val_150
+152	val_152
+153	val_153
+156	val_156
+157	val_157
+165	val_165
+172	val_172
+177	val_177
+179	val_179
+187	val_187
+195	val_195
+196	val_196
+217	val_217
+242	val_242
+248	val_248
+252	val_252
+265	val_265
+27	val_27
+272	val_272
+280	val_280
+291	val_291
+305	val_305
+309	val_309
+311	val_311
 315	val_315
 317	val_317
-321	val_321
-33	val_33
-331	val_331
+322	val_322
+333	val_333
+34	val_34
+345	val_345
+35	val_35
 356	val_356
-360	val_360
-366	val_366
-367	val_367
+364	val_364
 368	val_368
+369	val_369
 37	val_37
-378	val_378
-379	val_379
-382	val_382
-389	val_389
-395	val_395
-400	val_400
+373	val_373
+377	val_377
+4	val_4
 402	val_402
-406	val_406
-407	val_407
+404	val_404
+413	val_413
 42	val_42
 430	val_430
-436	val_436
-44	val_44
+431	val_431
+444	val_444
+449	val_449
 452	val_452
+454	val_454
+457	val_457
+463	val_463
 466	val_466
-467	val_467
-472	val_472
-480	val_480
-484	val_484
-485	val_485
-487	val_487
-495	val_495
-496	val_496
-498	val_498
-51	val_51
+470	val_470
+475	val_475
+481	val_481
+489	val_489
+491	val_491
 57	val_57
-58	val_58
 65	val_65
 66	val_66
-69	val_69
-70	val_70
+74	val_74
+76	val_76
 78	val_78
-8	val_8
+9	val_9
 92	val_92
-96	val_96
-104	val_104
-111	val_111
-114	val_114
-118	val_118
-12	val_12
-133	val_133
-138	val_138
-153	val_153
-156	val_156
-162	val_162
-168	val_168
+95	val_95
+100	val_100
+119	val_119
+128	val_128
+129	val_129
+145	val_145
+167	val_167
 174	val_174
-176	val_176
 178	val_178
 181	val_181
-186	val_186
-187	val_187
-192	val_192
-197	val_197
+193	val_193
 199	val_199
-2	val_2
+20	val_20
 201	val_201
-203	val_203
-208	val_208
+213	val_213
 214	val_214
-218	val_218
 219	val_219
-230	val_230
-237	val_237
+221	val_221
+223	val_223
+226	val_226
+233	val_233
+241	val_241
 249	val_249
-256	val_256
-257	val_257
+260	val_260
+262	val_262
 277	val_277
-278	val_278
-284	val_284
-285	val_285
+281	val_281
+287	val_287
+288	val_288
+298	val_298
+302	val_302
 310	val_310
-322	val_322
-327	val_327
-333	val_333
+323	val_323
 336	val_336
-338	val_338
 341	val_341
 344	val_344
-348	val_348
 351	val_351
-362	val_362
-364	val_364
-374	val_374
-392	val_392
-397	val_397
-4	val_4
+375	val_375
+382	val_382
+384	val_384
+393	val_393
+395	val_395
+399	val_399
 403	val_403
-404	val_404
-419	val_419
-421	val_421
-427	val_427
-429	val_429
-437	val_437
-438	val_438
-439	val_439
-454	val_454
+406	val_406
+418	val_418
+435	val_435
 455	val_455
-460	val_460
-463	val_463
-470	val_470
+459	val_459
+477	val_477
 478	val_478
 479	val_479
-489	val_489
-491	val_491
-492	val_492
-53	val_53
+482	val_482
+493	val_493
+494	val_494
+495	val_495
+497	val_497
+5	val_5
+58	val_58
 67	val_67
-82	val_82
-90	val_90
+77	val_77
+80	val_80
+86	val_86
 97	val_97
+98	val_98
 10	val_10
-125	val_125
+11	val_11
+111	val_111
+116	val_116
+126	val_126
+131	val_131
 134	val_134
+137	val_137
 143	val_143
-145	val_145
 149	val_149
-150	val_150
-158	val_158
+15	val_15
 163	val_163
 164	val_164
 166	val_166
-17	val_17
-170	val_170
-172	val_172
+169	val_169
+176	val_176
+183	val_183
 189	val_189
-19	val_19
-195	val_195
-196	val_196
-20	val_20
+190	val_190
+191	val_191
+192	val_192
+194	val_194
+2	val_2
+202	val_202
+203	val_203
+205	val_205
+207	val_207
+208	val_208
 209	val_209
-216	val_216
-217	val_217
-224	val_224
-228	val_228
 229	val_229
-233	val_233
-241	val_241
-244	val_244
-247	val_247
+230	val_230
+238	val_238
+24	val_24
 255	val_255
+257	val_257
 258	val_258
 26	val_26
-263	val_263
-265	val_265
 266	val_266
-272	val_272
-273	val_273
 274	val_274
-281	val_281
-291	val_291
+275	val_275
+278	val_278
+282	val_282
+284	val_284
+285	val_285
+289	val_289
 296	val_296
 30	val_30
-302	val_302
-309	val_309
+307	val_307
 316	val_316
 318	val_318
+321	val_321
 325	val_325
+331	val_331
 332	val_332
 335	val_335
+338	val_338
 339	val_339
 342	val_342
-345	val_345
-353	val_353
-369	val_369
-373	val_373
-375	val_375
-377	val_377
-384	val_384
+360	val_360
+365	val_365
+367	val_367
+374	val_374
+378	val_378
+379	val_379
 386	val_386
+389	val_389
+392	val_392
 394	val_394
-396	val_396
-399	val_399
-401	val_401
+400	val_400
+407	val_407
 41	val_41
-413	val_413
 414	val_414
-431	val_431
-446	val_446
-448	val_448
-449	val_449
-459	val_459
-462	val_462
-468	val_468
-47	val_47
-482	val_482
-490	val_490
-493	val_493
-494	val_494
-497	val_497
-5	val_5
-54	val_54
-74	val_74
-77	val_77
-80	val_80
-84	val_84
-85	val_85
-87	val_87
-9	val_9
-95	val_95
-100	val_100
-11	val_11
-113	val_113
-119	val_119
-126	val_126
-128	val_128
-137	val_137
-146	val_146
-15	val_15
-152	val_152
-165	val_165
-167	val_167
-169	val_169
-175	val_175
-177	val_177
-179	val_179
-18	val_18
-194	val_194
-200	val_200
-202	val_202
-221	val_221
-222	val_222
-226	val_226
-242	val_242
-252	val_252
-262	val_262
-27	val_27
-275	val_275
-280	val_280
-282	val_282
-283	val_283
-287	val_287
-288	val_288
-289	val_289
-292	val_292
-311	val_311
-323	val_323
-34	val_34
-35	val_35
-365	val_365
-393	val_393
-409	val_409
-411	val_411
 417	val_417
-418	val_418
+421	val_421
 424	val_424
-43	val_43
-432	val_432
-435	val_435
-443	val_443
-444	val_444
-453	val_453
-457	val_457
+429	val_429
+437	val_437
+438	val_438
+44	val_44
+446	val_446
+448	val_448
 458	val_458
+467	val_467
+468	val_468
 469	val_469
-475	val_475
-477	val_477
-481	val_481
+480	val_480
 483	val_483
-64	val_64
+484	val_484
+487	val_487
+490	val_490
+492	val_492
+498	val_498
+51	val_51
+53	val_53
+69	val_69
 72	val_72
-76	val_76
-83	val_83
-86	val_86
-98	val_98
+82	val_82
+87	val_87
+96	val_96
 PREHOOK: query: explain select value from a group by value intersect distinct select key from b group by key
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select value from a group by value intersect distinct select key from b group by key

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/join32_lessSize.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/join32_lessSize.q.out b/ql/src/test/results/clientpositive/llap/join32_lessSize.q.out
index 65ee468..7664912 100644
--- a/ql/src/test/results/clientpositive/llap/join32_lessSize.q.out
+++ b/ql/src/test/results/clientpositive/llap/join32_lessSize.q.out
@@ -90,6 +90,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'
@@ -111,6 +112,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'
@@ -166,6 +168,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'
@@ -187,6 +190,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'
@@ -266,6 +270,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 +318,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value,val2
                           columns.comments 
@@ -394,6 +400,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 
@@ -616,6 +623,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'
@@ -637,6 +645,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'
@@ -692,6 +701,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'
@@ -713,6 +723,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'
@@ -767,6 +778,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'
@@ -788,6 +800,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'
@@ -843,6 +856,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'
@@ -864,6 +878,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'
@@ -935,6 +950,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value,val2
                           columns.comments 
@@ -1016,6 +1032,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 
@@ -1245,6 +1262,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'
@@ -1314,6 +1332,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'
@@ -1335,6 +1354,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'
@@ -1390,6 +1410,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'
@@ -1411,6 +1432,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'
@@ -1460,6 +1482,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value,val2
                           columns.comments 
@@ -1541,6 +1564,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 
@@ -1772,6 +1796,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'
@@ -1820,6 +1845,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'
@@ -1841,6 +1867,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'
@@ -1896,6 +1923,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'
@@ -1917,6 +1945,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'
@@ -1966,6 +1995,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value,val2
                           columns.comments 
@@ -2073,6 +2103,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/lateral_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/lateral_view.q.out b/ql/src/test/results/clientpositive/llap/lateral_view.q.out
index 80328e9..3fae367 100644
--- a/ql/src/test/results/clientpositive/llap/lateral_view.q.out
+++ b/ql/src/test/results/clientpositive/llap/lateral_view.q.out
@@ -716,16 +716,16 @@ LATERAL VIEW explode(value) myTable AS myCol
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@tmp_pyang_src_rcfile
 #### A masked pattern was here ####
-["val_0"]	val_0
+["val_100"]	val_100
 ["val_10"]	val_10
-["val_104"]	val_104
-["val_105"]	val_105
 ["val_111"]	val_111
 ["val_113"]	val_113
-["val_114"]	val_114
-["val_116"]	val_116
-["val_119"]	val_119
 ["val_103"]	val_103
-["val_100"]	val_100
+["val_104"]	val_104
+["val_105"]	val_105
 ["val_11"]	val_11
+["val_114"]	val_114
 ["val_118"]	val_118
+["val_0"]	val_0
+["val_116"]	val_116
+["val_119"]	val_119

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/lineage2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/lineage2.q.out b/ql/src/test/results/clientpositive/llap/lineage2.q.out
index bac5863..da98117 100644
--- a/ql/src/test/results/clientpositive/llap/lineage2.q.out
+++ b/ql/src/test/results/clientpositive/llap/lineage2.q.out
@@ -143,18 +143,18 @@ PREHOOK: Input: default@dest1
 {"version":"1.0","engine":"tez","database":"default","hash":"f74475552dc79e09d4e75116c0cc9f37","queryText":"select key, count(1) a from dest1 group by key","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"expression":"count(*)","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"key"},{"id":1,"vertexType":"COLUMN","vertexId":"a"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest1.key"},{"id":3,"vertexType":"TABLE","vertexId":"default.dest1"}]}
 128	2
 213	2
-278	2
-369	2
-	20
-150	2
-238	2
+401	2
 66	2
 146	2
 224	2
-255	2
+238	2
 273	2
+	20
+150	2
+255	2
+278	2
 311	2
-401	2
+369	2
 406	2
 98	2
 PREHOOK: query: select key k, count(*) from dest1 group by key
@@ -164,18 +164,18 @@ PREHOOK: Input: default@dest1
 {"version":"1.0","engine":"tez","database":"default","hash":"3a519d9badc7e8b87b42ba96a6f922ef","queryText":"select key k, count(*) from dest1 group by key","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"expression":"count(*)","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"k"},{"id":1,"vertexType":"COLUMN","vertexId":"_c1"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest1.key"},{"id":3,"vertexType":"TABLE","vertexId":"default.dest1"}]}
 128	2
 213	2
-278	2
-369	2
-	20
-150	2
-238	2
+401	2
 66	2
 146	2
 224	2
-255	2
+238	2
 273	2
+	20
+150	2
+255	2
+278	2
 311	2
-401	2
+369	2
 406	2
 98	2
 PREHOOK: query: select key k, count(value) from dest1 group by key
@@ -185,18 +185,18 @@ PREHOOK: Input: default@dest1
 {"version":"1.0","engine":"tez","database":"default","hash":"1253b0d8b57dc384abbcaa0fb30dff88","queryText":"select key k, count(value) from dest1 group by key","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"expression":"count(default.dest1.value)","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"k"},{"id":1,"vertexType":"COLUMN","vertexId":"_c1"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest1.key"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest1.value"}]}
 128	2
 213	2
-278	2
-369	2
-	20
-150	2
-238	2
+401	2
 66	2
 146	2
 224	2
-255	2
+238	2
 273	2
+	20
+150	2
+255	2
+278	2
 311	2
-401	2
+369	2
 406	2
 98	2
 PREHOOK: query: select value, max(length(key)) from dest1 group by value
@@ -205,23 +205,23 @@ PREHOOK: Input: default@dest1
 #### A masked pattern was here ####
 {"version":"1.0","engine":"tez","database":"default","hash":"eb9155fd36ab5b8c92dc3c8c21be2378","queryText":"select value, max(length(key)) from dest1 group by value","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"expression":"max(length(dest1.key))","edgeType":"PROJECTION"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"value"},{"id":1,"vertexType":"COLUMN","vertexId":"_c1"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest1.value"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest1.key"}]}
 val_146	3
-val_27	0
+val_213	3
+val_238	3
+val_278	3
+val_406	3
 val_409	0
-val_484	0
 val_66	2
+val_265	0
+val_27	0
 	3
+val_150	3
 val_165	0
-val_238	3
 val_193	0
-val_213	3
 val_255	3
-val_265	0
 val_273	3
-val_278	3
-val_401	3
-val_150	3
 val_311	3
-val_406	3
+val_401	3
+val_484	0
 val_98	2
 PREHOOK: query: select value, max(length(key)) from dest1 group by value order by value limit 5
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/list_bucket_dml_10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/list_bucket_dml_10.q.out b/ql/src/test/results/clientpositive/llap/list_bucket_dml_10.q.out
index 2bf96d0..5e9d191 100644
--- a/ql/src/test/results/clientpositive/llap/list_bucket_dml_10.q.out
+++ b/ql/src/test/results/clientpositive/llap/list_bucket_dml_10.q.out
@@ -59,6 +59,7 @@ STAGE PLANS:
                           output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                           properties:
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,value
                             columns.comments 
@@ -108,6 +109,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'
@@ -129,6 +131,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'
@@ -201,6 +204,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               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/ac6b2a3f/ql/src/test/results/clientpositive/llap/llap_nullscan.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/llap_nullscan.q.out b/ql/src/test/results/clientpositive/llap/llap_nullscan.q.out
index 911b65a..aa0e6e4 100644
--- a/ql/src/test/results/clientpositive/llap/llap_nullscan.q.out
+++ b/ql/src/test/results/clientpositive/llap/llap_nullscan.q.out
@@ -87,6 +87,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value,ds,hr
                     columns.comments 
@@ -109,6 +110,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value,ds,hr
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/llap_smb.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/llap_smb.q.out b/ql/src/test/results/clientpositive/llap/llap_smb.q.out
index 44d78f5..d526fd3 100644
--- a/ql/src/test/results/clientpositive/llap/llap_smb.q.out
+++ b/ql/src/test/results/clientpositive/llap/llap_smb.q.out
@@ -172,26 +172,26 @@ POSTHOOK: Input: default@orc_a@y=2001/q=8
 POSTHOOK: Input: default@orc_a@y=2001/q=9
 POSTHOOK: Input: default@orc_b
 #### A masked pattern was here ####
-2000	2	6578
-2001	8	9438
-2000	3	6149
-2000	5	5720
+2000	0	6721
+2000	4	7865
+2000	7	6149
 2000	9	8151
+2001	3	6149
+2001	7	6149
+2000	2	6578
 2001	0	6721
 2001	1	7493
 2001	2	6578
-2001	4	7865
 2001	9	8151
 2000	1	7493
-2000	7	6149
+2000	3	6149
+2000	5	5720
+2000	6	5577
 2000	8	9438
 2001	6	5577
-2001	7	6149
-2000	0	6721
-2000	4	7865
-2000	6	5577
-2001	3	6149
+2001	4	7865
 2001	5	5720
+2001	8	9438
 PREHOOK: query: explain
 select y,q,count(*) from orc_a a join orc_b b on a.id=b.id group by y,q
 PREHOOK: type: QUERY
@@ -321,26 +321,26 @@ POSTHOOK: Input: default@orc_a@y=2001/q=8
 POSTHOOK: Input: default@orc_a@y=2001/q=9
 POSTHOOK: Input: default@orc_b
 #### A masked pattern was here ####
-2000	2	6578
-2001	8	9438
-2000	3	6149
-2000	5	5720
+2000	0	6721
+2000	4	7865
+2000	7	6149
 2000	9	8151
+2001	3	6149
+2001	7	6149
+2000	2	6578
 2001	0	6721
 2001	1	7493
 2001	2	6578
-2001	4	7865
 2001	9	8151
 2000	1	7493
-2000	7	6149
+2000	3	6149
+2000	5	5720
+2000	6	5577
 2000	8	9438
 2001	6	5577
-2001	7	6149
-2000	0	6721
-2000	4	7865
-2000	6	5577
-2001	3	6149
+2001	4	7865
 2001	5	5720
+2001	8	9438
 PREHOOK: query: DROP TABLE orc_a
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@orc_a

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/mapjoin_mapjoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/mapjoin_mapjoin.q.out b/ql/src/test/results/clientpositive/llap/mapjoin_mapjoin.q.out
index 961943d..8433e56 100644
--- a/ql/src/test/results/clientpositive/llap/mapjoin_mapjoin.q.out
+++ b/ql/src/test/results/clientpositive/llap/mapjoin_mapjoin.q.out
@@ -112,6 +112,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'
@@ -160,6 +161,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'
@@ -208,6 +210,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'
@@ -256,6 +259,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'
@@ -311,6 +315,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'
@@ -332,6 +337,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'
@@ -386,6 +392,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'
@@ -407,6 +414,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/materialized_view_create.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_create.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_create.q.out
index 8952304..2181f83 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_create.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_create.q.out
@@ -46,6 +46,7 @@ Retention:          	0
 Table Type:         	MATERIALIZED_VIEW   	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	5                   
 	rawDataSize         	1025                
@@ -106,6 +107,7 @@ Retention:          	0
 Table Type:         	MATERIALIZED_VIEW   	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	5                   
 	rawDataSize         	580                 
@@ -179,8 +181,8 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@cmv_mat_view4
 #### A masked pattern was here ####
 1	10.30
-2	172345.34
 3	988.56
+2	172345.34
 PREHOOK: query: describe extended cmv_mat_view4
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@cmv_mat_view4
@@ -240,6 +242,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: show tblproperties cmv_mat_view5
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true"}
+bucketing_version	2
 key	value
 numFiles	1
 numRows	5

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite.q.out
index f9879f7..654a15c 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite.q.out
@@ -65,6 +65,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: show tblproperties cmv_mat_view
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true"}
+bucketing_version	2
 numFiles	1
 numRows	2
 rawDataSize	408
@@ -97,6 +98,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: show tblproperties cmv_mat_view2
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true"}
+bucketing_version	2
 numFiles	1
 numRows	2
 rawDataSize	232

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_2.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_2.q.out
index 9c3c336..66431a5 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_2.q.out
@@ -126,8 +126,8 @@ POSTHOOK: query: select b from cmv_basetable where c > 20.0 group by a, b
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@cmv_basetable
 #### A masked pattern was here ####
-bonnie
 calvin
+bonnie
 PREHOOK: query: create materialized view cmv_mat_view_2 enable rewrite
 as select b, c from cmv_basetable where c > 10.0 group by a, b, c
 PREHOOK: type: CREATE_MATERIALIZED_VIEW
@@ -216,8 +216,8 @@ POSTHOOK: query: select b from cmv_basetable where c > 20.0 group by a, b
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@cmv_basetable
 #### A masked pattern was here ####
-bonnie
 calvin
+bonnie
 PREHOOK: query: create materialized view cmv_mat_view_3 enable rewrite
 as select a, b, c from cmv_basetable where c > 10.0 group by a, b, c
 PREHOOK: type: CREATE_MATERIALIZED_VIEW
@@ -308,8 +308,8 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@cmv_basetable
 POSTHOOK: Input: default@cmv_mat_view_3
 #### A masked pattern was here ####
-bonnie
 calvin
+bonnie
 PREHOOK: query: create materialized view cmv_mat_view_4 enable rewrite
 as select a, b from cmv_basetable group by a, b
 PREHOOK: type: CREATE_MATERIALIZED_VIEW
@@ -393,8 +393,8 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@cmv_basetable
 POSTHOOK: Input: default@cmv_mat_view_4
 #### A masked pattern was here ####
-bob
 alfred
+bob
 bonnie
 charlie
 calvin
@@ -499,8 +499,8 @@ POSTHOOK: Input: default@cmv_basetable
 POSTHOOK: Input: default@cmv_basetable_2
 POSTHOOK: Input: default@cmv_mat_view_5
 #### A masked pattern was here ####
-3
 1
+3
 PREHOOK: query: explain
 select cmv_basetable.a
 from cmv_basetable join cmv_basetable_2 on (cmv_basetable.a = cmv_basetable_2.a)

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_3.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_3.q.out
index bd0f903..dad8ebe 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_3.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_3.q.out
@@ -278,8 +278,8 @@ POSTHOOK: Input: default@cmv_basetable
 POSTHOOK: Input: default@cmv_basetable_2
 POSTHOOK: Input: default@cmv_mat_view
 #### A masked pattern was here ####
-3
 1
+3
 PREHOOK: query: insert into cmv_basetable_2 values
  (3, 'charlie', 15.8, 1)
 PREHOOK: type: QUERY
@@ -431,9 +431,9 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@cmv_basetable
 POSTHOOK: Input: default@cmv_basetable_2
 #### A masked pattern was here ####
+1
 3
 3
-1
 PREHOOK: query: EXPLAIN
 ALTER MATERIALIZED VIEW cmv_mat_view REBUILD
 PREHOOK: type: QUERY
@@ -690,9 +690,9 @@ POSTHOOK: Input: default@cmv_basetable
 POSTHOOK: Input: default@cmv_basetable_2
 POSTHOOK: Input: default@cmv_mat_view
 #### A masked pattern was here ####
+1
 3
 3
-1
 PREHOOK: query: DELETE FROM cmv_basetable_2 WHERE a = 3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cmv_basetable_2

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_4.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_4.q.out
index 8d6216b..918ceaa 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_4.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_4.q.out
@@ -264,6 +264,7 @@ Retention:          	0
 Table Type:         	MATERIALIZED_VIEW   	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"_c2\":\"true\",\"a\":\"true\",\"c\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	2                   
 	rawDataSize         	248                 
@@ -421,8 +422,8 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@cmv_basetable
 POSTHOOK: Input: default@cmv_basetable_2
 #### A masked pattern was here ####
-3	6
 1	2
+3	6
 PREHOOK: query: insert into cmv_basetable_2 values
  (3, 'charlie', 15.8, 1)
 PREHOOK: type: QUERY
@@ -490,6 +491,7 @@ Retention:          	0
 Table Type:         	MATERIALIZED_VIEW   	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"_c2\":\"true\",\"a\":\"true\",\"c\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	2                   
 	rawDataSize         	248                 
@@ -647,9 +649,9 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@cmv_basetable
 POSTHOOK: Input: default@cmv_basetable_2
 #### A masked pattern was here ####
+1	2
 3	2
 3	6
-1	2
 PREHOOK: query: EXPLAIN
 ALTER MATERIALIZED VIEW cmv_mat_view REBUILD
 PREHOOK: type: QUERY
@@ -933,6 +935,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MATERIALIZED_VIEW   	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	3                   
 	totalSize           	1451                
 	transactional       	true                
@@ -1005,8 +1008,8 @@ POSTHOOK: Input: default@cmv_basetable
 POSTHOOK: Input: default@cmv_basetable_2
 POSTHOOK: Input: default@cmv_mat_view
 #### A masked pattern was here ####
-3	6
 1	2
+3	6
 3	2
 PREHOOK: query: UPDATE cmv_basetable_2 SET a=2 WHERE a=1
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_5.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_5.q.out
index 2ffc9df..4a3fba9 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_5.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_5.q.out
@@ -398,6 +398,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MATERIALIZED_VIEW   	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	1053                
 	transactional       	true                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_dummy.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_dummy.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_dummy.q.out
index f9879f7..654a15c 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_dummy.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_dummy.q.out
@@ -65,6 +65,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: show tblproperties cmv_mat_view
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true"}
+bucketing_version	2
 numFiles	1
 numRows	2
 rawDataSize	408
@@ -97,6 +98,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: show tblproperties cmv_mat_view2
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true"}
+bucketing_version	2
 numFiles	1
 numRows	2
 rawDataSize	232

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_multi_db.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_multi_db.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_multi_db.q.out
index af56032..c728546 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_multi_db.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_multi_db.q.out
@@ -89,6 +89,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: show tblproperties cmv_mat_view
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true"}
+bucketing_version	2
 numFiles	1
 numRows	2
 rawDataSize	408
@@ -121,6 +122,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: show tblproperties cmv_mat_view2
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true"}
+bucketing_version	2
 numFiles	1
 numRows	2
 rawDataSize	232

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_rebuild_dummy.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_rebuild_dummy.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_rebuild_dummy.q.out
index bd0f903..dad8ebe 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_rebuild_dummy.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_rebuild_dummy.q.out
@@ -278,8 +278,8 @@ POSTHOOK: Input: default@cmv_basetable
 POSTHOOK: Input: default@cmv_basetable_2
 POSTHOOK: Input: default@cmv_mat_view
 #### A masked pattern was here ####
-3
 1
+3
 PREHOOK: query: insert into cmv_basetable_2 values
  (3, 'charlie', 15.8, 1)
 PREHOOK: type: QUERY
@@ -431,9 +431,9 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@cmv_basetable
 POSTHOOK: Input: default@cmv_basetable_2
 #### A masked pattern was here ####
+1
 3
 3
-1
 PREHOOK: query: EXPLAIN
 ALTER MATERIALIZED VIEW cmv_mat_view REBUILD
 PREHOOK: type: QUERY
@@ -690,9 +690,9 @@ POSTHOOK: Input: default@cmv_basetable
 POSTHOOK: Input: default@cmv_basetable_2
 POSTHOOK: Input: default@cmv_mat_view
 #### A masked pattern was here ####
+1
 3
 3
-1
 PREHOOK: query: DELETE FROM cmv_basetable_2 WHERE a = 3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cmv_basetable_2

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_time_window.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_time_window.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_time_window.q.out
index e820e5c..d45ccde 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_time_window.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_time_window.q.out
@@ -250,6 +250,7 @@ Retention:          	0
 Table Type:         	MATERIALIZED_VIEW   	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	2                   
 	rawDataSize         	232                 
@@ -403,8 +404,8 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@cmv_basetable
 POSTHOOK: Input: default@cmv_basetable_2
 #### A masked pattern was here ####
-3
 1
+3
 PREHOOK: query: insert into cmv_basetable_2 values
  (3, 'charlie', 15.8, 1)
 PREHOOK: type: QUERY
@@ -471,6 +472,7 @@ Retention:          	0
 Table Type:         	MATERIALIZED_VIEW   	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	2                   
 	rawDataSize         	232                 
@@ -544,8 +546,8 @@ POSTHOOK: Input: default@cmv_basetable
 POSTHOOK: Input: default@cmv_basetable_2
 POSTHOOK: Input: default@cmv_mat_view
 #### A masked pattern was here ####
-3
 1
+3
 PREHOOK: query: EXPLAIN
 ALTER MATERIALIZED VIEW cmv_mat_view REBUILD
 PREHOOK: type: QUERY
@@ -773,11 +775,12 @@ Retention:          	0
 Table Type:         	MATERIALIZED_VIEW   	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"c\":\"true\"}}
-	numFiles            	3                   
+	bucketing_version   	2                   
+	numFiles            	2                   
 	numRows             	3                   
 	rawDataSize         	348                 
 	rewriting.time.window	300s                
-	totalSize           	877                 
+	totalSize           	616                 
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -846,9 +849,9 @@ POSTHOOK: Input: default@cmv_basetable
 POSTHOOK: Input: default@cmv_basetable_2
 POSTHOOK: Input: default@cmv_mat_view
 #### A masked pattern was here ####
+1
 3
 3
-1
 PREHOOK: query: drop materialized view cmv_mat_view
 PREHOOK: type: DROP_MATERIALIZED_VIEW
 PREHOOK: Input: default@cmv_mat_view

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/materialized_view_describe.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_describe.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_describe.q.out
index efd60d4..b80d7b64 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_describe.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_describe.q.out
@@ -67,6 +67,7 @@ Retention:          	0
 Table Type:         	MATERIALIZED_VIEW   	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	comment             	this is the first view
 	key                 	foo                 
 	numFiles            	1                   
@@ -93,6 +94,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: show tblproperties cmv_mat_view
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true"}
+bucketing_version	2
 comment	this is the first view
 key	foo
 numFiles	1
@@ -154,6 +156,7 @@ Retention:          	0
 Table Type:         	MATERIALIZED_VIEW   	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	comment             	this is the second view
 	key                 	alice               
 	key2                	bob                 
@@ -234,6 +237,7 @@ Retention:          	0
 Table Type:         	MATERIALIZED_VIEW   	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	comment             	this is the third view
 	numFiles            	1                   
 	numRows             	5                   
@@ -276,8 +280,8 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@cmv_mat_view3
 #### A masked pattern was here ####
 1
-2
 3
+2
 PREHOOK: query: drop materialized view cmv_mat_view3
 PREHOOK: type: DROP_MATERIALIZED_VIEW
 PREHOOK: Input: default@cmv_mat_view3
@@ -323,6 +327,7 @@ Retention:          	0
 Table Type:         	MATERIALIZED_VIEW   	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	comment             	this is the last view
 	numFiles            	1                   
 	numRows             	5                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/metadataonly1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/metadataonly1.q.out b/ql/src/test/results/clientpositive/llap/metadataonly1.q.out
index 1630427..6a7d361 100644
--- a/ql/src/test/results/clientpositive/llap/metadataonly1.q.out
+++ b/ql/src/test/results/clientpositive/llap/metadataonly1.q.out
@@ -174,6 +174,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -315,6 +316,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -456,6 +458,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -604,6 +607,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -651,6 +655,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -728,6 +733,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -775,6 +781,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -1012,6 +1019,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -1059,6 +1067,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -1106,6 +1115,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -1257,6 +1267,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -1305,6 +1316,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -1353,6 +1365,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -1500,6 +1513,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -1546,6 +1560,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -1631,8 +1646,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 min(ds),max(ds) from srcpart
 PREHOOK: type: QUERY
 PREHOOK: Input: default@srcpart
@@ -1745,6 +1760,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -1792,6 +1808,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -1839,6 +1856,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -1886,6 +1904,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 
@@ -1933,6 +1952,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns a,b
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/mm_all.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/mm_all.q.out b/ql/src/test/results/clientpositive/llap/mm_all.q.out
index 7c8a38f..8a5c9d0 100644
--- a/ql/src/test/results/clientpositive/llap/mm_all.q.out
+++ b/ql/src/test/results/clientpositive/llap/mm_all.q.out
@@ -1815,6 +1815,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	3                   
 	numRows             	6                   
 	rawDataSize         	13                  
@@ -1864,6 +1865,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	6                   
 	numRows             	12                  
 	rawDataSize         	26                  
@@ -1922,6 +1924,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{}                  
+	bucketing_version   	2                   
 	numFiles            	55                  
 	numRows             	500                 
 	rawDataSize         	5312                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/multiMapJoin1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/multiMapJoin1.q.out b/ql/src/test/results/clientpositive/llap/multiMapJoin1.q.out
index 3530370..f8adcd4 100644
--- a/ql/src/test/results/clientpositive/llap/multiMapJoin1.q.out
+++ b/ql/src/test/results/clientpositive/llap/multiMapJoin1.q.out
@@ -659,12 +659,12 @@ POSTHOOK: Input: default@smalltbl1
 POSTHOOK: Input: default@smalltbl2
 #### A masked pattern was here ####
 RUN: Stage-1:MAPRED
+270
 10
+270
 10
 10
 10
-270
-270
 PREHOOK: query: drop table bigTbl
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@bigtbl

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/multi_column_in.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/multi_column_in.q.out b/ql/src/test/results/clientpositive/llap/multi_column_in.q.out
index 7092837..3e40653 100644
--- a/ql/src/test/results/clientpositive/llap/multi_column_in.q.out
+++ b/ql/src/test/results/clientpositive/llap/multi_column_in.q.out
@@ -305,8 +305,8 @@ select * from emps where (empno,deptno) in ((1,2),(3,2))
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@emps
 #### A masked pattern was here ####
-2	5	22
 1	2	11
+2	5	22
 PREHOOK: query: drop view v
 PREHOOK: type: DROPVIEW
 POSTHOOK: query: drop view v
@@ -342,8 +342,8 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@emps
 POSTHOOK: Input: default@v
 #### A masked pattern was here ####
-2	5	22
 1	2	11
+2	5	22
 PREHOOK: query: select subq.e1 from 
 (select (empno*2)|1 as e1, substr(empname,1,1) as n1 from emps)subq
 join

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/multi_count_distinct_null.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/multi_count_distinct_null.q.out b/ql/src/test/results/clientpositive/llap/multi_count_distinct_null.q.out
index 6c7b4da..9633ae0 100644
--- a/ql/src/test/results/clientpositive/llap/multi_count_distinct_null.q.out
+++ b/ql/src/test/results/clientpositive/llap/multi_count_distinct_null.q.out
@@ -292,23 +292,23 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@employee
 POSTHOOK: Output: hdfs://### HDFS PATH ###
 5	NULL	NULL	NULL
-2	NULL	NULL	1
+5	NULL	M	NULL
 2	1	NULL	1
-2	1	NULL	3
-3	4	NULL	NULL
-2	4	NULL	1
-3	NULL	NULL	NULL
-6	NULL	NULL	NULL
-6	NULL	NULL	2
-5	NULL	F	NULL
-3	1	NULL	NULL
+2	2	NULL	1
 2	2	NULL	3
+2	NULL	NULL	1
 6	NULL	NULL	3
-3	2	NULL	NULL
-2	2	NULL	1
-2	NULL	NULL	NULL
-6	NULL	NULL	1
-5	NULL	M	NULL
+5	NULL	F	NULL
 2	1	NULL	2
+2	NULL	NULL	NULL
+6	NULL	NULL	NULL
 3	3	NULL	NULL
+3	NULL	NULL	NULL
+6	NULL	NULL	1
+6	NULL	NULL	2
+3	1	NULL	NULL
+2	1	NULL	3
+3	2	NULL	NULL
 2	3	NULL	2
+3	4	NULL	NULL
+2	4	NULL	1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/optimize_nullscan.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/optimize_nullscan.q.out b/ql/src/test/results/clientpositive/llap/optimize_nullscan.q.out
index 9b60d60..eca9027 100644
--- a/ql/src/test/results/clientpositive/llap/optimize_nullscan.q.out
+++ b/ql/src/test/results/clientpositive/llap/optimize_nullscan.q.out
@@ -180,6 +180,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'
@@ -201,6 +202,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'
@@ -280,6 +282,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'
@@ -327,6 +330,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'
@@ -374,6 +378,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'
@@ -421,6 +426,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'
@@ -573,6 +579,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'
@@ -594,6 +601,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'
@@ -673,6 +681,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'
@@ -721,6 +730,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'
@@ -769,6 +779,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'
@@ -817,6 +828,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'
@@ -981,6 +993,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'
@@ -1002,6 +1015,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'
@@ -1081,6 +1095,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'
@@ -1128,6 +1143,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'
@@ -1175,6 +1191,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'
@@ -1222,6 +1239,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'
@@ -1389,6 +1407,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'
@@ -1410,6 +1429,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'
@@ -1459,6 +1479,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'
@@ -1480,6 +1501,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'
@@ -1622,6 +1644,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'
@@ -1643,6 +1666,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'
@@ -1693,6 +1717,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'
@@ -1714,6 +1739,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'
@@ -1839,6 +1865,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'
@@ -1860,6 +1887,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/orc_analyze.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/orc_analyze.q.out b/ql/src/test/results/clientpositive/llap/orc_analyze.q.out
index fd33bfd..cde05b3 100644
--- a/ql/src/test/results/clientpositive/llap/orc_analyze.q.out
+++ b/ql/src/test/results/clientpositive/llap/orc_analyze.q.out
@@ -98,6 +98,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	100                 
 	rawDataSize         	52600               
@@ -145,6 +146,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	100                 
 	rawDataSize         	52600               
@@ -231,6 +233,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         	52600               
@@ -727,8 +730,8 @@ Partition Parameters:
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
 	numFiles            	4                   
 	numRows             	50                  
-	rawDataSize         	21975               
-	totalSize           	5260                
+	rawDataSize         	21955               
+	totalSize           	5322                
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -769,7 +772,7 @@ Partition Parameters:
 	numFiles            	4                   
 	numRows             	50                  
 	rawDataSize         	22043               
-	totalSize           	5331                
+	totalSize           	5314                
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -821,8 +824,8 @@ Partition Parameters:
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
 	numFiles            	4                   
 	numRows             	50                  
-	rawDataSize         	21975               
-	totalSize           	5260                
+	rawDataSize         	21955               
+	totalSize           	5322                
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -863,7 +866,7 @@ Partition Parameters:
 	numFiles            	4                   
 	numRows             	50                  
 	rawDataSize         	22043               
-	totalSize           	5331                
+	totalSize           	5314                
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -964,8 +967,8 @@ Partition Parameters:
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"address\":\"true\",\"first_name\":\"true\",\"id\":\"true\",\"last_name\":\"true\",\"salary\":\"true\",\"start_date\":\"true\"}}
 	numFiles            	4                   
 	numRows             	50                  
-	rawDataSize         	21975               
-	totalSize           	5260                
+	rawDataSize         	21955               
+	totalSize           	5322                
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -1006,7 +1009,7 @@ Partition Parameters:
 	numFiles            	4                   
 	numRows             	50                  
 	rawDataSize         	22043               
-	totalSize           	5331                
+	totalSize           	5314                
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/sample6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/sample6.q.out b/ql/src/test/results/clientpositive/spark/sample6.q.out
index 34aee1e..cf172ea 100644
--- a/ql/src/test/results/clientpositive/spark/sample6.q.out
+++ b/ql/src/test/results/clientpositive/spark/sample6.q.out
@@ -52,6 +52,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 
@@ -84,6 +85,7 @@ STAGE PLANS:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -106,6 +108,7 @@ STAGE PLANS:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -137,6 +140,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 
@@ -181,172 +185,175 @@ order by key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@dest1
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
-0	val_1
-0	val_1
-4	val_4
-4	val_5
-8	val_8
-8	val_9
-12	val_12
-12	val_12
-12	val_13
-16	val_17
-16	val_17
-20	val_20
-20	val_21
-20	val_21
-24	val_24
-24	val_24
-28	val_28
-32	val_33
+2	val_2
+2	val_3
+6	val_7
+6	val_7
+10	val_10
+10	val_11
+17	val_17
+21	val_22
+21	val_22
+21	val_22
+21	val_22
+27	val_27
+30	val_30
+30	val_31
+31	val_32
 40	val_41
 40	val_41
-44	val_44
-48	val_49
-48	val_49
-52	val_53
-52	val_53
-52	val_53
-52	val_53
-56	val_57
-60	val_61
+51	val_51
+51	val_51
+51	val_52
+57	val_57
+58	val_58
+58	val_58
+58	val_59
+58	val_59
 64	val_64
-68	val_69
-72	val_72
-72	val_72
-76	val_76
-76	val_76
-76	val_77
-76	val_77
-76	val_77
+65	val_65
+65	val_66
+65	val_66
+70	val_70
+70	val_70
+70	val_70
+70	val_71
 80	val_80
 80	val_81
-84	val_84
-84	val_84
-92	val_92
-96	val_96
-100	val_100
-100	val_100
-100	val_101
-100	val_101
-104	val_104
-104	val_104
-104	val_105
-104	val_105
-104	val_105
+83	val_83
+83	val_83
+86	val_86
+86	val_87
+90	val_90
+90	val_90
+90	val_90
+91	val_92
+98	val_98
+98	val_98
+105	val_105
+105	val_106
+105	val_106
+110	val_111
+113	val_113
+113	val_113
 116	val_116
 116	val_117
-120	val_120
-120	val_120
-120	val_121
-128	val_128
-128	val_128
-128	val_128
-128	val_129
-128	val_129
-132	val_133
-132	val_133
-136	val_136
-136	val_137
-140	val_141
-144	val_145
-152	val_152
-152	val_152
-152	val_153
-152	val_153
-152	val_153
+117	val_118
+117	val_118
+119	val_119
+119	val_119
+119	val_119
+119	val_120
+119	val_120
+119	val_120
+121	val_122
+121	val_122
+123	val_124
+123	val_124
+126	val_126
+126	val_127
+126	val_127
+134	val_134
+134	val_134
+134	val_135
+137	val_137
+137	val_137
+137	val_138
+153	val_153
+153	val_154
+153	val_154
 156	val_156
 156	val_157
 156	val_157
-160	val_160
-160	val_161
-164	val_164
-164	val_164
-164	val_165
-164	val_165
-168	val_168
-168	val_169
-172	val_172
-172	val_172
-172	val_173
-176	val_176
-176	val_176
-180	val_180
+157	val_157
+157	val_158
+157	val_158
+158	val_158
+163	val_163
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+177	val_177
+177	val_178
+177	val_178
+178	val_178
+178	val_179
+178	val_179
 184	val_185
-192	val_192
-192	val_193
-196	val_196
-196	val_197
-196	val_197
-196	val_197
-200	val_200
-200	val_200
-204	val_205
+187	val_187
+187	val_187
+187	val_187
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+197	val_198
+206	val_207
+206	val_207
+206	val_207
 208	val_208
 208	val_208
 208	val_208
-212	val_213
-216	val_216
-216	val_216
-216	val_217
-224	val_224
-224	val_224
-224	val_225
-228	val_228
-228	val_229
-240	val_241
+221	val_221
+221	val_221
+229	val_229
+229	val_229
+237	val_237
+237	val_237
+243	val_244
+243	val_244
 244	val_244
 244	val_245
 244	val_245
 244	val_245
-248	val_248
-248	val_249
+249	val_249
+249	val_250
+249	val_250
 252	val_252
 252	val_253
+254	val_255
 256	val_256
 256	val_256
 256	val_257
-260	val_260
-260	val_261
-260	val_261
-264	val_265
-264	val_265
-268	val_269
+266	val_266
+271	val_272
 272	val_272
 272	val_272
 272	val_273
-276	val_277
-280	val_280
-280	val_280
-284	val_284
-284	val_285
-284	val_285
-288	val_288
-288	val_288
+286	val_286
+286	val_287
+289	val_289
+289	val_290
 292	val_292
 292	val_293
 292	val_293
-296	val_296
-296	val_297
-300	val_301
-300	val_301
 304	val_305
+307	val_307
+307	val_307
 308	val_308
 308	val_309
 308	val_309
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-324	val_325
-328	val_329
-328	val_329
-332	val_332
+317	val_317
+317	val_317
+317	val_318
+326	val_327
+327	val_327
+327	val_327
+327	val_327
+334	val_335
 336	val_336
 336	val_337
-340	val_341
+338	val_338
+338	val_339
+339	val_339
+342	val_342
+342	val_342
+342	val_343
 344	val_344
 344	val_344
 344	val_345
@@ -356,80 +363,97 @@ POSTHOOK: Input: default@dest1
 348	val_348
 348	val_348
 348	val_349
+349	val_350
+349	val_350
+349	val_350
+349	val_350
 352	val_353
 352	val_353
-356	val_356
-356	val_357
-356	val_357
+353	val_353
+353	val_353
+353	val_354
+355	val_356
+355	val_356
 360	val_360
 360	val_361
+362	val_362
 364	val_364
 364	val_365
-368	val_368
-376	val_377
-384	val_384
-384	val_384
-384	val_384
-384	val_385
-384	val_385
-384	val_385
-388	val_389
+369	val_369
+369	val_369
+369	val_369
+369	val_370
+371	val_372
+371	val_372
+371	val_372
+371	val_372
+377	val_377
+378	val_378
+378	val_379
+391	val_392
+391	val_392
 392	val_392
 392	val_393
 392	val_393
 396	val_396
 396	val_396
 396	val_396
-400	val_400
+399	val_399
+399	val_399
+399	val_400
+399	val_400
+402	val_402
+402	val_403
+402	val_403
+402	val_403
 404	val_404
 404	val_404
 404	val_405
 404	val_405
 404	val_405
+407	val_407
+407	val_408
+407	val_408
+407	val_408
 408	val_409
 408	val_409
-412	val_413
-412	val_413
-416	val_417
-424	val_424
-424	val_424
-424	val_425
-428	val_429
-432	val_432
-432	val_433
-436	val_436
-436	val_437
+410	val_411
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+423	val_424
+426	val_427
+427	val_427
+427	val_428
+427	val_428
 440	val_441
 440	val_441
-444	val_444
-448	val_448
-448	val_449
+449	val_449
 452	val_452
-460	val_460
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-468	val_469
-468	val_469
-468	val_469
+458	val_458
+458	val_458
+463	val_463
+463	val_463
+463	val_464
+466	val_466
+466	val_466
+466	val_466
 472	val_472
 476	val_477
 476	val_477
-480	val_480
-480	val_480
-480	val_480
-480	val_481
-480	val_481
+478	val_478
+478	val_478
+478	val_479
+478	val_479
+479	val_479
+482	val_482
+482	val_483
 484	val_484
 484	val_485
-488	val_489
-492	val_492
-492	val_492
-492	val_493
-492	val_493
-496	val_496
-496	val_497
+497	val_497
+497	val_498
+497	val_498
 PREHOOK: query: EXPLAIN EXTENDED SELECT s.* FROM srcbucket TABLESAMPLE (BUCKET 4 OUT OF 4 on key) s
 ORDER BY key, value
 PREHOOK: type: QUERY
@@ -482,6 +506,7 @@ STAGE PLANS:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -504,6 +529,7 @@ STAGE PLANS:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -570,147 +596,186 @@ ORDER BY key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket
 #### A masked pattern was here ####
-3	val_4
-11	val_11
-11	val_12
-11	val_12
-11	val_12
+5	val_5
+5	val_5
+5	val_5
+5	val_6
+12	val_12
+12	val_12
+12	val_13
 15	val_15
 15	val_15
 15	val_16
 15	val_16
-19	val_19
-19	val_20
+16	val_17
+16	val_17
+22	val_23
 23	val_24
-27	val_27
-31	val_32
+24	val_24
+24	val_24
+28	val_28
+33	val_33
+33	val_34
 35	val_35
 35	val_35
 35	val_35
 35	val_36
 35	val_36
 35	val_36
-43	val_43
+42	val_42
+42	val_42
+42	val_43
+42	val_43
+42	val_43
+44	val_44
 47	val_47
 47	val_48
-51	val_51
-51	val_51
-51	val_52
-59	val_60
+49	val_50
+49	val_50
+50	val_51
+52	val_53
+52	val_53
+52	val_53
+52	val_53
+53	val_53
+53	val_54
+56	val_57
 63	val_64
-67	val_67
-67	val_67
-71	val_72
 75	val_76
-83	val_83
-83	val_83
+76	val_76
+76	val_76
+76	val_77
+76	val_77
+76	val_77
 87	val_87
 87	val_88
 87	val_88
-91	val_92
+94	val_95
 95	val_95
 95	val_95
-99	val_100
-103	val_103
-103	val_103
+104	val_104
+104	val_104
+104	val_105
+104	val_105
+104	val_105
 111	val_111
-119	val_119
-119	val_119
-119	val_119
-119	val_120
-119	val_120
-119	val_120
-123	val_124
-123	val_124
-131	val_131
-135	val_136
-135	val_136
-135	val_136
-143	val_143
-143	val_144
+114	val_114
+114	val_115
+114	val_115
+114	val_115
+125	val_125
+125	val_125
+125	val_126
+129	val_129
+129	val_129
+129	val_130
+129	val_130
+138	val_138
+138	val_138
+138	val_138
+138	val_138
+138	val_139
+138	val_139
+145	val_145
 147	val_148
 147	val_148
 151	val_152
 151	val_152
-155	val_155
-163	val_163
+161	val_162
+161	val_162
+161	val_162
+161	val_162
+166	val_166
 167	val_167
 167	val_167
 167	val_167
 167	val_168
-175	val_175
-175	val_175
-175	val_176
-175	val_176
-179	val_179
-179	val_179
-179	val_180
-183	val_183
-183	val_184
-187	val_187
-187	val_187
-187	val_187
-191	val_191
-191	val_191
-191	val_192
-195	val_195
-195	val_195
-199	val_199
-199	val_199
-199	val_199
-199	val_200
+168	val_168
+168	val_169
+170	val_170
+170	val_171
+172	val_172
+172	val_172
+172	val_173
+180	val_180
+192	val_192
+192	val_193
+193	val_193
+193	val_193
+193	val_193
+196	val_196
+196	val_197
+196	val_197
+196	val_197
 203	val_203
 203	val_203
 207	val_207
 207	val_207
-215	val_216
+209	val_209
+209	val_209
+209	val_210
+209	val_210
+213	val_213
+213	val_213
+213	val_214
 219	val_219
 219	val_219
-223	val_223
-223	val_223
+224	val_224
+224	val_224
+224	val_225
 227	val_228
-231	val_232
-235	val_235
-235	val_236
-239	val_239
-239	val_239
-239	val_240
-239	val_240
-243	val_244
-243	val_244
-247	val_247
-255	val_255
-255	val_255
+241	val_241
+241	val_242
+241	val_242
+241	val_242
+241	val_242
+242	val_242
+242	val_242
+242	val_243
+245	val_246
+245	val_246
+257	val_257
+257	val_258
+257	val_258
+258	val_258
+258	val_259
 259	val_260
 259	val_260
 263	val_263
+265	val_265
+265	val_265
+265	val_266
 267	val_268
-271	val_272
-275	val_275
-275	val_276
-275	val_276
+268	val_269
+273	val_273
+273	val_273
+273	val_273
+273	val_274
+274	val_274
+274	val_275
+278	val_278
+278	val_278
+278	val_279
+281	val_281
+281	val_281
+281	val_282
+281	val_282
+281	val_282
 283	val_283
-287	val_287
-287	val_288
-287	val_288
-291	val_291
-291	val_292
-291	val_292
-295	val_296
-295	val_296
+293	val_294
+293	val_294
+300	val_301
+300	val_301
 303	val_304
 303	val_304
-307	val_307
-307	val_307
-311	val_311
-311	val_311
-311	val_311
-315	val_315
-323	val_323
-323	val_324
-327	val_327
-327	val_327
-327	val_327
+318	val_318
+318	val_318
+318	val_318
+318	val_319
+322	val_322
+322	val_322
+322	val_323
+330	val_331
 331	val_331
 331	val_331
 331	val_332
@@ -718,97 +783,91 @@ POSTHOOK: Input: default@srcbucket
 335	val_335
 335	val_336
 335	val_336
-339	val_339
-343	val_344
-347	val_348
-347	val_348
-351	val_351
-351	val_352
-351	val_352
-355	val_356
-355	val_356
-363	val_364
-363	val_364
-363	val_364
+356	val_356
+356	val_357
+356	val_357
+358	val_359
 367	val_367
 367	val_367
 367	val_368
 367	val_368
-371	val_372
-371	val_372
-371	val_372
-371	val_372
-375	val_375
-375	val_376
-375	val_376
-375	val_376
-375	val_376
-375	val_376
+373	val_373
+373	val_374
 379	val_379
 379	val_380
-391	val_392
-391	val_392
+381	val_382
+382	val_382
+382	val_382
+382	val_383
+382	val_383
+385	val_386
+385	val_386
+390	val_391
+390	val_391
+390	val_391
 395	val_395
 395	val_395
 395	val_396
 395	val_396
-399	val_399
-399	val_399
-399	val_400
-399	val_400
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_402
 403	val_403
 403	val_403
 403	val_403
-407	val_407
-407	val_408
-407	val_408
-407	val_408
-411	val_411
-411	val_412
+405	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_407
+412	val_413
+412	val_413
 415	val_416
-419	val_419
-423	val_424
-427	val_427
-427	val_428
-427	val_428
+416	val_417
+418	val_418
+429	val_429
+429	val_429
+429	val_430
+429	val_430
 431	val_431
 431	val_431
 431	val_431
 431	val_432
-435	val_435
-435	val_436
-439	val_439
-439	val_439
-439	val_440
-439	val_440
-443	val_443
-443	val_444
-443	val_444
-443	val_444
+436	val_436
+436	val_437
+441	val_442
 447	val_448
-451	val_452
-455	val_455
-455	val_456
-455	val_456
-459	val_459
-459	val_459
-459	val_460
-463	val_463
-463	val_463
-463	val_464
-467	val_467
-467	val_468
+448	val_448
+448	val_449
+468	val_468
+468	val_468
+468	val_468
+468	val_468
+468	val_469
+468	val_469
+468	val_469
+470	val_470
+470	val_471
 475	val_475
 475	val_476
-479	val_479
-483	val_483
-487	val_487
-487	val_488
-491	val_491
-491	val_492
-491	val_492
-495	val_495
-495	val_496
+481	val_481
+481	val_482
+489	val_489
+489	val_489
+489	val_489
+489	val_489
+489	val_490
+492	val_492
+492	val_492
+492	val_493
+492	val_493
+494	val_494
+494	val_495
+494	val_495
 PREHOOK: query: EXPLAIN EXTENDED SELECT s.* FROM srcbucket TABLESAMPLE (BUCKET 1 OUT OF 2 on key) s
 ORDER BY key, value
 PREHOOK: type: QUERY
@@ -861,6 +920,7 @@ STAGE PLANS:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -883,6 +943,7 @@ STAGE PLANS:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -949,205 +1010,188 @@ ORDER BY key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
-0	val_1
-0	val_1
 2	val_2
 2	val_3
-4	val_4
-4	val_5
+3	val_4
 6	val_7
 6	val_7
-8	val_8
-8	val_9
 10	val_10
 10	val_11
-12	val_12
-12	val_12
-12	val_13
-16	val_17
-16	val_17
-18	val_18
-18	val_18
+17	val_17
+19	val_19
+19	val_20
 20	val_20
 20	val_21
 20	val_21
-22	val_23
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
+21	val_22
+21	val_22
+21	val_22
+21	val_22
+27	val_27
+29	val_30
+29	val_30
 30	val_30
 30	val_31
-32	val_33
-34	val_34
+31	val_32
 40	val_41
 40	val_41
-42	val_42
-42	val_42
-42	val_43
-42	val_43
-42	val_43
-44	val_44
+41	val_41
+43	val_43
 46	val_47
 48	val_49
 48	val_49
-50	val_51
-52	val_53
-52	val_53
-52	val_53
-52	val_53
+51	val_51
+51	val_51
+51	val_52
 54	val_54
-56	val_57
+57	val_57
 58	val_58
 58	val_58
 58	val_59
 58	val_59
+59	val_60
 60	val_61
-62	val_63
-62	val_63
+61	val_62
 64	val_64
-66	val_66
+65	val_65
+65	val_66
+65	val_66
+67	val_67
+67	val_67
 68	val_69
+69	val_69
+69	val_70
 70	val_70
 70	val_70
 70	val_70
 70	val_71
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-76	val_77
-76	val_77
-76	val_77
-78	val_78
-78	val_79
+77	val_77
+77	val_78
+77	val_78
 80	val_80
 80	val_81
-82	val_82
-82	val_83
-82	val_83
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
+85	val_86
 86	val_86
 86	val_87
+89	val_90
+89	val_90
+89	val_90
 90	val_90
 90	val_90
 90	val_90
-92	val_92
-94	val_95
+91	val_92
+93	val_94
+93	val_94
+93	val_94
 96	val_96
+97	val_97
+97	val_97
+97	val_98
+97	val_98
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-100	val_101
-100	val_101
-102	val_103
-104	val_104
-104	val_104
-104	val_105
-104	val_105
-104	val_105
+99	val_100
+101	val_102
+105	val_105
+105	val_106
+105	val_106
 106	val_107
 110	val_111
-114	val_114
-114	val_115
-114	val_115
-114	val_115
+113	val_113
+113	val_113
 116	val_116
 116	val_117
-118	val_118
-118	val_118
-118	val_119
-118	val_119
-118	val_119
-120	val_120
-120	val_120
-120	val_121
-122	val_123
-122	val_123
-122	val_123
+117	val_118
+117	val_118
+119	val_119
+119	val_119
+119	val_119
+119	val_120
+119	val_120
+119	val_120
+121	val_122
+121	val_122
+123	val_124
+123	val_124
 126	val_126
 126	val_127
 126	val_127
-128	val_128
-128	val_128
-128	val_128
-128	val_129
-128	val_129
 132	val_133
 132	val_133
+133	val_133
+133	val_134
 134	val_134
 134	val_134
 134	val_135
-136	val_136
-136	val_137
-138	val_138
-138	val_138
-138	val_138
-138	val_138
-138	val_139
-138	val_139
+135	val_136
+135	val_136
+135	val_136
+137	val_137
+137	val_137
+137	val_138
 140	val_141
-144	val_145
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
-152	val_153
-152	val_153
-152	val_153
+149	val_149
+149	val_149
+149	val_150
+153	val_153
+153	val_154
+153	val_154
 156	val_156
 156	val_157
 156	val_157
+157	val_157
+157	val_158
+157	val_158
 158	val_158
-160	val_160
-160	val_161
 162	val_162
 162	val_163
+163	val_163
 164	val_164
 164	val_164
 164	val_165
 164	val_165
-166	val_166
-168	val_168
-168	val_169
-170	val_170
-170	val_171
-172	val_172
-172	val_172
-172	val_173
-174	val_174
-174	val_174
-174	val_175
-174	val_175
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+165	val_166
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+177	val_177
+177	val_178
+177	val_178
 178	val_178
 178	val_179
 178	val_179
-180	val_180
+181	val_181
 182	val_183
 184	val_185
-186	val_186
+185	val_186
+187	val_187
+187	val_187
+187	val_187
 190	val_190
-192	val_192
-192	val_193
-194	val_194
-196	val_196
-196	val_197
-196	val_197
-196	val_197
-200	val_200
-200	val_200
+191	val_191
+191	val_191
+191	val_192
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+197	val_198
+199	val_199
+199	val_199
+199	val_199
+199	val_200
+201	val_201
 202	val_202
-204	val_205
 206	val_207
 206	val_207
 206	val_207
@@ -1156,95 +1200,80 @@ POSTHOOK: Input: default@srcbucket
 208	val_208
 212	val_213
 214	val_214
+215	val_216
 216	val_216
 216	val_216
 216	val_217
-218	val_218
-222	val_222
-222	val_223
-224	val_224
-224	val_224
-224	val_225
+221	val_221
+221	val_221
 226	val_226
 226	val_227
 226	val_227
 226	val_227
 226	val_227
-228	val_228
-228	val_229
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+231	val_232
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
 238	val_239
+239	val_239
+239	val_239
+239	val_240
+239	val_240
 240	val_241
-242	val_242
-242	val_242
-242	val_243
+243	val_244
+243	val_244
 244	val_244
 244	val_245
 244	val_245
 244	val_245
-246	val_247
-246	val_247
 248	val_248
 248	val_249
+249	val_249
+249	val_250
+249	val_250
 252	val_252
 252	val_253
 254	val_255
+255	val_255
+255	val_255
 256	val_256
 256	val_256
 256	val_257
-258	val_258
-258	val_259
 260	val_260
 260	val_261
 260	val_261
-262	val_262
-262	val_263
-262	val_263
-264	val_265
-264	val_265
+261	val_262
 266	val_266
-268	val_269
+271	val_272
 272	val_272
 272	val_272
 272	val_273
-274	val_274
-274	val_275
 276	val_277
-278	val_278
-278	val_278
-278	val_279
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 284	val_285
 284	val_285
 286	val_286
 286	val_287
-288	val_288
-288	val_288
+287	val_287
+287	val_288
+287	val_288
+289	val_289
+289	val_290
+291	val_291
+291	val_292
+291	val_292
 292	val_292
 292	val_293
 292	val_293
-296	val_296
-296	val_297
-298	val_298
-298	val_298
-298	val_298
-300	val_301
-300	val_301
-302	val_302
-302	val_303
 304	val_305
-306	val_306
-306	val_307
+307	val_307
+307	val_307
 308	val_308
 308	val_309
 308	val_309
@@ -1252,63 +1281,83 @@ POSTHOOK: Input: default@srcbucket
 310	val_311
 310	val_311
 310	val_311
-314	val_315
+311	val_311
+311	val_311
+311	val_311
+313	val_314
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-318	val_319
-322	val_322
-322	val_322
-322	val_323
+317	val_317
+317	val_317
+317	val_318
 324	val_325
+325	val_325
+325	val_325
 326	val_327
-328	val_329
-328	val_329
-330	val_331
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 334	val_335
 336	val_336
 336	val_337
+337	val_338
 338	val_338
 338	val_339
-340	val_341
+339	val_339
+341	val_341
+341	val_342
+341	val_342
+341	val_342
 342	val_342
 342	val_342
 342	val_343
+343	val_344
 344	val_344
 344	val_344
 344	val_345
+347	val_348
+347	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_349
+349	val_350
+349	val_350
+349	val_350
+349	val_350
+351	val_351
+351	val_352
+351	val_352
 352	val_353
 352	val_353
-356	val_356
-356	val_357
-356	val_357
-358	val_359
+353	val_353
+353	val_353
+353	val_354
+355	val_356
+355	val_356
 360	val_360
 360	val_361
 362	val_362
 364	val_364
 364	val_365
-366	val_366
+365	val_365
 368	val_368
-374	val_374
-374	val_375
-376	val_377
+369	val_369
+369	val_369
+369	val_369
+369	val_370
+371	val_372
+371	val_372
+371	val_372
+371	val_372
+377	val_377
 378	val_378
 378	val_379
-382	val_382
-382	val_382
-382	val_383
-382	val_383
 384	val_384
 384	val_384
 384	val_384
@@ -1319,18 +1368,24 @@ POSTHOOK: Input: default@srcbucket
 386	val_387
 386	val_387
 388	val_389
-390	val_391
-390	val_391
-390	val_391
+391	val_392
+391	val_392
 392	val_392
 392	val_393
 392	val_393
+393	val_393
+393	val_394
+393	val_394
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-398	val_399
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
+399	val_400
+399	val_400
 402	val_402
 402	val_403
 402	val_403
@@ -1340,25 +1395,36 @@ POSTHOOK: Input: default@srcbucket
 404	val_405
 404	val_405
 404	val_405
-406	val_406
-406	val_406
-406	val_406
-406	val_406
-406	val_407
+407	val_407
+407	val_408
+407	val_408
+407	val_408
 408	val_409
 408	val_409
+409	val_409
+409	val_409
+409	val_409
+409	val_410
+409	val_410
 410	val_411
-412	val_413
-412	val_413
+411	val_411
+411	val_412
 414	val_414
 414	val_414
 414	val_415
-416	val_417
-418	val_418
-424	val_424
-424	val_424
-424	val_425
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+421	val_422
+421	val_422
+423	val_424
+425	val_426
 426	val_427
+427	val_427
+427	val_428
+427	val_428
 428	val_429
 430	val_430
 430	val_430
@@ -1366,25 +1432,24 @@ POSTHOOK: Input: default@srcbucket
 430	val_431
 432	val_432
 432	val_433
-436	val_436
-436	val_437
-438	val_438
-438	val_438
-438	val_438
-438	val_439
-438	val_439
+435	val_435
+435	val_436
+437	val_437
+437	val_438
 440	val_441
 440	val_441
-442	val_443
+443	val_443
+443	val_444
+443	val_444
+443	val_444
 444	val_444
 446	val_446
 446	val_447
 446	val_447
-448	val_448
-448	val_449
-450	val_451
-450	val_451
+449	val_449
 452	val_452
+453	val_453
+453	val_454
 454	val_454
 454	val_454
 454	val_454
@@ -1392,23 +1457,19 @@ POSTHOOK: Input: default@srcbucket
 454	val_455
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
-462	val_463
+459	val_459
+459	val_459
+459	val_460
+463	val_463
+463	val_463
+463	val_464
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-468	val_469
-468	val_469
-468	val_469
-470	val_470
-470	val_471
+467	val_467
+467	val_468
 472	val_472
+473	val_474
 474	val_475
 474	val_475
 476	val_477
@@ -1417,6 +1478,7 @@ POSTHOOK: Input: default@srcbucket
 478	val_478
 478	val_479
 478	val_479
+479	val_479
 480	val_480
 480	val_480
 480	val_480
@@ -1424,21 +1486,23 @@ POSTHOOK: Input: default@srcbucket
 480	val_481
 482	val_482
 482	val_483
+483	val_483
 484	val_484
 484	val_485
-486	val_487
+485	val_485
+485	val_486
+485	val_486
 488	val_489
 490	val_490
 490	val_491
-492	val_492
-492	val_492
-492	val_493
-492	val_493
-494	val_494
-494	val_495
-494	val_495
-496	val_496
-496	val_497
+491	val_491
+491	val_492
+491	val_492
+495	val_495
+495	val_496
+497	val_497
+497	val_498
+497	val_498
 498	val_498
 498	val_498
 498	val_498
@@ -1493,6 +1557,7 @@ STAGE PLANS:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1515,6 +1580,7 @@ STAGE PLANS:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1581,24 +1647,16 @@ ORDER BY key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
-0	val_1
-0	val_1
-3	val_4
-6	val_7
-6	val_7
 9	val_9
-12	val_12
-12	val_12
-12	val_13
-15	val_15
-15	val_15
-15	val_16
-15	val_16
+16	val_17
+16	val_17
 18	val_18
 18	val_18
+19	val_19
+19	val_20
+20	val_20
+20	val_21
+20	val_21
 21	val_22
 21	val_22
 21	val_22
@@ -1606,265 +1664,302 @@ POSTHOOK: Input: default@srcbucket
 24	val_24
 24	val_24
 27	val_27
+29	val_30
+29	val_30
 30	val_30
 30	val_31
-33	val_33
-33	val_34
-42	val_42
-42	val_42
-42	val_43
-42	val_43
-42	val_43
-48	val_49
-48	val_49
-51	val_51
-51	val_51
-51	val_52
+31	val_32
+32	val_33
+40	val_41
+40	val_41
+41	val_41
+43	val_43
+44	val_44
+47	val_47
+47	val_48
+49	val_50
+49	val_50
+50	val_51
 54	val_54
-57	val_57
-60	val_61
-63	val_64
-66	val_66
-69	val_69
-69	val_70
-72	val_72
-72	val_72
+61	val_62
+64	val_64
+67	val_67
+67	val_67
+70	val_70
+70	val_70
+70	val_70
+70	val_71
+71	val_72
+74	val_74
 75	val_76
-78	val_78
-78	val_79
-84	val_84
-84	val_84
+76	val_76
+76	val_76
+76	val_77
+76	val_77
+76	val_77
+77	val_77
+77	val_78
+77	val_78
+82	val_82
+82	val_83
+82	val_83
+85	val_85
+85	val_86
 87	val_87
 87	val_88
 87	val_88
+89	val_90
+89	val_90
+89	val_90
 90	val_90
 90	val_90
 90	val_90
-93	val_94
-93	val_94
-93	val_94
-96	val_96
-99	val_100
-102	val_103
+92	val_92
 105	val_105
 105	val_106
 105	val_106
-111	val_111
 114	val_114
 114	val_115
 114	val_115
 114	val_115
+116	val_116
+116	val_117
 117	val_118
 117	val_118
+118	val_118
+118	val_118
+118	val_119
+118	val_119
+118	val_119
 120	val_120
 120	val_120
 120	val_121
-123	val_124
-123	val_124
-126	val_126
-126	val_127
-126	val_127
-129	val_129
-129	val_129
-129	val_130
-129	val_130
-132	val_133
-132	val_133
+122	val_123
+122	val_123
+122	val_123
+134	val_134
+134	val_134
+134	val_135
 135	val_136
 135	val_136
 135	val_136
-138	val_138
-138	val_138
-138	val_138
-138	val_138
-138	val_139
-138	val_139
+143	val_143
+143	val_144
 144	val_145
-147	val_148
-147	val_148
-150	val_150
-153	val_153
-153	val_154
-153	val_154
-156	val_156
-156	val_157
-156	val_157
-162	val_162
-162	val_163
+145	val_145
+146	val_146
+146	val_146
+149	val_149
+149	val_149
+149	val_150
+157	val_157
+157	val_158
+157	val_158
+158	val_158
+161	val_162
+161	val_162
+161	val_162
+161	val_162
 165	val_165
 165	val_165
 165	val_166
+166	val_166
 168	val_168
 168	val_169
-174	val_174
-174	val_174
-174	val_175
-174	val_175
-177	val_177
-177	val_178
-177	val_178
+170	val_170
+170	val_171
+179	val_179
+179	val_179
+179	val_180
 180	val_180
+181	val_181
 183	val_183
 183	val_184
-186	val_186
-189	val_189
-189	val_190
 192	val_192
 192	val_193
+193	val_193
+193	val_193
+193	val_193
 195	val_195
 195	val_195
-201	val_201
+197	val_197
+197	val_197
+197	val_198
+203	val_203
+203	val_203
 204	val_205
-207	val_207
-207	val_207
-213	val_213
-213	val_213
-213	val_214
-216	val_216
-216	val_216
-216	val_217
-219	val_219
-219	val_219
+209	val_209
+209	val_209
+209	val_210
+209	val_210
+214	val_214
 222	val_222
 222	val_223
+226	val_226
+226	val_227
+226	val_227
+226	val_227
+226	val_227
 228	val_228
 228	val_229
-231	val_232
-237	val_237
-237	val_237
-240	val_241
-243	val_244
-243	val_244
-246	val_247
-246	val_247
-249	val_249
-249	val_250
-249	val_250
-252	val_252
-252	val_253
-255	val_255
-255	val_255
-258	val_258
-258	val_259
+235	val_235
+235	val_236
+238	val_238
+238	val_238
+238	val_239
+241	val_241
+241	val_242
+241	val_242
+241	val_242
+241	val_242
+242	val_242
+242	val_242
+242	val_243
+245	val_246
+245	val_246
+254	val_255
+256	val_256
+256	val_256
+256	val_257
 261	val_262
-264	val_265
-264	val_265
-267	val_268
+262	val_262
+262	val_263
+262	val_263
+266	val_266
+268	val_269
+271	val_272
 273	val_273
 273	val_273
 273	val_273
 273	val_274
 276	val_277
-282	val_282
-282	val_282
+278	val_278
+278	val_278
+278	val_279
+280	val_280
+280	val_280
+284	val_284
+284	val_285
+284	val_285
 285	val_285
 285	val_286
+286	val_286
+286	val_287
+287	val_287
+287	val_288
+287	val_288
 288	val_288
 288	val_288
-291	val_291
-291	val_292
-291	val_292
+292	val_292
+292	val_293
+292	val_293
+293	val_294
+293	val_294
+295	val_296
+295	val_296
+298	val_298
+298	val_298
+298	val_298
 300	val_301
 300	val_301
-303	val_304
-303	val_304
 306	val_306
 306	val_307
+308	val_308
+308	val_309
+308	val_309
 309	val_309
 309	val_309
 309	val_310
-315	val_315
+316	val_316
+316	val_316
+316	val_316
 318	val_318
 318	val_318
 318	val_318
 318	val_319
-321	val_321
-321	val_321
-324	val_325
-327	val_327
-327	val_327
-327	val_327
-330	val_331
-333	val_333
-333	val_333
-333	val_334
-336	val_336
-336	val_337
-339	val_339
-342	val_342
-342	val_342
-342	val_343
-345	val_345
+323	val_323
+323	val_324
+325	val_325
+325	val_325
+326	val_327
+331	val_331
+331	val_331
+331	val_332
+331	val_332
+332	val_332
+341	val_341
+341	val_342
+341	val_342
+341	val_342
+343	val_344
+344	val_344
+344	val_344
+344	val_345
+347	val_348
+347	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_349
-351	val_351
-351	val_352
-351	val_352
-360	val_360
-360	val_361
-363	val_364
-363	val_364
-363	val_364
+364	val_364
+364	val_365
 366	val_366
 369	val_369
 369	val_369
 369	val_369
 369	val_370
-375	val_375
-375	val_376
-375	val_376
-375	val_376
-375	val_376
-375	val_376
-378	val_378
-378	val_379
-381	val_382
+373	val_373
+373	val_374
+374	val_374
+374	val_375
+379	val_379
+379	val_380
 384	val_384
 384	val_384
 384	val_384
 384	val_385
 384	val_385
 384	val_385
-390	val_391
-390	val_391
-390	val_391
-393	val_393
-393	val_394
-393	val_394
-396	val_396
-396	val_396
-396	val_396
+391	val_392
+391	val_392
+392	val_392
+392	val_393
+392	val_393
+395	val_395
+395	val_395
+395	val_396
+395	val_396
+397	val_397
+397	val_397
 399	val_399
 399	val_399
 399	val_400
 399	val_400
-402	val_402
-402	val_403
-402	val_403
-402	val_403
-405	val_406
-408	val_409
-408	val_409
-411	val_411
-411	val_412
+407	val_407
+407	val_408
+407	val_408
+407	val_408
+409	val_409
+409	val_409
+409	val_409
+409	val_410
+409	val_410
+410	val_411
 414	val_414
 414	val_414
 414	val_415
+415	val_416
 417	val_417
 417	val_417
 417	val_417
 423	val_424
 426	val_427
-429	val_429
-429	val_429
-429	val_430
-429	val_430
-432	val_432
-432	val_433
+430	val_430
+430	val_430
+430	val_430
+430	val_431
 435	val_435
 435	val_436
 438	val_438
@@ -1872,19 +1967,24 @@ POSTHOOK: Input: default@srcbucket
 438	val_438
 438	val_439
 438	val_439
-441	val_442
+439	val_439
+439	val_439
+439	val_440
+439	val_440
+440	val_441
+440	val_441
+443	val_443
+443	val_444
+443	val_444
+443	val_444
 444	val_444
 447	val_448
-450	val_451
-450	val_451
-453	val_453
-453	val_454
+448	val_448
+448	val_449
+452	val_452
 459	val_459
 459	val_459
 459	val_460
-462	val_462
-462	val_462
-462	val_463
 468	val_468
 468	val_468
 468	val_468
@@ -1892,31 +1992,39 @@ POSTHOOK: Input: default@srcbucket
 468	val_469
 468	val_469
 468	val_469
-474	val_475
-474	val_475
-477	val_477
-477	val_478
+469	val_469
+469	val_469
+469	val_469
+469	val_469
+469	val_469
+469	val_470
+470	val_470
+470	val_471
+472	val_472
+478	val_478
+478	val_478
+478	val_479
+478	val_479
 480	val_480
 480	val_480
 480	val_480
 480	val_481
 480	val_481
-483	val_483
-486	val_487
-489	val_489
-489	val_489
-489	val_489
-489	val_489
-489	val_490
+485	val_485
+485	val_486
+485	val_486
+491	val_491
+491	val_492
+491	val_492
 492	val_492
 492	val_492
 492	val_493
 492	val_493
 495	val_495
 495	val_496
-498	val_498
-498	val_498
-498	val_498
+497	val_497
+497	val_498
+497	val_498
 PREHOOK: query: EXPLAIN EXTENDED SELECT s.* FROM srcbucket TABLESAMPLE (BUCKET 2 OUT OF 3 on key) s
 ORDER BY key, value
 PREHOOK: type: QUERY
@@ -1968,6 +2076,7 @@ STAGE PLANS:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1990,6 +2099,7 @@ STAGE PLANS:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -2056,91 +2166,125 @@ ORDER BY key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket
 #### A masked pattern was here ####
+0	val_0
+0	val_0
+0	val_0
+0	val_1
+0	val_1
 1	val_2
-4	val_4
-4	val_5
+5	val_5
+5	val_5
+5	val_5
+5	val_6
+8	val_8
+8	val_9
 10	val_10
 10	val_11
-16	val_17
-16	val_17
-19	val_19
-19	val_20
-22	val_23
-28	val_28
-31	val_32
+15	val_15
+15	val_15
+15	val_16
+15	val_16
+17	val_17
+26	val_26
+26	val_26
+33	val_33
+33	val_34
 34	val_34
 37	val_37
 37	val_37
-40	val_41
-40	val_41
-43	val_43
-46	val_47
-49	val_50
-49	val_50
+42	val_42
+42	val_42
+42	val_43
+42	val_43
+42	val_43
 52	val_53
 52	val_53
 52	val_53
 52	val_53
+53	val_53
+53	val_54
+56	val_57
 58	val_58
 58	val_58
 58	val_59
 58	val_59
-61	val_62
-64	val_64
-67	val_67
-67	val_67
-70	val_70
-70	val_70
-70	val_70
-70	val_71
-76	val_76
-76	val_76
-76	val_77
-76	val_77
-76	val_77
-82	val_82
-82	val_83
-82	val_83
-85	val_85
-85	val_86
+59	val_60
+60	val_61
+65	val_65
+65	val_66
+65	val_66
+66	val_66
+69	val_69
+69	val_70
+72	val_72
+72	val_72
+83	val_83
+83	val_83
+84	val_84
+84	val_84
 91	val_92
 94	val_95
 97	val_97
 97	val_97
 97	val_98
 97	val_98
-100	val_100
-100	val_100
-100	val_101
-100	val_101
-103	val_103
-103	val_103
+99	val_100
+101	val_102
+102	val_103
+104	val_104
+104	val_104
+104	val_105
+104	val_105
+104	val_105
 106	val_107
-118	val_118
-118	val_118
-118	val_119
-118	val_119
-118	val_119
+110	val_111
+113	val_113
+113	val_113
 121	val_122
 121	val_122
+123	val_124
+123	val_124
+126	val_126
+126	val_127
+126	val_127
+128	val_128
+128	val_128
+128	val_128
+128	val_129
+128	val_129
+132	val_133
+132	val_133
 133	val_133
 133	val_134
-136	val_136
-136	val_137
-145	val_145
-151	val_152
-151	val_152
-157	val_157
-157	val_158
-157	val_158
+137	val_137
+137	val_137
+137	val_138
+138	val_138
+138	val_138
+138	val_138
+138	val_138
+138	val_139
+138	val_139
+150	val_150
+152	val_152
+152	val_152
+152	val_153
+152	val_153
+152	val_153
+153	val_153
+153	val_154
+153	val_154
 160	val_160
 160	val_161
 163	val_163
-166	val_166
-169	val_169
-169	val_169
-169	val_169
-169	val_169
+164	val_164
+164	val_164
+164	val_165
+164	val_165
+167	val_167
+167	val_167
+167	val_167
+167	val_168
 172	val_172
 172	val_172
 172	val_173
@@ -2148,144 +2292,107 @@ POSTHOOK: Input: default@srcbucket
 175	val_175
 175	val_176
 175	val_176
-178	val_178
-178	val_179
-178	val_179
-181	val_181
+176	val_176
+176	val_176
+177	val_177
+177	val_178
+177	val_178
 184	val_185
 187	val_187
 187	val_187
 187	val_187
+189	val_189
+189	val_190
 190	val_190
-193	val_193
-193	val_193
-193	val_193
-196	val_196
-196	val_197
-196	val_197
-196	val_197
+194	val_194
 199	val_199
 199	val_199
 199	val_199
 199	val_200
 202	val_202
-205	val_205
-205	val_205
-205	val_206
-208	val_208
-208	val_208
-208	val_208
-214	val_214
-217	val_217
-217	val_217
-217	val_218
-217	val_218
-223	val_223
-223	val_223
-226	val_226
-226	val_227
-226	val_227
-226	val_227
-226	val_227
+212	val_213
+213	val_213
+213	val_213
+213	val_214
+215	val_216
+218	val_218
+219	val_219
+219	val_219
+224	val_224
+224	val_224
+224	val_225
+227	val_228
 229	val_229
 229	val_229
-235	val_235
-235	val_236
-238	val_238
-238	val_238
-238	val_239
-241	val_241
-241	val_242
-241	val_242
-241	val_242
-241	val_242
-244	val_244
-244	val_245
-244	val_245
-244	val_245
+233	val_233
+233	val_233
+243	val_244
+243	val_244
+246	val_247
+246	val_247
 247	val_247
-256	val_256
-256	val_256
-256	val_257
+249	val_249
+249	val_250
+249	val_250
+252	val_252
+252	val_253
+255	val_255
+255	val_255
+257	val_257
+257	val_258
+257	val_258
 259	val_260
 259	val_260
-262	val_262
-262	val_263
-262	val_263
-265	val_265
-265	val_265
-265	val_266
-268	val_269
-271	val_272
-274	val_274
-274	val_275
+260	val_260
+260	val_261
+260	val_261
+267	val_268
+272	val_272
+272	val_272
+272	val_273
+275	val_275
+275	val_276
+275	val_276
 277	val_277
 277	val_277
 277	val_277
 277	val_277
 277	val_278
 277	val_278
-280	val_280
-280	val_280
-283	val_283
-286	val_286
-286	val_287
+282	val_282
+282	val_282
 289	val_289
 289	val_290
-292	val_292
-292	val_293
-292	val_293
-295	val_296
-295	val_296
-298	val_298
-298	val_298
-298	val_298
 304	val_305
-307	val_307
-307	val_307
 310	val_310
 310	val_311
 310	val_311
 310	val_311
 313	val_314
-316	val_316
-316	val_316
-316	val_316
-322	val_322
-322	val_322
-322	val_323
-325	val_325
-325	val_325
-328	val_329
-328	val_329
-331	val_331
-331	val_331
-331	val_332
-331	val_332
-334	val_335
-337	val_338
+314	val_315
+315	val_315
+324	val_325
+330	val_331
+333	val_333
+333	val_333
+333	val_334
 340	val_341
-343	val_344
-349	val_350
-349	val_350
-349	val_350
-349	val_350
-352	val_353
-352	val_353
-355	val_356
-355	val_356
+351	val_351
+351	val_352
+351	val_352
+353	val_353
+353	val_353
+353	val_354
+356	val_356
+356	val_357
+356	val_357
 358	val_359
-364	val_364
-364	val_365
-367	val_367
-367	val_367
-367	val_368
-367	val_368
-373	val_373
-373	val_374
-376	val_377
-379	val_379
-379	val_380
+363	val_364
+363	val_364
+363	val_364
+377	val_377
+378	val_378
+378	val_379
 382	val_382
 382	val_382
 382	val_383
@@ -2293,52 +2400,46 @@ POSTHOOK: Input: default@srcbucket
 385	val_386
 385	val_386
 388	val_389
-391	val_392
-391	val_392
-394	val_394
-397	val_397
-397	val_397
-400	val_400
-403	val_403
-403	val_403
-403	val_403
-406	val_406
-406	val_406
-406	val_406
-406	val_406
-406	val_407
-409	val_409
-409	val_409
-409	val_409
-409	val_410
-409	val_410
+393	val_393
+393	val_394
+393	val_394
+396	val_396
+396	val_396
+396	val_396
+402	val_402
+402	val_403
+402	val_403
+402	val_403
+405	val_406
+408	val_409
+408	val_409
 412	val_413
 412	val_413
-415	val_416
-418	val_418
+413	val_413
+413	val_413
+413	val_414
+416	val_417
+419	val_419
 421	val_421
 421	val_422
 421	val_422
-424	val_424
-424	val_424
-424	val_425
-427	val_427
-427	val_428
-427	val_428
-430	val_430
-430	val_430
-430	val_430
-430	val_431
+429	val_429
+429	val_429
+429	val_430
+429	val_430
+432	val_432
+432	val_433
 436	val_436
 436	val_437
-439	val_439
-439	val_439
-439	val_440
-439	val_440
-442	val_443
-448	val_448
-448	val_449
+437	val_437
+437	val_438
+441	val_442
+446	val_446
+446	val_447
+446	val_447
 451	val_452
+453	val_453
+453	val_454
 454	val_454
 454	val_454
 454	val_454
@@ -2347,37 +2448,41 @@ POSTHOOK: Input: default@srcbucket
 457	val_457
 457	val_458
 457	val_458
+458	val_458
+458	val_458
 460	val_460
+461	val_462
 463	val_463
 463	val_463
 463	val_464
 466	val_466
 466	val_466
 466	val_466
-469	val_469
-469	val_469
-469	val_469
-469	val_469
-469	val_469
-469	val_470
-472	val_472
+474	val_475
+474	val_475
 475	val_475
 475	val_476
-478	val_478
-478	val_478
-478	val_479
-478	val_479
+476	val_477
+476	val_477
+477	val_477
+477	val_478
 481	val_481
 481	val_482
+482	val_482
+482	val_483
+483	val_483
 484	val_484
 484	val_485
+486	val_487
 487	val_487
 487	val_488
+489	val_489
+489	val_489
+489	val_489
+489	val_489
+489	val_490
 490	val_490
 490	val_491
-493	val_493
-496	val_496
-496	val_497
 PREHOOK: query: EXPLAIN EXTENDED SELECT s.* FROM srcbucket2 TABLESAMPLE (BUCKET 1 OUT OF 2 on key) s
 ORDER BY key, value
 PREHOOK: type: QUERY
@@ -2430,6 +2535,7 @@ STAGE PLANS:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                     bucket_count 4
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -2452,6 +2558,7 @@ STAGE PLANS:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -2478,6 +2585,7 @@ STAGE PLANS:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                     bucket_count 4
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -2500,6 +2608,7 @@ STAGE PLANS:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -2567,104 +2676,93 @@ ORDER BY key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket2
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
 2	val_2
-4	val_4
-8	val_8
 10	val_10
-12	val_12
-12	val_12
-18	val_18
-18	val_18
+17	val_17
+19	val_19
 20	val_20
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
+27	val_27
 30	val_30
-34	val_34
-42	val_42
-42	val_42
-44	val_44
+41	val_41
+43	val_43
+51	val_51
+51	val_51
 54	val_54
+57	val_57
 58	val_58
 58	val_58
 64	val_64
-66	val_66
+65	val_65
+67	val_67
+67	val_67
+69	val_69
 70	val_70
 70	val_70
 70	val_70
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-78	val_78
+77	val_77
 80	val_80
-82	val_82
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
 86	val_86
 90	val_90
 90	val_90
 90	val_90
-92	val_92
 96	val_96
+97	val_97
+97	val_97
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-104	val_104
-104	val_104
-114	val_114
+105	val_105
+113	val_113
+113	val_113
 116	val_116
-118	val_118
-118	val_118
-120	val_120
-120	val_120
+119	val_119
+119	val_119
+119	val_119
 126	val_126
-128	val_128
-128	val_128
-128	val_128
+133	val_133
 134	val_134
 134	val_134
-136	val_136
-138	val_138
-138	val_138
-138	val_138
-138	val_138
+137	val_137
+137	val_137
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
+149	val_149
+149	val_149
+153	val_153
 156	val_156
+157	val_157
 158	val_158
-160	val_160
 162	val_162
+163	val_163
 164	val_164
 164	val_164
-166	val_166
-168	val_168
-170	val_170
-172	val_172
-172	val_172
-174	val_174
-174	val_174
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+177	val_177
 178	val_178
-180	val_180
-186	val_186
+181	val_181
+187	val_187
+187	val_187
+187	val_187
 190	val_190
-192	val_192
-194	val_194
-196	val_196
-200	val_200
-200	val_200
+191	val_191
+191	val_191
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+199	val_199
+199	val_199
+199	val_199
+201	val_201
 202	val_202
 208	val_208
 208	val_208
@@ -2672,63 +2770,60 @@ POSTHOOK: Input: default@srcbucket2
 214	val_214
 216	val_216
 216	val_216
-218	val_218
-222	val_222
-224	val_224
-224	val_224
+221	val_221
+221	val_221
 226	val_226
-228	val_228
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
-242	val_242
-242	val_242
+239	val_239
+239	val_239
 244	val_244
 248	val_248
+249	val_249
 252	val_252
+255	val_255
+255	val_255
 256	val_256
 256	val_256
-258	val_258
 260	val_260
-262	val_262
 266	val_266
 272	val_272
 272	val_272
-274	val_274
-278	val_278
-278	val_278
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 286	val_286
-288	val_288
-288	val_288
+287	val_287
+289	val_289
+291	val_291
 292	val_292
-296	val_296
-298	val_298
-298	val_298
-298	val_298
-302	val_302
-306	val_306
+307	val_307
+307	val_307
 308	val_308
 310	val_310
+311	val_311
+311	val_311
+311	val_311
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-322	val_322
-322	val_322
+317	val_317
+317	val_317
+325	val_325
+325	val_325
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 336	val_336
 338	val_338
+339	val_339
+341	val_341
 342	val_342
 342	val_342
 344	val_344
@@ -2738,79 +2833,89 @@ POSTHOOK: Input: default@srcbucket2
 348	val_348
 348	val_348
 348	val_348
-356	val_356
+351	val_351
+353	val_353
+353	val_353
 360	val_360
 362	val_362
 364	val_364
-366	val_366
+365	val_365
 368	val_368
-374	val_374
+369	val_369
+369	val_369
+369	val_369
+377	val_377
 378	val_378
-382	val_382
-382	val_382
 384	val_384
 384	val_384
 384	val_384
 386	val_386
 392	val_392
+393	val_393
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
 402	val_402
 404	val_404
 404	val_404
-406	val_406
-406	val_406
-406	val_406
-406	val_406
+407	val_407
+409	val_409
+409	val_409
+409	val_409
+411	val_411
 414	val_414
 414	val_414
-418	val_418
-424	val_424
-424	val_424
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+427	val_427
 430	val_430
 430	val_430
 430	val_430
 432	val_432
-436	val_436
-438	val_438
-438	val_438
-438	val_438
+435	val_435
+437	val_437
+443	val_443
 444	val_444
 446	val_446
-448	val_448
+449	val_449
 452	val_452
+453	val_453
 454	val_454
 454	val_454
 454	val_454
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
+459	val_459
+459	val_459
+463	val_463
+463	val_463
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-470	val_470
+467	val_467
 472	val_472
 478	val_478
 478	val_478
+479	val_479
 480	val_480
 480	val_480
 480	val_480
 482	val_482
+483	val_483
 484	val_484
+485	val_485
 490	val_490
-492	val_492
-492	val_492
-494	val_494
-496	val_496
+491	val_491
+495	val_495
+497	val_497
 498	val_498
 498	val_498
 498	val_498
@@ -2866,6 +2971,7 @@ STAGE PLANS:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                     bucket_count 4
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -2888,6 +2994,7 @@ STAGE PLANS:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -2954,144 +3061,132 @@ ORDER BY key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket2
 #### A masked pattern was here ####
-5	val_5
-5	val_5
-5	val_5
+0	val_0
+0	val_0
+0	val_0
+4	val_4
+8	val_8
 9	val_9
-17	val_17
-33	val_33
+11	val_11
+18	val_18
+18	val_18
+26	val_26
+26	val_26
+34	val_34
 37	val_37
 37	val_37
-41	val_41
-53	val_53
-57	val_57
-65	val_65
-69	val_69
-77	val_77
-85	val_85
-97	val_97
-97	val_97
-105	val_105
-113	val_113
-113	val_113
-125	val_125
-125	val_125
-129	val_129
-129	val_129
-133	val_133
-137	val_137
-137	val_137
-145	val_145
-149	val_149
-149	val_149
-153	val_153
-157	val_157
-165	val_165
-165	val_165
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-177	val_177
-181	val_181
+66	val_66
+72	val_72
+72	val_72
+74	val_74
+78	val_78
+82	val_82
+92	val_92
+100	val_100
+100	val_100
+103	val_103
+103	val_103
+118	val_118
+118	val_118
+120	val_120
+120	val_120
+128	val_128
+128	val_128
+128	val_128
+131	val_131
+136	val_136
+143	val_143
+150	val_150
+152	val_152
+152	val_152
+155	val_155
+160	val_160
+174	val_174
+174	val_174
+175	val_175
+175	val_175
+176	val_176
+176	val_176
+179	val_179
+179	val_179
+183	val_183
+186	val_186
 189	val_189
-193	val_193
-193	val_193
-193	val_193
-197	val_197
-197	val_197
-201	val_201
+194	val_194
+200	val_200
+200	val_200
 205	val_205
 205	val_205
-209	val_209
-209	val_209
-213	val_213
-213	val_213
 217	val_217
 217	val_217
-221	val_221
-221	val_221
-229	val_229
-229	val_229
-233	val_233
-233	val_233
-237	val_237
-237	val_237
-241	val_241
-249	val_249
-257	val_257
-265	val_265
-265	val_265
-273	val_273
-273	val_273
-273	val_273
+218	val_218
+222	val_222
+223	val_223
+223	val_223
+228	val_228
+230	val_230
+230	val_230
+230	val_230
+230	val_230
+230	val_230
+235	val_235
+247	val_247
+262	val_262
+275	val_275
 277	val_277
 277	val_277
 277	val_277
 277	val_277
-281	val_281
-281	val_281
+280	val_280
+280	val_280
+282	val_282
+282	val_282
 285	val_285
-289	val_289
+288	val_288
+288	val_288
+296	val_296
+298	val_298
+298	val_298
+298	val_298
+302	val_302
 305	val_305
+306	val_306
 309	val_309
 309	val_309
-317	val_317
-317	val_317
 321	val_321
 321	val_321
-325	val_325
-325	val_325
+323	val_323
 333	val_333
 333	val_333
-341	val_341
 345	val_345
-353	val_353
-353	val_353
-365	val_365
-369	val_369
-369	val_369
-369	val_369
-373	val_373
-377	val_377
+366	val_366
+374	val_374
+375	val_375
 389	val_389
-393	val_393
-397	val_397
-397	val_397
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-409	val_409
-409	val_409
-409	val_409
+400	val_400
 413	val_413
 413	val_413
-417	val_417
-417	val_417
-417	val_417
-421	val_421
-429	val_429
-429	val_429
-437	val_437
-449	val_449
-453	val_453
+424	val_424
+424	val_424
+438	val_438
+438	val_438
+438	val_438
+439	val_439
+439	val_439
+455	val_455
 457	val_457
+460	val_460
+462	val_462
+462	val_462
 469	val_469
 469	val_469
 469	val_469
 469	val_469
 469	val_469
 477	val_477
-481	val_481
-485	val_485
-489	val_489
-489	val_489
-489	val_489
-489	val_489
+487	val_487
 493	val_493
-497	val_497
+496	val_496
 PREHOOK: query: CREATE TABLE empty_bucket (key int, value string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/sample7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/sample7.q.out b/ql/src/test/results/clientpositive/spark/sample7.q.out
index d017850..5b70a47 100644
--- a/ql/src/test/results/clientpositive/spark/sample7.q.out
+++ b/ql/src/test/results/clientpositive/spark/sample7.q.out
@@ -53,6 +53,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 
@@ -85,6 +86,7 @@ STAGE PLANS:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -107,6 +109,7 @@ STAGE PLANS:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -138,6 +141,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 
@@ -184,121 +188,130 @@ order by key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@dest1
 #### A masked pattern was here ####
-104	val_104
-104	val_104
-104	val_105
-104	val_105
-104	val_105
+105	val_105
+105	val_106
+105	val_106
+110	val_111
+113	val_113
+113	val_113
 116	val_116
 116	val_117
-120	val_120
-120	val_120
-120	val_121
-128	val_128
-128	val_128
-128	val_128
-128	val_129
-128	val_129
-132	val_133
-132	val_133
-136	val_136
-136	val_137
-140	val_141
-144	val_145
-152	val_152
-152	val_152
-152	val_153
-152	val_153
-152	val_153
+117	val_118
+117	val_118
+119	val_119
+119	val_119
+119	val_119
+119	val_120
+119	val_120
+119	val_120
+121	val_122
+121	val_122
+123	val_124
+123	val_124
+126	val_126
+126	val_127
+126	val_127
+134	val_134
+134	val_134
+134	val_135
+137	val_137
+137	val_137
+137	val_138
+153	val_153
+153	val_154
+153	val_154
 156	val_156
 156	val_157
 156	val_157
-160	val_160
-160	val_161
-164	val_164
-164	val_164
-164	val_165
-164	val_165
-168	val_168
-168	val_169
-172	val_172
-172	val_172
-172	val_173
-176	val_176
-176	val_176
-180	val_180
+157	val_157
+157	val_158
+157	val_158
+158	val_158
+163	val_163
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+177	val_177
+177	val_178
+177	val_178
+178	val_178
+178	val_179
+178	val_179
 184	val_185
-192	val_192
-192	val_193
-196	val_196
-196	val_197
-196	val_197
-196	val_197
-200	val_200
-200	val_200
-204	val_205
+187	val_187
+187	val_187
+187	val_187
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+197	val_198
+206	val_207
+206	val_207
+206	val_207
 208	val_208
 208	val_208
 208	val_208
-212	val_213
-216	val_216
-216	val_216
-216	val_217
-224	val_224
-224	val_224
-224	val_225
-228	val_228
-228	val_229
-240	val_241
+221	val_221
+221	val_221
+229	val_229
+229	val_229
+237	val_237
+237	val_237
+243	val_244
+243	val_244
 244	val_244
 244	val_245
 244	val_245
 244	val_245
-248	val_248
-248	val_249
+249	val_249
+249	val_250
+249	val_250
 252	val_252
 252	val_253
+254	val_255
 256	val_256
 256	val_256
 256	val_257
-260	val_260
-260	val_261
-260	val_261
-264	val_265
-264	val_265
-268	val_269
+266	val_266
+271	val_272
 272	val_272
 272	val_272
 272	val_273
-276	val_277
-280	val_280
-280	val_280
-284	val_284
-284	val_285
-284	val_285
-288	val_288
-288	val_288
+286	val_286
+286	val_287
+289	val_289
+289	val_290
 292	val_292
 292	val_293
 292	val_293
-296	val_296
-296	val_297
-300	val_301
-300	val_301
 304	val_305
+307	val_307
+307	val_307
 308	val_308
 308	val_309
 308	val_309
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-324	val_325
-328	val_329
-328	val_329
-332	val_332
+317	val_317
+317	val_317
+317	val_318
+326	val_327
+327	val_327
+327	val_327
+327	val_327
+334	val_335
 336	val_336
 336	val_337
-340	val_341
+338	val_338
+338	val_339
+339	val_339
+342	val_342
+342	val_342
+342	val_343
 344	val_344
 344	val_344
 344	val_345
@@ -308,77 +321,94 @@ POSTHOOK: Input: default@dest1
 348	val_348
 348	val_348
 348	val_349
+349	val_350
+349	val_350
+349	val_350
+349	val_350
 352	val_353
 352	val_353
-356	val_356
-356	val_357
-356	val_357
+353	val_353
+353	val_353
+353	val_354
+355	val_356
+355	val_356
 360	val_360
 360	val_361
+362	val_362
 364	val_364
 364	val_365
-368	val_368
-376	val_377
-384	val_384
-384	val_384
-384	val_384
-384	val_385
-384	val_385
-384	val_385
-388	val_389
+369	val_369
+369	val_369
+369	val_369
+369	val_370
+371	val_372
+371	val_372
+371	val_372
+371	val_372
+377	val_377
+378	val_378
+378	val_379
+391	val_392
+391	val_392
 392	val_392
 392	val_393
 392	val_393
 396	val_396
 396	val_396
 396	val_396
-400	val_400
+399	val_399
+399	val_399
+399	val_400
+399	val_400
+402	val_402
+402	val_403
+402	val_403
+402	val_403
 404	val_404
 404	val_404
 404	val_405
 404	val_405
 404	val_405
+407	val_407
+407	val_408
+407	val_408
+407	val_408
 408	val_409
 408	val_409
-412	val_413
-412	val_413
-416	val_417
-424	val_424
-424	val_424
-424	val_425
-428	val_429
-432	val_432
-432	val_433
-436	val_436
-436	val_437
+410	val_411
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+423	val_424
+426	val_427
+427	val_427
+427	val_428
+427	val_428
 440	val_441
 440	val_441
-444	val_444
-448	val_448
-448	val_449
+449	val_449
 452	val_452
-460	val_460
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-468	val_469
-468	val_469
-468	val_469
+458	val_458
+458	val_458
+463	val_463
+463	val_463
+463	val_464
+466	val_466
+466	val_466
+466	val_466
 472	val_472
 476	val_477
 476	val_477
-480	val_480
-480	val_480
-480	val_480
-480	val_481
-480	val_481
+478	val_478
+478	val_478
+478	val_479
+478	val_479
+479	val_479
+482	val_482
+482	val_483
 484	val_484
 484	val_485
-488	val_489
-492	val_492
-492	val_492
-492	val_493
-492	val_493
-496	val_496
-496	val_497
+497	val_497
+497	val_498
+497	val_498

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/sample8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/sample8.q.out b/ql/src/test/results/clientpositive/spark/sample8.q.out
index 5e0bf43..eae5453 100644
--- a/ql/src/test/results/clientpositive/spark/sample8.q.out
+++ b/ql/src/test/results/clientpositive/spark/sample8.q.out
@@ -76,6 +76,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'
@@ -148,6 +149,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 +198,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'
@@ -244,6 +247,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'
@@ -292,6 +296,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'
@@ -382,358 +387,334 @@ 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 ####
-105	val_105
-105	val_105
-105	val_105
-105	val_105
-114	val_114
-114	val_114
-114	val_114
-114	val_114
-150	val_150
-150	val_150
-150	val_150
-150	val_150
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-178	val_178
-178	val_178
-178	val_178
-178	val_178
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
 196	val_196
 196	val_196
 196	val_196
 196	val_196
-2	val_2
-2	val_2
-2	val_2
-2	val_2
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-222	val_222
-222	val_222
-222	val_222
-222	val_222
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-286	val_286
-286	val_286
-286	val_286
-286	val_286
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+258	val_258
+258	val_258
+258	val_258
+258	val_258
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+285	val_285
+285	val_285
+285	val_285
+285	val_285
+291	val_291
+291	val_291
+291	val_291
+291	val_291
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+306	val_306
+306	val_306
+306	val_306
+306	val_306
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+374	val_374
+374	val_374
+374	val_374
+374	val_374
+377	val_377
+377	val_377
+377	val_377
+377	val_377
 394	val_394
 394	val_394
 394	val_394
 394	val_394
-402	val_402
-402	val_402
-402	val_402
-402	val_402
-411	val_411
-411	val_411
-411	val_411
-411	val_411
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-448	val_448
-448	val_448
-448	val_448
-448	val_448
-457	val_457
-457	val_457
-457	val_457
-457	val_457
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-475	val_475
-475	val_475
-475	val_475
-475	val_475
-484	val_484
-484	val_484
-484	val_484
-484	val_484
-493	val_493
-493	val_493
-493	val_493
-493	val_493
-77	val_77
-77	val_77
-77	val_77
-77	val_77
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+444	val_444
+444	val_444
+444	val_444
+444	val_444
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+485	val_485
+485	val_485
+485	val_485
+485	val_485
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+66	val_66
+66	val_66
+66	val_66
+66	val_66
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+8	val_8
+8	val_8
+8	val_8
+8	val_8
 86	val_86
 86	val_86
 86	val_86
 86	val_86
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
 PREHOOK: query: EXPLAIN
 SELECT * FROM src TABLESAMPLE(100 ROWS) a JOIN src1 TABLESAMPLE(10 ROWS) b ON a.key=b.key
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/sample9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/sample9.q.out b/ql/src/test/results/clientpositive/spark/sample9.q.out
index 8283d04..7e648b5 100644
--- a/ql/src/test/results/clientpositive/spark/sample9.q.out
+++ b/ql/src/test/results/clientpositive/spark/sample9.q.out
@@ -38,205 +38,188 @@ order by key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
-0	val_1
-0	val_1
 2	val_2
 2	val_3
-4	val_4
-4	val_5
+3	val_4
 6	val_7
 6	val_7
-8	val_8
-8	val_9
 10	val_10
 10	val_11
-12	val_12
-12	val_12
-12	val_13
-16	val_17
-16	val_17
-18	val_18
-18	val_18
+17	val_17
+19	val_19
+19	val_20
 20	val_20
 20	val_21
 20	val_21
-22	val_23
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
+21	val_22
+21	val_22
+21	val_22
+21	val_22
+27	val_27
+29	val_30
+29	val_30
 30	val_30
 30	val_31
-32	val_33
-34	val_34
+31	val_32
 40	val_41
 40	val_41
-42	val_42
-42	val_42
-42	val_43
-42	val_43
-42	val_43
-44	val_44
+41	val_41
+43	val_43
 46	val_47
 48	val_49
 48	val_49
-50	val_51
-52	val_53
-52	val_53
-52	val_53
-52	val_53
+51	val_51
+51	val_51
+51	val_52
 54	val_54
-56	val_57
+57	val_57
 58	val_58
 58	val_58
 58	val_59
 58	val_59
+59	val_60
 60	val_61
-62	val_63
-62	val_63
+61	val_62
 64	val_64
-66	val_66
+65	val_65
+65	val_66
+65	val_66
+67	val_67
+67	val_67
 68	val_69
+69	val_69
+69	val_70
 70	val_70
 70	val_70
 70	val_70
 70	val_71
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-76	val_77
-76	val_77
-76	val_77
-78	val_78
-78	val_79
+77	val_77
+77	val_78
+77	val_78
 80	val_80
 80	val_81
-82	val_82
-82	val_83
-82	val_83
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
+85	val_86
 86	val_86
 86	val_87
+89	val_90
+89	val_90
+89	val_90
 90	val_90
 90	val_90
 90	val_90
-92	val_92
-94	val_95
+91	val_92
+93	val_94
+93	val_94
+93	val_94
 96	val_96
+97	val_97
+97	val_97
+97	val_98
+97	val_98
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-100	val_101
-100	val_101
-102	val_103
-104	val_104
-104	val_104
-104	val_105
-104	val_105
-104	val_105
+99	val_100
+101	val_102
+105	val_105
+105	val_106
+105	val_106
 106	val_107
 110	val_111
-114	val_114
-114	val_115
-114	val_115
-114	val_115
+113	val_113
+113	val_113
 116	val_116
 116	val_117
-118	val_118
-118	val_118
-118	val_119
-118	val_119
-118	val_119
-120	val_120
-120	val_120
-120	val_121
-122	val_123
-122	val_123
-122	val_123
+117	val_118
+117	val_118
+119	val_119
+119	val_119
+119	val_119
+119	val_120
+119	val_120
+119	val_120
+121	val_122
+121	val_122
+123	val_124
+123	val_124
 126	val_126
 126	val_127
 126	val_127
-128	val_128
-128	val_128
-128	val_128
-128	val_129
-128	val_129
 132	val_133
 132	val_133
+133	val_133
+133	val_134
 134	val_134
 134	val_134
 134	val_135
-136	val_136
-136	val_137
-138	val_138
-138	val_138
-138	val_138
-138	val_138
-138	val_139
-138	val_139
+135	val_136
+135	val_136
+135	val_136
+137	val_137
+137	val_137
+137	val_138
 140	val_141
-144	val_145
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
-152	val_153
-152	val_153
-152	val_153
+149	val_149
+149	val_149
+149	val_150
+153	val_153
+153	val_154
+153	val_154
 156	val_156
 156	val_157
 156	val_157
+157	val_157
+157	val_158
+157	val_158
 158	val_158
-160	val_160
-160	val_161
 162	val_162
 162	val_163
+163	val_163
 164	val_164
 164	val_164
 164	val_165
 164	val_165
-166	val_166
-168	val_168
-168	val_169
-170	val_170
-170	val_171
-172	val_172
-172	val_172
-172	val_173
-174	val_174
-174	val_174
-174	val_175
-174	val_175
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+165	val_166
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+177	val_177
+177	val_178
+177	val_178
 178	val_178
 178	val_179
 178	val_179
-180	val_180
+181	val_181
 182	val_183
 184	val_185
-186	val_186
+185	val_186
+187	val_187
+187	val_187
+187	val_187
 190	val_190
-192	val_192
-192	val_193
-194	val_194
-196	val_196
-196	val_197
-196	val_197
-196	val_197
-200	val_200
-200	val_200
+191	val_191
+191	val_191
+191	val_192
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+197	val_198
+199	val_199
+199	val_199
+199	val_199
+199	val_200
+201	val_201
 202	val_202
-204	val_205
 206	val_207
 206	val_207
 206	val_207
@@ -245,95 +228,80 @@ POSTHOOK: Input: default@srcbucket
 208	val_208
 212	val_213
 214	val_214
+215	val_216
 216	val_216
 216	val_216
 216	val_217
-218	val_218
-222	val_222
-222	val_223
-224	val_224
-224	val_224
-224	val_225
+221	val_221
+221	val_221
 226	val_226
 226	val_227
 226	val_227
 226	val_227
 226	val_227
-228	val_228
-228	val_229
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+231	val_232
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
 238	val_239
+239	val_239
+239	val_239
+239	val_240
+239	val_240
 240	val_241
-242	val_242
-242	val_242
-242	val_243
+243	val_244
+243	val_244
 244	val_244
 244	val_245
 244	val_245
 244	val_245
-246	val_247
-246	val_247
 248	val_248
 248	val_249
+249	val_249
+249	val_250
+249	val_250
 252	val_252
 252	val_253
 254	val_255
+255	val_255
+255	val_255
 256	val_256
 256	val_256
 256	val_257
-258	val_258
-258	val_259
 260	val_260
 260	val_261
 260	val_261
-262	val_262
-262	val_263
-262	val_263
-264	val_265
-264	val_265
+261	val_262
 266	val_266
-268	val_269
+271	val_272
 272	val_272
 272	val_272
 272	val_273
-274	val_274
-274	val_275
 276	val_277
-278	val_278
-278	val_278
-278	val_279
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 284	val_285
 284	val_285
 286	val_286
 286	val_287
-288	val_288
-288	val_288
+287	val_287
+287	val_288
+287	val_288
+289	val_289
+289	val_290
+291	val_291
+291	val_292
+291	val_292
 292	val_292
 292	val_293
 292	val_293
-296	val_296
-296	val_297
-298	val_298
-298	val_298
-298	val_298
-300	val_301
-300	val_301
-302	val_302
-302	val_303
 304	val_305
-306	val_306
-306	val_307
+307	val_307
+307	val_307
 308	val_308
 308	val_309
 308	val_309
@@ -341,63 +309,83 @@ POSTHOOK: Input: default@srcbucket
 310	val_311
 310	val_311
 310	val_311
-314	val_315
+311	val_311
+311	val_311
+311	val_311
+313	val_314
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-318	val_319
-322	val_322
-322	val_322
-322	val_323
+317	val_317
+317	val_317
+317	val_318
 324	val_325
+325	val_325
+325	val_325
 326	val_327
-328	val_329
-328	val_329
-330	val_331
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 334	val_335
 336	val_336
 336	val_337
+337	val_338
 338	val_338
 338	val_339
-340	val_341
+339	val_339
+341	val_341
+341	val_342
+341	val_342
+341	val_342
 342	val_342
 342	val_342
 342	val_343
+343	val_344
 344	val_344
 344	val_344
 344	val_345
+347	val_348
+347	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_348
 348	val_349
+349	val_350
+349	val_350
+349	val_350
+349	val_350
+351	val_351
+351	val_352
+351	val_352
 352	val_353
 352	val_353
-356	val_356
-356	val_357
-356	val_357
-358	val_359
+353	val_353
+353	val_353
+353	val_354
+355	val_356
+355	val_356
 360	val_360
 360	val_361
 362	val_362
 364	val_364
 364	val_365
-366	val_366
+365	val_365
 368	val_368
-374	val_374
-374	val_375
-376	val_377
+369	val_369
+369	val_369
+369	val_369
+369	val_370
+371	val_372
+371	val_372
+371	val_372
+371	val_372
+377	val_377
 378	val_378
 378	val_379
-382	val_382
-382	val_382
-382	val_383
-382	val_383
 384	val_384
 384	val_384
 384	val_384
@@ -408,18 +396,24 @@ POSTHOOK: Input: default@srcbucket
 386	val_387
 386	val_387
 388	val_389
-390	val_391
-390	val_391
-390	val_391
+391	val_392
+391	val_392
 392	val_392
 392	val_393
 392	val_393
+393	val_393
+393	val_394
+393	val_394
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-398	val_399
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
+399	val_400
+399	val_400
 402	val_402
 402	val_403
 402	val_403
@@ -429,25 +423,36 @@ POSTHOOK: Input: default@srcbucket
 404	val_405
 404	val_405
 404	val_405
-406	val_406
-406	val_406
-406	val_406
-406	val_406
-406	val_407
+407	val_407
+407	val_408
+407	val_408
+407	val_408
 408	val_409
 408	val_409
+409	val_409
+409	val_409
+409	val_409
+409	val_410
+409	val_410
 410	val_411
-412	val_413
-412	val_413
+411	val_411
+411	val_412
 414	val_414
 414	val_414
 414	val_415
-416	val_417
-418	val_418
-424	val_424
-424	val_424
-424	val_425
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+421	val_422
+421	val_422
+423	val_424
+425	val_426
 426	val_427
+427	val_427
+427	val_428
+427	val_428
 428	val_429
 430	val_430
 430	val_430
@@ -455,25 +460,24 @@ POSTHOOK: Input: default@srcbucket
 430	val_431
 432	val_432
 432	val_433
-436	val_436
-436	val_437
-438	val_438
-438	val_438
-438	val_438
-438	val_439
-438	val_439
+435	val_435
+435	val_436
+437	val_437
+437	val_438
 440	val_441
 440	val_441
-442	val_443
+443	val_443
+443	val_444
+443	val_444
+443	val_444
 444	val_444
 446	val_446
 446	val_447
 446	val_447
-448	val_448
-448	val_449
-450	val_451
-450	val_451
+449	val_449
 452	val_452
+453	val_453
+453	val_454
 454	val_454
 454	val_454
 454	val_454
@@ -481,23 +485,19 @@ POSTHOOK: Input: default@srcbucket
 454	val_455
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
-462	val_463
+459	val_459
+459	val_459
+459	val_460
+463	val_463
+463	val_463
+463	val_464
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-468	val_469
-468	val_469
-468	val_469
-470	val_470
-470	val_471
+467	val_467
+467	val_468
 472	val_472
+473	val_474
 474	val_475
 474	val_475
 476	val_477
@@ -506,6 +506,7 @@ POSTHOOK: Input: default@srcbucket
 478	val_478
 478	val_479
 478	val_479
+479	val_479
 480	val_480
 480	val_480
 480	val_480
@@ -513,21 +514,23 @@ POSTHOOK: Input: default@srcbucket
 480	val_481
 482	val_482
 482	val_483
+483	val_483
 484	val_484
 484	val_485
-486	val_487
+485	val_485
+485	val_486
+485	val_486
 488	val_489
 490	val_490
 490	val_491
-492	val_492
-492	val_492
-492	val_493
-492	val_493
-494	val_494
-494	val_495
-494	val_495
-496	val_496
-496	val_497
+491	val_491
+491	val_492
+491	val_492
+495	val_495
+495	val_496
+497	val_497
+497	val_498
+497	val_498
 498	val_498
 498	val_498
 498	val_498

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/smb_mapjoin_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/smb_mapjoin_1.q.out b/ql/src/test/results/clientpositive/spark/smb_mapjoin_1.q.out
index ec10c44..0ada54b 100644
--- a/ql/src/test/results/clientpositive/spark/smb_mapjoin_1.q.out
+++ b/ql/src/test/results/clientpositive/spark/smb_mapjoin_1.q.out
@@ -64,6 +64,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	SORTBUCKETCOLSPREFIX	TRUE                
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/smb_mapjoin_11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/smb_mapjoin_11.q.out b/ql/src/test/results/clientpositive/spark/smb_mapjoin_11.q.out
index 5a0c973..c331cbd 100644
--- a/ql/src/test/results/clientpositive/spark/smb_mapjoin_11.q.out
+++ b/ql/src/test/results/clientpositive/spark/smb_mapjoin_11.q.out
@@ -128,6 +128,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -167,6 +168,7 @@ STAGE PLANS:
                       properties:
                         bucket_count 16
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -198,6 +200,7 @@ STAGE PLANS:
               properties:
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -1827,6 +1830,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -1899,6 +1903,7 @@ STAGE PLANS:
               properties:
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -1937,47 +1942,38 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table1
 POSTHOOK: Input: default@test_table1@ds=1
 #### A masked pattern was here ####
-17	val_17	1
-33	val_33	1
-65	val_65	1
-97	val_97	1
-97	val_97	1
-113	val_113	1
-113	val_113	1
-129	val_129	1
-129	val_129	1
-145	val_145	1
-177	val_177	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-209	val_209	1
-209	val_209	1
-241	val_241	1
-257	val_257	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-289	val_289	1
-305	val_305	1
+8	val_8	1
+26	val_26	1
+26	val_26	1
+82	val_82	1
+103	val_103	1
+103	val_103	1
+118	val_118	1
+118	val_118	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+176	val_176	1
+176	val_176	1
+194	val_194	1
+275	val_275	1
+280	val_280	1
+280	val_280	1
+282	val_282	1
+282	val_282	1
+309	val_309	1
+309	val_309	1
 321	val_321	1
 321	val_321	1
-353	val_353	1
-353	val_353	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-449	val_449	1
-481	val_481	1
-497	val_497	1
+400	val_400	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+439	val_439	1
+439	val_439	1
+455	val_455	1
+462	val_462	1
+462	val_462	1
 PREHOOK: query: SELECT * FROM test_table3 TABLESAMPLE(BUCKET 2 OUT OF 16)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -1988,103 +1984,70 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-17	val_17	1
-33	val_33	1
-65	val_65	1
-97	val_97	1
-97	val_97	1
-97	val_97	1
-97	val_97	1
-113	val_113	1
-113	val_113	1
-113	val_113	1
-113	val_113	1
-129	val_129	1
-129	val_129	1
-129	val_129	1
-129	val_129	1
-145	val_145	1
-177	val_177	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-209	val_209	1
-209	val_209	1
-209	val_209	1
-209	val_209	1
-241	val_241	1
-257	val_257	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-289	val_289	1
-305	val_305	1
+8	val_8	1
+26	val_26	1
+26	val_26	1
+26	val_26	1
+26	val_26	1
+82	val_82	1
+103	val_103	1
+103	val_103	1
+103	val_103	1
+103	val_103	1
+118	val_118	1
+118	val_118	1
+118	val_118	1
+118	val_118	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+176	val_176	1
+176	val_176	1
+176	val_176	1
+176	val_176	1
+194	val_194	1
+275	val_275	1
+280	val_280	1
+280	val_280	1
+280	val_280	1
+280	val_280	1
+282	val_282	1
+282	val_282	1
+282	val_282	1
+282	val_282	1
+309	val_309	1
+309	val_309	1
+309	val_309	1
+309	val_309	1
 321	val_321	1
 321	val_321	1
 321	val_321	1
 321	val_321	1
-353	val_353	1
-353	val_353	1
-353	val_353	1
-353	val_353	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-449	val_449	1
-481	val_481	1
-497	val_497	1
+400	val_400	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+439	val_439	1
+439	val_439	1
+439	val_439	1
+439	val_439	1
+455	val_455	1
+462	val_462	1
+462	val_462	1
+462	val_462	1
+462	val_462	1
 PREHOOK: query: SELECT COUNT(*) FROM test_table3 TABLESAMPLE(BUCKET 2 OUT OF 16) a JOIN test_table1 TABLESAMPLE(BUCKET 2 OUT OF 16) b ON a.key = b.key AND a.ds = '1' AND b.ds='1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table1
@@ -2099,4 +2062,4 @@ POSTHOOK: Input: default@test_table1@ds=1
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-293
+140


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/unionDistinct_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/unionDistinct_1.q.out b/ql/src/test/results/clientpositive/llap/unionDistinct_1.q.out
index 6a654d0..42d5528 100644
--- a/ql/src/test/results/clientpositive/llap/unionDistinct_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/unionDistinct_1.q.out
@@ -651,314 +651,314 @@ POSTHOOK: query: select unionsrc.key, unionsrc.value FROM (select s1.key as key,
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-0	val_0
-103	val_103
-105	val_105
 116	val_116
+118	val_118
 120	val_120
-129	val_129
 131	val_131
-136	val_136
+133	val_133
+15	val_15
+150	val_150
+152	val_152
+153	val_153
 155	val_155
-157	val_157
 160	val_160
-180	val_180
+169	val_169
+175	val_175
+176	val_176
+178	val_178
 183	val_183
-190	val_190
-191	val_191
-193	val_193
-205	val_205
-207	val_207
+186	val_186
+194	val_194
+202	val_202
+203	val_203
 213	val_213
 223	val_223
-235	val_235
-238	val_238
+224	val_224
+226	val_226
+228	val_228
 239	val_239
-24	val_24
-248	val_248
-260	val_260
+244	val_244
+247	val_247
+252	val_252
+255	val_255
+256	val_256
+257	val_257
+266	val_266
+272	val_272
+274	val_274
+275	val_275
 28	val_28
+284	val_284
 286	val_286
-298	val_298
-305	val_305
+289	val_289
+296	val_296
+302	val_302
 306	val_306
 307	val_307
-308	val_308
-315	val_315
 317	val_317
 321	val_321
+323	val_323
 33	val_33
-331	val_331
-356	val_356
+338	val_338
+34	val_34
+35	val_35
 360	val_360
-366	val_366
-367	val_367
-368	val_368
-37	val_37
-378	val_378
-379	val_379
-382	val_382
-389	val_389
-395	val_395
-400	val_400
-402	val_402
+365	val_365
+374	val_374
+377	val_377
+393	val_393
+399	val_399
+404	val_404
 406	val_406
-407	val_407
+409	val_409
+41	val_41
+417	val_417
+418	val_418
 42	val_42
-430	val_430
-436	val_436
+431	val_431
+439	val_439
 44	val_44
-452	val_452
-466	val_466
-467	val_467
-472	val_472
-480	val_480
-484	val_484
-485	val_485
-487	val_487
-495	val_495
-496	val_496
-498	val_498
-51	val_51
-57	val_57
-58	val_58
-65	val_65
+443	val_443
+448	val_448
+455	val_455
+459	val_459
+462	val_462
+463	val_463
+470	val_470
+490	val_490
+491	val_491
+494	val_494
+5	val_5
+53	val_53
 66	val_66
-69	val_69
-70	val_70
-78	val_78
-8	val_8
-92	val_92
-96	val_96
-104	val_104
+72	val_72
+76	val_76
+77	val_77
+80	val_80
+84	val_84
+90	val_90
+10	val_10
+105	val_105
 111	val_111
-114	val_114
-118	val_118
-12	val_12
-133	val_133
-138	val_138
-153	val_153
-156	val_156
-162	val_162
-168	val_168
+113	val_113
+119	val_119
+129	val_129
+136	val_136
+143	val_143
+149	val_149
+163	val_163
+167	val_167
 174	val_174
-176	val_176
-178	val_178
-181	val_181
-186	val_186
 187	val_187
-192	val_192
 197	val_197
-199	val_199
 2	val_2
-201	val_201
-203	val_203
+200	val_200
 208	val_208
-214	val_214
+209	val_209
+216	val_216
+217	val_217
 218	val_218
-219	val_219
+221	val_221
 230	val_230
-237	val_237
-249	val_249
-256	val_256
-257	val_257
+258	val_258
+26	val_26
+263	val_263
+273	val_273
 277	val_277
-278	val_278
-284	val_284
-285	val_285
-310	val_310
-322	val_322
-327	val_327
-333	val_333
-336	val_336
-338	val_338
+281	val_281
+292	val_292
+30	val_30
+316	val_316
+335	val_335
 341	val_341
+342	val_342
 344	val_344
-348	val_348
-351	val_351
+345	val_345
 362	val_362
-364	val_364
-374	val_374
+367	val_367
+368	val_368
+37	val_37
 392	val_392
-397	val_397
+394	val_394
 4	val_4
-403	val_403
-404	val_404
-419	val_419
-421	val_421
-427	val_427
-429	val_429
+413	val_413
 437	val_437
-438	val_438
-439	val_439
-454	val_454
-455	val_455
+444	val_444
+446	val_446
+452	val_452
+453	val_453
+457	val_457
 460	val_460
-463	val_463
-470	val_470
-478	val_478
+466	val_466
+468	val_468
+477	val_477
 479	val_479
-489	val_489
-491	val_491
+483	val_483
+487	val_487
 492	val_492
-53	val_53
+493	val_493
+498	val_498
+51	val_51
+54	val_54
+64	val_64
+65	val_65
 67	val_67
 82	val_82
-90	val_90
-97	val_97
-10	val_10
-125	val_125
-134	val_134
-143	val_143
+85	val_85
+87	val_87
+95	val_95
+96	val_96
+100	val_100
+103	val_103
+104	val_104
+11	val_11
+114	val_114
+137	val_137
 145	val_145
-149	val_149
-150	val_150
-158	val_158
-163	val_163
-164	val_164
-166	val_166
+156	val_156
+157	val_157
+162	val_162
+168	val_168
 17	val_17
 170	val_170
-172	val_172
-189	val_189
+180	val_180
 19	val_19
-195	val_195
+190	val_190
+192	val_192
 196	val_196
+199	val_199
 20	val_20
-209	val_209
-216	val_216
-217	val_217
-224	val_224
-228	val_228
-229	val_229
+207	val_207
+214	val_214
+219	val_219
+222	val_222
 233	val_233
 241	val_241
-244	val_244
-247	val_247
-255	val_255
-258	val_258
-26	val_26
-263	val_263
-265	val_265
-266	val_266
-272	val_272
-273	val_273
-274	val_274
-281	val_281
-291	val_291
-296	val_296
-30	val_30
-302	val_302
-309	val_309
-316	val_316
+260	val_260
+27	val_27
+278	val_278
+280	val_280
+285	val_285
+288	val_288
+305	val_305
+311	val_311
 318	val_318
-325	val_325
-332	val_332
-335	val_335
-339	val_339
-342	val_342
-345	val_345
-353	val_353
+322	val_322
+327	val_327
+331	val_331
+336	val_336
+348	val_348
+351	val_351
+366	val_366
 369	val_369
-373	val_373
 375	val_375
-377	val_377
+379	val_379
+382	val_382
 384	val_384
-386	val_386
-394	val_394
+389	val_389
+395	val_395
 396	val_396
-399	val_399
+397	val_397
+400	val_400
 401	val_401
-41	val_41
-413	val_413
+407	val_407
 414	val_414
-431	val_431
-446	val_446
-448	val_448
-449	val_449
-459	val_459
-462	val_462
-468	val_468
+421	val_421
+427	val_427
+430	val_430
+435	val_435
+438	val_438
+454	val_454
 47	val_47
-482	val_482
-490	val_490
-493	val_493
-494	val_494
-497	val_497
-5	val_5
-54	val_54
+472	val_472
+478	val_478
+480	val_480
+481	val_481
+485	val_485
+489	val_489
+57	val_57
+69	val_69
 74	val_74
-77	val_77
-80	val_80
-84	val_84
-85	val_85
-87	val_87
+78	val_78
+8	val_8
+86	val_86
 9	val_9
-95	val_95
-100	val_100
-11	val_11
-113	val_113
-119	val_119
+0	val_0
+12	val_12
+125	val_125
 126	val_126
 128	val_128
-137	val_137
+134	val_134
+138	val_138
 146	val_146
-15	val_15
-152	val_152
+158	val_158
+164	val_164
 165	val_165
-167	val_167
-169	val_169
-175	val_175
+166	val_166
+172	val_172
 177	val_177
 179	val_179
 18	val_18
-194	val_194
-200	val_200
-202	val_202
-221	val_221
-222	val_222
-226	val_226
+181	val_181
+189	val_189
+191	val_191
+193	val_193
+195	val_195
+201	val_201
+205	val_205
+229	val_229
+235	val_235
+237	val_237
+238	val_238
+24	val_24
 242	val_242
-252	val_252
+248	val_248
+249	val_249
 262	val_262
-27	val_27
-275	val_275
-280	val_280
+265	val_265
 282	val_282
 283	val_283
 287	val_287
-288	val_288
-289	val_289
-292	val_292
-311	val_311
-323	val_323
-34	val_34
-35	val_35
-365	val_365
-393	val_393
-409	val_409
+291	val_291
+298	val_298
+308	val_308
+309	val_309
+310	val_310
+315	val_315
+325	val_325
+332	val_332
+333	val_333
+339	val_339
+353	val_353
+356	val_356
+364	val_364
+373	val_373
+378	val_378
+386	val_386
+402	val_402
+403	val_403
 411	val_411
-417	val_417
-418	val_418
+419	val_419
 424	val_424
+429	val_429
 43	val_43
 432	val_432
-435	val_435
-443	val_443
-444	val_444
-453	val_453
-457	val_457
+436	val_436
+449	val_449
 458	val_458
+467	val_467
 469	val_469
 475	val_475
-477	val_477
-481	val_481
-483	val_483
-64	val_64
-72	val_72
-76	val_76
+482	val_482
+484	val_484
+495	val_495
+496	val_496
+497	val_497
+58	val_58
+70	val_70
 83	val_83
-86	val_86
+92	val_92
+97	val_97
 98	val_98
 PREHOOK: query: CREATE TABLE DEST1(key STRING, value STRING) STORED AS TEXTFILE
 PREHOOK: type: CREATETABLE
@@ -3836,6 +3836,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns k0,k1,k2,k3,k4,k5
                       columns.comments 
@@ -3914,6 +3915,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns k1,k2,k3,k4
                       columns.comments 
@@ -3992,6 +3994,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns k0,k1,k2,k3,k4,k5
                       columns.comments 
@@ -4032,6 +4035,7 @@ STAGE PLANS:
                       output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                       properties:
                         bucket_count -1
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns k1,k2,k3,k4
                         columns.comments 
@@ -4157,6 +4161,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns k1,k2,k3,k4
                 columns.comments 
@@ -4231,329 +4236,329 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@dst_union22
 POSTHOOK: Input: default@dst_union22@ds=2
 POSTHOOK: Output: hdfs://### HDFS PATH ###
+100	val_100	100	val_100	2
 103	val_103	103	val_103	2
-113	val_113	113	val_113	2
+104	val_104	104	val_104	2
+11	val_11	11	val_11	2
+114	val_114	114	val_114	2
+116	val_116	116	val_116	2
+118	val_118	118	val_118	2
 120	val_120	120	val_120	2
-128	val_128	128	val_128	2
+131	val_131	131	val_131	2
+133	val_133	133	val_133	2
 137	val_137	137	val_137	2
 145	val_145	145	val_145	2
-146	val_146	146	val_146	2
 15	val_15	15	val_15	2
+150	val_150	150	val_150	2
+152	val_152	152	val_152	2
+153	val_153	153	val_153	2
+155	val_155	155	val_155	2
 156	val_156	156	val_156	2
-163	val_163	163	val_163	2
-165	val_165	165	val_165	2
-166	val_166	166	val_166	2
-167	val_167	167	val_167	2
+157	val_157	157	val_157	2
+160	val_160	160	val_160	2
+162	val_162	162	val_162	2
+168	val_168	168	val_168	2
+169	val_169	169	val_169	2
+17	val_17	17	val_17	2
 170	val_170	170	val_170	2
-174	val_174	174	val_174	2
+175	val_175	175	val_175	2
+176	val_176	176	val_176	2
 178	val_178	178	val_178	2
+180	val_180	180	val_180	2
 183	val_183	183	val_183	2
-191	val_191	191	val_191	2
-195	val_195	195	val_195	2
+186	val_186	186	val_186	2
+19	val_19	19	val_19	2
+190	val_190	190	val_190	2
+192	val_192	192	val_192	2
+194	val_194	194	val_194	2
+196	val_196	196	val_196	2
 199	val_199	199	val_199	2
-2	val_2	2	val_2	2
+20	val_20	20	val_20	2
+202	val_202	202	val_202	2
 203	val_203	203	val_203	2
-217	val_217	217	val_217	2
+207	val_207	207	val_207	2
+213	val_213	213	val_213	2
+214	val_214	214	val_214	2
+219	val_219	219	val_219	2
+222	val_222	222	val_222	2
+223	val_223	223	val_223	2
 224	val_224	224	val_224	2
-229	val_229	229	val_229	2
-242	val_242	242	val_242	2
-27	val_27	NULL	NULL	2
-272	val_272	272	val_272	2
-28	val_28	NULL	NULL	2
-280	val_280	280	val_280	2
-282	val_282	282	val_282	2
-283	val_283	283	val_283	2
-287	val_287	287	val_287	2
-289	val_289	289	val_289	2
-292	val_292	292	val_292	2
-306	val_306	306	val_306	2
-307	val_307	307	val_307	2
-309	val_309	309	val_309	2
-310	val_310	310	val_310	2
-315	val_315	315	val_315	2
-327	val_327	327	val_327	2
-33	val_33	33	val_33	2
-331	val_331	331	val_331	2
-332	val_332	332	val_332	2
-333	val_333	333	val_333	2
-338	val_338	338	val_338	2
-344	val_344	344	val_344	2
-348	val_348	348	val_348	2
-35	val_35	35	val_35	2
-353	val_353	353	val_353	2
-362	val_362	362	val_362	2
-37	val_37	37	val_37	2
-373	val_373	373	val_373	2
-379	val_379	379	val_379	2
-4	val_4	4	val_4	2
-400	val_400	400	val_400	2
-401	val_401	401	val_401	2
-403	val_403	403	val_403	2
-406	val_406	406	val_406	2
-41	val_41	41	val_41	2
-414	val_414	414	val_414	2
-417	val_417	417	val_417	2
-431	val_431	431	val_431	2
-432	val_432	432	val_432	2
-436	val_436	436	val_436	2
-439	val_439	439	val_439	2
-452	val_452	452	val_452	2
-453	val_453	453	val_453	2
-455	val_455	455	val_455	2
-466	val_466	466	val_466	2
-469	val_469	469	val_469	2
-47	val_47	NULL	NULL	2
-470	val_470	470	val_470	2
-475	val_475	475	val_475	2
-477	val_477	477	val_477	2
-493	val_493	493	val_493	2
-496	val_496	496	val_496	2
-54	val_54	54	val_54	2
-57	val_57	57	val_57	2
-65	val_65	65	val_65	2
-69	val_69	69	val_69	2
-77	val_77	77	val_77	2
-78	val_78	78	val_78	2
-8	val_8	8	val_8	2
-82	val_82	82	val_82	2
-87	val_87	87	val_87	2
-9	val_9	9	val_9	2
-92	val_92	92	val_92	2
-10	val_10	10	val_10	2
-11	val_11	11	val_11	2
-111	val_111	111	val_111	2
-114	val_114	114	val_114	2
-116	val_116	116	val_116	2
-12	val_12	12	val_12	2
-129	val_129	129	val_129	2
-136	val_136	136	val_136	2
-152	val_152	152	val_152	2
-155	val_155	155	val_155	2
-158	val_158	158	val_158	2
-168	val_168	168	val_168	2
-176	val_176	176	val_176	2
-177	val_177	177	val_177	2
-179	val_179	179	val_179	2
-18	val_18	18	val_18	2
-186	val_186	186	val_186	2
-194	val_194	194	val_194	2
-208	val_208	208	val_208	2
-214	val_214	214	val_214	2
-222	val_222	222	val_222	2
 226	val_226	226	val_226	2
-230	val_230	230	val_230	2
-237	val_237	237	val_237	2
-24	val_24	NULL	NULL	2
-24	val_24	24	val_24	2
-248	val_248	248	val_248	2
+228	val_228	228	val_228	2
+233	val_233	233	val_233	2
+239	val_239	239	val_239	2
+241	val_241	241	val_241	2
+244	val_244	244	val_244	2
+247	val_247	247	val_247	2
+252	val_252	252	val_252	2
 255	val_255	255	val_255	2
 256	val_256	256	val_256	2
-26	val_26	26	val_26	2
-265	val_265	265	val_265	2
+257	val_257	257	val_257	2
+260	val_260	260	val_260	2
 266	val_266	266	val_266	2
-273	val_273	273	val_273	2
+27	val_27	27	val_27	2
+272	val_272	272	val_272	2
+274	val_274	274	val_274	2
 275	val_275	275	val_275	2
+278	val_278	278	val_278	2
+28	val_28	NULL	NULL	2
 28	val_28	28	val_28	2
+280	val_280	280	val_280	2
 284	val_284	284	val_284	2
-291	val_291	291	val_291	2
-298	val_298	298	val_298	2
-30	val_30	NULL	NULL	2
-30	val_30	30	val_30	2
-308	val_308	308	val_308	2
+285	val_285	285	val_285	2
+286	val_286	286	val_286	2
+288	val_288	288	val_288	2
+289	val_289	289	val_289	2
+296	val_296	296	val_296	2
+302	val_302	302	val_302	2
+305	val_305	305	val_305	2
+306	val_306	306	val_306	2
+307	val_307	307	val_307	2
+311	val_311	311	val_311	2
+317	val_317	317	val_317	2
+318	val_318	318	val_318	2
 321	val_321	321	val_321	2
 322	val_322	322	val_322	2
-335	val_335	335	val_335	2
+323	val_323	323	val_323	2
+327	val_327	327	val_327	2
+33	val_33	NULL	NULL	2
+33	val_33	33	val_33	2
+331	val_331	331	val_331	2
 336	val_336	336	val_336	2
+338	val_338	338	val_338	2
+34	val_34	NULL	NULL	2
 34	val_34	34	val_34	2
-341	val_341	341	val_341	2
-342	val_342	342	val_342	2
+348	val_348	348	val_348	2
+35	val_35	NULL	NULL	2
+35	val_35	35	val_35	2
+351	val_351	351	val_351	2
+360	val_360	360	val_360	2
+365	val_365	365	val_365	2
+366	val_366	366	val_366	2
 369	val_369	369	val_369	2
 374	val_374	374	val_374	2
+375	val_375	375	val_375	2
 377	val_377	377	val_377	2
+379	val_379	379	val_379	2
 382	val_382	382	val_382	2
-386	val_386	386	val_386	2
+384	val_384	384	val_384	2
+389	val_389	389	val_389	2
 393	val_393	393	val_393	2
+395	val_395	395	val_395	2
+396	val_396	396	val_396	2
 397	val_397	397	val_397	2
-402	val_402	402	val_402	2
+399	val_399	399	val_399	2
+400	val_400	400	val_400	2
+401	val_401	401	val_401	2
 404	val_404	404	val_404	2
+406	val_406	406	val_406	2
 407	val_407	407	val_407	2
+409	val_409	409	val_409	2
+41	val_41	NULL	NULL	2
+41	val_41	41	val_41	2
+414	val_414	414	val_414	2
+417	val_417	417	val_417	2
 418	val_418	418	val_418	2
-446	val_446	446	val_446	2
+42	val_42	NULL	NULL	2
+42	val_42	42	val_42	2
+421	val_421	421	val_421	2
+427	val_427	427	val_427	2
+430	val_430	430	val_430	2
+431	val_431	431	val_431	2
+435	val_435	435	val_435	2
+438	val_438	438	val_438	2
+439	val_439	439	val_439	2
+44	val_44	NULL	NULL	2
+44	val_44	44	val_44	2
+443	val_443	443	val_443	2
 448	val_448	448	val_448	2
-457	val_457	457	val_457	2
+454	val_454	454	val_454	2
+455	val_455	455	val_455	2
 459	val_459	459	val_459	2
 462	val_462	462	val_462	2
 463	val_463	463	val_463	2
+47	val_47	47	val_47	2
+470	val_470	470	val_470	2
 472	val_472	472	val_472	2
 478	val_478	478	val_478	2
-479	val_479	479	val_479	2
 480	val_480	480	val_480	2
-483	val_483	483	val_483	2
+481	val_481	481	val_481	2
 485	val_485	485	val_485	2
+489	val_489	489	val_489	2
+490	val_490	490	val_490	2
 491	val_491	491	val_491	2
+494	val_494	494	val_494	2
 5	val_5	5	val_5	2
 53	val_53	53	val_53	2
-67	val_67	67	val_67	2
+57	val_57	57	val_57	2
+66	val_66	66	val_66	2
+69	val_69	69	val_69	2
+72	val_72	72	val_72	2
+74	val_74	74	val_74	2
 76	val_76	76	val_76	2
-83	val_83	83	val_83	2
+77	val_77	77	val_77	2
+78	val_78	78	val_78	2
+8	val_8	8	val_8	2
+80	val_80	80	val_80	2
+84	val_84	84	val_84	2
 86	val_86	86	val_86	2
-95	val_95	95	val_95	2
-96	val_96	96	val_96	2
-98	val_98	98	val_98	2
-100	val_100	100	val_100	2
+9	val_9	9	val_9	2
+90	val_90	90	val_90	2
+26	val_26	NULL	NULL	2
+30	val_30	NULL	NULL	2
+37	val_37	NULL	NULL	2
+0	val_0	0	val_0	2
+10	val_10	10	val_10	2
+105	val_105	105	val_105	2
+111	val_111	111	val_111	2
+113	val_113	113	val_113	2
+119	val_119	119	val_119	2
+12	val_12	12	val_12	2
 125	val_125	125	val_125	2
 126	val_126	126	val_126	2
+128	val_128	128	val_128	2
+129	val_129	129	val_129	2
 134	val_134	134	val_134	2
+136	val_136	136	val_136	2
 138	val_138	138	val_138	2
 143	val_143	143	val_143	2
+146	val_146	146	val_146	2
 149	val_149	149	val_149	2
-150	val_150	150	val_150	2
-157	val_157	157	val_157	2
+158	val_158	158	val_158	2
+163	val_163	163	val_163	2
 164	val_164	164	val_164	2
-169	val_169	169	val_169	2
-17	val_17	17	val_17	2
+165	val_165	165	val_165	2
+166	val_166	166	val_166	2
+167	val_167	167	val_167	2
 172	val_172	172	val_172	2
+174	val_174	174	val_174	2
+177	val_177	177	val_177	2
+179	val_179	179	val_179	2
+18	val_18	18	val_18	2
 181	val_181	181	val_181	2
 187	val_187	187	val_187	2
 189	val_189	189	val_189	2
-190	val_190	190	val_190	2
-192	val_192	192	val_192	2
+191	val_191	191	val_191	2
+193	val_193	193	val_193	2
+195	val_195	195	val_195	2
 197	val_197	197	val_197	2
+2	val_2	2	val_2	2
+200	val_200	200	val_200	2
 201	val_201	201	val_201	2
-202	val_202	202	val_202	2
 205	val_205	205	val_205	2
-207	val_207	207	val_207	2
+208	val_208	208	val_208	2
 209	val_209	209	val_209	2
 216	val_216	216	val_216	2
+217	val_217	217	val_217	2
 218	val_218	218	val_218	2
-223	val_223	223	val_223	2
-228	val_228	228	val_228	2
-233	val_233	233	val_233	2
+221	val_221	221	val_221	2
+229	val_229	229	val_229	2
+230	val_230	230	val_230	2
 235	val_235	235	val_235	2
+237	val_237	237	val_237	2
 238	val_238	238	val_238	2
-241	val_241	241	val_241	2
-244	val_244	244	val_244	2
-247	val_247	247	val_247	2
-252	val_252	252	val_252	2
+24	val_24	24	val_24	2
+242	val_242	242	val_242	2
+248	val_248	248	val_248	2
+249	val_249	249	val_249	2
 258	val_258	258	val_258	2
-260	val_260	260	val_260	2
+26	val_26	26	val_26	2
 262	val_262	262	val_262	2
-27	val_27	27	val_27	2
-274	val_274	274	val_274	2
+263	val_263	263	val_263	2
+265	val_265	265	val_265	2
+27	val_27	NULL	NULL	2
+273	val_273	273	val_273	2
 277	val_277	277	val_277	2
-278	val_278	278	val_278	2
-288	val_288	288	val_288	2
-296	val_296	296	val_296	2
-302	val_302	302	val_302	2
-305	val_305	305	val_305	2
-311	val_311	311	val_311	2
-318	val_318	318	val_318	2
+281	val_281	281	val_281	2
+282	val_282	282	val_282	2
+283	val_283	283	val_283	2
+287	val_287	287	val_287	2
+291	val_291	291	val_291	2
+292	val_292	292	val_292	2
+298	val_298	298	val_298	2
+30	val_30	30	val_30	2
+308	val_308	308	val_308	2
+309	val_309	309	val_309	2
+310	val_310	310	val_310	2
+315	val_315	315	val_315	2
+316	val_316	316	val_316	2
+325	val_325	325	val_325	2
+332	val_332	332	val_332	2
+333	val_333	333	val_333	2
+335	val_335	335	val_335	2
+339	val_339	339	val_339	2
+341	val_341	341	val_341	2
+342	val_342	342	val_342	2
+344	val_344	344	val_344	2
 345	val_345	345	val_345	2
-35	val_35	NULL	NULL	2
+353	val_353	353	val_353	2
 356	val_356	356	val_356	2
-360	val_360	360	val_360	2
-365	val_365	365	val_365	2
-375	val_375	375	val_375	2
-389	val_389	389	val_389	2
+362	val_362	362	val_362	2
+364	val_364	364	val_364	2
+367	val_367	367	val_367	2
+368	val_368	368	val_368	2
+37	val_37	37	val_37	2
+373	val_373	373	val_373	2
+378	val_378	378	val_378	2
+386	val_386	386	val_386	2
 392	val_392	392	val_392	2
 394	val_394	394	val_394	2
-395	val_395	395	val_395	2
-409	val_409	409	val_409	2
-41	val_41	NULL	NULL	2
+4	val_4	4	val_4	2
+402	val_402	402	val_402	2
+403	val_403	403	val_403	2
 411	val_411	411	val_411	2
 413	val_413	413	val_413	2
 419	val_419	419	val_419	2
-42	val_42	42	val_42	2
-427	val_427	427	val_427	2
+424	val_424	424	val_424	2
 429	val_429	429	val_429	2
-430	val_430	430	val_430	2
-44	val_44	NULL	NULL	2
+43	val_43	43	val_43	2
+432	val_432	432	val_432	2
+436	val_436	436	val_436	2
+437	val_437	437	val_437	2
 444	val_444	444	val_444	2
-454	val_454	454	val_454	2
+446	val_446	446	val_446	2
+449	val_449	449	val_449	2
+452	val_452	452	val_452	2
+453	val_453	453	val_453	2
+457	val_457	457	val_457	2
+458	val_458	458	val_458	2
 460	val_460	460	val_460	2
+466	val_466	466	val_466	2
+467	val_467	467	val_467	2
 468	val_468	468	val_468	2
-47	val_47	47	val_47	2
-481	val_481	481	val_481	2
+469	val_469	469	val_469	2
+47	val_47	NULL	NULL	2
+475	val_475	475	val_475	2
+477	val_477	477	val_477	2
+479	val_479	479	val_479	2
 482	val_482	482	val_482	2
+483	val_483	483	val_483	2
 484	val_484	484	val_484	2
-489	val_489	489	val_489	2
+487	val_487	487	val_487	2
 492	val_492	492	val_492	2
+493	val_493	493	val_493	2
 495	val_495	495	val_495	2
+496	val_496	496	val_496	2
+497	val_497	497	val_497	2
 498	val_498	498	val_498	2
+51	val_51	51	val_51	2
+54	val_54	54	val_54	2
 58	val_58	58	val_58	2
 64	val_64	64	val_64	2
-66	val_66	66	val_66	2
+65	val_65	65	val_65	2
+67	val_67	67	val_67	2
 70	val_70	70	val_70	2
-72	val_72	72	val_72	2
-74	val_74	74	val_74	2
-80	val_80	80	val_80	2
-84	val_84	84	val_84	2
-90	val_90	90	val_90	2
-0	val_0	0	val_0	2
-104	val_104	104	val_104	2
-105	val_105	105	val_105	2
-118	val_118	118	val_118	2
-119	val_119	119	val_119	2
-131	val_131	131	val_131	2
-133	val_133	133	val_133	2
-153	val_153	153	val_153	2
-160	val_160	160	val_160	2
-162	val_162	162	val_162	2
-175	val_175	175	val_175	2
-180	val_180	180	val_180	2
-19	val_19	19	val_19	2
-193	val_193	193	val_193	2
-196	val_196	196	val_196	2
-20	val_20	20	val_20	2
-200	val_200	200	val_200	2
-213	val_213	213	val_213	2
-219	val_219	219	val_219	2
-221	val_221	221	val_221	2
-239	val_239	239	val_239	2
-249	val_249	249	val_249	2
-257	val_257	257	val_257	2
-26	val_26	NULL	NULL	2
-263	val_263	263	val_263	2
-281	val_281	281	val_281	2
-285	val_285	285	val_285	2
-286	val_286	286	val_286	2
-316	val_316	316	val_316	2
-317	val_317	317	val_317	2
-323	val_323	323	val_323	2
-325	val_325	325	val_325	2
-33	val_33	NULL	NULL	2
-339	val_339	339	val_339	2
-34	val_34	NULL	NULL	2
-351	val_351	351	val_351	2
-364	val_364	364	val_364	2
-366	val_366	366	val_366	2
-367	val_367	367	val_367	2
-368	val_368	368	val_368	2
-37	val_37	NULL	NULL	2
-378	val_378	378	val_378	2
-384	val_384	384	val_384	2
-396	val_396	396	val_396	2
-399	val_399	399	val_399	2
-42	val_42	NULL	NULL	2
-421	val_421	421	val_421	2
-424	val_424	424	val_424	2
-43	val_43	NULL	NULL	2
-43	val_43	43	val_43	2
-435	val_435	435	val_435	2
-437	val_437	437	val_437	2
-438	val_438	438	val_438	2
-44	val_44	44	val_44	2
-443	val_443	443	val_443	2
-449	val_449	449	val_449	2
-458	val_458	458	val_458	2
-467	val_467	467	val_467	2
-487	val_487	487	val_487	2
-490	val_490	490	val_490	2
-494	val_494	494	val_494	2
-497	val_497	497	val_497	2
-51	val_51	51	val_51	2
+82	val_82	82	val_82	2
+83	val_83	83	val_83	2
 85	val_85	85	val_85	2
+87	val_87	87	val_87	2
+92	val_92	92	val_92	2
+95	val_95	95	val_95	2
+96	val_96	96	val_96	2
 97	val_97	97	val_97	2
+98	val_98	98	val_98	2
+24	val_24	NULL	NULL	2
+43	val_43	NULL	NULL	2
 PREHOOK: query: explain
 select s.key2, s.value2
 from (
@@ -4672,314 +4677,314 @@ from (
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-0	val_0
-103	val_103
-105	val_105
 116	val_116
+118	val_118
 120	val_120
-129	val_129
 131	val_131
-136	val_136
+133	val_133
+15	val_15
+150	val_150
+152	val_152
+153	val_153
 155	val_155
-157	val_157
 160	val_160
-180	val_180
+169	val_169
+175	val_175
+176	val_176
+178	val_178
 183	val_183
-190	val_190
-191	val_191
-193	val_193
-205	val_205
-207	val_207
+186	val_186
+194	val_194
+202	val_202
+203	val_203
 213	val_213
 223	val_223
-235	val_235
-238	val_238
+224	val_224
+226	val_226
+228	val_228
 239	val_239
-24	val_24
-248	val_248
-260	val_260
+244	val_244
+247	val_247
+252	val_252
+255	val_255
+256	val_256
+257	val_257
+266	val_266
+272	val_272
+274	val_274
+275	val_275
 28	val_28
+284	val_284
 286	val_286
-298	val_298
-305	val_305
+289	val_289
+296	val_296
+302	val_302
 306	val_306
 307	val_307
-308	val_308
-315	val_315
 317	val_317
 321	val_321
+323	val_323
 33	val_33
-331	val_331
-356	val_356
+338	val_338
+34	val_34
+35	val_35
 360	val_360
-366	val_366
-367	val_367
-368	val_368
-37	val_37
-378	val_378
-379	val_379
-382	val_382
-389	val_389
-395	val_395
-400	val_400
-402	val_402
+365	val_365
+374	val_374
+377	val_377
+393	val_393
+399	val_399
+404	val_404
 406	val_406
-407	val_407
+409	val_409
+41	val_41
+417	val_417
+418	val_418
 42	val_42
-430	val_430
-436	val_436
+431	val_431
+439	val_439
 44	val_44
-452	val_452
-466	val_466
-467	val_467
-472	val_472
-480	val_480
-484	val_484
-485	val_485
-487	val_487
-495	val_495
-496	val_496
-498	val_498
-51	val_51
-57	val_57
-58	val_58
-65	val_65
+443	val_443
+448	val_448
+455	val_455
+459	val_459
+462	val_462
+463	val_463
+470	val_470
+490	val_490
+491	val_491
+494	val_494
+5	val_5
+53	val_53
 66	val_66
-69	val_69
-70	val_70
-78	val_78
-8	val_8
-92	val_92
-96	val_96
-104	val_104
+72	val_72
+76	val_76
+77	val_77
+80	val_80
+84	val_84
+90	val_90
+10	val_10
+105	val_105
 111	val_111
-114	val_114
-118	val_118
-12	val_12
-133	val_133
-138	val_138
-153	val_153
-156	val_156
-162	val_162
-168	val_168
+113	val_113
+119	val_119
+129	val_129
+136	val_136
+143	val_143
+149	val_149
+163	val_163
+167	val_167
 174	val_174
-176	val_176
-178	val_178
-181	val_181
-186	val_186
 187	val_187
-192	val_192
 197	val_197
-199	val_199
 2	val_2
-201	val_201
-203	val_203
+200	val_200
 208	val_208
-214	val_214
+209	val_209
+216	val_216
+217	val_217
 218	val_218
-219	val_219
+221	val_221
 230	val_230
-237	val_237
-249	val_249
-256	val_256
-257	val_257
+258	val_258
+26	val_26
+263	val_263
+273	val_273
 277	val_277
-278	val_278
-284	val_284
-285	val_285
-310	val_310
-322	val_322
-327	val_327
-333	val_333
-336	val_336
-338	val_338
+281	val_281
+292	val_292
+30	val_30
+316	val_316
+335	val_335
 341	val_341
+342	val_342
 344	val_344
-348	val_348
-351	val_351
+345	val_345
 362	val_362
-364	val_364
-374	val_374
+367	val_367
+368	val_368
+37	val_37
 392	val_392
-397	val_397
+394	val_394
 4	val_4
-403	val_403
-404	val_404
-419	val_419
-421	val_421
-427	val_427
-429	val_429
+413	val_413
 437	val_437
-438	val_438
-439	val_439
-454	val_454
-455	val_455
+444	val_444
+446	val_446
+452	val_452
+453	val_453
+457	val_457
 460	val_460
-463	val_463
-470	val_470
-478	val_478
+466	val_466
+468	val_468
+477	val_477
 479	val_479
-489	val_489
-491	val_491
+483	val_483
+487	val_487
 492	val_492
-53	val_53
+493	val_493
+498	val_498
+51	val_51
+54	val_54
+64	val_64
+65	val_65
 67	val_67
 82	val_82
-90	val_90
-97	val_97
-10	val_10
-125	val_125
-134	val_134
-143	val_143
+85	val_85
+87	val_87
+95	val_95
+96	val_96
+100	val_100
+103	val_103
+104	val_104
+11	val_11
+114	val_114
+137	val_137
 145	val_145
-149	val_149
-150	val_150
-158	val_158
-163	val_163
-164	val_164
-166	val_166
+156	val_156
+157	val_157
+162	val_162
+168	val_168
 17	val_17
 170	val_170
-172	val_172
-189	val_189
+180	val_180
 19	val_19
-195	val_195
+190	val_190
+192	val_192
 196	val_196
+199	val_199
 20	val_20
-209	val_209
-216	val_216
-217	val_217
-224	val_224
-228	val_228
-229	val_229
+207	val_207
+214	val_214
+219	val_219
+222	val_222
 233	val_233
 241	val_241
-244	val_244
-247	val_247
-255	val_255
-258	val_258
-26	val_26
-263	val_263
-265	val_265
-266	val_266
-272	val_272
-273	val_273
-274	val_274
-281	val_281
-291	val_291
-296	val_296
-30	val_30
-302	val_302
-309	val_309
-316	val_316
+260	val_260
+27	val_27
+278	val_278
+280	val_280
+285	val_285
+288	val_288
+305	val_305
+311	val_311
 318	val_318
-325	val_325
-332	val_332
-335	val_335
-339	val_339
-342	val_342
-345	val_345
-353	val_353
+322	val_322
+327	val_327
+331	val_331
+336	val_336
+348	val_348
+351	val_351
+366	val_366
 369	val_369
-373	val_373
 375	val_375
-377	val_377
+379	val_379
+382	val_382
 384	val_384
-386	val_386
-394	val_394
+389	val_389
+395	val_395
 396	val_396
-399	val_399
+397	val_397
+400	val_400
 401	val_401
-41	val_41
-413	val_413
+407	val_407
 414	val_414
-431	val_431
-446	val_446
-448	val_448
-449	val_449
-459	val_459
-462	val_462
-468	val_468
+421	val_421
+427	val_427
+430	val_430
+435	val_435
+438	val_438
+454	val_454
 47	val_47
-482	val_482
-490	val_490
-493	val_493
-494	val_494
-497	val_497
-5	val_5
-54	val_54
+472	val_472
+478	val_478
+480	val_480
+481	val_481
+485	val_485
+489	val_489
+57	val_57
+69	val_69
 74	val_74
-77	val_77
-80	val_80
-84	val_84
-85	val_85
-87	val_87
+78	val_78
+8	val_8
+86	val_86
 9	val_9
-95	val_95
-100	val_100
-11	val_11
-113	val_113
-119	val_119
+0	val_0
+12	val_12
+125	val_125
 126	val_126
 128	val_128
-137	val_137
+134	val_134
+138	val_138
 146	val_146
-15	val_15
-152	val_152
+158	val_158
+164	val_164
 165	val_165
-167	val_167
-169	val_169
-175	val_175
+166	val_166
+172	val_172
 177	val_177
 179	val_179
 18	val_18
-194	val_194
-200	val_200
-202	val_202
-221	val_221
-222	val_222
-226	val_226
+181	val_181
+189	val_189
+191	val_191
+193	val_193
+195	val_195
+201	val_201
+205	val_205
+229	val_229
+235	val_235
+237	val_237
+238	val_238
+24	val_24
 242	val_242
-252	val_252
+248	val_248
+249	val_249
 262	val_262
-27	val_27
-275	val_275
-280	val_280
+265	val_265
 282	val_282
 283	val_283
 287	val_287
-288	val_288
-289	val_289
-292	val_292
-311	val_311
-323	val_323
-34	val_34
-35	val_35
-365	val_365
-393	val_393
-409	val_409
+291	val_291
+298	val_298
+308	val_308
+309	val_309
+310	val_310
+315	val_315
+325	val_325
+332	val_332
+333	val_333
+339	val_339
+353	val_353
+356	val_356
+364	val_364
+373	val_373
+378	val_378
+386	val_386
+402	val_402
+403	val_403
 411	val_411
-417	val_417
-418	val_418
+419	val_419
 424	val_424
+429	val_429
 43	val_43
 432	val_432
-435	val_435
-443	val_443
-444	val_444
-453	val_453
-457	val_457
+436	val_436
+449	val_449
 458	val_458
+467	val_467
 469	val_469
 475	val_475
-477	val_477
-481	val_481
-483	val_483
-64	val_64
-72	val_72
-76	val_76
+482	val_482
+484	val_484
+495	val_495
+496	val_496
+497	val_497
+58	val_58
+70	val_70
 83	val_83
-86	val_86
+92	val_92
+97	val_97
 98	val_98
 PREHOOK: query: create table src2 as select key, count(1) as count from src group by key
 PREHOOK: type: CREATETABLE_AS_SELECT
@@ -5108,6 +5113,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -5130,6 +5136,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -5187,6 +5194,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -5209,6 +5217,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -5268,6 +5277,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -5290,6 +5300,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -5349,6 +5360,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -5371,6 +5383,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -5613,6 +5626,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -5635,6 +5649,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -5694,6 +5709,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -5716,6 +5732,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -5770,6 +5787,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -5792,6 +5810,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -5847,6 +5866,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -5869,6 +5889,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -6088,6 +6109,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -6110,6 +6132,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -6164,6 +6187,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -6186,6 +6210,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -6245,6 +6270,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -6267,6 +6293,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -6321,6 +6348,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -6343,6 +6371,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -7329,314 +7358,314 @@ POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-1	0	val_0
-1	103	val_103
-1	105	val_105
 1	116	val_116
+1	118	val_118
 1	120	val_120
-1	129	val_129
 1	131	val_131
-1	136	val_136
+1	133	val_133
+1	15	val_15
+1	150	val_150
+1	152	val_152
+1	153	val_153
 1	155	val_155
-1	157	val_157
 1	160	val_160
-1	180	val_180
+1	169	val_169
+1	175	val_175
+1	176	val_176
+1	178	val_178
 1	183	val_183
-1	190	val_190
-1	191	val_191
-1	193	val_193
-1	205	val_205
-1	207	val_207
+1	186	val_186
+1	194	val_194
+1	202	val_202
+1	203	val_203
 1	213	val_213
 1	223	val_223
-1	235	val_235
-1	238	val_238
+1	224	val_224
+1	226	val_226
+1	228	val_228
 1	239	val_239
-1	24	val_24
-1	248	val_248
-1	260	val_260
+1	244	val_244
+1	247	val_247
+1	252	val_252
+1	255	val_255
+1	256	val_256
+1	257	val_257
+1	266	val_266
+1	272	val_272
+1	274	val_274
+1	275	val_275
 1	28	val_28
+1	284	val_284
 1	286	val_286
-1	298	val_298
-1	305	val_305
+1	289	val_289
+1	296	val_296
+1	302	val_302
 1	306	val_306
 1	307	val_307
-1	308	val_308
-1	315	val_315
 1	317	val_317
 1	321	val_321
+1	323	val_323
 1	33	val_33
-1	331	val_331
-1	356	val_356
+1	338	val_338
+1	34	val_34
+1	35	val_35
 1	360	val_360
-1	366	val_366
-1	367	val_367
-1	368	val_368
-1	37	val_37
-1	378	val_378
-1	379	val_379
-1	382	val_382
-1	389	val_389
-1	395	val_395
-1	400	val_400
-1	402	val_402
+1	365	val_365
+1	374	val_374
+1	377	val_377
+1	393	val_393
+1	399	val_399
+1	404	val_404
 1	406	val_406
-1	407	val_407
+1	409	val_409
+1	41	val_41
+1	417	val_417
+1	418	val_418
 1	42	val_42
-1	430	val_430
-1	436	val_436
+1	431	val_431
+1	439	val_439
 1	44	val_44
+1	443	val_443
+1	448	val_448
+1	455	val_455
+1	459	val_459
+1	462	val_462
+1	463	val_463
+1	470	val_470
+1	490	val_490
+1	491	val_491
+1	494	val_494
+1	5	val_5
+1	53	val_53
+1	66	val_66
+1	72	val_72
+1	76	val_76
+1	77	val_77
+1	80	val_80
+1	84	val_84
+1	90	val_90
+1	10	val_10
+1	105	val_105
+1	111	val_111
+1	113	val_113
+1	119	val_119
+1	129	val_129
+1	136	val_136
+1	143	val_143
+1	149	val_149
+1	163	val_163
+1	167	val_167
+1	174	val_174
+1	187	val_187
+1	197	val_197
+1	2	val_2
+1	200	val_200
+1	208	val_208
+1	209	val_209
+1	216	val_216
+1	217	val_217
+1	218	val_218
+1	221	val_221
+1	230	val_230
+1	258	val_258
+1	26	val_26
+1	263	val_263
+1	273	val_273
+1	277	val_277
+1	281	val_281
+1	292	val_292
+1	30	val_30
+1	316	val_316
+1	335	val_335
+1	341	val_341
+1	342	val_342
+1	344	val_344
+1	345	val_345
+1	362	val_362
+1	367	val_367
+1	368	val_368
+1	37	val_37
+1	392	val_392
+1	394	val_394
+1	4	val_4
+1	413	val_413
+1	437	val_437
+1	444	val_444
+1	446	val_446
 1	452	val_452
+1	453	val_453
+1	457	val_457
+1	460	val_460
 1	466	val_466
-1	467	val_467
-1	472	val_472
-1	480	val_480
-1	484	val_484
-1	485	val_485
+1	468	val_468
+1	477	val_477
+1	479	val_479
+1	483	val_483
 1	487	val_487
-1	495	val_495
-1	496	val_496
+1	492	val_492
+1	493	val_493
 1	498	val_498
 1	51	val_51
-1	57	val_57
-1	58	val_58
+1	54	val_54
+1	64	val_64
 1	65	val_65
-1	66	val_66
-1	69	val_69
-1	70	val_70
-1	78	val_78
-1	8	val_8
-1	92	val_92
+1	67	val_67
+1	82	val_82
+1	85	val_85
+1	87	val_87
+1	95	val_95
 1	96	val_96
+1	100	val_100
+1	103	val_103
 1	104	val_104
-1	111	val_111
+1	11	val_11
 1	114	val_114
-1	118	val_118
-1	12	val_12
-1	133	val_133
-1	138	val_138
-1	153	val_153
+1	137	val_137
+1	145	val_145
 1	156	val_156
+1	157	val_157
 1	162	val_162
 1	168	val_168
-1	174	val_174
-1	176	val_176
-1	178	val_178
-1	181	val_181
-1	186	val_186
-1	187	val_187
+1	17	val_17
+1	170	val_170
+1	180	val_180
+1	19	val_19
+1	190	val_190
 1	192	val_192
-1	197	val_197
+1	196	val_196
 1	199	val_199
-1	2	val_2
-1	201	val_201
-1	203	val_203
-1	208	val_208
+1	20	val_20
+1	207	val_207
 1	214	val_214
-1	218	val_218
 1	219	val_219
-1	230	val_230
-1	237	val_237
-1	249	val_249
-1	256	val_256
-1	257	val_257
-1	277	val_277
+1	222	val_222
+1	233	val_233
+1	241	val_241
+1	260	val_260
+1	27	val_27
 1	278	val_278
-1	284	val_284
+1	280	val_280
 1	285	val_285
-1	310	val_310
+1	288	val_288
+1	305	val_305
+1	311	val_311
+1	318	val_318
 1	322	val_322
 1	327	val_327
-1	333	val_333
+1	331	val_331
 1	336	val_336
-1	338	val_338
-1	341	val_341
-1	344	val_344
 1	348	val_348
 1	351	val_351
-1	362	val_362
-1	364	val_364
-1	374	val_374
-1	392	val_392
+1	366	val_366
+1	369	val_369
+1	375	val_375
+1	379	val_379
+1	382	val_382
+1	384	val_384
+1	389	val_389
+1	395	val_395
+1	396	val_396
 1	397	val_397
-1	4	val_4
-1	403	val_403
-1	404	val_404
-1	419	val_419
+1	400	val_400
+1	401	val_401
+1	407	val_407
+1	414	val_414
 1	421	val_421
 1	427	val_427
-1	429	val_429
-1	437	val_437
+1	430	val_430
+1	435	val_435
 1	438	val_438
-1	439	val_439
 1	454	val_454
-1	455	val_455
-1	460	val_460
-1	463	val_463
-1	470	val_470
+1	47	val_47
+1	472	val_472
 1	478	val_478
-1	479	val_479
+1	480	val_480
+1	481	val_481
+1	485	val_485
 1	489	val_489
-1	491	val_491
-1	492	val_492
-1	53	val_53
-1	67	val_67
-1	82	val_82
-1	90	val_90
-1	97	val_97
-1	10	val_10
+1	57	val_57
+1	69	val_69
+1	74	val_74
+1	78	val_78
+1	8	val_8
+1	86	val_86
+1	9	val_9
+1	0	val_0
+1	12	val_12
 1	125	val_125
+1	126	val_126
+1	128	val_128
 1	134	val_134
-1	143	val_143
-1	145	val_145
-1	149	val_149
-1	150	val_150
+1	138	val_138
+1	146	val_146
 1	158	val_158
-1	163	val_163
 1	164	val_164
+1	165	val_165
 1	166	val_166
-1	17	val_17
-1	170	val_170
 1	172	val_172
+1	177	val_177
+1	179	val_179
+1	18	val_18
+1	181	val_181
 1	189	val_189
-1	19	val_19
+1	191	val_191
+1	193	val_193
 1	195	val_195
-1	196	val_196
-1	20	val_20
-1	209	val_209
-1	216	val_216
-1	217	val_217
-1	224	val_224
-1	228	val_228
+1	201	val_201
+1	205	val_205
 1	229	val_229
-1	233	val_233
-1	241	val_241
-1	244	val_244
-1	247	val_247
-1	255	val_255
-1	258	val_258
-1	26	val_26
-1	263	val_263
+1	235	val_235
+1	237	val_237
+1	238	val_238
+1	24	val_24
+1	242	val_242
+1	248	val_248
+1	249	val_249
+1	262	val_262
 1	265	val_265
-1	266	val_266
-1	272	val_272
-1	273	val_273
-1	274	val_274
-1	281	val_281
+1	282	val_282
+1	283	val_283
+1	287	val_287
 1	291	val_291
-1	296	val_296
-1	30	val_30
-1	302	val_302
+1	298	val_298
+1	308	val_308
 1	309	val_309
-1	316	val_316
-1	318	val_318
+1	310	val_310
+1	315	val_315
 1	325	val_325
 1	332	val_332
-1	335	val_335
+1	333	val_333
 1	339	val_339
-1	342	val_342
-1	345	val_345
 1	353	val_353
-1	369	val_369
+1	356	val_356
+1	364	val_364
 1	373	val_373
-1	375	val_375
-1	377	val_377
-1	384	val_384
+1	378	val_378
 1	386	val_386
-1	394	val_394
-1	396	val_396
-1	399	val_399
-1	401	val_401
-1	41	val_41
-1	413	val_413
-1	414	val_414
-1	431	val_431
-1	446	val_446
-1	448	val_448
-1	449	val_449
-1	459	val_459
-1	462	val_462
-1	468	val_468
-1	47	val_47
-1	482	val_482
-1	490	val_490
-1	493	val_493
-1	494	val_494
-1	497	val_497
-1	5	val_5
-1	54	val_54
-1	74	val_74
-1	77	val_77
-1	80	val_80
-1	84	val_84
-1	85	val_85
-1	87	val_87
-1	9	val_9
-1	95	val_95
-1	100	val_100
-1	11	val_11
-1	113	val_113
-1	119	val_119
-1	126	val_126
-1	128	val_128
-1	137	val_137
-1	146	val_146
-1	15	val_15
-1	152	val_152
-1	165	val_165
-1	167	val_167
-1	169	val_169
-1	175	val_175
-1	177	val_177
-1	179	val_179
-1	18	val_18
-1	194	val_194
-1	200	val_200
-1	202	val_202
-1	221	val_221
-1	222	val_222
-1	226	val_226
-1	242	val_242
-1	252	val_252
-1	262	val_262
-1	27	val_27
-1	275	val_275
-1	280	val_280
-1	282	val_282
-1	283	val_283
-1	287	val_287
-1	288	val_288
-1	289	val_289
-1	292	val_292
-1	311	val_311
-1	323	val_323
-1	34	val_34
-1	35	val_35
-1	365	val_365
-1	393	val_393
-1	409	val_409
+1	402	val_402
+1	403	val_403
 1	411	val_411
-1	417	val_417
-1	418	val_418
+1	419	val_419
 1	424	val_424
+1	429	val_429
 1	43	val_43
 1	432	val_432
-1	435	val_435
-1	443	val_443
-1	444	val_444
-1	453	val_453
-1	457	val_457
+1	436	val_436
+1	449	val_449
 1	458	val_458
+1	467	val_467
 1	469	val_469
 1	475	val_475
-1	477	val_477
-1	481	val_481
-1	483	val_483
-1	64	val_64
-1	72	val_72
-1	76	val_76
+1	482	val_482
+1	484	val_484
+1	495	val_495
+1	496	val_496
+1	497	val_497
+1	58	val_58
+1	70	val_70
 1	83	val_83
-1	86	val_86
+1	92	val_92
+1	97	val_97
 1	98	val_98
 PREHOOK: query: SELECT 
 count(1) as counts,
@@ -7688,314 +7717,314 @@ POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-1	0	val_0
-1	103	val_103
-1	105	val_105
 1	116	val_116
+1	118	val_118
 1	120	val_120
-1	129	val_129
 1	131	val_131
-1	136	val_136
+1	133	val_133
+1	15	val_15
+1	150	val_150
+1	152	val_152
+1	153	val_153
 1	155	val_155
-1	157	val_157
 1	160	val_160
-1	180	val_180
+1	169	val_169
+1	175	val_175
+1	176	val_176
+1	178	val_178
 1	183	val_183
-1	190	val_190
-1	191	val_191
-1	193	val_193
-1	205	val_205
-1	207	val_207
+1	186	val_186
+1	194	val_194
+1	202	val_202
+1	203	val_203
 1	213	val_213
 1	223	val_223
-1	235	val_235
-1	238	val_238
+1	224	val_224
+1	226	val_226
+1	228	val_228
 1	239	val_239
-1	24	val_24
-1	248	val_248
-1	260	val_260
+1	244	val_244
+1	247	val_247
+1	252	val_252
+1	255	val_255
+1	256	val_256
+1	257	val_257
+1	266	val_266
+1	272	val_272
+1	274	val_274
+1	275	val_275
 1	28	val_28
+1	284	val_284
 1	286	val_286
-1	298	val_298
-1	305	val_305
+1	289	val_289
+1	296	val_296
+1	302	val_302
 1	306	val_306
 1	307	val_307
-1	308	val_308
-1	315	val_315
 1	317	val_317
 1	321	val_321
+1	323	val_323
 1	33	val_33
-1	331	val_331
-1	356	val_356
+1	338	val_338
+1	34	val_34
+1	35	val_35
 1	360	val_360
-1	366	val_366
-1	367	val_367
-1	368	val_368
-1	37	val_37
-1	378	val_378
-1	379	val_379
-1	382	val_382
-1	389	val_389
-1	395	val_395
-1	400	val_400
-1	402	val_402
+1	365	val_365
+1	374	val_374
+1	377	val_377
+1	393	val_393
+1	399	val_399
+1	404	val_404
 1	406	val_406
-1	407	val_407
+1	409	val_409
+1	41	val_41
+1	417	val_417
+1	418	val_418
 1	42	val_42
-1	430	val_430
-1	436	val_436
+1	431	val_431
+1	439	val_439
 1	44	val_44
-1	452	val_452
-1	466	val_466
-1	467	val_467
-1	472	val_472
-1	480	val_480
-1	484	val_484
-1	485	val_485
-1	487	val_487
-1	495	val_495
-1	496	val_496
-1	498	val_498
-1	51	val_51
-1	57	val_57
-1	58	val_58
-1	65	val_65
+1	443	val_443
+1	448	val_448
+1	455	val_455
+1	459	val_459
+1	462	val_462
+1	463	val_463
+1	470	val_470
+1	490	val_490
+1	491	val_491
+1	494	val_494
+1	5	val_5
+1	53	val_53
 1	66	val_66
-1	69	val_69
-1	70	val_70
-1	78	val_78
-1	8	val_8
-1	92	val_92
-1	96	val_96
-1	104	val_104
+1	72	val_72
+1	76	val_76
+1	77	val_77
+1	80	val_80
+1	84	val_84
+1	90	val_90
+1	10	val_10
+1	105	val_105
 1	111	val_111
-1	114	val_114
-1	118	val_118
-1	12	val_12
-1	133	val_133
-1	138	val_138
-1	153	val_153
-1	156	val_156
-1	162	val_162
-1	168	val_168
+1	113	val_113
+1	119	val_119
+1	129	val_129
+1	136	val_136
+1	143	val_143
+1	149	val_149
+1	163	val_163
+1	167	val_167
 1	174	val_174
-1	176	val_176
-1	178	val_178
-1	181	val_181
-1	186	val_186
 1	187	val_187
-1	192	val_192
 1	197	val_197
-1	199	val_199
 1	2	val_2
-1	201	val_201
-1	203	val_203
+1	200	val_200
 1	208	val_208
-1	214	val_214
+1	209	val_209
+1	216	val_216
+1	217	val_217
 1	218	val_218
-1	219	val_219
+1	221	val_221
 1	230	val_230
-1	237	val_237
-1	249	val_249
-1	256	val_256
-1	257	val_257
+1	258	val_258
+1	26	val_26
+1	263	val_263
+1	273	val_273
 1	277	val_277
-1	278	val_278
-1	284	val_284
-1	285	val_285
-1	310	val_310
-1	322	val_322
-1	327	val_327
-1	333	val_333
-1	336	val_336
-1	338	val_338
+1	281	val_281
+1	292	val_292
+1	30	val_30
+1	316	val_316
+1	335	val_335
 1	341	val_341
+1	342	val_342
 1	344	val_344
-1	348	val_348
-1	351	val_351
+1	345	val_345
 1	362	val_362
-1	364	val_364
-1	374	val_374
+1	367	val_367
+1	368	val_368
+1	37	val_37
 1	392	val_392
-1	397	val_397
+1	394	val_394
 1	4	val_4
-1	403	val_403
-1	404	val_404
-1	419	val_419
-1	421	val_421
-1	427	val_427
-1	429	val_429
+1	413	val_413
 1	437	val_437
-1	438	val_438
-1	439	val_439
-1	454	val_454
-1	455	val_455
+1	444	val_444
+1	446	val_446
+1	452	val_452
+1	453	val_453
+1	457	val_457
 1	460	val_460
-1	463	val_463
-1	470	val_470
-1	478	val_478
+1	466	val_466
+1	468	val_468
+1	477	val_477
 1	479	val_479
-1	489	val_489
-1	491	val_491
+1	483	val_483
+1	487	val_487
 1	492	val_492
-1	53	val_53
-1	67	val_67
-1	82	val_82
-1	90	val_90
-1	97	val_97
-1	10	val_10
-1	125	val_125
-1	134	val_134
-1	143	val_143
+1	493	val_493
+1	498	val_498
+1	51	val_51
+1	54	val_54
+1	64	val_64
+1	65	val_65
+1	67	val_67
+1	82	val_82
+1	85	val_85
+1	87	val_87
+1	95	val_95
+1	96	val_96
+1	100	val_100
+1	103	val_103
+1	104	val_104
+1	11	val_11
+1	114	val_114
+1	137	val_137
 1	145	val_145
-1	149	val_149
-1	150	val_150
-1	158	val_158
-1	163	val_163
-1	164	val_164
-1	166	val_166
+1	156	val_156
+1	157	val_157
+1	162	val_162
+1	168	val_168
 1	17	val_17
 1	170	val_170
-1	172	val_172
-1	189	val_189
+1	180	val_180
 1	19	val_19
-1	195	val_195
+1	190	val_190
+1	192	val_192
 1	196	val_196
+1	199	val_199
 1	20	val_20
-1	209	val_209
-1	216	val_216
-1	217	val_217
-1	224	val_224
-1	228	val_228
-1	229	val_229
+1	207	val_207
+1	214	val_214
+1	219	val_219
+1	222	val_222
 1	233	val_233
 1	241	val_241
-1	244	val_244
-1	247	val_247
-1	255	val_255
-1	258	val_258
-1	26	val_26
-1	263	val_263
-1	265	val_265
-1	266	val_266
-1	272	val_272
-1	273	val_273
-1	274	val_274
-1	281	val_281
-1	291	val_291
-1	296	val_296
-1	30	val_30
-1	302	val_302
-1	309	val_309
-1	316	val_316
+1	260	val_260
+1	27	val_27
+1	278	val_278
+1	280	val_280
+1	285	val_285
+1	288	val_288
+1	305	val_305
+1	311	val_311
 1	318	val_318
-1	325	val_325
-1	332	val_332
-1	335	val_335
-1	339	val_339
-1	342	val_342
-1	345	val_345
-1	353	val_353
+1	322	val_322
+1	327	val_327
+1	331	val_331
+1	336	val_336
+1	348	val_348
+1	351	val_351
+1	366	val_366
 1	369	val_369
-1	373	val_373
 1	375	val_375
-1	377	val_377
+1	379	val_379
+1	382	val_382
 1	384	val_384
-1	386	val_386
-1	394	val_394
+1	389	val_389
+1	395	val_395
 1	396	val_396
-1	399	val_399
+1	397	val_397
+1	400	val_400
 1	401	val_401
-1	41	val_41
-1	413	val_413
+1	407	val_407
 1	414	val_414
-1	431	val_431
-1	446	val_446
-1	448	val_448
-1	449	val_449
-1	459	val_459
-1	462	val_462
-1	468	val_468
+1	421	val_421
+1	427	val_427
+1	430	val_430
+1	435	val_435
+1	438	val_438
+1	454	val_454
 1	47	val_47
-1	482	val_482
-1	490	val_490
-1	493	val_493
-1	494	val_494
-1	497	val_497
-1	5	val_5
-1	54	val_54
+1	472	val_472
+1	478	val_478
+1	480	val_480
+1	481	val_481
+1	485	val_485
+1	489	val_489
+1	57	val_57
+1	69	val_69
 1	74	val_74
-1	77	val_77
-1	80	val_80
-1	84	val_84
-1	85	val_85
-1	87	val_87
+1	78	val_78
+1	8	val_8
+1	86	val_86
 1	9	val_9
-1	95	val_95
-1	100	val_100
-1	11	val_11
-1	113	val_113
-1	119	val_119
+1	0	val_0
+1	12	val_12
+1	125	val_125
 1	126	val_126
 1	128	val_128
-1	137	val_137
+1	134	val_134
+1	138	val_138
 1	146	val_146
-1	15	val_15
-1	152	val_152
+1	158	val_158
+1	164	val_164
 1	165	val_165
-1	167	val_167
-1	169	val_169
-1	175	val_175
+1	166	val_166
+1	172	val_172
 1	177	val_177
 1	179	val_179
 1	18	val_18
-1	194	val_194
-1	200	val_200
-1	202	val_202
-1	221	val_221
-1	222	val_222
-1	226	val_226
+1	181	val_181
+1	189	val_189
+1	191	val_191
+1	193	val_193
+1	195	val_195
+1	201	val_201
+1	205	val_205
+1	229	val_229
+1	235	val_235
+1	237	val_237
+1	238	val_238
+1	24	val_24
 1	242	val_242
-1	252	val_252
+1	248	val_248
+1	249	val_249
 1	262	val_262
-1	27	val_27
-1	275	val_275
-1	280	val_280
+1	265	val_265
 1	282	val_282
 1	283	val_283
 1	287	val_287
-1	288	val_288
-1	289	val_289
-1	292	val_292
-1	311	val_311
-1	323	val_323
-1	34	val_34
-1	35	val_35
-1	365	val_365
-1	393	val_393
-1	409	val_409
+1	291	val_291
+1	298	val_298
+1	308	val_308
+1	309	val_309
+1	310	val_310
+1	315	val_315
+1	325	val_325
+1	332	val_332
+1	333	val_333
+1	339	val_339
+1	353	val_353
+1	356	val_356
+1	364	val_364
+1	373	val_373
+1	378	val_378
+1	386	val_386
+1	402	val_402
+1	403	val_403
 1	411	val_411
-1	417	val_417
-1	418	val_418
+1	419	val_419
 1	424	val_424
+1	429	val_429
 1	43	val_43
 1	432	val_432
-1	435	val_435
-1	443	val_443
-1	444	val_444
-1	453	val_453
-1	457	val_457
+1	436	val_436
+1	449	val_449
 1	458	val_458
+1	467	val_467
 1	469	val_469
 1	475	val_475
-1	477	val_477
-1	481	val_481
-1	483	val_483
-1	64	val_64
-1	72	val_72
-1	76	val_76
+1	482	val_482
+1	484	val_484
+1	495	val_495
+1	496	val_496
+1	497	val_497
+1	58	val_58
+1	70	val_70
 1	83	val_83
-1	86	val_86
+1	92	val_92
+1	97	val_97
 1	98	val_98
 PREHOOK: query: create table jackson_sev_same as select * from src
 PREHOOK: type: CREATETABLE_AS_SELECT
@@ -9031,9 +9060,9 @@ POSTHOOK: query: select * from union_out
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@union_out
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-4
-1
 2
+1
+4
 3
 PREHOOK: query: create table union_subq_union30(key int, value string)
 PREHOOK: type: CREATETABLE
@@ -11880,15 +11909,15 @@ POSTHOOK: Input: default@src10_2
 POSTHOOK: Input: default@src10_3
 POSTHOOK: Input: default@src10_4
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-238	val_238
-484	val_484
-278	val_278
 255	val_255
-165	val_165
+409	val_409
 27	val_27
+278	val_278
 311	val_311
-409	val_409
 86	val_86
+165	val_165
+238	val_238
+484	val_484
 98	val_98
 PREHOOK: query: explain
 SELECT * FROM (
@@ -12083,13 +12112,13 @@ POSTHOOK: Input: default@src10_2
 POSTHOOK: Input: default@src10_3
 POSTHOOK: Input: default@src10_4
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-238	val_238
-484	val_484
-278	val_278
 255	val_255
-165	val_165
+409	val_409
 27	val_27
+278	val_278
 311	val_311
-409	val_409
 86	val_86
+165	val_165
+238	val_238
+484	val_484
 98	val_98

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/unionDistinct_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/unionDistinct_3.q.out b/ql/src/test/results/clientpositive/llap/unionDistinct_3.q.out
index 65a57e0..cb5b912 100644
--- a/ql/src/test/results/clientpositive/llap/unionDistinct_3.q.out
+++ b/ql/src/test/results/clientpositive/llap/unionDistinct_3.q.out
@@ -489,315 +489,315 @@ POSTHOOK: query: select unionsrc.key, unionsrc.value FROM (select s1.key as key,
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
-0	val_0
-103	val_103
+104	val_104
 105	val_105
-116	val_116
+113	val_113
+118	val_118
+12	val_12
 120	val_120
-129	val_129
-131	val_131
+133	val_133
 136	val_136
 155	val_155
-157	val_157
+158	val_158
 160	val_160
+162	val_162
+168	val_168
+17	val_17
+170	val_170
+175	val_175
+18	val_18
 180	val_180
-183	val_183
-190	val_190
-191	val_191
-193	val_193
-205	val_205
-207	val_207
-213	val_213
-223	val_223
+186	val_186
+19	val_19
+197	val_197
+200	val_200
+216	val_216
+218	val_218
+222	val_222
+224	val_224
+228	val_228
 235	val_235
-238	val_238
+237	val_237
 239	val_239
-24	val_24
-248	val_248
-260	val_260
+244	val_244
+247	val_247
+256	val_256
+263	val_263
+273	val_273
 28	val_28
+283	val_283
 286	val_286
-298	val_298
-305	val_305
+292	val_292
 306	val_306
-307	val_307
 308	val_308
+327	val_327
+33	val_33
+348	val_348
+353	val_353
+362	val_362
+366	val_366
+396	val_396
+397	val_397
+401	val_401
+409	val_409
+411	val_411
+419	val_419
+427	val_427
+43	val_43
+432	val_432
+436	val_436
+439	val_439
+443	val_443
+453	val_453
+460	val_460
+462	val_462
+47	val_47
+472	val_472
+485	val_485
+496	val_496
+54	val_54
+64	val_64
+70	val_70
+8	val_8
+83	val_83
+84	val_84
+85	val_85
+90	val_90
+0	val_0
+103	val_103
+114	val_114
+125	val_125
+138	val_138
+146	val_146
+150	val_150
+152	val_152
+153	val_153
+156	val_156
+157	val_157
+165	val_165
+172	val_172
+177	val_177
+179	val_179
+187	val_187
+195	val_195
+196	val_196
+217	val_217
+242	val_242
+248	val_248
+252	val_252
+265	val_265
+27	val_27
+272	val_272
+280	val_280
+291	val_291
+305	val_305
+309	val_309
+311	val_311
 315	val_315
 317	val_317
-321	val_321
-33	val_33
-331	val_331
+322	val_322
+333	val_333
+34	val_34
+345	val_345
+35	val_35
 356	val_356
-360	val_360
-366	val_366
-367	val_367
+364	val_364
 368	val_368
+369	val_369
 37	val_37
-378	val_378
-379	val_379
-382	val_382
-389	val_389
-395	val_395
-400	val_400
+373	val_373
+377	val_377
+4	val_4
 402	val_402
-406	val_406
-407	val_407
+404	val_404
+413	val_413
 42	val_42
 430	val_430
-436	val_436
-44	val_44
+431	val_431
+444	val_444
+449	val_449
 452	val_452
+454	val_454
+457	val_457
+463	val_463
 466	val_466
-467	val_467
-472	val_472
-480	val_480
-484	val_484
-485	val_485
-487	val_487
-495	val_495
-496	val_496
-498	val_498
-51	val_51
+470	val_470
+475	val_475
+481	val_481
+489	val_489
+491	val_491
 57	val_57
-58	val_58
 65	val_65
 66	val_66
-69	val_69
-70	val_70
+74	val_74
+76	val_76
 78	val_78
-8	val_8
+9	val_9
 92	val_92
-96	val_96
-104	val_104
-111	val_111
-114	val_114
-118	val_118
-12	val_12
-133	val_133
-138	val_138
-153	val_153
-156	val_156
-162	val_162
-168	val_168
+95	val_95
+100	val_100
+119	val_119
+128	val_128
+129	val_129
+145	val_145
+167	val_167
 174	val_174
-176	val_176
 178	val_178
 181	val_181
-186	val_186
-187	val_187
-192	val_192
-197	val_197
+193	val_193
 199	val_199
-2	val_2
+20	val_20
 201	val_201
-203	val_203
-208	val_208
+213	val_213
 214	val_214
-218	val_218
 219	val_219
-230	val_230
-237	val_237
+221	val_221
+223	val_223
+226	val_226
+233	val_233
+241	val_241
 249	val_249
-256	val_256
-257	val_257
+260	val_260
+262	val_262
 277	val_277
-278	val_278
-284	val_284
-285	val_285
+281	val_281
+287	val_287
+288	val_288
+298	val_298
+302	val_302
 310	val_310
-322	val_322
-327	val_327
-333	val_333
+323	val_323
 336	val_336
-338	val_338
 341	val_341
 344	val_344
-348	val_348
 351	val_351
-362	val_362
-364	val_364
-374	val_374
-392	val_392
-397	val_397
-4	val_4
+375	val_375
+382	val_382
+384	val_384
+393	val_393
+395	val_395
+399	val_399
 403	val_403
-404	val_404
-419	val_419
-421	val_421
-427	val_427
-429	val_429
-437	val_437
-438	val_438
-439	val_439
-454	val_454
+406	val_406
+418	val_418
+435	val_435
 455	val_455
-460	val_460
-463	val_463
-470	val_470
+459	val_459
+477	val_477
 478	val_478
 479	val_479
-489	val_489
-491	val_491
-492	val_492
-53	val_53
+482	val_482
+493	val_493
+494	val_494
+495	val_495
+497	val_497
+5	val_5
+58	val_58
 67	val_67
-82	val_82
-90	val_90
+77	val_77
+80	val_80
+86	val_86
 97	val_97
+98	val_98
 10	val_10
-125	val_125
+11	val_11
+111	val_111
+116	val_116
+126	val_126
+131	val_131
 134	val_134
+137	val_137
 143	val_143
-145	val_145
 149	val_149
-150	val_150
-158	val_158
+15	val_15
 163	val_163
 164	val_164
 166	val_166
-17	val_17
-170	val_170
-172	val_172
+169	val_169
+176	val_176
+183	val_183
 189	val_189
-19	val_19
-195	val_195
-196	val_196
-20	val_20
+190	val_190
+191	val_191
+192	val_192
+194	val_194
+2	val_2
+202	val_202
+203	val_203
+205	val_205
+207	val_207
+208	val_208
 209	val_209
-216	val_216
-217	val_217
-224	val_224
-228	val_228
 229	val_229
-233	val_233
-241	val_241
-244	val_244
-247	val_247
+230	val_230
+238	val_238
+24	val_24
 255	val_255
+257	val_257
 258	val_258
 26	val_26
-263	val_263
-265	val_265
 266	val_266
-272	val_272
-273	val_273
 274	val_274
-281	val_281
-291	val_291
+275	val_275
+278	val_278
+282	val_282
+284	val_284
+285	val_285
+289	val_289
 296	val_296
 30	val_30
-302	val_302
-309	val_309
+307	val_307
 316	val_316
 318	val_318
+321	val_321
 325	val_325
+331	val_331
 332	val_332
 335	val_335
+338	val_338
 339	val_339
 342	val_342
-345	val_345
-353	val_353
-369	val_369
-373	val_373
-375	val_375
-377	val_377
-384	val_384
+360	val_360
+365	val_365
+367	val_367
+374	val_374
+378	val_378
+379	val_379
 386	val_386
+389	val_389
+392	val_392
 394	val_394
-396	val_396
-399	val_399
-401	val_401
+400	val_400
+407	val_407
 41	val_41
-413	val_413
 414	val_414
-431	val_431
-446	val_446
-448	val_448
-449	val_449
-459	val_459
-462	val_462
-468	val_468
-47	val_47
-482	val_482
-490	val_490
-493	val_493
-494	val_494
-497	val_497
-5	val_5
-54	val_54
-74	val_74
-77	val_77
-80	val_80
-84	val_84
-85	val_85
-87	val_87
-9	val_9
-95	val_95
-100	val_100
-11	val_11
-113	val_113
-119	val_119
-126	val_126
-128	val_128
-137	val_137
-146	val_146
-15	val_15
-152	val_152
-165	val_165
-167	val_167
-169	val_169
-175	val_175
-177	val_177
-179	val_179
-18	val_18
-194	val_194
-200	val_200
-202	val_202
-221	val_221
-222	val_222
-226	val_226
-242	val_242
-252	val_252
-262	val_262
-27	val_27
-275	val_275
-280	val_280
-282	val_282
-283	val_283
-287	val_287
-288	val_288
-289	val_289
-292	val_292
-311	val_311
-323	val_323
-34	val_34
-35	val_35
-365	val_365
-393	val_393
-409	val_409
-411	val_411
 417	val_417
-418	val_418
+421	val_421
 424	val_424
-43	val_43
-432	val_432
-435	val_435
-443	val_443
-444	val_444
-453	val_453
-457	val_457
+429	val_429
+437	val_437
+438	val_438
+44	val_44
+446	val_446
+448	val_448
 458	val_458
+467	val_467
+468	val_468
 469	val_469
-475	val_475
-477	val_477
-481	val_481
+480	val_480
 483	val_483
-64	val_64
+484	val_484
+487	val_487
+490	val_490
+492	val_492
+498	val_498
+51	val_51
+53	val_53
+69	val_69
 72	val_72
-76	val_76
-83	val_83
-86	val_86
-98	val_98
+82	val_82
+87	val_87
+96	val_96
 PREHOOK: query: explain 
   select unionsrc.key, count(1) FROM (select 'tst1' as key, count(1) as value from src s1
                                         UNION DISTINCT  
@@ -2145,539 +2145,539 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Input: default@src_thrift
 #### A masked pattern was here ####
-03	1
-071	1
-09	1
-1	1
+013	1
+061	1
+063	1
+064	1
+074	1
+08	1
+081	1
+094	1
 10	1
 100	1
+103	1
 104	1
-111	1
-114	1
-116	1
-123	1
+105	1
+11	1
 126	1
 128	1
-131	1
+129	1
+133	1
 134	1
-14	1
+136	1
+143	1
+149	1
 152	1
-155	1
+153	1
+157	1
+162	1
+166	1
 169	1
-17	1
 170	1
-172	1
-178	1
-179	1
-182	1
-189	1
-19	1
-192	1
-194	1
-195	1
-199	1
-20	1
-207	1
-21	1
+174	1
+176	1
+184	1
+193	1
+196	1
+201	1
+205	1
+209	1
 213	1
 218	1
+221	1
 223	1
-229	1
 233	1
-235	1
+234	1
+239	1
 24	1
-256	1
-257	1
+241	1
+242	1
+247	1
+248	1
+251	1
+254	1
 26	1
-265	1
-266	1
-27	1
-278	1
-280	1
-284	1
-291	1
-294	1
-30	1
+263	1
+264	1
+272	1
+275	1
+285	1
+293	1
+296	1
+298	1
 301	1
 302	1
-305	1
-312	1
-314	1
-316	1
-321	1
+307	1
+310	1
 323	1
-33	1
+325	1
 333	1
+335	1
 338	1
-344	1
-353	1
-356	1
-361	1
-364	1
-368	1
-369	1
-37	1
+360	1
+362	1
+367	1
+375	1
 377	1
-378	1
-386	1
+38	1
+384	1
 392	1
-397	1
+399	1
 40	1
-404	1
-407	1
-411	1
-418	1
+401	1
+402	1
+403	1
+412	1
+413	1
+417	1
 419	1
-422	1
-424	1
-430	1
-432	1
-436	1
-437	1
-448	1
-454	1
-457	1
-46	1
-468	1
-477	1
+42	1
+427	1
+438	1
+44	1
+458	1
+459	1
+461	1
+466	1
+469	1
+472	1
+475	1
+478	1
 479	1
-490	1
-492	1
-493	1
+483	1
+489	1
 495	1
 496	1
-497	1
-501	1
+5	1
 533	1
-534	1
-552	1
+551	1
 57	1
+573	1
+58	1
 582	1
-611	1
-62	1
+593	1
+594	1
+604	1
+64	1
 652	1
-67	1
-671	1
-691	1
-712	1
-723	1
-73	1
-732	1
-75	1
-751	1
-761	1
-794	1
-8	1
-80	1
-814	1
-822	1
-831	1
-85	1
-854	1
-863	1
-871	1
-874	1
-882	1
+66	1
+682	1
+683	1
+69	1
+702	1
+713	1
+72	1
+76	1
+763	1
+77	1
+771	1
+774	1
+782	1
+791	1
+802	1
+812	1
+833	1
+842	1
+873	1
+894	1
 9	1
-902	1
-904	1
-91	1
-911	1
-92	1
-921	1
-922	1
+90	1
+903	1
+912	1
+933	1
+954	1
 964	1
-97	1
-974	1
-982	1
 983	1
-record_7	1
+984	1
+record_2	1
+record_3	1
+record_6	1
 record_8	1
 NULL	1
-002	1
+0	1
+004	1
+01	1
 02	1
 032	1
-034	1
-07	1
-074	1
+062	1
+082	1
 091	1
-105	1
-11	1
 113	1
-124	1
-136	1
+114	1
+116	1
+118	1
+122	1
+123	1
 137	1
 138	1
-143	1
-150	1
+14	1
+145	1
+146	1
+155	1
 158	1
-160	1
-162	1
+164	1
 165	1
-166	1
-174	1
-177	1
-18	1
-180	1
+178	1
+181	1
+183	1
 186	1
-196	1
-197	1
+189	1
+190	1
+191	1
+194	1
+195	1
+199	1
+2	1
 204	1
-217	1
-219	1
-226	1
+207	1
+208	1
+214	1
+216	1
+222	1
+224	1
+229	1
 230	1
 238	1
-242	1
-248	1
-252	1
+243	1
+244	1
+258	1
 260	1
-261	1
-263	1
-274	1
-277	1
-293	1
-296	1
-304	1
-307	1
-308	1
-325	1
-327	1
+262	1
+266	1
+27	1
+273	1
+28	1
+284	1
+288	1
+294	1
+30	1
+312	1
+314	1
+315	1
+321	1
+33	1
 342	1
-348	1
 35	1
-351	1
-367	1
+364	1
+365	1
+366	1
+368	1
 381	1
+386	1
 389	1
-393	1
 394	1
+396	1
+397	1
 4	1
-403	1
-409	1
-412	1
+41	1
 414	1
 421	1
-427	1
-429	1
-435	1
-438	1
-439	1
-45	1
+442	1
+444	1
+446	1
+448	1
+452	1
+454	1
 455	1
-458	1
 460	1
-461	1
-462	1
+463	1
 471	1
-475	1
-478	1
-480	1
-484	1
-487	1
+473	1
+482	1
+492	1
+493	1
 50	1
-503	1
-513	1
-521	1
-523	1
-53	1
-532	1
-551	1
-56	1
-563	1
-571	1
-573	1
-58	1
-59	1
-591	1
-603	1
-604	1
-622	1
+501	1
+502	1
+543	1
+554	1
+574	1
+584	1
+60	1
+621	1
 633	1
-634	1
-641	1
-644	1
+65	1
 651	1
-66	1
-661	1
-69	1
-693	1
-694	1
+662	1
+664	1
+681	1
+692	1
 703	1
-71	1
+712	1
+714	1
+723	1
 731	1
 734	1
-752	1
-754	1
-764	1
-77	1
-772	1
+751	1
 78	1
-784	1
-793	1
-803	1
-813	1
-83	1
-833	1
+80	1
+814	1
+831	1
+832	1
+834	1
 843	1
 844	1
-864	1
-89	1
-90	1
+852	1
+863	1
+882	1
+911	1
 924	1
+932	1
 934	1
-95	1
-954	1
-961	1
+942	1
+944	1
+963	1
+97	1
+982	1
+991	1
 993	1
-record_0	1
-record_2	1
-record_4	1
-record_6	1
+record_1	1
+record_7	1
 record_9	1
 001	1
-004	1
-01	1
-013	1
+002	1
 051	1
-061	1
-062	1
-063	1
+071	1
 102	1
-103	1
+111	1
+12	1
 120	1
-129	1
-133	1
-142	1
-145	1
-146	1
-149	1
-15	1
-157	1
-181	1
-187	1
-191	1
-2	1
-200	1
-201	1
-202	1
+131	1
+150	1
+156	1
+160	1
+163	1
+167	1
+168	1
+17	1
+175	1
+180	1
+182	1
+20	1
 203	1
-208	1
-214	1
-216	1
-222	1
-224	1
-228	1
+21	1
+226	1
 237	1
-239	1
-241	1
-244	1
-254	1
 255	1
-258	1
-262	1
-264	1
-273	1
-275	1
-28	1
+256	1
+261	1
+271	1
+274	1
+277	1
+281	1
 282	1
-285	1
 286	1
 287	1
-288	1
-29	1
+289	1
 292	1
-298	1
-310	1
-311	1
+308	1
+309	1
+318	1
+327	1
 332	1
-335	1
-336	1
 339	1
+34	1
+341	1
+348	1
 354	1
-360	1
-362	1
-373	1
-384	1
-395	1
-396	1
-402	1
-417	1
-42	1
+356	1
+361	1
+37	1
+372	1
+374	1
+379	1
+382	1
+409	1
+429	1
 43	1
-442	1
-444	1
-449	1
-453	1
-459	1
-47	1
+430	1
+431	1
+432	1
+435	1
+437	1
+439	1
+443	1
+45	1
+457	1
+462	1
+467	1
+470	1
 48	1
 481	1
-482	1
-483	1
-485	1
-489	1
+487	1
 494	1
-502	1
-541	1
-562	1
-574	1
-593	1
-60	1
-621	1
-631	1
-65	1
+51	1
+513	1
+521	1
+523	1
+532	1
+534	1
+552	1
+561	1
+563	1
+571	1
+603	1
+612	1
+62	1
+622	1
+641	1
+644	1
 653	1
 663	1
-664	1
-681	1
-682	1
-683	1
-713	1
-72	1
+68	1
+691	1
+70	1
+724	1
+73	1
+732	1
 74	1
-742	1
-76	1
-763	1
-771	1
+752	1
+754	1
 781	1
+784	1
 79	1
-791	1
 811	1
-812	1
 82	1
-834	1
-852	1
-86	1
+821	1
+83	1
+84	1
 861	1
-87	1
-872	1
-894	1
-903	1
-912	1
-914	1
-932	1
-942	1
-944	1
-96	1
-963	1
+904	1
+91	1
+941	1
+961	1
+971	1
+981	1
+record_4	1
 record_5	1
-0	1
 021	1
-064	1
-08	1
-081	1
-082	1
+03	1
+034	1
+07	1
 084	1
-094	1
-118	1
+09	1
+1	1
 119	1
-12	1
-122	1
+124	1
 125	1
-153	1
-156	1
-163	1
-164	1
-167	1
-168	1
-175	1
-176	1
-183	1
-184	1
-190	1
-193	1
-205	1
-209	1
-221	1
-234	1
-243	1
-247	1
+142	1
+15	1
+172	1
+177	1
+179	1
+18	1
+187	1
+19	1
+192	1
+197	1
+200	1
+202	1
+217	1
+219	1
+228	1
+235	1
 249	1
-251	1
-271	1
-272	1
-281	1
+252	1
+257	1
+265	1
+278	1
+280	1
 283	1
-289	1
+29	1
+291	1
+304	1
+305	1
 306	1
-309	1
-315	1
+311	1
+316	1
 317	1
-318	1
 322	1
 331	1
-34	1
-341	1
+336	1
+344	1
 345	1
-365	1
-366	1
-372	1
-374	1
-375	1
-379	1
-38	1
-382	1
+351	1
+353	1
+369	1
+373	1
+378	1
 391	1
-399	1
+393	1
+395	1
 400	1
-401	1
+404	1
 406	1
-41	1
-413	1
-431	1
-44	1
-443	1
-446	1
-452	1
-463	1
-466	1
-467	1
-469	1
-470	1
-472	1
-473	1
+407	1
+411	1
+418	1
+422	1
+424	1
+436	1
+449	1
+453	1
+46	1
+468	1
+47	1
+477	1
+480	1
+484	1
+485	1
+490	1
 491	1
+497	1
 498	1
-5	1
-51	1
+503	1
+53	1
 54	1
-543	1
-554	1
-561	1
+541	1
+56	1
+562	1
 572	1
-584	1
-594	1
-612	1
+59	1
+591	1
+611	1
 613	1
-64	1
-662	1
-68	1
-692	1
-70	1
-702	1
+631	1
+634	1
+661	1
+67	1
+671	1
+693	1
+694	1
 704	1
-714	1
-724	1
+71	1
+742	1
+75	1
+761	1
+764	1
+772	1
 773	1
-774	1
-782	1
-802	1
+793	1
+794	1
+8	1
+803	1
 81	1
-821	1
-832	1
-84	1
-842	1
+813	1
+822	1
+85	1
 851	1
-873	1
+854	1
+86	1
+864	1
+87	1
+871	1
+872	1
+874	1
+89	1
 892	1
-933	1
-941	1
-971	1
+902	1
+914	1
+92	1
+921	1
+922	1
+95	1
+96	1
 973	1
+974	1
 98	1
-981	1
-984	1
-991	1
-record_1	1
-record_3	1
+record_0	1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/union_fast_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/union_fast_stats.q.out b/ql/src/test/results/clientpositive/llap/union_fast_stats.q.out
index 5cd5d41..4ca5f47 100644
--- a/ql/src/test/results/clientpositive/llap/union_fast_stats.q.out
+++ b/ql/src/test/results/clientpositive/llap/union_fast_stats.q.out
@@ -176,6 +176,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	3                   
 	numRows             	15                  
 	rawDataSize         	3483                
@@ -228,6 +229,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	3                   
 	numRows             	15                  
 	rawDataSize         	3483                
@@ -292,6 +294,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	4                   
 	numRows             	20                  
 	rawDataSize         	4552                
@@ -506,10 +509,11 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	5                   
 	rawDataSize         	1069                
-	totalSize           	3243                
+	totalSize           	3245                
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -558,10 +562,11 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	15                  
 	rawDataSize         	3320                
-	totalSize           	3243                
+	totalSize           	3245                
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -622,10 +627,11 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	20                  
 	rawDataSize         	4389                
-	totalSize           	4616                
+	totalSize           	4618                
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/union_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/union_stats.q.out b/ql/src/test/results/clientpositive/llap/union_stats.q.out
index b56807c..5a088f4 100644
--- a/ql/src/test/results/clientpositive/llap/union_stats.q.out
+++ b/ql/src/test/results/clientpositive/llap/union_stats.q.out
@@ -62,6 +62,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'
@@ -83,6 +84,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'
@@ -146,6 +148,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'
@@ -167,6 +170,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'
@@ -251,6 +255,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	500                 
 	rawDataSize         	5312                
@@ -299,6 +304,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	1000                
 	rawDataSize         	10624               
@@ -355,6 +361,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	1000                
 	rawDataSize         	10624               

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/vector_coalesce_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_coalesce_2.q.out b/ql/src/test/results/clientpositive/llap/vector_coalesce_2.q.out
index e8bb722..451a6e1 100644
--- a/ql/src/test/results/clientpositive/llap/vector_coalesce_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_coalesce_2.q.out
@@ -168,9 +168,9 @@ GROUP BY str2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@str_str_orc
 #### A masked pattern was here ####
-y	0.0
-NULL	0.0
 X	0.02
+NULL	0.0
+y	0.0
 PREHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
 SELECT COALESCE(str1, 0) as result
 from str_str_orc
@@ -393,9 +393,9 @@ GROUP BY str2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@str_str_orc
 #### A masked pattern was here ####
-y	0.0
-NULL	0.0
 X	0.02
+NULL	0.0
+y	0.0
 PREHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
 SELECT COALESCE(str1, 0) as result
 from str_str_orc

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/vector_complex_all.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_complex_all.q.out b/ql/src/test/results/clientpositive/llap/vector_complex_all.q.out
index f2277c1..a123a33 100644
--- a/ql/src/test/results/clientpositive/llap/vector_complex_all.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_complex_all.q.out
@@ -1112,9 +1112,9 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_create_complex
 #### A masked pattern was here ####
 lst	strct
+["g","h","i"]	{"a":"five","b":"six"}
 ["a","b","c"]	{"a":"one","b":"two"}
 ["d","e","f"]	{"a":"three","b":"four"}
-["g","h","i"]	{"a":"five","b":"six"}
 PREHOOK: query: EXPLAIN VECTORIZATION DETAIL
 SELECT str, count(val)  FROM orc_create_complex GROUP BY str
 PREHOOK: type: QUERY
@@ -1253,9 +1253,9 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_create_complex
 #### A masked pattern was here ####
 str	_c1
+line2	4501
 line3	4501
 line1	4501
-line2	4501
 PREHOOK: query: EXPLAIN VECTORIZATION DETAIL
 SELECT strct.B, count(val) FROM orc_create_complex GROUP BY strct.B
 PREHOOK: type: QUERY
@@ -1492,6 +1492,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@orc_create_complex
 #### A masked pattern was here ####
 strct	mp	lst	str	_c4
-{"a":"three","b":"four"}	{"key21":"value21","key22":"value22","key23":"value23"}	["d","e","f"]	line2	4501
 {"a":"one","b":"two"}	{"key11":"value11","key12":"value12","key13":"value13"}	["a","b","c"]	line1	4501
+{"a":"three","b":"four"}	{"key21":"value21","key22":"value22","key23":"value23"}	["d","e","f"]	line2	4501
 {"a":"five","b":"six"}	{"key31":"value31","key32":"value32","key33":"value33"}	["g","h","i"]	line3	4501

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/vector_grouping_sets.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_grouping_sets.q.out b/ql/src/test/results/clientpositive/llap/vector_grouping_sets.q.out
index ec3e2b8..e31de7d 100644
--- a/ql/src/test/results/clientpositive/llap/vector_grouping_sets.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_grouping_sets.q.out
@@ -247,13 +247,13 @@ POSTHOOK: query: select s_store_id
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@store
 #### A masked pattern was here ####
+AAAAAAAACAAAAAAA
+NULL
 AAAAAAAABAAAAAAA
 AAAAAAAAEAAAAAAA
 AAAAAAAAHAAAAAAA
-NULL
 AAAAAAAAIAAAAAAA
 AAAAAAAAKAAAAAAA
-AAAAAAAACAAAAAAA
 PREHOOK: query: explain vectorization expression
 select s_store_id, GROUPING__ID
  from store
@@ -385,13 +385,13 @@ POSTHOOK: query: select s_store_id, GROUPING__ID
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@store
 #### A masked pattern was here ####
+AAAAAAAACAAAAAAA	0
+NULL	1
 AAAAAAAABAAAAAAA	0
 AAAAAAAAEAAAAAAA	0
 AAAAAAAAHAAAAAAA	0
-NULL	1
 AAAAAAAAIAAAAAAA	0
 AAAAAAAAKAAAAAAA	0
-AAAAAAAACAAAAAAA	0
 PREHOOK: query: explain
 select s_store_id, GROUPING__ID
  from store


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketsortoptimize_insert_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketsortoptimize_insert_1.q.out b/ql/src/test/results/clientpositive/bucketsortoptimize_insert_1.q.out
index b59c4bc..49598d1 100644
--- a/ql/src/test/results/clientpositive/bucketsortoptimize_insert_1.q.out
+++ b/ql/src/test/results/clientpositive/bucketsortoptimize_insert_1.q.out
@@ -128,7 +128,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 POSTHOOK: Input: default@test_table2@ds=1
 #### A masked pattern was here ####
-247
+243
 PREHOOK: query: select count(*) from test_table2 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table2
@@ -139,7 +139,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 POSTHOOK: Input: default@test_table2@ds=1
 #### A masked pattern was here ####
-253
+257
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table2 PARTITION (ds = '1')
 SELECT * from 
@@ -238,7 +238,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 POSTHOOK: Input: default@test_table2@ds=1
 #### A masked pattern was here ####
-247
+243
 PREHOOK: query: select count(*) from test_table2 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table2
@@ -249,7 +249,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 POSTHOOK: Input: default@test_table2@ds=1
 #### A masked pattern was here ####
-253
+257
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table2 PARTITION (ds = '1')
 SELECT x.key, concat(x.value, x.value) from 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketsortoptimize_insert_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketsortoptimize_insert_3.q.out b/ql/src/test/results/clientpositive/bucketsortoptimize_insert_3.q.out
index 52ef3db..d1c11f4 100644
--- a/ql/src/test/results/clientpositive/bucketsortoptimize_insert_3.q.out
+++ b/ql/src/test/results/clientpositive/bucketsortoptimize_insert_3.q.out
@@ -120,7 +120,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 POSTHOOK: Input: default@test_table2@ds=1
 #### A masked pattern was here ####
-247
+243
 PREHOOK: query: select count(*) from test_table2 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table2
@@ -131,7 +131,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 POSTHOOK: Input: default@test_table2@ds=1
 #### A masked pattern was here ####
-253
+257
 PREHOOK: query: CREATE TABLE test_table3 (key INT, value STRING) PARTITIONED BY (ds STRING)
 CLUSTERED BY (value) SORTED BY (value) INTO 2 BUCKETS
 PREHOOK: type: CREATETABLE

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketsortoptimize_insert_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketsortoptimize_insert_4.q.out b/ql/src/test/results/clientpositive/bucketsortoptimize_insert_4.q.out
index eaf85c3..72e918f 100644
--- a/ql/src/test/results/clientpositive/bucketsortoptimize_insert_4.q.out
+++ b/ql/src/test/results/clientpositive/bucketsortoptimize_insert_4.q.out
@@ -199,18 +199,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
 2	2	val_2val_2	1
-4	4	val_4val_4	1
-8	8	val_8val_8	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -221,6 +210,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+4	4	val_4val_4	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
@@ -230,6 +229,7 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
+8	8	val_8val_8	1
 9	9	val_9val_9	1
 PREHOOK: query: DROP TABLE test_table3
 PREHOOK: type: DROPTABLE
@@ -408,6 +408,7 @@ POSTHOOK: Input: default@test_table3@ds=1
 2	val_2	1
 4	val_4	1
 8	val_8	1
+9	val_9	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -427,7 +428,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	val_5	1
 5	val_5	1
 5	val_5	1
-9	val_9	1
 PREHOOK: query: DROP TABLE test_table3
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@test_table3

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketsortoptimize_insert_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketsortoptimize_insert_5.q.out b/ql/src/test/results/clientpositive/bucketsortoptimize_insert_5.q.out
index 661114d..775cb91 100644
--- a/ql/src/test/results/clientpositive/bucketsortoptimize_insert_5.q.out
+++ b/ql/src/test/results/clientpositive/bucketsortoptimize_insert_5.q.out
@@ -202,18 +202,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-8	val_8val_8	1
-4	val_4val_4	1
 2	val_2val_2	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -225,6 +214,7 @@ POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
 9	val_9val_9	1
+8	val_8val_8	1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
@@ -234,6 +224,16 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
+4	val_4val_4	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
 SELECT a.key, concat(a.value, b.value) 
@@ -396,18 +396,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-8	val_8val_8	1
-4	val_4val_4	1
 2	val_2val_2	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -419,6 +408,7 @@ POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
 9	val_9val_9	1
+8	val_8val_8	1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
@@ -428,3 +418,13 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
+4	val_4val_4	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/bucketsortoptimize_insert_8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketsortoptimize_insert_8.q.out b/ql/src/test/results/clientpositive/bucketsortoptimize_insert_8.q.out
index dae491a..639af48 100644
--- a/ql/src/test/results/clientpositive/bucketsortoptimize_insert_8.q.out
+++ b/ql/src/test/results/clientpositive/bucketsortoptimize_insert_8.q.out
@@ -203,18 +203,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
 2	2	val_2val_2	1
-4	4	val_4val_4	1
-8	8	val_8val_8	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -225,6 +214,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+4	4	val_4val_4	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
@@ -234,6 +233,7 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
+8	8	val_8val_8	1
 9	9	val_9val_9	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -386,18 +386,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
-0	0	val_0val_0	1
 2	2	val_2val_2	1
-4	4	val_4val_4	1
-8	8	val_8val_8	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -408,6 +397,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+0	0	val_0val_0	1
+4	4	val_4val_4	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
@@ -417,4 +416,5 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
 5	5	val_5val_5	1
+8	8	val_8val_8	1
 9	9	val_9val_9	1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/cbo_rp_outer_join_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cbo_rp_outer_join_ppr.q.out b/ql/src/test/results/clientpositive/cbo_rp_outer_join_ppr.q.out
index ec06e0e..f7123b9 100644
--- a/ql/src/test/results/clientpositive/cbo_rp_outer_join_ppr.q.out
+++ b/ql/src/test/results/clientpositive/cbo_rp_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'
@@ -375,6 +379,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'
@@ -396,6 +401,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'
@@ -446,6 +452,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'
@@ -494,6 +501,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/ac6b2a3f/ql/src/test/results/clientpositive/columnStatsUpdateForStatsOptimizer_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/columnStatsUpdateForStatsOptimizer_2.q.out b/ql/src/test/results/clientpositive/columnStatsUpdateForStatsOptimizer_2.q.out
index f2e813a..7399821 100644
--- a/ql/src/test/results/clientpositive/columnStatsUpdateForStatsOptimizer_2.q.out
+++ b/ql/src/test/results/clientpositive/columnStatsUpdateForStatsOptimizer_2.q.out
@@ -38,6 +38,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	3                   
 	rawDataSize         	24                  
@@ -82,6 +83,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"year\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	3                   
 	rawDataSize         	24                  
@@ -170,6 +172,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numRows             	3                   
@@ -292,6 +295,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/column_names_with_leading_and_trailing_spaces.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/column_names_with_leading_and_trailing_spaces.q.out b/ql/src/test/results/clientpositive/column_names_with_leading_and_trailing_spaces.q.out
index b327bf8..e83a370 100644
--- a/ql/src/test/results/clientpositive/column_names_with_leading_and_trailing_spaces.q.out
+++ b/ql/src/test/results/clientpositive/column_names_with_leading_and_trailing_spaces.q.out
@@ -25,6 +25,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\" left\":\"true\",\" middle \":\"true\",\"right \":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/column_pruner_multiple_children.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/column_pruner_multiple_children.q.out b/ql/src/test/results/clientpositive/column_pruner_multiple_children.q.out
index c56a504..17271b6 100644
--- a/ql/src/test/results/clientpositive/column_pruner_multiple_children.q.out
+++ b/ql/src/test/results/clientpositive/column_pruner_multiple_children.q.out
@@ -149,6 +149,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1                   
 	rawDataSize         	7                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/columnstats_infinity.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/columnstats_infinity.q.out b/ql/src/test/results/clientpositive/columnstats_infinity.q.out
index 6b31882..e06ff95 100644
--- a/ql/src/test/results/clientpositive/columnstats_infinity.q.out
+++ b/ql/src/test/results/clientpositive/columnstats_infinity.q.out
@@ -98,6 +98,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	5                   
 	rawDataSize         	1250                
@@ -157,6 +158,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"b\":\"true\",\"c1\":\"true\",\"c10\":\"true\",\"c12\":\"true\",\"c13\":\"true\",\"c15\":\"true\",\"c3\":\"true\",\"c4\":\"true\",\"c6\":\"true\",\"c7\":\"true\",\"c9\":\"true\",\"insert_num\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	5                   
 	rawDataSize         	1250                
@@ -276,6 +278,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"b\":\"true\",\"c1\":\"true\",\"c10\":\"true\",\"c11\":\"true\",\"c12\":\"true\",\"c13\":\"true\",\"c14\":\"true\",\"c15\":\"true\",\"c2\":\"true\",\"c3\":\"true\",\"c4\":\"true\",\"c5\":\"true\",\"c6\":\"true\",\"c7\":\"true\",\"c8\":\"true\",\"c9\":\"true\",\"insert_num\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	5                   
 	rawDataSize         	1250                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/columnstats_partlvl.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/columnstats_partlvl.q.out b/ql/src/test/results/clientpositive/columnstats_partlvl.q.out
index 7d1b433..602714b 100644
--- a/ql/src/test/results/clientpositive/columnstats_partlvl.q.out
+++ b/ql/src/test/results/clientpositive/columnstats_partlvl.q.out
@@ -163,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 employeeid,employeename
                 columns.comments 
@@ -411,6 +412,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns employeeid,employeename
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out b/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out
index 9a9223a..6cbcab0 100644
--- a/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out
+++ b/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out
@@ -135,6 +135,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns sourceip,desturl,visitdate,adrevenue,useragent,ccode,lcode,skeyword,avgtimeonsite
               columns.comments 
@@ -156,6 +157,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns sourceip,desturl,visitdate,adrevenue,useragent,ccode,lcode,skeyword,avgtimeonsite
                 columns.comments 
@@ -607,6 +609,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns sourceip,desturl,visitdate,adrevenue,useragent,ccode,lcode,skeyword,avgtimeonsite
               columns.comments 
@@ -628,6 +631,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns sourceip,desturl,visitdate,adrevenue,useragent,ccode,lcode,skeyword,avgtimeonsite
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/combine3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/combine3.q.out b/ql/src/test/results/clientpositive/combine3.q.out
index c508166..8a38fe3 100644
--- a/ql/src/test/results/clientpositive/combine3.q.out
+++ b/ql/src/test/results/clientpositive/combine3.q.out
@@ -170,36 +170,36 @@ POSTHOOK: Input: default@combine_3_srcpart_seq_rc_bucket
 POSTHOOK: Input: default@combine_3_srcpart_seq_rc_bucket@ds=1
 POSTHOOK: Input: default@combine_3_srcpart_seq_rc_bucket@ds=11
 #### A masked pattern was here ####
-0	1
-0	1
-0	1
-0	11
-0	11
-0	11
 2	1
 2	11
-4	1
-4	11
-8	1
-8	11
 10	1
 10	11
-12	1
-12	1
-12	11
-12	11
-18	1
-18	1
-18	11
-18	11
+17	1
+17	11
+19	1
+19	11
 20	1
 20	11
-24	1
-24	1
-24	11
-24	11
-26	1
-26	1
+27	1
+27	11
+30	1
+30	11
+41	1
+41	11
+43	1
+43	11
+51	1
+51	1
+51	11
+51	11
+54	1
+54	11
+57	1
+57	11
+58	1
+58	1
+58	11
+58	11
 PREHOOK: query: drop table combine_3_srcpart_seq_rc_bucket
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@combine_3_srcpart_seq_rc_bucket

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/comments.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/comments.q.out b/ql/src/test/results/clientpositive/comments.q.out
index cedbd1e..34fd1f6 100644
--- a/ql/src/test/results/clientpositive/comments.q.out
+++ b/ql/src/test/results/clientpositive/comments.q.out
@@ -156,6 +156,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'
@@ -177,6 +178,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/constantPropagateForSubQuery.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constantPropagateForSubQuery.q.out b/ql/src/test/results/clientpositive/constantPropagateForSubQuery.q.out
index 3cca8b8..5619f19 100644
--- a/ql/src/test/results/clientpositive/constantPropagateForSubQuery.q.out
+++ b/ql/src/test/results/clientpositive/constantPropagateForSubQuery.q.out
@@ -58,6 +58,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'
@@ -79,6 +80,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'
@@ -104,6 +106,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'
@@ -125,6 +128,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/create_alter_list_bucketing_table1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_alter_list_bucketing_table1.q.out b/ql/src/test/results/clientpositive/create_alter_list_bucketing_table1.q.out
index e74be62..593ae83 100644
--- a/ql/src/test/results/clientpositive/create_alter_list_bucketing_table1.q.out
+++ b/ql/src/test/results/clientpositive/create_alter_list_bucketing_table1.q.out
@@ -27,6 +27,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col1\":\"true\",\"col2\":\"true\",\"col3\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -73,6 +74,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col1\":\"true\",\"col2\":\"true\",\"col3\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -119,6 +121,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col1\":\"true\",\"col2\":\"true\",\"col3\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -172,6 +175,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -218,6 +222,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -263,6 +268,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/create_like.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_like.q.out b/ql/src/test/results/clientpositive/create_like.q.out
index 7c26a59..c672a98 100644
--- a/ql/src/test/results/clientpositive/create_like.q.out
+++ b/ql/src/test/results/clientpositive/create_like.q.out
@@ -24,6 +24,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -373,6 +374,7 @@ Table Parameters:
 	                    	    }               
 	                    	  ]                 
 	                    	}                   
+	bucketing_version   	2                   
 	k1                  	v1                  
 	k2                  	v2                  
 #### A masked pattern was here ####
@@ -534,6 +536,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col1\":\"true\",\"col2\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/create_like_tbl_props.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_like_tbl_props.q.out b/ql/src/test/results/clientpositive/create_like_tbl_props.q.out
index e324749..675f5c2 100644
--- a/ql/src/test/results/clientpositive/create_like_tbl_props.q.out
+++ b/ql/src/test/results/clientpositive/create_like_tbl_props.q.out
@@ -210,6 +210,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	key                 	value               
 	key1                	value1              
 	numFiles            	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/create_like_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_like_view.q.out b/ql/src/test/results/clientpositive/create_like_view.q.out
index 25b927b..a955c3f 100644
--- a/ql/src/test/results/clientpositive/create_like_view.q.out
+++ b/ql/src/test/results/clientpositive/create_like_view.q.out
@@ -48,6 +48,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -110,6 +111,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -169,6 +171,7 @@ Table Type:         	EXTERNAL_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -291,6 +294,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/ac6b2a3f/ql/src/test/results/clientpositive/create_or_replace_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_or_replace_view.q.out b/ql/src/test/results/clientpositive/create_or_replace_view.q.out
index 8383951..5871434 100644
--- a/ql/src/test/results/clientpositive/create_or_replace_view.q.out
+++ b/ql/src/test/results/clientpositive/create_or_replace_view.q.out
@@ -36,6 +36,7 @@ Database:           	vt
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -124,6 +125,7 @@ Retention:          	0
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	2                   
 	numRows             	0                   
@@ -220,6 +222,7 @@ Retention:          	0
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -293,6 +296,7 @@ Retention:          	0
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -389,6 +393,7 @@ Retention:          	0
 Table Type:         	VIRTUAL_VIEW        	 
 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/ac6b2a3f/ql/src/test/results/clientpositive/create_skewed_table1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_skewed_table1.q.out b/ql/src/test/results/clientpositive/create_skewed_table1.q.out
index cc647a3..eda8cbd 100644
--- a/ql/src/test/results/clientpositive/create_skewed_table1.q.out
+++ b/ql/src/test/results/clientpositive/create_skewed_table1.q.out
@@ -40,6 +40,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -76,6 +77,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -113,6 +115,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col1\":\"true\",\"col2\":\"true\",\"col3\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/create_table_like_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_table_like_stats.q.out b/ql/src/test/results/clientpositive/create_table_like_stats.q.out
index f88c50c..7740fd7 100644
--- a/ql/src/test/results/clientpositive/create_table_like_stats.q.out
+++ b/ql/src/test/results/clientpositive/create_table_like_stats.q.out
@@ -136,6 +136,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/ac6b2a3f/ql/src/test/results/clientpositive/create_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_view.q.out b/ql/src/test/results/clientpositive/create_view.q.out
index 70fc85e..3165642 100644
--- a/ql/src/test/results/clientpositive/create_view.q.out
+++ b/ql/src/test/results/clientpositive/create_view.q.out
@@ -254,6 +254,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -303,6 +304,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -349,6 +351,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	fear                	factor              
 #### A masked pattern was here ####
 	 	 
@@ -398,6 +401,7 @@ Retention:          	0
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
 	biggest             	loser               
+	bucketing_version   	2                   
 	fear                	factor              
 #### A masked pattern was here ####
 	 	 
@@ -740,6 +744,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -815,6 +820,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -890,6 +896,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -958,6 +965,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -1031,6 +1039,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -1104,6 +1113,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -1184,6 +1194,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -1213,18 +1224,18 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket
 POSTHOOK: Input: default@view13
 #### A masked pattern was here ####
-0
-0
-0
-0
-0
-5
-5
-5
-5
-10
-10
-15
+1
+8
+8
+16
+16
+18
+18
+21
+21
+21
+21
+24
 PREHOOK: query: CREATE VIEW view14 AS
 SELECT unionsrc1.key as k1, unionsrc1.value as v1,
        unionsrc2.key as k2, unionsrc2.value as v2
@@ -1289,6 +1300,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -1401,6 +1413,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -1483,6 +1496,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/create_view_defaultformats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_view_defaultformats.q.out b/ql/src/test/results/clientpositive/create_view_defaultformats.q.out
index 71df2b2..b408c6e 100644
--- a/ql/src/test/results/clientpositive/create_view_defaultformats.q.out
+++ b/ql/src/test/results/clientpositive/create_view_defaultformats.q.out
@@ -46,6 +46,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -77,6 +78,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/create_view_partitioned.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_view_partitioned.q.out b/ql/src/test/results/clientpositive/create_view_partitioned.q.out
index 2cfb815..a337e86 100644
--- a/ql/src/test/results/clientpositive/create_view_partitioned.q.out
+++ b/ql/src/test/results/clientpositive/create_view_partitioned.q.out
@@ -65,6 +65,7 @@ Retention:          	0
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -264,6 +265,7 @@ Retention:          	0
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -379,6 +381,7 @@ Retention:          	0
 Table Type:         	VIRTUAL_VIEW        	 
 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/ac6b2a3f/ql/src/test/results/clientpositive/create_view_translate.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_view_translate.q.out b/ql/src/test/results/clientpositive/create_view_translate.q.out
index 2365a74..7c746ea 100644
--- a/ql/src/test/results/clientpositive/create_view_translate.q.out
+++ b/ql/src/test/results/clientpositive/create_view_translate.q.out
@@ -32,6 +32,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -79,6 +80,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/create_with_constraints.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_with_constraints.q.out b/ql/src/test/results/clientpositive/create_with_constraints.q.out
index 07435ca..8897663 100644
--- a/ql/src/test/results/clientpositive/create_with_constraints.q.out
+++ b/ql/src/test/results/clientpositive/create_with_constraints.q.out
@@ -457,6 +457,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -498,6 +499,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -538,6 +540,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"x\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -591,6 +594,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"x\":\"true\",\"y\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -650,6 +654,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"x\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -697,6 +702,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"x\":\"true\",\"y\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -747,6 +753,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -788,6 +795,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -829,6 +837,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -870,6 +879,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -919,6 +929,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\",\"c\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -967,6 +978,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1012,6 +1024,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -1055,6 +1068,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1097,6 +1111,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1131,6 +1146,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1165,6 +1181,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1210,6 +1227,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -1253,6 +1271,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1300,6 +1319,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1345,6 +1365,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -1389,6 +1410,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1529,6 +1551,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1562,6 +1585,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"x\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1609,6 +1633,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"x\":\"true\",\"y\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1657,6 +1682,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"x\":\"true\",\"y\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1698,6 +1724,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1732,6 +1759,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1769,6 +1797,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -1832,6 +1861,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1872,6 +1902,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"x\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1925,6 +1956,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"x\":\"true\",\"y\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1975,6 +2007,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -2016,6 +2049,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -2054,6 +2088,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -2114,6 +2149,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -2163,6 +2199,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numPartitions       	0                   
@@ -2214,6 +2251,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -2295,6 +2333,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -2357,6 +2396,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -2403,6 +2443,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -2454,6 +2495,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -2526,6 +2568,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -2600,6 +2643,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\",\"c\":\"true\",\"d\":\"true\",\"e\":\"true\",\"f\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1                   
 	rawDataSize         	26                  

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/create_with_constraints2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/create_with_constraints2.q.out b/ql/src/test/results/clientpositive/create_with_constraints2.q.out
index eea74d9..9f600b2 100644
--- a/ql/src/test/results/clientpositive/create_with_constraints2.q.out
+++ b/ql/src/test/results/clientpositive/create_with_constraints2.q.out
@@ -54,6 +54,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -95,6 +96,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/ctas.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ctas.q.out b/ql/src/test/results/clientpositive/ctas.q.out
index 6ff36b4..5f1a379 100644
--- a/ql/src/test/results/clientpositive/ctas.q.out
+++ b/ql/src/test/results/clientpositive/ctas.q.out
@@ -151,6 +151,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	96                  
@@ -304,6 +305,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	96                  
@@ -457,6 +459,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	120                 
@@ -520,6 +523,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	120                 
@@ -674,6 +678,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	96                  

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/ctas_colname.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ctas_colname.q.out b/ql/src/test/results/clientpositive/ctas_colname.q.out
index 7305b4b..b3a4992 100644
--- a/ql/src/test/results/clientpositive/ctas_colname.q.out
+++ b/ql/src/test/results/clientpositive/ctas_colname.q.out
@@ -100,6 +100,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	20                  
 	rawDataSize         	620                 
@@ -259,6 +260,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	25                  
 	rawDataSize         	242                 
@@ -452,6 +454,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	20                  
 	rawDataSize         	268                 
@@ -624,6 +627,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	25                  
 	rawDataSize         	309                 
@@ -776,6 +780,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	309                 
 	rawDataSize         	3891                
@@ -1211,6 +1216,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	5                   
 	rawDataSize         	45                  
@@ -1347,6 +1353,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	5                   
 	rawDataSize         	35                  

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/ctas_uses_database_location.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ctas_uses_database_location.q.out b/ql/src/test/results/clientpositive/ctas_uses_database_location.q.out
index 927b655..68bc015 100644
--- a/ql/src/test/results/clientpositive/ctas_uses_database_location.q.out
+++ b/ql/src/test/results/clientpositive/ctas_uses_database_location.q.out
@@ -138,6 +138,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	5312                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/database_location.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/database_location.q.out b/ql/src/test/results/clientpositive/database_location.q.out
index a62ba2e..13fd01e 100644
--- a/ql/src/test/results/clientpositive/database_location.q.out
+++ b/ql/src/test/results/clientpositive/database_location.q.out
@@ -43,6 +43,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"name\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -117,6 +118,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"name\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/decimal_serde.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/decimal_serde.q.out b/ql/src/test/results/clientpositive/decimal_serde.q.out
index 43f7ab8..fb74324 100644
--- a/ql/src/test/results/clientpositive/decimal_serde.q.out
+++ b/ql/src/test/results/clientpositive/decimal_serde.q.out
@@ -116,6 +116,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	38                  
 	rawDataSize         	157                 
@@ -168,6 +169,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	38                  
 	rawDataSize         	157                 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/default_file_format.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/default_file_format.q.out b/ql/src/test/results/clientpositive/default_file_format.q.out
index 9eb7d2d..11909e1 100644
--- a/ql/src/test/results/clientpositive/default_file_format.q.out
+++ b/ql/src/test/results/clientpositive/default_file_format.q.out
@@ -69,6 +69,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -102,6 +103,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -135,6 +137,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -168,6 +171,7 @@ Retention:          	0
 Table Type:         	EXTERNAL_TABLE      	 
 Table Parameters:	 	 
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -197,6 +201,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -230,6 +235,7 @@ Retention:          	0
 Table Type:         	EXTERNAL_TABLE      	 
 Table Parameters:	 	 
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	numFiles            	0                   
 	totalSize           	0                   
 #### A masked pattern was here ####
@@ -363,6 +369,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -396,6 +403,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -429,6 +437,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -462,6 +471,7 @@ Retention:          	0
 Table Type:         	EXTERNAL_TABLE      	 
 Table Parameters:	 	 
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	numFiles            	0                   
 	totalSize           	0                   
 #### A masked pattern was here ####
@@ -493,6 +503,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -526,6 +537,7 @@ Retention:          	0
 Table Type:         	EXTERNAL_TABLE      	 
 Table Parameters:	 	 
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	numFiles            	0                   
 	totalSize           	0                   
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/deleteAnalyze.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/deleteAnalyze.q.out b/ql/src/test/results/clientpositive/deleteAnalyze.q.out
index b3ce8bc..be45b75 100644
--- a/ql/src/test/results/clientpositive/deleteAnalyze.q.out
+++ b/ql/src/test/results/clientpositive/deleteAnalyze.q.out
@@ -50,6 +50,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"amount\":\"true\",\"id\":\"true\",\"item\":\"true\",\"sales_tax\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	2                   
 	rawDataSize         	634                 
@@ -116,6 +117,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"amount\":\"true\",\"id\":\"true\",\"item\":\"true\",\"sales_tax\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/describe_comment_indent.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/describe_comment_indent.q.out b/ql/src/test/results/clientpositive/describe_comment_indent.q.out
index 8da5949..d88ed12 100644
--- a/ql/src/test/results/clientpositive/describe_comment_indent.q.out
+++ b/ql/src/test/results/clientpositive/describe_comment_indent.q.out
@@ -56,6 +56,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col1\":\"true\",\"col2\":\"true\",\"col3\":\"true\"}}
+	bucketing_version   	2                   
 	comment             	table comment       
 	                    	two lines           
 	numFiles            	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/describe_comment_nonascii.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/describe_comment_nonascii.q.out b/ql/src/test/results/clientpositive/describe_comment_nonascii.q.out
index a4d5127..8bf2019 100644
--- a/ql/src/test/results/clientpositive/describe_comment_nonascii.q.out
+++ b/ql/src/test/results/clientpositive/describe_comment_nonascii.q.out
@@ -49,6 +49,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col1\":\"true\",\"col2\":\"true\",\"col3\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/describe_syntax.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/describe_syntax.q.out b/ql/src/test/results/clientpositive/describe_syntax.q.out
index a0c6182..79c44de 100644
--- a/ql/src/test/results/clientpositive/describe_syntax.q.out
+++ b/ql/src/test/results/clientpositive/describe_syntax.q.out
@@ -94,6 +94,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	3                   
 	numRows             	0                   
@@ -166,6 +167,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	3                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/describe_table.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/describe_table.q.out b/ql/src/test/results/clientpositive/describe_table.q.out
index 8f7d0f6..2323685 100644
--- a/ql/src/test/results/clientpositive/describe_table.q.out
+++ b/ql/src/test/results/clientpositive/describe_table.q.out
@@ -177,6 +177,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	4                   
 	numPartitions       	4                   
 	numRows             	2000                
@@ -274,6 +275,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	4                   
 	numPartitions       	4                   
 	numRows             	2000                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/display_colstats_tbllvl.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/display_colstats_tbllvl.q.out b/ql/src/test/results/clientpositive/display_colstats_tbllvl.q.out
index c2226f6..927c27e 100644
--- a/ql/src/test/results/clientpositive/display_colstats_tbllvl.q.out
+++ b/ql/src/test/results/clientpositive/display_colstats_tbllvl.q.out
@@ -160,6 +160,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns sourceip,desturl,visitdate,adrevenue,useragent,ccode,lcode,skeyword,avgtimeonsite
               columns.comments 
@@ -181,6 +182,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns sourceip,desturl,visitdate,adrevenue,useragent,ccode,lcode,skeyword,avgtimeonsite
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/druid/druidkafkamini_basic.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/druid/druidkafkamini_basic.q.out b/ql/src/test/results/clientpositive/druid/druidkafkamini_basic.q.out
index 73eab7b..6f553fa 100644
--- a/ql/src/test/results/clientpositive/druid/druidkafkamini_basic.q.out
+++ b/ql/src/test/results/clientpositive/druid/druidkafkamini_basic.q.out
@@ -245,6 +245,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"fullname":"true","shortname":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns shortname,fullname
                     columns.comments 
@@ -267,6 +268,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"fullname":"true","shortname":"true"}}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns shortname,fullname
                       columns.comments 
@@ -318,6 +320,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"__time":"true","added":"true","deleted":"true","language":"true","page":"true","user":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns __time,page,user,language,added,deleted
                     columns.comments 
@@ -356,6 +359,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"__time":"true","added":"true","deleted":"true","language":"true","page":"true","user":"true"}}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns __time,page,user,language,added,deleted
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/druid/druidmini_mv.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/druid/druidmini_mv.q.out b/ql/src/test/results/clientpositive/druid/druidmini_mv.q.out
index a87040a..c29f547 100644
--- a/ql/src/test/results/clientpositive/druid/druidmini_mv.q.out
+++ b/ql/src/test/results/clientpositive/druid/druidmini_mv.q.out
@@ -85,6 +85,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES cmv_mat_view
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true"}
+bucketing_version	2
 druid.datasource	default.cmv_mat_view
 druid.segment.granularity	HOUR
 numFiles	0
@@ -131,6 +132,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES cmv_mat_view2
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true"}
+bucketing_version	2
 druid.datasource	default.cmv_mat_view2
 druid.segment.granularity	HOUR
 numFiles	0
@@ -502,6 +504,7 @@ PREHOOK: query: SHOW TBLPROPERTIES cmv_mat_view2
 PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES cmv_mat_view2
 POSTHOOK: type: SHOW_TBLPROPERTIES
+bucketing_version	2
 druid.datasource	default.cmv_mat_view2
 druid.segment.granularity	HOUR
 #### A masked pattern was here ####


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/groupby_sort_skew_1_23.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/groupby_sort_skew_1_23.q.out b/ql/src/test/results/clientpositive/spark/groupby_sort_skew_1_23.q.out
index 9b068ed..d8b9dca 100644
--- a/ql/src/test/results/clientpositive/spark/groupby_sort_skew_1_23.q.out
+++ b/ql/src/test/results/clientpositive/spark/groupby_sort_skew_1_23.q.out
@@ -85,6 +85,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,cnt
                                 columns.comments 
@@ -118,6 +119,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -141,6 +143,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -172,6 +175,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -287,6 +291,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -310,6 +315,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -375,6 +381,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,cnt
                           columns.comments 
@@ -406,6 +413,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -506,6 +514,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,cnt
                                 columns.comments 
@@ -539,6 +548,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -562,6 +572,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -593,6 +604,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -691,6 +703,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,cnt
                                 columns.comments 
@@ -724,6 +737,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -747,6 +761,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -778,6 +793,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -884,6 +900,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key1,key2,cnt
                                 columns.comments 
@@ -917,6 +934,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -940,6 +958,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -971,6 +990,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -1087,6 +1107,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -1110,6 +1131,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -1175,6 +1197,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,key3,cnt
                           columns.comments 
@@ -1206,6 +1229,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -1316,6 +1340,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -1339,6 +1364,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -1404,6 +1430,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,key2,cnt
                           columns.comments 
@@ -1435,6 +1462,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,cnt
                 columns.comments 
@@ -1557,6 +1585,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -1580,6 +1609,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -1645,6 +1675,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,cnt
                           columns.comments 
@@ -1676,6 +1707,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -1786,6 +1818,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,cnt
                                 columns.comments 
@@ -1819,6 +1852,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -1842,6 +1876,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -1894,6 +1929,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,cnt
                                 columns.comments 
@@ -1927,6 +1963,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -1950,6 +1987,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -1981,6 +2019,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -2103,6 +2142,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,cnt
                                 columns.comments 
@@ -2136,6 +2176,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -2159,6 +2200,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -2217,6 +2259,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -2240,6 +2283,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -2309,6 +2353,7 @@ STAGE PLANS:
                           properties:
                             COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,cnt
                             columns.comments 
@@ -2340,6 +2385,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -2467,6 +2513,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -2490,6 +2537,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -2548,6 +2596,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -2571,6 +2620,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -2618,6 +2668,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,cnt
                           columns.comments 
@@ -2649,6 +2700,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -2770,6 +2822,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -2793,6 +2846,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -2851,6 +2905,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -2874,6 +2929,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -3052,6 +3108,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -3075,6 +3132,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -3140,6 +3198,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,cnt
                           columns.comments 
@@ -3171,6 +3230,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,cnt
                 columns.comments 
@@ -3269,6 +3329,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key1,key2,key3,cnt
                                 columns.comments 
@@ -3302,6 +3363,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -3325,6 +3387,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -3356,6 +3419,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -3465,6 +3529,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key1,key2,key3,key4,cnt
                                 columns.comments 
@@ -3498,6 +3563,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -3521,6 +3587,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -3552,6 +3619,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cnt":"true","key1":"true","key2":"true","key3":"true","key4":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,key4,cnt
                 columns.comments 
@@ -3660,6 +3728,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key1,key2,key3,cnt
                                 columns.comments 
@@ -3693,6 +3762,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -3716,6 +3786,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -3747,6 +3818,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 
@@ -3862,6 +3934,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key1,key2,key3,cnt
                                 columns.comments 
@@ -3895,6 +3968,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,val
                     columns.comments 
@@ -3918,6 +3992,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,val
                       columns.comments 
@@ -3949,6 +4024,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,key2,key3,cnt
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/infer_bucket_sort_bucketed_table.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/infer_bucket_sort_bucketed_table.q.out b/ql/src/test/results/clientpositive/spark/infer_bucket_sort_bucketed_table.q.out
index fbb1731..8fab7ec 100644
--- a/ql/src/test/results/clientpositive/spark/infer_bucket_sort_bucketed_table.q.out
+++ b/ql/src/test/results/clientpositive/spark/infer_bucket_sort_bucketed_table.q.out
@@ -67,7 +67,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table_bucketed
 POSTHOOK: Input: default@test_table_bucketed@part=1
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-31
+0
 PREHOOK: query: SELECT COUNT(*) FROM test_table_bucketed TABLESAMPLE (BUCKET 2 OUT OF 3) WHERE part = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table_bucketed
@@ -78,7 +78,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table_bucketed
 POSTHOOK: Input: default@test_table_bucketed@part=1
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-179
+126
 PREHOOK: query: SELECT COUNT(*) FROM test_table_bucketed TABLESAMPLE (BUCKET 3 OUT OF 3) WHERE part = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table_bucketed
@@ -89,7 +89,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table_bucketed
 POSTHOOK: Input: default@test_table_bucketed@part=1
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-99
+6
 PREHOOK: query: SELECT cnt FROM (SELECT INPUT__FILE__NAME, COUNT(*) cnt FROM test_table_bucketed WHERE part = '1'
 GROUP BY INPUT__FILE__NAME ORDER BY INPUT__FILE__NAME ASC LIMIT 3) a
 PREHOOK: type: QUERY
@@ -102,6 +102,5 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table_bucketed
 POSTHOOK: Input: default@test_table_bucketed@part=1
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-31
-179
-99
+303
+6

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/infer_bucket_sort_num_buckets.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/infer_bucket_sort_num_buckets.q.out b/ql/src/test/results/clientpositive/spark/infer_bucket_sort_num_buckets.q.out
index 3b0d702..695a685 100644
--- a/ql/src/test/results/clientpositive/spark/infer_bucket_sort_num_buckets.q.out
+++ b/ql/src/test/results/clientpositive/spark/infer_bucket_sort_num_buckets.q.out
@@ -131,7 +131,7 @@ Table:              	test_table
 #### A masked pattern was here ####
 Partition Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
-	numFiles            	2                   
+	numFiles            	1                   
 	numRows             	670                 
 	rawDataSize         	5888                
 	totalSize           	6558                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/input_part2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/input_part2.q.out b/ql/src/test/results/clientpositive/spark/input_part2.q.out
index ca95c97..db6c96c 100644
--- a/ql/src/test/results/clientpositive/spark/input_part2.q.out
+++ b/ql/src/test/results/clientpositive/spark/input_part2.q.out
@@ -63,6 +63,7 @@ STAGE PLANS:
                             properties:
                               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                               bucket_count -1
+                              bucketing_version 2
                               column.name.delimiter ,
                               columns key,value,hr,ds
                               columns.comments 
@@ -103,6 +104,7 @@ STAGE PLANS:
                             properties:
                               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                               bucket_count -1
+                              bucketing_version 2
                               column.name.delimiter ,
                               columns key,value,hr,ds
                               columns.comments 
@@ -159,6 +161,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'
@@ -207,6 +210,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'
@@ -237,6 +241,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,hr,ds
                 columns.comments 
@@ -270,6 +275,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,hr,ds
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/join17.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/join17.q.out b/ql/src/test/results/clientpositive/spark/join17.q.out
index 63a3c9f..7c5a37e 100644
--- a/ql/src/test/results/clientpositive/spark/join17.q.out
+++ b/ql/src/test/results/clientpositive/spark/join17.q.out
@@ -61,6 +61,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'
@@ -82,6 +83,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'
@@ -136,6 +138,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'
@@ -157,6 +160,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'
@@ -204,6 +208,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key1":"true","key2":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key1,value1,key2,value2
                           columns.comments 
@@ -235,6 +240,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key1":"true","key2":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key1,value1,key2,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/join26.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/join26.q.out b/ql/src/test/results/clientpositive/spark/join26.q.out
index cd2c36a..ac7a621 100644
--- a/ql/src/test/results/clientpositive/spark/join26.q.out
+++ b/ql/src/test/results/clientpositive/spark/join26.q.out
@@ -63,6 +63,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'
@@ -84,6 +85,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'
@@ -162,6 +164,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'
@@ -229,6 +232,7 @@ STAGE PLANS:
                                 properties:
                                   COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                                   bucket_count -1
+                                  bucketing_version 2
                                   column.name.delimiter ,
                                   columns key,value,val2
                                   columns.comments 
@@ -262,6 +266,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'
@@ -283,6 +288,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'
@@ -314,6 +320,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/join32.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/join32.q.out b/ql/src/test/results/clientpositive/spark/join32.q.out
index cb7ef42..4243e90 100644
--- a/ql/src/test/results/clientpositive/spark/join32.q.out
+++ b/ql/src/test/results/clientpositive/spark/join32.q.out
@@ -62,6 +62,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'
@@ -83,6 +84,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'
@@ -160,6 +162,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'
@@ -235,6 +238,7 @@ STAGE PLANS:
                                   properties:
                                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                                     bucket_count -1
+                                    bucketing_version 2
                                     column.name.delimiter ,
                                     columns key,value,val2
                                     columns.comments 
@@ -268,6 +272,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'
@@ -289,6 +294,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'
@@ -320,6 +326,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/join32_lessSize.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/join32_lessSize.q.out b/ql/src/test/results/clientpositive/spark/join32_lessSize.q.out
index 94acc1e..b5a3e87 100644
--- a/ql/src/test/results/clientpositive/spark/join32_lessSize.q.out
+++ b/ql/src/test/results/clientpositive/spark/join32_lessSize.q.out
@@ -70,6 +70,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'
@@ -91,6 +92,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'
@@ -168,6 +170,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'
@@ -243,6 +246,7 @@ STAGE PLANS:
                                   properties:
                                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                                     bucket_count -1
+                                    bucketing_version 2
                                     column.name.delimiter ,
                                     columns key,value,val2
                                     columns.comments 
@@ -276,6 +280,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'
@@ -297,6 +302,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'
@@ -328,6 +334,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 
@@ -525,6 +532,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'
@@ -546,6 +554,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'
@@ -614,6 +623,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'
@@ -635,6 +645,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'
@@ -687,6 +698,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'
@@ -708,6 +720,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'
@@ -785,6 +798,7 @@ STAGE PLANS:
                                   properties:
                                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                     bucket_count -1
+                                    bucketing_version 2
                                     column.name.delimiter ,
                                     columns key,value,val2
                                     columns.comments 
@@ -818,6 +832,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'
@@ -839,6 +854,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'
@@ -870,6 +886,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 
@@ -1087,6 +1104,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'
@@ -1137,6 +1155,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'
@@ -1158,6 +1177,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'
@@ -1239,6 +1259,7 @@ STAGE PLANS:
                                     properties:
                                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                                       bucket_count -1
+                                      bucketing_version 2
                                       column.name.delimiter ,
                                       columns key,value,val2
                                       columns.comments 
@@ -1272,6 +1293,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'
@@ -1293,6 +1315,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'
@@ -1324,6 +1347,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 
@@ -1543,6 +1567,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'
@@ -1589,6 +1614,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'
@@ -1610,6 +1636,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'
@@ -1691,6 +1718,7 @@ STAGE PLANS:
                                     properties:
                                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                       bucket_count -1
+                                      bucketing_version 2
                                       column.name.delimiter ,
                                       columns key,value,val2
                                       columns.comments 
@@ -1724,6 +1752,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'
@@ -1745,6 +1774,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'
@@ -1776,6 +1806,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/join33.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/join33.q.out b/ql/src/test/results/clientpositive/spark/join33.q.out
index cb7ef42..4243e90 100644
--- a/ql/src/test/results/clientpositive/spark/join33.q.out
+++ b/ql/src/test/results/clientpositive/spark/join33.q.out
@@ -62,6 +62,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'
@@ -83,6 +84,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'
@@ -160,6 +162,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'
@@ -235,6 +238,7 @@ STAGE PLANS:
                                   properties:
                                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                                     bucket_count -1
+                                    bucketing_version 2
                                     column.name.delimiter ,
                                     columns key,value,val2
                                     columns.comments 
@@ -268,6 +272,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'
@@ -289,6 +294,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'
@@ -320,6 +326,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/join34.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/join34.q.out b/ql/src/test/results/clientpositive/spark/join34.q.out
index 42f191b..679883b 100644
--- a/ql/src/test/results/clientpositive/spark/join34.q.out
+++ b/ql/src/test/results/clientpositive/spark/join34.q.out
@@ -73,6 +73,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'
@@ -94,6 +95,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:
                   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 +172,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'
@@ -223,6 +227,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'
@@ -244,6 +249,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'
@@ -291,6 +297,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value,val2
                           columns.comments 
@@ -322,6 +329,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/join35.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/join35.q.out b/ql/src/test/results/clientpositive/spark/join35.q.out
index f8797b5..496dbb0 100644
--- a/ql/src/test/results/clientpositive/spark/join35.q.out
+++ b/ql/src/test/results/clientpositive/spark/join35.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'
@@ -154,6 +156,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'
@@ -175,6 +178,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'
@@ -229,6 +233,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'
@@ -250,6 +255,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'
@@ -316,6 +322,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value,val2
                           columns.comments 
@@ -366,6 +373,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/join9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/join9.q.out b/ql/src/test/results/clientpositive/spark/join9.q.out
index da543a5..1f435d2 100644
--- a/ql/src/test/results/clientpositive/spark/join9.q.out
+++ b/ql/src/test/results/clientpositive/spark/join9.q.out
@@ -85,6 +85,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'
@@ -137,6 +138,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'
@@ -158,6 +160,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'
@@ -205,6 +208,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 
@@ -236,6 +240,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 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/join_filters_overlap.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/join_filters_overlap.q.out b/ql/src/test/results/clientpositive/spark/join_filters_overlap.q.out
index 91622ca..9397044 100644
--- a/ql/src/test/results/clientpositive/spark/join_filters_overlap.q.out
+++ b/ql/src/test/results/clientpositive/spark/join_filters_overlap.q.out
@@ -56,6 +56,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -77,6 +78,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -131,6 +133,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -152,6 +155,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -206,6 +210,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -227,6 +232,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -366,6 +372,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -387,6 +394,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -437,6 +445,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -458,6 +467,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -512,6 +522,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -533,6 +544,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -672,6 +684,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -693,6 +706,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -743,6 +757,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -764,6 +779,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -818,6 +834,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -839,6 +856,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -974,6 +992,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -995,6 +1014,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1045,6 +1065,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1066,6 +1087,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1120,6 +1142,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1141,6 +1164,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1195,6 +1219,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1216,6 +1241,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1346,6 +1372,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1367,6 +1394,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1421,6 +1449,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1442,6 +1471,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1496,6 +1526,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1517,6 +1548,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1571,6 +1603,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1592,6 +1625,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/join_map_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/join_map_ppr.q.out b/ql/src/test/results/clientpositive/spark/join_map_ppr.q.out
index 44af65d..84d60af 100644
--- a/ql/src/test/results/clientpositive/spark/join_map_ppr.q.out
+++ b/ql/src/test/results/clientpositive/spark/join_map_ppr.q.out
@@ -61,6 +61,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'
@@ -82,6 +83,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'
@@ -131,6 +133,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'
@@ -152,6 +155,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'
@@ -217,6 +221,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,value,val2
                                 columns.comments 
@@ -275,6 +280,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'
@@ -304,6 +310,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","val2":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 
@@ -557,6 +564,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -578,6 +586,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -627,6 +636,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -648,6 +658,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -713,6 +724,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,value,val2
                                 columns.comments 
@@ -771,6 +783,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'
@@ -800,6 +813,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,val2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/list_bucket_dml_10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/list_bucket_dml_10.q.out b/ql/src/test/results/clientpositive/spark/list_bucket_dml_10.q.out
index 2daf15e..e14ae92 100644
--- a/ql/src/test/results/clientpositive/spark/list_bucket_dml_10.q.out
+++ b/ql/src/test/results/clientpositive/spark/list_bucket_dml_10.q.out
@@ -55,6 +55,7 @@ STAGE PLANS:
                           output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                           properties:
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,value
                             columns.comments 
@@ -85,6 +86,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'
@@ -107,6 +109,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'
@@ -141,6 +144,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucket_num_reducers2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucket_num_reducers2.q.out b/ql/src/test/results/clientpositive/llap/bucket_num_reducers2.q.out
new file mode 100644
index 0000000..79d9755
--- /dev/null
+++ b/ql/src/test/results/clientpositive/llap/bucket_num_reducers2.q.out
@@ -0,0 +1,242 @@
+PREHOOK: query: CREATE TABLE test_table(key int, value string) CLUSTERED BY (key) INTO 3 BUCKETS
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@test_table
+POSTHOOK: query: CREATE TABLE test_table(key int, value string) CLUSTERED BY (key) INTO 3 BUCKETS
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@test_table
+PREHOOK: query: explain extended insert overwrite table test_table
+  select * from src
+PREHOOK: type: QUERY
+POSTHOOK: query: explain extended insert overwrite table test_table
+  select * from src
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-2 depends on stages: Stage-1
+  Stage-0 depends on stages: Stage-2
+  Stage-3 depends on stages: Stage-0
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: src
+                  Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                  GatherStats: false
+                  Select Operator
+                    expressions: key (type: string), value (type: string)
+                    outputColumnNames: _col0, _col1
+                    Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                    Reduce Output Operator
+                      null sort order: 
+                      sort order: 
+                      Map-reduce partition columns: UDFToInteger(_col0) (type: int)
+                      Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                      tag: -1
+                      value expressions: _col0 (type: string), _col1 (type: string)
+                      auto parallelism: false
+            Execution mode: llap
+            LLAP IO: no inputs
+            Path -> Alias:
+#### A masked pattern was here ####
+            Path -> Partition:
+#### A masked pattern was here ####
+                Partition
+                  base file name: src
+                  input format: org.apache.hadoop.mapred.TextInputFormat
+                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                  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'
+                    columns.types string:string
+#### A masked pattern was here ####
+                    name default.src
+                    numFiles 1
+                    numRows 500
+                    rawDataSize 5312
+                    serialization.ddl struct src { string key, string value}
+                    serialization.format 1
+                    serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    totalSize 5812
+#### A masked pattern was here ####
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                
+                    input format: org.apache.hadoop.mapred.TextInputFormat
+                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                    properties:
+                      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'
+                      columns.types string:string
+#### A masked pattern was here ####
+                      name default.src
+                      numFiles 1
+                      numRows 500
+                      rawDataSize 5312
+                      serialization.ddl struct src { string key, string value}
+                      serialization.format 1
+                      serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                      totalSize 5812
+#### A masked pattern was here ####
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    name: default.src
+                  name: default.src
+            Truncated Path -> Alias:
+              /src [src]
+        Reducer 2 
+            Execution mode: llap
+            Needs Tagging: false
+            Reduce Operator Tree:
+              Select Operator
+                expressions: UDFToInteger(VALUE._col0) (type: int), VALUE._col1 (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
+                File Output Operator
+                  compressed: false
+                  GlobalTableId: 1
+#### A masked pattern was here ####
+                  NumFilesPerFileSink: 3
+                  Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
+#### A masked pattern was here ####
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      properties:
+                        COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
+                        bucket_count 3
+                        bucket_field_name key
+                        bucketing_version 2
+                        column.name.delimiter ,
+                        columns key,value
+                        columns.comments 
+                        columns.types int:string
+#### A masked pattern was here ####
+                        name default.test_table
+                        numFiles 0
+                        numRows 0
+                        rawDataSize 0
+                        serialization.ddl struct test_table { i32 key, string value}
+                        serialization.format 1
+                        serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        totalSize 0
+#### A masked pattern was here ####
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                      name: default.test_table
+                  TotalFiles: 3
+                  GatherStats: true
+                  MultiFileSpray: true
+                Select Operator
+                  expressions: _col0 (type: int), _col1 (type: string)
+                  outputColumnNames: key, value
+                  Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
+                  Group By Operator
+                    aggregations: compute_stats(key, 'hll'), compute_stats(value, 'hll')
+                    mode: complete
+                    outputColumnNames: _col0, _col1
+                    Statistics: Num rows: 1 Data size: 864 Basic stats: COMPLETE Column stats: COMPLETE
+                    Select Operator
+                      expressions: _col0 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>), _col1 (type: struct<columntype:string,maxlength:bigint,avglength:double,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>)
+                      outputColumnNames: _col0, _col1
+                      Statistics: Num rows: 1 Data size: 864 Basic stats: COMPLETE Column stats: COMPLETE
+                      File Output Operator
+                        compressed: false
+                        GlobalTableId: 0
+#### A masked pattern was here ####
+                        NumFilesPerFileSink: 1
+                        Statistics: Num rows: 1 Data size: 864 Basic stats: COMPLETE Column stats: COMPLETE
+#### A masked pattern was here ####
+                        table:
+                            input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                            output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                            properties:
+                              columns _col0,_col1
+                              columns.types struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>:struct<columntype:string,maxlength:bigint,avglength:double,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>
+                              escape.delim \
+                              hive.serialization.extend.additional.nesting.levels true
+                              serialization.escape.crlf true
+                              serialization.format 1
+                              serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                            serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        TotalFiles: 1
+                        GatherStats: false
+                        MultiFileSpray: false
+
+  Stage: Stage-2
+    Dependency Collection
+
+  Stage: Stage-0
+    Move Operator
+      tables:
+          replace: true
+#### A masked pattern was here ####
+          table:
+              input format: org.apache.hadoop.mapred.TextInputFormat
+              output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+              properties:
+                COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
+                bucket_count 3
+                bucket_field_name key
+                bucketing_version 2
+                column.name.delimiter ,
+                columns key,value
+                columns.comments 
+                columns.types int:string
+#### A masked pattern was here ####
+                name default.test_table
+                numFiles 0
+                numRows 0
+                rawDataSize 0
+                serialization.ddl struct test_table { i32 key, string value}
+                serialization.format 1
+                serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                totalSize 0
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              name: default.test_table
+
+  Stage: Stage-3
+    Stats Work
+      Basic Stats Work:
+#### A masked pattern was here ####
+      Column Stats Desc:
+          Columns: key, value
+          Column Types: int, string
+          Table: default.test_table
+          Is Table Level Stats: true
+
+PREHOOK: query: insert overwrite table test_table
+select * from src
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@test_table
+POSTHOOK: query: insert overwrite table test_table
+select * from src
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@test_table
+POSTHOOK: Lineage: test_table.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: test_table.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+PREHOOK: query: drop table test_table
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@test_table
+PREHOOK: Output: default@test_table
+POSTHOOK: query: drop table test_table
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@test_table
+POSTHOOK: Output: default@test_table

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucket_num_reducers_acid2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucket_num_reducers_acid2.q.out b/ql/src/test/results/clientpositive/llap/bucket_num_reducers_acid2.q.out
new file mode 100644
index 0000000..8a4b54a
--- /dev/null
+++ b/ql/src/test/results/clientpositive/llap/bucket_num_reducers_acid2.q.out
@@ -0,0 +1,84 @@
+PREHOOK: query: drop table if exists bucket_nr_acid2
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists bucket_nr_acid2
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table bucket_nr_acid2 (a int, b int) clustered by (a) into 4 buckets stored as orc TBLPROPERTIES ('transactional'='true')
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: query: create table bucket_nr_acid2 (a int, b int) clustered by (a) into 4 buckets stored as orc TBLPROPERTIES ('transactional'='true')
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@bucket_nr_acid2
+PREHOOK: query: insert into bucket_nr_acid2 values(0,1),(1,1)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: query: insert into bucket_nr_acid2 values(0,1),(1,1)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: Lineage: bucket_nr_acid2.a SCRIPT []
+POSTHOOK: Lineage: bucket_nr_acid2.b SCRIPT []
+PREHOOK: query: insert into bucket_nr_acid2 values(2,2),(3,2)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: query: insert into bucket_nr_acid2 values(2,2),(3,2)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: Lineage: bucket_nr_acid2.a SCRIPT []
+POSTHOOK: Lineage: bucket_nr_acid2.b SCRIPT []
+PREHOOK: query: insert into bucket_nr_acid2 values(0,3),(1,3)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: query: insert into bucket_nr_acid2 values(0,3),(1,3)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: Lineage: bucket_nr_acid2.a SCRIPT []
+POSTHOOK: Lineage: bucket_nr_acid2.b SCRIPT []
+PREHOOK: query: insert into bucket_nr_acid2 values(2,4),(3,4)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: query: insert into bucket_nr_acid2 values(2,4),(3,4)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: Lineage: bucket_nr_acid2.a SCRIPT []
+POSTHOOK: Lineage: bucket_nr_acid2.b SCRIPT []
+PREHOOK: query: update bucket_nr_acid2 set b = -1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket_nr_acid2
+PREHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: query: update bucket_nr_acid2 set b = -1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket_nr_acid2
+POSTHOOK: Output: default@bucket_nr_acid2
+PREHOOK: query: select * from bucket_nr_acid2 order by a, b
+PREHOOK: type: QUERY
+PREHOOK: Input: default@bucket_nr_acid2
+#### A masked pattern was here ####
+POSTHOOK: query: select * from bucket_nr_acid2 order by a, b
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@bucket_nr_acid2
+#### A masked pattern was here ####
+0	-1
+0	-1
+1	-1
+1	-1
+2	-1
+2	-1
+3	-1
+3	-1
+PREHOOK: query: drop table bucket_nr_acid2
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@bucket_nr_acid2
+PREHOOK: Output: default@bucket_nr_acid2
+POSTHOOK: query: drop table bucket_nr_acid2
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@bucket_nr_acid2
+POSTHOOK: Output: default@bucket_nr_acid2

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucketmapjoin1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketmapjoin1.q.out b/ql/src/test/results/clientpositive/llap/bucketmapjoin1.q.out
index 61db738..bbd689a 100644
--- a/ql/src/test/results/clientpositive/llap/bucketmapjoin1.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketmapjoin1.q.out
@@ -439,6 +439,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -460,6 +461,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -540,6 +542,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -587,6 +590,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -668,6 +672,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -859,6 +864,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -880,6 +886,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -960,6 +967,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1007,6 +1015,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -1088,6 +1097,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucketmapjoin2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketmapjoin2.q.out b/ql/src/test/results/clientpositive/llap/bucketmapjoin2.q.out
index d6f541d..633e6b8 100644
--- a/ql/src/test/results/clientpositive/llap/bucketmapjoin2.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketmapjoin2.q.out
@@ -176,6 +176,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -254,6 +255,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -301,6 +303,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -382,6 +385,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -602,6 +606,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -680,6 +685,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -727,6 +733,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -808,6 +815,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -1045,6 +1053,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1123,6 +1132,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1171,6 +1181,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1219,6 +1230,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -1300,6 +1312,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucketmapjoin3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketmapjoin3.q.out b/ql/src/test/results/clientpositive/llap/bucketmapjoin3.q.out
index e37a618..e73c2af 100644
--- a/ql/src/test/results/clientpositive/llap/bucketmapjoin3.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketmapjoin3.q.out
@@ -200,6 +200,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -278,6 +279,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -325,6 +327,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -406,6 +409,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -626,6 +630,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -704,6 +709,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -751,6 +757,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -832,6 +839,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucketmapjoin4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketmapjoin4.q.out b/ql/src/test/results/clientpositive/llap/bucketmapjoin4.q.out
index c8deac4..23ef650 100644
--- a/ql/src/test/results/clientpositive/llap/bucketmapjoin4.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketmapjoin4.q.out
@@ -175,6 +175,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -196,6 +197,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -251,6 +253,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -272,6 +275,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -321,6 +325,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -402,6 +407,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -585,6 +591,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -606,6 +613,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -661,6 +669,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -682,6 +691,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -731,6 +741,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -812,6 +823,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucketmapjoin7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketmapjoin7.q.out b/ql/src/test/results/clientpositive/llap/bucketmapjoin7.q.out
index 1e87e1a..ad740c841 100644
--- a/ql/src/test/results/clientpositive/llap/bucketmapjoin7.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketmapjoin7.q.out
@@ -134,6 +134,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -209,6 +210,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucketpruning1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketpruning1.q.out b/ql/src/test/results/clientpositive/llap/bucketpruning1.q.out
index 21bd171..b435116 100644
--- a/ql/src/test/results/clientpositive/llap/bucketpruning1.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketpruning1.q.out
@@ -34,7 +34,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key = 1) (type: boolean)
-                  buckets included: [1,] of 16
+                  buckets included: [13,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -96,7 +96,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key = 16) (type: boolean)
-                  buckets included: [0,] of 16
+                  buckets included: [3,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -158,7 +158,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key = 17) (type: boolean)
-                  buckets included: [1,] of 16
+                  buckets included: [12,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -220,7 +220,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key = 17) (type: boolean)
-                  buckets included: [1,] of 16
+                  buckets included: [12,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -282,7 +282,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key = 11) (type: boolean)
-                  buckets included: [11,] of 16
+                  buckets included: [5,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -344,7 +344,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key = 1) and (ds = '2008-04-08')) (type: boolean)
-                  buckets included: [1,] of 16
+                  buckets included: [13,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -406,7 +406,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key = 1) and (ds = '2008-04-08') and (value = 'One')) (type: boolean)
-                  buckets included: [1,] of 16
+                  buckets included: [13,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -468,7 +468,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((value = 'One') and (key = 1) and (ds = '2008-04-08')) (type: boolean)
-                  buckets included: [1,] of 16
+                  buckets included: [13,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -530,7 +530,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key) IN (2, 3) (type: boolean)
-                  buckets included: [2,3,] of 16
+                  buckets included: [4,6,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -592,7 +592,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key) IN (2, 3) and (ds = '2008-04-08')) (type: boolean)
-                  buckets included: [2,3,] of 16
+                  buckets included: [4,6,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -654,7 +654,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key) IN (2, 3) and (ds = '2008-04-08') and (value = 'One')) (type: boolean)
-                  buckets included: [2,3,] of 16
+                  buckets included: [4,6,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -716,7 +716,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key) IN (2, 3) and (value = 'One') and (ds = '2008-04-08')) (type: boolean)
-                  buckets included: [2,3,] of 16
+                  buckets included: [4,6,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -900,7 +900,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key = -15) (type: boolean)
-                  buckets included: [1,15,] of 16
+                  buckets included: [6,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -962,6 +962,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: (key) IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17) (type: boolean)
+                  buckets included: [1,3,4,5,6,8,11,12,13,15,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -1023,6 +1024,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key) IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17) and (ds = '2008-04-08')) (type: boolean)
+                  buckets included: [1,3,4,5,6,8,11,12,13,15,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -1084,6 +1086,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key) IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17) and (ds = '2008-04-08') and (value = 'One')) (type: boolean)
+                  buckets included: [1,3,4,5,6,8,11,12,13,15,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator
@@ -1145,6 +1148,7 @@ STAGE PLANS:
                 TableScan
                   alias: srcbucket_pruned
                   filterExpr: ((key) IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17) and (value = 'One') and (ds = '2008-04-08')) (type: boolean)
+                  buckets included: [1,3,4,5,6,8,11,12,13,15,] of 16
                   Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: PARTIAL
                   GatherStats: false
                   Filter Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_2.q.out b/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_2.q.out
index 49827b4..35dc60e 100644
--- a/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_2.q.out
@@ -252,18 +252,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
 2	val_2val_2	1
-4	val_4val_4	1
-8	val_8val_8	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -274,6 +263,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+4	val_4val_4	1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
@@ -283,6 +282,7 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
+8	val_8val_8	1
 9	val_9val_9	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -462,6 +462,18 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+2	val_2val_2	1
+2	val_2val_2	1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 0	val_0val_0	1
 0	val_0val_0	1
 0	val_0val_0	1
@@ -480,22 +492,8 @@ POSTHOOK: Input: default@test_table3@ds=1
 0	val_0val_0	1
 0	val_0val_0	1
 0	val_0val_0	1
-2	val_2val_2	1
-2	val_2val_2	1
 4	val_4val_4	1
 4	val_4val_4	1
-8	val_8val_8	1
-8	val_8val_8	1
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
@@ -514,6 +512,8 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
+8	val_8val_8	1
+8	val_8val_8	1
 9	val_9val_9	1
 9	val_9val_9	1
 PREHOOK: query: EXPLAIN
@@ -694,6 +694,18 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+2	val_2val_2	1
+2	val_2val_2	1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 0	val_0val_0	1
 0	val_0val_0	1
 0	val_0val_0	1
@@ -712,22 +724,8 @@ POSTHOOK: Input: default@test_table3@ds=1
 0	val_0val_0	1
 0	val_0val_0	1
 0	val_0val_0	1
-2	val_2val_2	1
-2	val_2val_2	1
 4	val_4val_4	1
 4	val_4val_4	1
-8	val_8val_8	1
-8	val_8val_8	1
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
@@ -746,6 +744,8 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
+8	val_8val_8	1
+8	val_8val_8	1
 9	val_9val_9	1
 9	val_9val_9	1
 PREHOOK: query: EXPLAIN
@@ -936,18 +936,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
 2	val_2val_2	1
-4	val_4val_4	1
-8	val_8val_8	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -958,6 +947,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+4	val_4val_4	1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
@@ -967,6 +966,7 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
+8	val_8val_8	1
 9	val_9val_9	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -1156,18 +1156,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
-0	val_0val_0val_0val_0	1
 2	val_2val_2val_2val_2	1
-4	val_4val_4val_4val_4	1
-8	val_8val_8val_8val_8	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -1178,6 +1167,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+0	val_0val_0val_0val_0	1
+4	val_4val_4val_4val_4	1
 5	val_5val_5val_5val_5	1
 5	val_5val_5val_5val_5	1
 5	val_5val_5val_5val_5	1
@@ -1187,6 +1186,7 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	val_5val_5val_5val_5	1
 5	val_5val_5val_5val_5	1
 5	val_5val_5val_5val_5	1
+8	val_8val_8val_8val_8	1
 9	val_9val_9val_9val_9	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -1376,17 +1376,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-4	val_2val_2	1
-8	val_4val_4	1
 10	val_5val_5	1
 10	val_5val_5	1
 10	val_5val_5	1
@@ -1396,8 +1385,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 10	val_5val_5	1
 10	val_5val_5	1
 10	val_5val_5	1
-16	val_8val_8	1
-18	val_9val_9	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -1408,3 +1395,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+4	val_2val_2	1
+8	val_4val_4	1
+16	val_8val_8	1
+18	val_9val_9	1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_6.q.out b/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_6.q.out
index 56e93ac..9e80eab 100644
--- a/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_6.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_6.q.out
@@ -231,16 +231,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 0	1	val_0val_0	1
 0	1	val_0val_0	1
 0	1	val_0val_0	1
@@ -252,6 +242,17 @@ POSTHOOK: Input: default@test_table3@ds=1
 0	1	val_0val_0	1
 2	3	val_2val_2	1
 4	5	val_4val_4	1
+8	9	val_8val_8	1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
@@ -261,7 +262,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
-8	9	val_8val_8	1
 9	10	val_9val_9	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -452,16 +452,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 0	1	val_0val_0	1
 0	1	val_0val_0	1
 0	1	val_0val_0	1
@@ -473,6 +463,17 @@ POSTHOOK: Input: default@test_table3@ds=1
 0	1	val_0val_0	1
 2	3	val_2val_2	1
 4	5	val_4val_4	1
+8	9	val_8val_8	1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
@@ -482,7 +483,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
-8	9	val_8val_8	1
 9	10	val_9val_9	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -979,16 +979,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 0	1	val_0val_0	1
 0	1	val_0val_0	1
 0	1	val_0val_0	1
@@ -1000,6 +990,17 @@ POSTHOOK: Input: default@test_table3@ds=1
 0	1	val_0val_0	1
 2	3	val_2val_2	1
 4	5	val_4val_4	1
+8	9	val_8val_8	1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
@@ -1009,7 +1010,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
-8	9	val_8val_8	1
 9	10	val_9val_9	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
@@ -1212,16 +1212,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-PREHOOK: type: QUERY
-PREHOOK: Input: default@test_table3
-PREHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
-POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@test_table3
-POSTHOOK: Input: default@test_table3@ds=1
-#### A masked pattern was here ####
 0	1	val_0val_0	1
 0	1	val_0val_0	1
 0	1	val_0val_0	1
@@ -1233,6 +1223,17 @@ POSTHOOK: Input: default@test_table3@ds=1
 0	1	val_0val_0	1
 2	3	val_2val_2	1
 4	5	val_4val_4	1
+8	9	val_8val_8	1
+PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test_table3
+PREHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_table3
+POSTHOOK: Input: default@test_table3@ds=1
+#### A masked pattern was here ####
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
@@ -1242,7 +1243,6 @@ POSTHOOK: Input: default@test_table3@ds=1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
 5	6	val_5val_5	1
-8	9	val_8val_8	1
 9	10	val_9val_9	1
 PREHOOK: query: CREATE TABLE test_table4 (key INT, key2 INT, value STRING) PARTITIONED BY (ds STRING)
 CLUSTERED BY (key, key2) SORTED BY (key DESC, key2 DESC) INTO 2 BUCKETS

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_7.q.out b/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_7.q.out
index da28ae4..34890e0 100644
--- a/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_7.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_7.q.out
@@ -232,15 +232,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -251,6 +242,15 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
@@ -448,15 +448,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -467,6 +458,15 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1
@@ -668,15 +668,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
-0	val_0val_0	1
 PREHOOK: query: select * from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -687,6 +678,15 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
+0	val_0val_0	1
 5	val_5val_5	1
 5	val_5val_5	1
 5	val_5val_5	1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/cbo_rp_views.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/cbo_rp_views.q.out b/ql/src/test/results/clientpositive/llap/cbo_rp_views.q.out
index 25ea4cf..44e5501 100644
--- a/ql/src/test/results/clientpositive/llap/cbo_rp_views.q.out
+++ b/ql/src/test/results/clientpositive/llap/cbo_rp_views.q.out
@@ -50,9 +50,9 @@ POSTHOOK: Input: default@cbo_t1
 POSTHOOK: Input: default@cbo_t1@dt=2014
 POSTHOOK: Input: default@v1
 #### A masked pattern was here ####
-1
 NULL
 1
+1
 PREHOOK: query: select count(v1.c_int)  from v1 join cbo_t2 on v1.c_int = cbo_t2.c_int
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cbo_t1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/cbo_views.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/cbo_views.q.out b/ql/src/test/results/clientpositive/llap/cbo_views.q.out
index 25ea4cf..44e5501 100644
--- a/ql/src/test/results/clientpositive/llap/cbo_views.q.out
+++ b/ql/src/test/results/clientpositive/llap/cbo_views.q.out
@@ -50,9 +50,9 @@ POSTHOOK: Input: default@cbo_t1
 POSTHOOK: Input: default@cbo_t1@dt=2014
 POSTHOOK: Input: default@v1
 #### A masked pattern was here ####
-1
 NULL
 1
+1
 PREHOOK: query: select count(v1.c_int)  from v1 join cbo_t2 on v1.c_int = cbo_t2.c_int
 PREHOOK: type: QUERY
 PREHOOK: Input: default@cbo_t1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/check_constraint.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/check_constraint.q.out b/ql/src/test/results/clientpositive/llap/check_constraint.q.out
index d7316de..5b47bb3 100644
--- a/ql/src/test/results/clientpositive/llap/check_constraint.q.out
+++ b/ql/src/test/results/clientpositive/llap/check_constraint.q.out
@@ -39,6 +39,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -206,6 +207,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -423,6 +425,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -573,6 +576,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	totalSize           	0                   
 #### A masked pattern was here ####
@@ -732,6 +736,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -877,6 +882,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -1101,6 +1107,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -1256,6 +1263,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -1611,16 +1619,16 @@ POSTHOOK: query: select * from acid_uami
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@acid_uami
 #### A masked pattern was here ####
-8	8.00	val_8
-4	4.00	val_4
 2	2.00	val_2
-0	0.00	val_0
-0	0.00	val_0
-0	0.00	val_0
 9	9.00	val_9
+8	8.00	val_8
 5	5.00	val_5
 5	5.00	val_5
 5	5.00	val_5
+4	4.00	val_4
+0	0.00	val_0
+0	0.00	val_0
+0	0.00	val_0
 10	10.00	val_10
 0	0.00	val_0
 0	0.00	val_0
@@ -1757,16 +1765,16 @@ POSTHOOK: query: select * from acid_uami
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@acid_uami
 #### A masked pattern was here ####
-114	114.00	val_114
-104	104.00	val_104
-100	100.00	val_100
-10	10.00	val_10
-0	0.00	val_0
 113	113.00	val_113
+105	105.00	val_105
+10	10.00	val_10
+114	114.00	val_114
 111	111.00	val_111
 11	11.00	val_11
-105	105.00	val_105
+104	104.00	val_104
 103	103.00	val_103
+100	100.00	val_100
+0	0.00	val_0
 PREHOOK: query: truncate table acid_uami
 PREHOOK: type: TRUNCATETABLE
 PREHOOK: Output: default@acid_uami
@@ -2109,6 +2117,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -2817,6 +2826,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -2866,6 +2876,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -3014,6 +3025,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -3373,6 +3385,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	transactional       	true                
 	transactional_properties	insert_only         
@@ -3429,6 +3442,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	transactional       	true                
 	transactional_properties	insert_only         
 #### A masked pattern was here ####
@@ -3551,6 +3565,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
 	totalSize           	5                   
 	transactional       	true                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/cluster.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/cluster.q.out b/ql/src/test/results/clientpositive/llap/cluster.q.out
index 33d74ce..c2a8577 100644
--- a/ql/src/test/results/clientpositive/llap/cluster.q.out
+++ b/ql/src/test/results/clientpositive/llap/cluster.q.out
@@ -1064,178 +1064,217 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 10	val_10
+103	val_103
+103	val_103
 104	val_104
 104	val_104
-111	val_111
-114	val_114
-116	val_116
+105	val_105
+11	val_11
 126	val_126
 128	val_128
 128	val_128
 128	val_128
-131	val_131
+129	val_129
+129	val_129
+133	val_133
 134	val_134
 134	val_134
+136	val_136
+143	val_143
+149	val_149
+149	val_149
 152	val_152
 152	val_152
-155	val_155
+153	val_153
+157	val_157
+162	val_162
+166	val_166
 169	val_169
 169	val_169
 169	val_169
 169	val_169
-17	val_17
 170	val_170
-172	val_172
-172	val_172
-178	val_178
-179	val_179
-179	val_179
-189	val_189
-19	val_19
-192	val_192
-194	val_194
-195	val_195
-195	val_195
-199	val_199
-199	val_199
-199	val_199
-20	val_20
-207	val_207
-207	val_207
+174	val_174
+174	val_174
+176	val_176
+176	val_176
+193	val_193
+193	val_193
+193	val_193
+196	val_196
+201	val_201
+205	val_205
+205	val_205
+209	val_209
+209	val_209
 213	val_213
 213	val_213
 218	val_218
+221	val_221
+221	val_221
 223	val_223
 223	val_223
-229	val_229
-229	val_229
 233	val_233
 233	val_233
-235	val_235
+239	val_239
+239	val_239
 24	val_24
 24	val_24
-256	val_256
-256	val_256
-257	val_257
+241	val_241
+242	val_242
+242	val_242
+247	val_247
+248	val_248
 26	val_26
 26	val_26
-265	val_265
-265	val_265
-266	val_266
-27	val_27
-278	val_278
-278	val_278
-280	val_280
-280	val_280
-284	val_284
-291	val_291
-30	val_30
+263	val_263
+272	val_272
+272	val_272
+275	val_275
+285	val_285
+296	val_296
+298	val_298
+298	val_298
+298	val_298
 302	val_302
-305	val_305
-316	val_316
-316	val_316
-316	val_316
-321	val_321
-321	val_321
+307	val_307
+307	val_307
+310	val_310
 323	val_323
-33	val_33
+325	val_325
+325	val_325
 333	val_333
 333	val_333
+335	val_335
 338	val_338
-344	val_344
-344	val_344
-353	val_353
-353	val_353
-356	val_356
-364	val_364
-368	val_368
-369	val_369
-369	val_369
-369	val_369
-37	val_37
-37	val_37
+360	val_360
+362	val_362
+367	val_367
+367	val_367
+375	val_375
 377	val_377
-378	val_378
-386	val_386
+384	val_384
+384	val_384
+384	val_384
 392	val_392
-397	val_397
-397	val_397
-404	val_404
-404	val_404
-407	val_407
-411	val_411
-418	val_418
+399	val_399
+399	val_399
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+402	val_402
+403	val_403
+403	val_403
+403	val_403
+413	val_413
+413	val_413
+417	val_417
+417	val_417
+417	val_417
 419	val_419
-424	val_424
-424	val_424
-430	val_430
-430	val_430
-430	val_430
-432	val_432
-436	val_436
-437	val_437
-448	val_448
-454	val_454
-454	val_454
-454	val_454
-457	val_457
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-477	val_477
+42	val_42
+42	val_42
+427	val_427
+438	val_438
+438	val_438
+438	val_438
+44	val_44
+458	val_458
+458	val_458
+459	val_459
+459	val_459
+466	val_466
+466	val_466
+466	val_466
+469	val_469
+469	val_469
+469	val_469
+469	val_469
+469	val_469
+472	val_472
+475	val_475
+478	val_478
+478	val_478
 479	val_479
-490	val_490
-492	val_492
-492	val_492
-493	val_493
+483	val_483
+489	val_489
+489	val_489
+489	val_489
+489	val_489
 495	val_495
 496	val_496
-497	val_497
+5	val_5
+5	val_5
+5	val_5
 57	val_57
-67	val_67
-67	val_67
-8	val_8
-80	val_80
-85	val_85
+58	val_58
+58	val_58
+64	val_64
+66	val_66
+69	val_69
+72	val_72
+72	val_72
+76	val_76
+76	val_76
+77	val_77
 9	val_9
-92	val_92
-97	val_97
-97	val_97
-105	val_105
-11	val_11
+90	val_90
+90	val_90
+90	val_90
+0	val_0
+0	val_0
+0	val_0
 113	val_113
 113	val_113
-136	val_136
+114	val_114
+116	val_116
+118	val_118
+118	val_118
 137	val_137
 137	val_137
 138	val_138
 138	val_138
 138	val_138
 138	val_138
-143	val_143
-150	val_150
+145	val_145
+146	val_146
+146	val_146
+155	val_155
 158	val_158
-160	val_160
-162	val_162
+164	val_164
+164	val_164
 165	val_165
 165	val_165
-166	val_166
-174	val_174
-174	val_174
-177	val_177
-18	val_18
-18	val_18
-180	val_180
+178	val_178
+181	val_181
+183	val_183
 186	val_186
-196	val_196
-197	val_197
-197	val_197
-217	val_217
-217	val_217
-219	val_219
-219	val_219
-226	val_226
+189	val_189
+190	val_190
+191	val_191
+191	val_191
+194	val_194
+195	val_195
+195	val_195
+199	val_199
+199	val_199
+199	val_199
+2	val_2
+207	val_207
+207	val_207
+208	val_208
+208	val_208
+208	val_208
+214	val_214
+216	val_216
+216	val_216
+222	val_222
+224	val_224
+224	val_224
+229	val_229
+229	val_229
 230	val_230
 230	val_230
 230	val_230
@@ -1243,321 +1282,282 @@ POSTHOOK: Input: default@src
 230	val_230
 238	val_238
 238	val_238
-242	val_242
-242	val_242
-248	val_248
-252	val_252
+244	val_244
+258	val_258
 260	val_260
-263	val_263
-274	val_274
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-296	val_296
-307	val_307
-307	val_307
-308	val_308
-325	val_325
-325	val_325
-327	val_327
-327	val_327
-327	val_327
+262	val_262
+266	val_266
+27	val_27
+273	val_273
+273	val_273
+273	val_273
+28	val_28
+284	val_284
+288	val_288
+288	val_288
+30	val_30
+315	val_315
+321	val_321
+321	val_321
+33	val_33
 342	val_342
 342	val_342
-348	val_348
-348	val_348
-348	val_348
-348	val_348
-348	val_348
 35	val_35
 35	val_35
 35	val_35
-351	val_351
-367	val_367
-367	val_367
+364	val_364
+365	val_365
+366	val_366
+368	val_368
+386	val_386
 389	val_389
-393	val_393
 394	val_394
+396	val_396
+396	val_396
+396	val_396
+397	val_397
+397	val_397
 4	val_4
-403	val_403
-403	val_403
-403	val_403
-409	val_409
-409	val_409
-409	val_409
+41	val_41
 414	val_414
 414	val_414
 421	val_421
-427	val_427
-429	val_429
-429	val_429
-435	val_435
-438	val_438
-438	val_438
-438	val_438
-439	val_439
-439	val_439
+444	val_444
+446	val_446
+448	val_448
+452	val_452
+454	val_454
+454	val_454
+454	val_454
 455	val_455
-458	val_458
-458	val_458
 460	val_460
-462	val_462
-462	val_462
-475	val_475
-478	val_478
-478	val_478
-480	val_480
-480	val_480
-480	val_480
-484	val_484
-487	val_487
-53	val_53
-58	val_58
-58	val_58
-66	val_66
-69	val_69
-77	val_77
+463	val_463
+463	val_463
+482	val_482
+492	val_492
+492	val_492
+493	val_493
+65	val_65
 78	val_78
-83	val_83
-83	val_83
-90	val_90
-90	val_90
-90	val_90
-95	val_95
-95	val_95
-103	val_103
-103	val_103
+80	val_80
+97	val_97
+97	val_97
+111	val_111
+12	val_12
+12	val_12
 120	val_120
 120	val_120
-129	val_129
-129	val_129
-133	val_133
-145	val_145
-146	val_146
-146	val_146
-149	val_149
-149	val_149
-15	val_15
-15	val_15
-157	val_157
-181	val_181
-187	val_187
-187	val_187
-187	val_187
-191	val_191
-191	val_191
-2	val_2
-200	val_200
-200	val_200
-201	val_201
-202	val_202
+131	val_131
+150	val_150
+156	val_156
+160	val_160
+163	val_163
+167	val_167
+167	val_167
+167	val_167
+168	val_168
+17	val_17
+175	val_175
+175	val_175
+180	val_180
+20	val_20
 203	val_203
 203	val_203
-208	val_208
-208	val_208
-208	val_208
-214	val_214
-216	val_216
-216	val_216
-222	val_222
-224	val_224
-224	val_224
-228	val_228
+226	val_226
 237	val_237
 237	val_237
-239	val_239
-239	val_239
-241	val_241
-244	val_244
 255	val_255
 255	val_255
-258	val_258
-262	val_262
-273	val_273
-273	val_273
-273	val_273
-275	val_275
-28	val_28
+256	val_256
+256	val_256
+274	val_274
+277	val_277
+277	val_277
+277	val_277
+277	val_277
+281	val_281
+281	val_281
 282	val_282
 282	val_282
-285	val_285
 286	val_286
 287	val_287
-288	val_288
-288	val_288
+289	val_289
 292	val_292
-298	val_298
-298	val_298
-298	val_298
-310	val_310
-311	val_311
-311	val_311
-311	val_311
+308	val_308
+309	val_309
+309	val_309
+318	val_318
+318	val_318
+318	val_318
+327	val_327
+327	val_327
+327	val_327
 332	val_332
-335	val_335
-336	val_336
 339	val_339
-360	val_360
-362	val_362
-373	val_373
-384	val_384
-384	val_384
-384	val_384
-395	val_395
-395	val_395
-396	val_396
-396	val_396
-396	val_396
-402	val_402
-417	val_417
-417	val_417
-417	val_417
-42	val_42
-42	val_42
+34	val_34
+341	val_341
+348	val_348
+348	val_348
+348	val_348
+348	val_348
+348	val_348
+356	val_356
+37	val_37
+37	val_37
+374	val_374
+379	val_379
+382	val_382
+382	val_382
+409	val_409
+409	val_409
+409	val_409
+429	val_429
+429	val_429
 43	val_43
-444	val_444
-449	val_449
-453	val_453
-459	val_459
-459	val_459
-47	val_47
+430	val_430
+430	val_430
+430	val_430
+431	val_431
+431	val_431
+431	val_431
+432	val_432
+435	val_435
+437	val_437
+439	val_439
+439	val_439
+443	val_443
+457	val_457
+462	val_462
+462	val_462
+467	val_467
+470	val_470
 481	val_481
-482	val_482
-483	val_483
-485	val_485
-489	val_489
-489	val_489
-489	val_489
-489	val_489
+487	val_487
 494	val_494
-65	val_65
-72	val_72
-72	val_72
+51	val_51
+51	val_51
+70	val_70
+70	val_70
+70	val_70
 74	val_74
-76	val_76
-76	val_76
 82	val_82
-86	val_86
-87	val_87
-96	val_96
-0	val_0
-0	val_0
-0	val_0
-118	val_118
-118	val_118
+83	val_83
+83	val_83
+84	val_84
+84	val_84
 119	val_119
 119	val_119
 119	val_119
-12	val_12
-12	val_12
 125	val_125
 125	val_125
-153	val_153
-156	val_156
-163	val_163
-164	val_164
-164	val_164
-167	val_167
-167	val_167
-167	val_167
-168	val_168
-175	val_175
-175	val_175
-176	val_176
-176	val_176
-183	val_183
-190	val_190
-193	val_193
-193	val_193
-193	val_193
-205	val_205
-205	val_205
-209	val_209
-209	val_209
-221	val_221
-221	val_221
-247	val_247
+15	val_15
+15	val_15
+172	val_172
+172	val_172
+177	val_177
+179	val_179
+179	val_179
+18	val_18
+18	val_18
+187	val_187
+187	val_187
+187	val_187
+19	val_19
+192	val_192
+197	val_197
+197	val_197
+200	val_200
+200	val_200
+202	val_202
+217	val_217
+217	val_217
+219	val_219
+219	val_219
+228	val_228
+235	val_235
 249	val_249
-272	val_272
-272	val_272
-281	val_281
-281	val_281
+252	val_252
+257	val_257
+265	val_265
+265	val_265
+278	val_278
+278	val_278
+280	val_280
+280	val_280
 283	val_283
-289	val_289
+291	val_291
+305	val_305
 306	val_306
-309	val_309
-309	val_309
-315	val_315
+311	val_311
+311	val_311
+311	val_311
+316	val_316
+316	val_316
+316	val_316
 317	val_317
 317	val_317
-318	val_318
-318	val_318
-318	val_318
 322	val_322
 322	val_322
 331	val_331
 331	val_331
-34	val_34
-341	val_341
+336	val_336
+344	val_344
+344	val_344
 345	val_345
-365	val_365
-366	val_366
-374	val_374
-375	val_375
-379	val_379
-382	val_382
-382	val_382
-399	val_399
-399	val_399
+351	val_351
+353	val_353
+353	val_353
+369	val_369
+369	val_369
+369	val_369
+373	val_373
+378	val_378
+393	val_393
+395	val_395
+395	val_395
 400	val_400
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-401	val_401
+404	val_404
+404	val_404
 406	val_406
 406	val_406
 406	val_406
 406	val_406
-41	val_41
-413	val_413
-413	val_413
-431	val_431
-431	val_431
-431	val_431
-44	val_44
-443	val_443
-446	val_446
-452	val_452
-463	val_463
-463	val_463
-466	val_466
-466	val_466
-466	val_466
-467	val_467
-469	val_469
-469	val_469
-469	val_469
-469	val_469
-469	val_469
-470	val_470
-472	val_472
+407	val_407
+411	val_411
+418	val_418
+424	val_424
+424	val_424
+436	val_436
+449	val_449
+453	val_453
+468	val_468
+468	val_468
+468	val_468
+468	val_468
+47	val_47
+477	val_477
+480	val_480
+480	val_480
+480	val_480
+484	val_484
+485	val_485
+490	val_490
 491	val_491
+497	val_497
 498	val_498
 498	val_498
 498	val_498
-5	val_5
-5	val_5
-5	val_5
-51	val_51
-51	val_51
+53	val_53
 54	val_54
-64	val_64
-70	val_70
-70	val_70
-70	val_70
-84	val_84
-84	val_84
+67	val_67
+67	val_67
+8	val_8
+85	val_85
+86	val_86
+87	val_87
+92	val_92
+95	val_95
+95	val_95
+96	val_96
 98	val_98
 98	val_98

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/columnStatsUpdateForStatsOptimizer_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/columnStatsUpdateForStatsOptimizer_1.q.out b/ql/src/test/results/clientpositive/llap/columnStatsUpdateForStatsOptimizer_1.q.out
index 63d5902..2a9f339 100644
--- a/ql/src/test/results/clientpositive/llap/columnStatsUpdateForStatsOptimizer_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/columnStatsUpdateForStatsOptimizer_1.q.out
@@ -38,6 +38,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	3                   
 	rawDataSize         	21                  
@@ -80,6 +81,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	3                   
 	rawDataSize         	21                  
@@ -214,6 +216,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"month\":\"true\",\"year\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	3                   
 	rawDataSize         	21                  
@@ -281,6 +284,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	4                   
 	rawDataSize         	28                  
@@ -459,6 +463,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"year\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	4                   
 	rawDataSize         	28                  
@@ -593,6 +598,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"month\":\"true\",\"year\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	4                   
 	rawDataSize         	28                  
@@ -965,6 +971,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -1007,6 +1014,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	5312                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/column_names_with_leading_and_trailing_spaces.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/column_names_with_leading_and_trailing_spaces.q.out b/ql/src/test/results/clientpositive/llap/column_names_with_leading_and_trailing_spaces.q.out
index b327bf8..e83a370 100644
--- a/ql/src/test/results/clientpositive/llap/column_names_with_leading_and_trailing_spaces.q.out
+++ b/ql/src/test/results/clientpositive/llap/column_names_with_leading_and_trailing_spaces.q.out
@@ -25,6 +25,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\" left\":\"true\",\" middle \":\"true\",\"right \":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/column_table_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/column_table_stats.q.out b/ql/src/test/results/clientpositive/llap/column_table_stats.q.out
index 7f3cc02..1457932 100644
--- a/ql/src/test/results/clientpositive/llap/column_table_stats.q.out
+++ b/ql/src/test/results/clientpositive/llap/column_table_stats.q.out
@@ -35,6 +35,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -102,6 +103,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'
@@ -122,6 +124,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'
@@ -211,6 +214,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	5312                
@@ -287,6 +291,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	0                   
@@ -383,6 +388,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'
@@ -430,6 +436,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'
@@ -536,6 +543,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	1000                
@@ -693,6 +701,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	0                   
@@ -789,6 +798,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'
@@ -836,6 +846,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'
@@ -942,6 +953,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	1000                
@@ -1099,6 +1111,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	0                   
@@ -1195,6 +1208,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'
@@ -1295,6 +1309,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	500                 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/column_table_stats_orc.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/column_table_stats_orc.q.out b/ql/src/test/results/clientpositive/llap/column_table_stats_orc.q.out
index 2c8e9ab..5ed5dbf 100644
--- a/ql/src/test/results/clientpositive/llap/column_table_stats_orc.q.out
+++ b/ql/src/test/results/clientpositive/llap/column_table_stats_orc.q.out
@@ -38,6 +38,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1                   
 	rawDataSize         	170                 
@@ -106,6 +107,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'
@@ -127,6 +129,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'
@@ -215,6 +218,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1                   
 	rawDataSize         	170                 
@@ -290,6 +294,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	2                   
@@ -383,6 +388,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 'default','default'
@@ -427,6 +433,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 'default','default'
@@ -532,6 +539,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	2                   
@@ -688,6 +696,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	2                   
@@ -781,6 +790,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 'default','default'
@@ -881,6 +891,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	2                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/correlationoptimizer1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/correlationoptimizer1.q.out b/ql/src/test/results/clientpositive/llap/correlationoptimizer1.q.out
index 05d9471..e91b699 100644
--- a/ql/src/test/results/clientpositive/llap/correlationoptimizer1.q.out
+++ b/ql/src/test/results/clientpositive/llap/correlationoptimizer1.q.out
@@ -1425,22 +1425,22 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Input: default@src1
 #### A masked pattern was here ####
+273	val_273	3
+401	val_401	5
+146	val_146	2
+150	val_150	1
+311	val_311	3
+66	val_66	1
 	NULL	10
+128	NULL	1
 213	val_213	2
-238	val_238	2
 406	val_406	4
-66	val_66	1
+98	val_98	2
 224	NULL	1
-278	val_278	2
-128	NULL	1
-150	val_150	1
+238	val_238	2
 255	val_255	2
-273	val_273	3
-401	val_401	5
-146	val_146	2
-311	val_311	3
+278	val_278	2
 369	NULL	1
-98	val_98	2
 PREHOOK: query: EXPLAIN
 SELECT x.key, y.value, count(1) AS cnt
 FROM src1 x LEFT OUTER JOIN src y ON (x.key = y.key AND x.value = y.value)
@@ -1556,22 +1556,22 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Input: default@src1
 #### A masked pattern was here ####
+273	val_273	3
+401	val_401	5
+146	val_146	2
+150	val_150	1
+311	val_311	3
+66	val_66	1
 	NULL	10
+128	NULL	1
 213	val_213	2
-238	val_238	2
 406	val_406	4
-66	val_66	1
+98	val_98	2
 224	NULL	1
-278	val_278	2
-128	NULL	1
-150	val_150	1
+238	val_238	2
 255	val_255	2
-273	val_273	3
-401	val_401	5
-146	val_146	2
-311	val_311	3
+278	val_278	2
 369	NULL	1
-98	val_98	2
 PREHOOK: query: EXPLAIN
 SELECT SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt))
 FROM (SELECT y.key AS key, count(1) AS cnt

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/ctas.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/ctas.q.out b/ql/src/test/results/clientpositive/llap/ctas.q.out
index baafefd..729a6c7 100644
--- a/ql/src/test/results/clientpositive/llap/ctas.q.out
+++ b/ql/src/test/results/clientpositive/llap/ctas.q.out
@@ -154,6 +154,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	96                  
@@ -310,6 +311,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	96                  
@@ -466,6 +468,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	120                 
@@ -529,6 +532,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	120                 
@@ -686,6 +690,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	96                  


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/subquery_notin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/subquery_notin.q.out b/ql/src/test/results/clientpositive/spark/subquery_notin.q.out
index ffa524e..0f2f717 100644
--- a/ql/src/test/results/clientpositive/spark/subquery_notin.q.out
+++ b/ql/src/test/results/clientpositive/spark/subquery_notin.q.out
@@ -1213,25 +1213,25 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
 Manufacturer#1	almond aquamarine burnished black steel	28
-Manufacturer#1	almond antique chartreuse lavender yellow	34
 Manufacturer#1	almond aquamarine pink moccasin thistle	42
-Manufacturer#2	almond aquamarine rose maroon antique	25
+Manufacturer#2	almond antique violet chocolate turquoise	14
+Manufacturer#2	almond aquamarine sandy cyan gainsboro	18
 Manufacturer#2	almond antique violet turquoise frosted	40
-Manufacturer#3	almond antique chartreuse khaki white	17
 Manufacturer#3	almond antique metallic orange dim	19
+Manufacturer#4	almond aquamarine floral ivory bisque	27
+Manufacturer#4	almond antique violet mint lemon	39
 Manufacturer#5	almond antique medium spring khaki	6
 Manufacturer#5	almond azure blanched chiffon midnight	23
 Manufacturer#5	almond antique blue firebrick mint	31
 Manufacturer#5	almond aquamarine dodger light gainsboro	46
 Manufacturer#1	almond antique salmon chartreuse burlywood	6
-Manufacturer#2	almond antique violet chocolate turquoise	14
-Manufacturer#2	almond aquamarine sandy cyan gainsboro	18
+Manufacturer#1	almond antique chartreuse lavender yellow	34
+Manufacturer#2	almond aquamarine rose maroon antique	25
 Manufacturer#3	almond antique forest lavender goldenrod	14
+Manufacturer#3	almond antique chartreuse khaki white	17
 Manufacturer#3	almond antique olive coral navajo	45
 Manufacturer#4	almond antique gainsboro frosted violet	10
 Manufacturer#4	almond azure aquamarine papaya violet	12
-Manufacturer#4	almond aquamarine floral ivory bisque	27
-Manufacturer#4	almond antique violet mint lemon	39
 Warning: Shuffle Join JOIN[19][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product
 PREHOOK: query: select li.l_partkey, count(*)
 from lineitem li
@@ -1250,21 +1250,21 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@lineitem
 #### A masked pattern was here ####
 22630	1
-7068	1
-88362	1
-123076	1
-139636	1
-106170	1
-182052	1
-59694	1
 175839	1
-21636	1
 119767	1
+139636	1
+21636	1
 119477	1
-88035	1
-450	1
-61931	1
+88362	1
+106170	1
+59694	1
+7068	1
+123076	1
 85951	1
+61931	1
+450	1
+182052	1
+88035	1
 Warning: Shuffle Join JOIN[18][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product
 PREHOOK: query: select * 
 from src 
@@ -1789,29 +1789,29 @@ POSTHOOK: query: select * from part where p_brand <> 'Brand#14' AND p_size NOT I
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
-17927	almond aquamarine yellow dodger mint	Manufacturer#4	Brand#41	ECONOMY BRUSHED COPPER	7	SM PKG	1844.92	ites. eve
 191709	almond antique violet turquoise frosted	Manufacturer#2	Brand#22	ECONOMY POLISHED STEEL	40	MED BOX	1800.7	 haggle
-78486	almond azure blanched chiffon midnight	Manufacturer#5	Brand#52	LARGE BRUSHED BRASS	23	MED BAG	1464.48	hely blith
+85768	almond antique chartreuse lavender yellow	Manufacturer#1	Brand#12	LARGE BRUSHED STEEL	34	SM BAG	1753.76	refull
+65667	almond aquamarine pink moccasin thistle	Manufacturer#1	Brand#12	LARGE BURNISHED STEEL	42	JUMBO CASE	1632.66	e across the expr
 105685	almond antique violet chocolate turquoise	Manufacturer#2	Brand#22	MEDIUM ANODIZED COPPER	14	MED CAN	1690.68	ly pending requ
 112398	almond antique metallic orange dim	Manufacturer#3	Brand#32	MEDIUM BURNISHED BRASS	19	JUMBO JAR	1410.39	ole car
 146985	almond aquamarine midnight light salmon	Manufacturer#2	Brand#23	MEDIUM BURNISHED COPPER	2	SM CASE	2031.98	s cajole caref
-90681	almond antique chartreuse khaki white	Manufacturer#3	Brand#31	MEDIUM BURNISHED TIN	17	SM CASE	1671.68	are slyly after the sl
 110592	almond antique salmon chartreuse burlywood	Manufacturer#1	Brand#15	PROMO BURNISHED NICKEL	6	JUMBO PKG	1602.59	 to the furiously
+48427	almond antique violet mint lemon	Manufacturer#4	Brand#42	PROMO POLISHED STEEL	39	SM CASE	1375.42	hely ironic i
 49671	almond antique gainsboro frosted violet	Manufacturer#4	Brand#41	SMALL BRUSHED BRASS	10	SM BOX	1620.67	ccounts run quick
-33357	almond azure aquamarine papaya violet	Manufacturer#4	Brand#41	STANDARD ANODIZED TIN	12	WRAP CASE	1290.35	reful
+45261	almond aquamarine floral ivory bisque	Manufacturer#4	Brand#42	SMALL PLATED STEEL	27	WRAP CASE	1206.26	careful
 42669	almond antique medium spring khaki	Manufacturer#5	Brand#51	STANDARD BURNISHED TIN	6	MED CAN	1611.66	sits haggl
+195606	almond aquamarine sandy cyan gainsboro	Manufacturer#2	Brand#25	STANDARD PLATED TIN	18	SM PKG	1701.6	ic de
+144293	almond antique olive coral navajo	Manufacturer#3	Brand#34	STANDARD POLISHED STEEL	45	JUMBO CAN	1337.29	ag furiously about 
+17927	almond aquamarine yellow dodger mint	Manufacturer#4	Brand#41	ECONOMY BRUSHED COPPER	7	SM PKG	1844.92	ites. eve
 15103	almond aquamarine dodger light gainsboro	Manufacturer#5	Brand#53	ECONOMY BURNISHED STEEL	46	LG PACK	1018.1	packages hinder carefu
-85768	almond antique chartreuse lavender yellow	Manufacturer#1	Brand#12	LARGE BRUSHED STEEL	34	SM BAG	1753.76	refull
-65667	almond aquamarine pink moccasin thistle	Manufacturer#1	Brand#12	LARGE BURNISHED STEEL	42	JUMBO CASE	1632.66	e across the expr
+78486	almond azure blanched chiffon midnight	Manufacturer#5	Brand#52	LARGE BRUSHED BRASS	23	MED BAG	1464.48	hely blith
+90681	almond antique chartreuse khaki white	Manufacturer#3	Brand#31	MEDIUM BURNISHED TIN	17	SM CASE	1671.68	are slyly after the sl
 192697	almond antique blue firebrick mint	Manufacturer#5	Brand#52	MEDIUM BURNISHED TIN	31	LG DRUM	1789.69	ickly ir
 17273	almond antique forest lavender goldenrod	Manufacturer#3	Brand#35	PROMO ANODIZED TIN	14	JUMBO CASE	1190.27	along the
-48427	almond antique violet mint lemon	Manufacturer#4	Brand#42	PROMO POLISHED STEEL	39	SM CASE	1375.42	hely ironic i
 155733	almond antique sky peru orange	Manufacturer#5	Brand#53	SMALL PLATED BRASS	2	WRAP DRUM	1788.73	furiously. bra
-45261	almond aquamarine floral ivory bisque	Manufacturer#4	Brand#42	SMALL PLATED STEEL	27	WRAP CASE	1206.26	careful
 132666	almond aquamarine rose maroon antique	Manufacturer#2	Brand#24	SMALL POLISHED NICKEL	25	MED BOX	1698.66	even 
 86428	almond aquamarine burnished black steel	Manufacturer#1	Brand#12	STANDARD ANODIZED STEEL	28	WRAP BAG	1414.42	arefully 
-195606	almond aquamarine sandy cyan gainsboro	Manufacturer#2	Brand#25	STANDARD PLATED TIN	18	SM PKG	1701.6	ic de
-144293	almond antique olive coral navajo	Manufacturer#3	Brand#34	STANDARD POLISHED STEEL	45	JUMBO CAN	1337.29	ag furiously about 
+33357	almond azure aquamarine papaya violet	Manufacturer#4	Brand#41	STANDARD ANODIZED TIN	12	WRAP CASE	1290.35	reful
 Warning: Shuffle Join JOIN[26][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product
 PREHOOK: query: explain select * from part  where (p_size-1) NOT IN (select min(p_size) from part group by p_type) order by p_partkey
 PREHOOK: type: QUERY
@@ -2220,27 +2220,27 @@ POSTHOOK: Input: default@part
 17927	almond aquamarine yellow dodger mint	Manufacturer#4	Brand#41	ECONOMY BRUSHED COPPER	7	SM PKG	1844.92	ites. eve
 121152	almond antique burnished rose metallic	Manufacturer#1	Brand#14	PROMO PLATED TIN	2	JUMBO BOX	1173.15	e pinto beans h
 121152	almond antique burnished rose metallic	Manufacturer#1	Brand#14	PROMO PLATED TIN	2	JUMBO BOX	1173.15	e pinto beans h
+42669	almond antique medium spring khaki	Manufacturer#5	Brand#51	STANDARD BURNISHED TIN	6	MED CAN	1611.66	sits haggl
+146985	almond aquamarine midnight light salmon	Manufacturer#2	Brand#23	MEDIUM BURNISHED COPPER	2	SM CASE	2031.98	s cajole caref
+15103	almond aquamarine dodger light gainsboro	Manufacturer#5	Brand#53	ECONOMY BURNISHED STEEL	46	LG PACK	1018.1	packages hinder carefu
+78486	almond azure blanched chiffon midnight	Manufacturer#5	Brand#52	LARGE BRUSHED BRASS	23	MED BAG	1464.48	hely blith
+112398	almond antique metallic orange dim	Manufacturer#3	Brand#32	MEDIUM BURNISHED BRASS	19	JUMBO JAR	1410.39	ole car
+132666	almond aquamarine rose maroon antique	Manufacturer#2	Brand#24	SMALL POLISHED NICKEL	25	MED BOX	1698.66	even 
+191709	almond antique violet turquoise frosted	Manufacturer#2	Brand#22	ECONOMY POLISHED STEEL	40	MED BOX	1800.7	 haggle
+17273	almond antique forest lavender goldenrod	Manufacturer#3	Brand#35	PROMO ANODIZED TIN	14	JUMBO CASE	1190.27	along the
 155733	almond antique sky peru orange	Manufacturer#5	Brand#53	SMALL PLATED BRASS	2	WRAP DRUM	1788.73	furiously. bra
+33357	almond azure aquamarine papaya violet	Manufacturer#4	Brand#41	STANDARD ANODIZED TIN	12	WRAP CASE	1290.35	reful
 49671	almond antique gainsboro frosted violet	Manufacturer#4	Brand#41	SMALL BRUSHED BRASS	10	SM BOX	1620.67	ccounts run quick
-15103	almond aquamarine dodger light gainsboro	Manufacturer#5	Brand#53	ECONOMY BURNISHED STEEL	46	LG PACK	1018.1	packages hinder carefu
+110592	almond antique salmon chartreuse burlywood	Manufacturer#1	Brand#15	PROMO BURNISHED NICKEL	6	JUMBO PKG	1602.59	 to the furiously
 45261	almond aquamarine floral ivory bisque	Manufacturer#4	Brand#42	SMALL PLATED STEEL	27	WRAP CASE	1206.26	careful
+105685	almond antique violet chocolate turquoise	Manufacturer#2	Brand#22	MEDIUM ANODIZED COPPER	14	MED CAN	1690.68	ly pending requ
 90681	almond antique chartreuse khaki white	Manufacturer#3	Brand#31	MEDIUM BURNISHED TIN	17	SM CASE	1671.68	are slyly after the sl
-112398	almond antique metallic orange dim	Manufacturer#3	Brand#32	MEDIUM BURNISHED BRASS	19	JUMBO JAR	1410.39	ole car
+48427	almond antique violet mint lemon	Manufacturer#4	Brand#42	PROMO POLISHED STEEL	39	SM CASE	1375.42	hely ironic i
 86428	almond aquamarine burnished black steel	Manufacturer#1	Brand#12	STANDARD ANODIZED STEEL	28	WRAP BAG	1414.42	arefully 
 65667	almond aquamarine pink moccasin thistle	Manufacturer#1	Brand#12	LARGE BURNISHED STEEL	42	JUMBO CASE	1632.66	e across the expr
 85768	almond antique chartreuse lavender yellow	Manufacturer#1	Brand#12	LARGE BRUSHED STEEL	34	SM BAG	1753.76	refull
 195606	almond aquamarine sandy cyan gainsboro	Manufacturer#2	Brand#25	STANDARD PLATED TIN	18	SM PKG	1701.6	ic de
 192697	almond antique blue firebrick mint	Manufacturer#5	Brand#52	MEDIUM BURNISHED TIN	31	LG DRUM	1789.69	ickly ir
-191709	almond antique violet turquoise frosted	Manufacturer#2	Brand#22	ECONOMY POLISHED STEEL	40	MED BOX	1800.7	 haggle
-17273	almond antique forest lavender goldenrod	Manufacturer#3	Brand#35	PROMO ANODIZED TIN	14	JUMBO CASE	1190.27	along the
-42669	almond antique medium spring khaki	Manufacturer#5	Brand#51	STANDARD BURNISHED TIN	6	MED CAN	1611.66	sits haggl
-146985	almond aquamarine midnight light salmon	Manufacturer#2	Brand#23	MEDIUM BURNISHED COPPER	2	SM CASE	2031.98	s cajole caref
-33357	almond azure aquamarine papaya violet	Manufacturer#4	Brand#41	STANDARD ANODIZED TIN	12	WRAP CASE	1290.35	reful
-110592	almond antique salmon chartreuse burlywood	Manufacturer#1	Brand#15	PROMO BURNISHED NICKEL	6	JUMBO PKG	1602.59	 to the furiously
-105685	almond antique violet chocolate turquoise	Manufacturer#2	Brand#22	MEDIUM ANODIZED COPPER	14	MED CAN	1690.68	ly pending requ
-78486	almond azure blanched chiffon midnight	Manufacturer#5	Brand#52	LARGE BRUSHED BRASS	23	MED BAG	1464.48	hely blith
-48427	almond antique violet mint lemon	Manufacturer#4	Brand#42	PROMO POLISHED STEEL	39	SM CASE	1375.42	hely ironic i
-132666	almond aquamarine rose maroon antique	Manufacturer#2	Brand#24	SMALL POLISHED NICKEL	25	MED BOX	1698.66	even 
 144293	almond antique olive coral navajo	Manufacturer#3	Brand#34	STANDARD POLISHED STEEL	45	JUMBO CAN	1337.29	ag furiously about 
 PREHOOK: query: explain select count(*) as c from part as e where p_size + 100 NOT IN (select p_partkey from part where p_name = e.p_name)
 PREHOOK: type: QUERY
@@ -2914,27 +2914,27 @@ POSTHOOK: Input: default@part
 192697	almond antique blue firebrick mint	Manufacturer#5	Brand#52	MEDIUM BURNISHED TIN	31	LG DRUM	1789.69	ickly ir
 90681	almond antique chartreuse khaki white	Manufacturer#3	Brand#31	MEDIUM BURNISHED TIN	17	SM CASE	1671.68	are slyly after the sl
 85768	almond antique chartreuse lavender yellow	Manufacturer#1	Brand#12	LARGE BRUSHED STEEL	34	SM BAG	1753.76	refull
-112398	almond antique metallic orange dim	Manufacturer#3	Brand#32	MEDIUM BURNISHED BRASS	19	JUMBO JAR	1410.39	ole car
+17273	almond antique forest lavender goldenrod	Manufacturer#3	Brand#35	PROMO ANODIZED TIN	14	JUMBO CASE	1190.27	along the
+40982	almond antique misty red olive	Manufacturer#3	Brand#32	ECONOMY PLATED COPPER	1	LG PKG	1922.98	c foxes can s
+144293	almond antique olive coral navajo	Manufacturer#3	Brand#34	STANDARD POLISHED STEEL	45	JUMBO CAN	1337.29	ag furiously about 
 110592	almond antique salmon chartreuse burlywood	Manufacturer#1	Brand#15	PROMO BURNISHED NICKEL	6	JUMBO PKG	1602.59	 to the furiously
-15103	almond aquamarine dodger light gainsboro	Manufacturer#5	Brand#53	ECONOMY BURNISHED STEEL	46	LG PACK	1018.1	packages hinder carefu
-45261	almond aquamarine floral ivory bisque	Manufacturer#4	Brand#42	SMALL PLATED STEEL	27	WRAP CASE	1206.26	careful
+155733	almond antique sky peru orange	Manufacturer#5	Brand#53	SMALL PLATED BRASS	2	WRAP DRUM	1788.73	furiously. bra
+146985	almond aquamarine midnight light salmon	Manufacturer#2	Brand#23	MEDIUM BURNISHED COPPER	2	SM CASE	2031.98	s cajole caref
 132666	almond aquamarine rose maroon antique	Manufacturer#2	Brand#24	SMALL POLISHED NICKEL	25	MED BOX	1698.66	even 
 195606	almond aquamarine sandy cyan gainsboro	Manufacturer#2	Brand#25	STANDARD PLATED TIN	18	SM PKG	1701.6	ic de
-33357	almond azure aquamarine papaya violet	Manufacturer#4	Brand#41	STANDARD ANODIZED TIN	12	WRAP CASE	1290.35	reful
 78486	almond azure blanched chiffon midnight	Manufacturer#5	Brand#52	LARGE BRUSHED BRASS	23	MED BAG	1464.48	hely blith
-17273	almond antique forest lavender goldenrod	Manufacturer#3	Brand#35	PROMO ANODIZED TIN	14	JUMBO CASE	1190.27	along the
 49671	almond antique gainsboro frosted violet	Manufacturer#4	Brand#41	SMALL BRUSHED BRASS	10	SM BOX	1620.67	ccounts run quick
 42669	almond antique medium spring khaki	Manufacturer#5	Brand#51	STANDARD BURNISHED TIN	6	MED CAN	1611.66	sits haggl
-40982	almond antique misty red olive	Manufacturer#3	Brand#32	ECONOMY PLATED COPPER	1	LG PKG	1922.98	c foxes can s
-144293	almond antique olive coral navajo	Manufacturer#3	Brand#34	STANDARD POLISHED STEEL	45	JUMBO CAN	1337.29	ag furiously about 
-155733	almond antique sky peru orange	Manufacturer#5	Brand#53	SMALL PLATED BRASS	2	WRAP DRUM	1788.73	furiously. bra
+112398	almond antique metallic orange dim	Manufacturer#3	Brand#32	MEDIUM BURNISHED BRASS	19	JUMBO JAR	1410.39	ole car
 105685	almond antique violet chocolate turquoise	Manufacturer#2	Brand#22	MEDIUM ANODIZED COPPER	14	MED CAN	1690.68	ly pending requ
 48427	almond antique violet mint lemon	Manufacturer#4	Brand#42	PROMO POLISHED STEEL	39	SM CASE	1375.42	hely ironic i
 191709	almond antique violet turquoise frosted	Manufacturer#2	Brand#22	ECONOMY POLISHED STEEL	40	MED BOX	1800.7	 haggle
 86428	almond aquamarine burnished black steel	Manufacturer#1	Brand#12	STANDARD ANODIZED STEEL	28	WRAP BAG	1414.42	arefully 
-146985	almond aquamarine midnight light salmon	Manufacturer#2	Brand#23	MEDIUM BURNISHED COPPER	2	SM CASE	2031.98	s cajole caref
+15103	almond aquamarine dodger light gainsboro	Manufacturer#5	Brand#53	ECONOMY BURNISHED STEEL	46	LG PACK	1018.1	packages hinder carefu
+45261	almond aquamarine floral ivory bisque	Manufacturer#4	Brand#42	SMALL PLATED STEEL	27	WRAP CASE	1206.26	careful
 65667	almond aquamarine pink moccasin thistle	Manufacturer#1	Brand#12	LARGE BURNISHED STEEL	42	JUMBO CASE	1632.66	e across the expr
 17927	almond aquamarine yellow dodger mint	Manufacturer#4	Brand#41	ECONOMY BRUSHED COPPER	7	SM PKG	1844.92	ites. eve
+33357	almond azure aquamarine papaya violet	Manufacturer#4	Brand#41	STANDARD ANODIZED TIN	12	WRAP CASE	1290.35	reful
 PREHOOK: query: explain select * from part where p_name NOT IN (select p_name from part p where p.p_size = part.p_size AND part.p_partkey= p.p_partkey )
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select * from part where p_name NOT IN (select p_name from part p where p.p_size = part.p_size AND part.p_partkey= p.p_partkey )
@@ -3529,29 +3529,29 @@ POSTHOOK: Input: default@part
 almond aquamarine yellow dodger mint
 almond aquamarine dodger light gainsboro
 almond antique violet turquoise frosted
-almond aquamarine pink moccasin thistle
+almond antique chartreuse lavender yellow
+almond antique metallic orange dim
+almond antique blue firebrick mint
 almond antique salmon chartreuse burlywood
 almond antique burnished rose metallic
 almond antique burnished rose metallic
-almond antique gainsboro frosted violet
+almond antique sky peru orange
+almond aquamarine floral ivory bisque
+almond aquamarine rose maroon antique
+almond aquamarine burnished black steel
 almond azure aquamarine papaya violet
-almond aquamarine sandy cyan gainsboro
+almond antique medium spring khaki
 almond antique olive coral navajo
 almond antique misty red olive
 almond azure blanched chiffon midnight
-almond antique chartreuse lavender yellow
+almond aquamarine pink moccasin thistle
 almond antique violet chocolate turquoise
-almond antique metallic orange dim
 almond aquamarine midnight light salmon
 almond antique chartreuse khaki white
-almond antique blue firebrick mint
 almond antique forest lavender goldenrod
 almond antique violet mint lemon
-almond antique sky peru orange
-almond aquamarine floral ivory bisque
-almond aquamarine rose maroon antique
-almond aquamarine burnished black steel
-almond antique medium spring khaki
+almond antique gainsboro frosted violet
+almond aquamarine sandy cyan gainsboro
 Warning: Shuffle Join JOIN[16][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product
 PREHOOK: query: explain select key, count(*) from src where value NOT IN (select key from src) group by key having count(*) in (select count(*) from src s1 where s1.key = '90' group by s1.key )
 PREHOOK: type: QUERY
@@ -3806,37 +3806,37 @@ POSTHOOK: query: select key, count(*) from src where value NOT IN (select key fr
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
-273	3
-454	3
-311	3
-128	3
-396	3
-316	3
+70	3
+431	3
+90	3
 384	3
-369	3
+466	3
+5	3
+409	3
+318	3
 417	3
+167	3
+128	3
+327	3
+193	3
+438	3
+403	3
 298	3
-208	3
-199	3
 430	3
 187	3
-193	3
-318	3
-327	3
-5	3
+273	3
+454	3
 119	3
-466	3
-70	3
-167	3
-403	3
-480	3
+316	3
+311	3
 0	3
-409	3
-35	3
-90	3
-438	3
-431	3
+369	3
 498	3
+35	3
+480	3
+208	3
+199	3
+396	3
 PREHOOK: query: explain select key, count(*) from src where value NOT IN (select concat('v', value) from src sc where sc.key = src.key ) group by key having count(*) in (select count(*) from src s1 where s1.key = '90' group by s1.key )
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select key, count(*) from src where value NOT IN (select concat('v', value) from src sc where sc.key = src.key ) group by key having count(*) in (select count(*) from src s1 where s1.key = '90' group by s1.key )
@@ -4110,37 +4110,37 @@ POSTHOOK: query: select key, count(*) from src where value NOT IN (select concat
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
-273	3
-454	3
-311	3
-128	3
-396	3
-316	3
+70	3
+431	3
+90	3
 384	3
-369	3
+466	3
+5	3
+409	3
+318	3
 417	3
+167	3
+128	3
+327	3
+193	3
+438	3
+403	3
 298	3
-208	3
-199	3
 430	3
 187	3
-193	3
-318	3
-327	3
-5	3
+273	3
+454	3
 119	3
-466	3
-70	3
-167	3
-403	3
-480	3
+316	3
+311	3
 0	3
-409	3
-35	3
-90	3
-438	3
-431	3
+369	3
 498	3
+35	3
+480	3
+208	3
+199	3
+396	3
 Warning: Shuffle Join JOIN[26][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product
 PREHOOK: query: explain select * from part  where (p_size-1) NOT IN (select min(p_size) from part group by p_type) order by p_brand
 PREHOOK: type: QUERY
@@ -4351,8 +4351,8 @@ POSTHOOK: Input: default@part
 40982	almond antique misty red olive	Manufacturer#3	Brand#32	ECONOMY PLATED COPPER	1	LG PKG	1922.98	c foxes can s
 144293	almond antique olive coral navajo	Manufacturer#3	Brand#34	STANDARD POLISHED STEEL	45	JUMBO CAN	1337.29	ag furiously about 
 17273	almond antique forest lavender goldenrod	Manufacturer#3	Brand#35	PROMO ANODIZED TIN	14	JUMBO CASE	1190.27	along the
-49671	almond antique gainsboro frosted violet	Manufacturer#4	Brand#41	SMALL BRUSHED BRASS	10	SM BOX	1620.67	ccounts run quick
 33357	almond azure aquamarine papaya violet	Manufacturer#4	Brand#41	STANDARD ANODIZED TIN	12	WRAP CASE	1290.35	reful
+49671	almond antique gainsboro frosted violet	Manufacturer#4	Brand#41	SMALL BRUSHED BRASS	10	SM BOX	1620.67	ccounts run quick
 45261	almond aquamarine floral ivory bisque	Manufacturer#4	Brand#42	SMALL PLATED STEEL	27	WRAP CASE	1206.26	careful
 48427	almond antique violet mint lemon	Manufacturer#4	Brand#42	PROMO POLISHED STEEL	39	SM CASE	1375.42	hely ironic i
 42669	almond antique medium spring khaki	Manufacturer#5	Brand#51	STANDARD BURNISHED TIN	6	MED CAN	1611.66	sits haggl
@@ -4773,9 +4773,11 @@ POSTHOOK: Input: default@src
 103	val_103
 104	val_104
 104	val_104
+105	val_105
+11	val_11
 111	val_111
-114	val_114
-116	val_116
+12	val_12
+12	val_12
 120	val_120
 120	val_120
 126	val_126
@@ -4788,73 +4790,59 @@ POSTHOOK: Input: default@src
 133	val_133
 134	val_134
 134	val_134
-145	val_145
-146	val_146
-146	val_146
+136	val_136
+143	val_143
 149	val_149
 149	val_149
-15	val_15
-15	val_15
+150	val_150
 152	val_152
 152	val_152
-155	val_155
+153	val_153
+156	val_156
 157	val_157
+160	val_160
+162	val_162
+163	val_163
+166	val_166
+167	val_167
+167	val_167
+167	val_167
+168	val_168
 169	val_169
 169	val_169
 169	val_169
 169	val_169
 17	val_17
 170	val_170
-172	val_172
-172	val_172
-178	val_178
-179	val_179
-179	val_179
-181	val_181
-187	val_187
-187	val_187
-187	val_187
-189	val_189
-19	val_19
-191	val_191
-191	val_191
-192	val_192
-194	val_194
-195	val_195
-195	val_195
-199	val_199
-199	val_199
-199	val_199
-2	val_2
+174	val_174
+174	val_174
+175	val_175
+175	val_175
+176	val_176
+176	val_176
+180	val_180
+193	val_193
+193	val_193
+193	val_193
+196	val_196
 20	val_20
-200	val_200
-200	val_200
 201	val_201
-202	val_202
 203	val_203
 203	val_203
-207	val_207
-207	val_207
-208	val_208
-208	val_208
-208	val_208
+205	val_205
+205	val_205
+209	val_209
+209	val_209
 213	val_213
 213	val_213
-214	val_214
-216	val_216
-216	val_216
 218	val_218
-222	val_222
+221	val_221
+221	val_221
 223	val_223
 223	val_223
-224	val_224
-224	val_224
-228	val_228
-229	val_229
-229	val_229
+226	val_226
 233	val_233
 233	val_233
-235	val_235
 237	val_237
 237	val_237
 239	val_239
@@ -4862,408 +4850,420 @@ POSTHOOK: Input: default@src
 24	val_24
 24	val_24
 241	val_241
-244	val_244
+242	val_242
+242	val_242
+247	val_247
+248	val_248
 255	val_255
 255	val_255
 256	val_256
 256	val_256
-257	val_257
-258	val_258
 26	val_26
 26	val_26
-262	val_262
-265	val_265
-265	val_265
-266	val_266
-27	val_27
-273	val_273
-273	val_273
-273	val_273
+263	val_263
+272	val_272
+272	val_272
+274	val_274
 275	val_275
-278	val_278
-278	val_278
-28	val_28
-280	val_280
-280	val_280
+277	val_277
+277	val_277
+277	val_277
+277	val_277
+281	val_281
+281	val_281
 282	val_282
 282	val_282
-284	val_284
 285	val_285
 286	val_286
 287	val_287
-288	val_288
-288	val_288
-291	val_291
+289	val_289
 292	val_292
+296	val_296
 298	val_298
 298	val_298
 298	val_298
-30	val_30
 302	val_302
-305	val_305
+307	val_307
+307	val_307
+308	val_308
+309	val_309
+309	val_309
 310	val_310
-311	val_311
-311	val_311
-311	val_311
-316	val_316
-316	val_316
-316	val_316
-321	val_321
-321	val_321
+318	val_318
+318	val_318
+318	val_318
 323	val_323
-33	val_33
+325	val_325
+325	val_325
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 333	val_333
 333	val_333
 335	val_335
-336	val_336
 338	val_338
 339	val_339
-344	val_344
-344	val_344
-353	val_353
-353	val_353
+34	val_34
+341	val_341
+348	val_348
+348	val_348
+348	val_348
+348	val_348
+348	val_348
 356	val_356
 360	val_360
 362	val_362
-364	val_364
-368	val_368
-369	val_369
-369	val_369
-369	val_369
+367	val_367
+367	val_367
 37	val_37
 37	val_37
-373	val_373
+374	val_374
+375	val_375
 377	val_377
-378	val_378
+379	val_379
+382	val_382
+382	val_382
 384	val_384
 384	val_384
 384	val_384
-386	val_386
 392	val_392
-395	val_395
-395	val_395
-396	val_396
-396	val_396
-396	val_396
-397	val_397
-397	val_397
+399	val_399
+399	val_399
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
 402	val_402
-404	val_404
-404	val_404
-407	val_407
-411	val_411
+403	val_403
+403	val_403
+403	val_403
+409	val_409
+409	val_409
+409	val_409
+413	val_413
+413	val_413
 417	val_417
 417	val_417
 417	val_417
-418	val_418
 419	val_419
 42	val_42
 42	val_42
-424	val_424
-424	val_424
+427	val_427
+429	val_429
+429	val_429
 43	val_43
 430	val_430
 430	val_430
 430	val_430
+431	val_431
+431	val_431
+431	val_431
 432	val_432
-436	val_436
+435	val_435
 437	val_437
-444	val_444
-448	val_448
-449	val_449
-453	val_453
-454	val_454
-454	val_454
-454	val_454
+438	val_438
+438	val_438
+438	val_438
+439	val_439
+439	val_439
+44	val_44
+443	val_443
 457	val_457
+458	val_458
+458	val_458
 459	val_459
 459	val_459
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-47	val_47
-477	val_477
+462	val_462
+462	val_462
+466	val_466
+466	val_466
+466	val_466
+467	val_467
+469	val_469
+469	val_469
+469	val_469
+469	val_469
+469	val_469
+470	val_470
+472	val_472
+475	val_475
+478	val_478
+478	val_478
 479	val_479
 481	val_481
-482	val_482
 483	val_483
-485	val_485
+487	val_487
 489	val_489
 489	val_489
 489	val_489
 489	val_489
-490	val_490
-492	val_492
-492	val_492
-493	val_493
 494	val_494
 495	val_495
 496	val_496
-497	val_497
+5	val_5
+5	val_5
+5	val_5
+51	val_51
+51	val_51
 57	val_57
-65	val_65
-67	val_67
-67	val_67
+58	val_58
+58	val_58
+64	val_64
+66	val_66
+69	val_69
+70	val_70
+70	val_70
+70	val_70
 72	val_72
 72	val_72
 74	val_74
 76	val_76
 76	val_76
-8	val_8
-80	val_80
+77	val_77
 82	val_82
-85	val_85
-86	val_86
-87	val_87
+83	val_83
+83	val_83
+84	val_84
+84	val_84
 9	val_9
-92	val_92
-96	val_96
-97	val_97
-97	val_97
+90	val_90
+90	val_90
+90	val_90
 0	val_0
 0	val_0
 0	val_0
-105	val_105
-11	val_11
 113	val_113
 113	val_113
+114	val_114
+116	val_116
 118	val_118
 118	val_118
 119	val_119
 119	val_119
 119	val_119
-12	val_12
-12	val_12
 125	val_125
 125	val_125
-136	val_136
 137	val_137
 137	val_137
 138	val_138
 138	val_138
 138	val_138
 138	val_138
-143	val_143
-150	val_150
-153	val_153
-156	val_156
-158	val_158
-160	val_160
-162	val_162
-163	val_163
+145	val_145
+146	val_146
+146	val_146
+15	val_15
+15	val_15
+155	val_155
+158	val_158
 164	val_164
 164	val_164
 165	val_165
 165	val_165
-166	val_166
-167	val_167
-167	val_167
-167	val_167
-168	val_168
-174	val_174
-174	val_174
-175	val_175
-175	val_175
-176	val_176
-176	val_176
+172	val_172
+172	val_172
 177	val_177
+178	val_178
+179	val_179
+179	val_179
 18	val_18
 18	val_18
-180	val_180
+181	val_181
 183	val_183
 186	val_186
+187	val_187
+187	val_187
+187	val_187
+189	val_189
+19	val_19
 190	val_190
-193	val_193
-193	val_193
-193	val_193
-196	val_196
+191	val_191
+191	val_191
+192	val_192
+194	val_194
+195	val_195
+195	val_195
 197	val_197
 197	val_197
-205	val_205
-205	val_205
-209	val_209
-209	val_209
+199	val_199
+199	val_199
+199	val_199
+2	val_2
+200	val_200
+200	val_200
+202	val_202
+207	val_207
+207	val_207
+208	val_208
+208	val_208
+208	val_208
+214	val_214
+216	val_216
+216	val_216
 217	val_217
 217	val_217
 219	val_219
 219	val_219
-221	val_221
-221	val_221
-226	val_226
+222	val_222
+224	val_224
+224	val_224
+228	val_228
+229	val_229
+229	val_229
 230	val_230
 230	val_230
 230	val_230
 230	val_230
 230	val_230
+235	val_235
 238	val_238
 238	val_238
-242	val_242
-242	val_242
-247	val_247
-248	val_248
+244	val_244
 249	val_249
 252	val_252
+257	val_257
+258	val_258
 260	val_260
-263	val_263
-272	val_272
-272	val_272
-274	val_274
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-281	val_281
-281	val_281
+262	val_262
+265	val_265
+265	val_265
+266	val_266
+27	val_27
+273	val_273
+273	val_273
+273	val_273
+278	val_278
+278	val_278
+28	val_28
+280	val_280
+280	val_280
 283	val_283
-289	val_289
-296	val_296
+284	val_284
+288	val_288
+288	val_288
+291	val_291
+30	val_30
+305	val_305
 306	val_306
-307	val_307
-307	val_307
-308	val_308
-309	val_309
-309	val_309
+311	val_311
+311	val_311
+311	val_311
 315	val_315
+316	val_316
+316	val_316
+316	val_316
 317	val_317
 317	val_317
-318	val_318
-318	val_318
-318	val_318
+321	val_321
+321	val_321
 322	val_322
 322	val_322
-325	val_325
-325	val_325
-327	val_327
-327	val_327
-327	val_327
+33	val_33
 331	val_331
 331	val_331
-34	val_34
-341	val_341
+336	val_336
 342	val_342
 342	val_342
+344	val_344
+344	val_344
 345	val_345
-348	val_348
-348	val_348
-348	val_348
-348	val_348
-348	val_348
 35	val_35
 35	val_35
 35	val_35
 351	val_351
+353	val_353
+353	val_353
+364	val_364
 365	val_365
 366	val_366
-367	val_367
-367	val_367
-374	val_374
-375	val_375
-379	val_379
-382	val_382
-382	val_382
+368	val_368
+369	val_369
+369	val_369
+369	val_369
+373	val_373
+378	val_378
+386	val_386
 389	val_389
 393	val_393
 394	val_394
-399	val_399
-399	val_399
+395	val_395
+395	val_395
+396	val_396
+396	val_396
+396	val_396
+397	val_397
+397	val_397
 4	val_4
 400	val_400
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-403	val_403
-403	val_403
-403	val_403
+404	val_404
+404	val_404
 406	val_406
 406	val_406
 406	val_406
 406	val_406
-409	val_409
-409	val_409
-409	val_409
+407	val_407
 41	val_41
-413	val_413
-413	val_413
+411	val_411
 414	val_414
 414	val_414
+418	val_418
 421	val_421
-427	val_427
-429	val_429
-429	val_429
-431	val_431
-431	val_431
-431	val_431
-435	val_435
-438	val_438
-438	val_438
-438	val_438
-439	val_439
-439	val_439
-44	val_44
-443	val_443
+424	val_424
+424	val_424
+436	val_436
+444	val_444
 446	val_446
+448	val_448
+449	val_449
 452	val_452
+453	val_453
+454	val_454
+454	val_454
+454	val_454
 455	val_455
-458	val_458
-458	val_458
 460	val_460
-462	val_462
-462	val_462
 463	val_463
 463	val_463
-466	val_466
-466	val_466
-466	val_466
-467	val_467
-469	val_469
-469	val_469
-469	val_469
-469	val_469
-469	val_469
-470	val_470
-472	val_472
-475	val_475
-478	val_478
-478	val_478
+468	val_468
+468	val_468
+468	val_468
+468	val_468
+47	val_47
+477	val_477
 480	val_480
 480	val_480
 480	val_480
+482	val_482
 484	val_484
-487	val_487
+485	val_485
+490	val_490
 491	val_491
+492	val_492
+492	val_492
+493	val_493
+497	val_497
 498	val_498
 498	val_498
 498	val_498
-5	val_5
-5	val_5
-5	val_5
-51	val_51
-51	val_51
 53	val_53
 54	val_54
-58	val_58
-58	val_58
-64	val_64
-66	val_66
-69	val_69
-70	val_70
-70	val_70
-70	val_70
-77	val_77
-78	val_78
-83	val_83
-83	val_83
-84	val_84
-84	val_84
-90	val_90
-90	val_90
-90	val_90
+65	val_65
+67	val_67
+67	val_67
+78	val_78
+8	val_8
+80	val_80
+85	val_85
+86	val_86
+87	val_87
+92	val_92
 95	val_95
 95	val_95
+96	val_96
+97	val_97
+97	val_97
 98	val_98
 98	val_98
 PREHOOK: query: explain select count(*) as c from part as e where p_size + 100 not in ( select p_type from part where p_brand = e.p_brand)
@@ -5945,8 +5945,8 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t1
 POSTHOOK: Input: default@t2
 #### A masked pattern was here ####
-NULL
 1
+NULL
 PREHOOK: query: DROP TABLE t1
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@t1
@@ -6655,9 +6655,9 @@ POSTHOOK: query: select t.i from t where t.j NOT IN (select t1.i from t t1 where
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t
 #### A masked pattern was here ####
-4
 7
 1
+4
 PREHOOK: query: explain select t.i from t where t.i NOT IN (select t1.i from t t1 where t1.j=t.j)
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select t.i from t where t.i NOT IN (select t1.i from t t1 where t1.j=t.j)
@@ -6982,8 +6982,8 @@ POSTHOOK: query: select t.i from t where t.j NOT IN (select t1.i from t t1 )
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t
 #### A masked pattern was here ####
-4
 1
+4
 Warning: Shuffle Join JOIN[16][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product
 PREHOOK: query: explain select t.i from t where t.i NOT IN (select t1.i from t t1 )
 PREHOOK: type: QUERY
@@ -7404,9 +7404,11 @@ POSTHOOK: Input: default@src
 103	val_103
 104	val_104
 104	val_104
+105	val_105
+11	val_11
 111	val_111
-114	val_114
-116	val_116
+12	val_12
+12	val_12
 120	val_120
 120	val_120
 126	val_126
@@ -7419,73 +7421,59 @@ POSTHOOK: Input: default@src
 133	val_133
 134	val_134
 134	val_134
-145	val_145
-146	val_146
-146	val_146
+136	val_136
+143	val_143
 149	val_149
 149	val_149
-15	val_15
-15	val_15
+150	val_150
 152	val_152
 152	val_152
-155	val_155
+153	val_153
+156	val_156
 157	val_157
+160	val_160
+162	val_162
+163	val_163
+166	val_166
+167	val_167
+167	val_167
+167	val_167
+168	val_168
 169	val_169
 169	val_169
 169	val_169
 169	val_169
 17	val_17
 170	val_170
-172	val_172
-172	val_172
-178	val_178
-179	val_179
-179	val_179
-181	val_181
-187	val_187
-187	val_187
-187	val_187
-189	val_189
-19	val_19
-191	val_191
-191	val_191
-192	val_192
-194	val_194
-195	val_195
-195	val_195
-199	val_199
-199	val_199
-199	val_199
-2	val_2
+174	val_174
+174	val_174
+175	val_175
+175	val_175
+176	val_176
+176	val_176
+180	val_180
+193	val_193
+193	val_193
+193	val_193
+196	val_196
 20	val_20
-200	val_200
-200	val_200
 201	val_201
-202	val_202
 203	val_203
 203	val_203
-207	val_207
-207	val_207
-208	val_208
-208	val_208
-208	val_208
+205	val_205
+205	val_205
+209	val_209
+209	val_209
 213	val_213
 213	val_213
-214	val_214
-216	val_216
-216	val_216
 218	val_218
-222	val_222
+221	val_221
+221	val_221
 223	val_223
 223	val_223
-224	val_224
-224	val_224
-228	val_228
-229	val_229
-229	val_229
+226	val_226
 233	val_233
 233	val_233
-235	val_235
 237	val_237
 237	val_237
 239	val_239
@@ -7493,407 +7481,419 @@ POSTHOOK: Input: default@src
 24	val_24
 24	val_24
 241	val_241
-244	val_244
+242	val_242
+242	val_242
+247	val_247
+248	val_248
 255	val_255
 255	val_255
 256	val_256
 256	val_256
-257	val_257
-258	val_258
 26	val_26
 26	val_26
-262	val_262
-265	val_265
-265	val_265
-266	val_266
-27	val_27
-273	val_273
-273	val_273
-273	val_273
+263	val_263
+272	val_272
+272	val_272
+274	val_274
 275	val_275
-278	val_278
-278	val_278
-28	val_28
-280	val_280
-280	val_280
+277	val_277
+277	val_277
+277	val_277
+277	val_277
+281	val_281
+281	val_281
 282	val_282
 282	val_282
-284	val_284
 285	val_285
 286	val_286
 287	val_287
-288	val_288
-288	val_288
-291	val_291
+289	val_289
 292	val_292
+296	val_296
 298	val_298
 298	val_298
 298	val_298
-30	val_30
 302	val_302
-305	val_305
+307	val_307
+307	val_307
+308	val_308
+309	val_309
+309	val_309
 310	val_310
-311	val_311
-311	val_311
-311	val_311
-316	val_316
-316	val_316
-316	val_316
-321	val_321
-321	val_321
+318	val_318
+318	val_318
+318	val_318
 323	val_323
-33	val_33
+325	val_325
+325	val_325
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 333	val_333
 333	val_333
 335	val_335
-336	val_336
 338	val_338
 339	val_339
-344	val_344
-344	val_344
-353	val_353
-353	val_353
+34	val_34
+341	val_341
+348	val_348
+348	val_348
+348	val_348
+348	val_348
+348	val_348
 356	val_356
 360	val_360
 362	val_362
-364	val_364
-368	val_368
-369	val_369
-369	val_369
-369	val_369
+367	val_367
+367	val_367
 37	val_37
 37	val_37
-373	val_373
+374	val_374
+375	val_375
 377	val_377
-378	val_378
+379	val_379
+382	val_382
+382	val_382
 384	val_384
 384	val_384
 384	val_384
-386	val_386
 392	val_392
-395	val_395
-395	val_395
-396	val_396
-396	val_396
-396	val_396
-397	val_397
-397	val_397
+399	val_399
+399	val_399
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
 402	val_402
-404	val_404
-404	val_404
-407	val_407
-411	val_411
+403	val_403
+403	val_403
+403	val_403
+409	val_409
+409	val_409
+409	val_409
+413	val_413
+413	val_413
 417	val_417
 417	val_417
 417	val_417
-418	val_418
 419	val_419
 42	val_42
 42	val_42
-424	val_424
-424	val_424
+427	val_427
+429	val_429
+429	val_429
 43	val_43
 430	val_430
 430	val_430
 430	val_430
+431	val_431
+431	val_431
+431	val_431
 432	val_432
-436	val_436
+435	val_435
 437	val_437
-444	val_444
-448	val_448
-449	val_449
-453	val_453
-454	val_454
-454	val_454
-454	val_454
+438	val_438
+438	val_438
+438	val_438
+439	val_439
+439	val_439
+44	val_44
+443	val_443
 457	val_457
+458	val_458
+458	val_458
 459	val_459
 459	val_459
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-47	val_47
-477	val_477
-479	val_479
-481	val_481
-482	val_482
+462	val_462
+462	val_462
+466	val_466
+466	val_466
+466	val_466
+467	val_467
+469	val_469
+469	val_469
+469	val_469
+469	val_469
+469	val_469
+470	val_470
+472	val_472
+475	val_475
+478	val_478
+478	val_478
+479	val_479
+481	val_481
 483	val_483
-485	val_485
+487	val_487
 489	val_489
 489	val_489
 489	val_489
 489	val_489
-490	val_490
-492	val_492
-492	val_492
-493	val_493
 494	val_494
 495	val_495
 496	val_496
-497	val_497
+5	val_5
+5	val_5
+5	val_5
+51	val_51
+51	val_51
 57	val_57
-65	val_65
-67	val_67
-67	val_67
+58	val_58
+58	val_58
+64	val_64
+66	val_66
+69	val_69
+70	val_70
+70	val_70
+70	val_70
 72	val_72
 72	val_72
 74	val_74
 76	val_76
 76	val_76
-8	val_8
-80	val_80
+77	val_77
 82	val_82
-85	val_85
-86	val_86
-87	val_87
+83	val_83
+83	val_83
+84	val_84
+84	val_84
 9	val_9
-92	val_92
-96	val_96
-97	val_97
-97	val_97
+90	val_90
+90	val_90
+90	val_90
 0	val_0
 0	val_0
 0	val_0
-105	val_105
-11	val_11
 113	val_113
 113	val_113
+114	val_114
+116	val_116
 118	val_118
 118	val_118
 119	val_119
 119	val_119
 119	val_119
-12	val_12
-12	val_12
 125	val_125
 125	val_125
-136	val_136
 137	val_137
 137	val_137
 138	val_138
 138	val_138
 138	val_138
 138	val_138
-143	val_143
-150	val_150
-153	val_153
-156	val_156
+145	val_145
+146	val_146
+146	val_146
+15	val_15
+15	val_15
+155	val_155
 158	val_158
-160	val_160
-162	val_162
-163	val_163
 164	val_164
 164	val_164
 165	val_165
 165	val_165
-166	val_166
-167	val_167
-167	val_167
-167	val_167
-168	val_168
-174	val_174
-174	val_174
-175	val_175
-175	val_175
-176	val_176
-176	val_176
+172	val_172
+172	val_172
 177	val_177
+178	val_178
+179	val_179
+179	val_179
 18	val_18
 18	val_18
-180	val_180
+181	val_181
 183	val_183
 186	val_186
+187	val_187
+187	val_187
+187	val_187
+189	val_189
+19	val_19
 190	val_190
-193	val_193
-193	val_193
-193	val_193
-196	val_196
+191	val_191
+191	val_191
+192	val_192
+194	val_194
+195	val_195
+195	val_195
 197	val_197
 197	val_197
-205	val_205
-205	val_205
-209	val_209
-209	val_209
+199	val_199
+199	val_199
+199	val_199
+2	val_2
+200	val_200
+200	val_200
+202	val_202
+207	val_207
+207	val_207
+208	val_208
+208	val_208
+208	val_208
+214	val_214
+216	val_216
+216	val_216
 217	val_217
 217	val_217
 219	val_219
 219	val_219
-221	val_221
-221	val_221
-226	val_226
+222	val_222
+224	val_224
+224	val_224
+228	val_228
+229	val_229
+229	val_229
 230	val_230
 230	val_230
 230	val_230
 230	val_230
 230	val_230
+235	val_235
 238	val_238
 238	val_238
-242	val_242
-242	val_242
-247	val_247
-248	val_248
+244	val_244
 249	val_249
 252	val_252
+257	val_257
+258	val_258
 260	val_260
-263	val_263
-272	val_272
-272	val_272
-274	val_274
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-281	val_281
-281	val_281
+262	val_262
+265	val_265
+265	val_265
+266	val_266
+27	val_27
+273	val_273
+273	val_273
+273	val_273
+278	val_278
+278	val_278
+28	val_28
+280	val_280
+280	val_280
 283	val_283
-289	val_289
-296	val_296
+284	val_284
+288	val_288
+288	val_288
+291	val_291
+30	val_30
+305	val_305
 306	val_306
-307	val_307
-307	val_307
-308	val_308
-309	val_309
-309	val_309
+311	val_311
+311	val_311
+311	val_311
 315	val_315
+316	val_316
+316	val_316
+316	val_316
 317	val_317
 317	val_317
-318	val_318
-318	val_318
-318	val_318
+321	val_321
+321	val_321
 322	val_322
 322	val_322
-325	val_325
-325	val_325
-327	val_327
-327	val_327
-327	val_327
+33	val_33
 331	val_331
 331	val_331
-34	val_34
-341	val_341
+336	val_336
 342	val_342
 342	val_342
+344	val_344
+344	val_344
 345	val_345
-348	val_348
-348	val_348
-348	val_348
-348	val_348
-348	val_348
 35	val_35
 35	val_35
 35	val_35
 351	val_351
+353	val_353
+353	val_353
+364	val_364
 365	val_365
 366	val_366
-367	val_367
-367	val_367
-374	val_374
-375	val_375
-379	val_379
-382	val_382
-382	val_382
+368	val_368
+369	val_369
+369	val_369
+369	val_369
+373	val_373
+378	val_378
+386	val_386
 389	val_389
 393	val_393
 394	val_394
-399	val_399
-399	val_399
+395	val_395
+395	val_395
+396	val_396
+396	val_396
+396	val_396
+397	val_397
+397	val_397
 4	val_4
 400	val_400
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-403	val_403
-403	val_403
-403	val_403
+404	val_404
+404	val_404
 406	val_406
 406	val_406
 406	val_406
 406	val_406
-409	val_409
-409	val_409
-409	val_409
+407	val_407
 41	val_41
-413	val_413
-413	val_413
+411	val_411
 414	val_414
 414	val_414
+418	val_418
 421	val_421
-427	val_427
-429	val_429
-429	val_429
-431	val_431
-431	val_431
-431	val_431
-435	val_435
-438	val_438
-438	val_438
-438	val_438
-439	val_439
-439	val_439
-44	val_44
-443	val_443
+424	val_424
+424	val_424
+436	val_436
+444	val_444
 446	val_446
+448	val_448
+449	val_449
 452	val_452
+453	val_453
+454	val_454
+454	val_454
+454	val_454
 455	val_455
-458	val_458
-458	val_458
 460	val_460
-462	val_462
-462	val_462
 463	val_463
 463	val_463
-466	val_466
-466	val_466
-466	val_466
-467	val_467
-469	val_469
-469	val_469
-469	val_469
-469	val_469
-469	val_469
-470	val_470
-472	val_472
-475	val_475
-478	val_478
-478	val_478
+468	val_468
+468	val_468
+468	val_468
+468	val_468
+47	val_47
+477	val_477
 480	val_480
 480	val_480
 480	val_480
+482	val_482
 484	val_484
-487	val_487
+485	val_485
+490	val_490
 491	val_491
+492	val_492
+492	val_492
+493	val_493
+497	val_497
 498	val_498
 498	val_498
 498	val_498
-5	val_5
-5	val_5
-5	val_5
-51	val_51
-51	val_51
 53	val_53
 54	val_54
-58	val_58
-58	val_58
-64	val_64
-66	val_66
-69	val_69
-70	val_70
-70	val_70
-70	val_70
-77	val_77
+65	val_65
+67	val_67
+67	val_67
 78	val_78
-83	val_83
-83	val_83
-84	val_84
-84	val_84
-90	val_90
-90	val_90
-90	val_90
+8	val_8
+80	val_80
+85	val_85
+86	val_86
+87	val_87
+92	val_92
 95	val_95
 95	val_95
+96	val_96
+97	val_97
+97	val_97
 98	val_98
 98	val_98

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/subquery_select.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/subquery_select.q.out b/ql/src/test/results/clientpositive/spark/subquery_select.q.out
index d366a5f..7433b78 100644
--- a/ql/src/test/results/clientpositive/spark/subquery_select.q.out
+++ b/ql/src/test/results/clientpositive/spark/subquery_select.q.out
@@ -146,16 +146,13 @@ FROM part
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
+1	false
 10	false
 12	false
-14	false
-14	false
-23	false
+19	false
 28	false
-31	false
+34	false
 42	false
-45	false
-1	false
 2	false
 2	false
 2	false
@@ -163,14 +160,17 @@ POSTHOOK: Input: default@part
 6	false
 6	false
 7	false
+14	false
+14	false
 17	false
 18	false
-19	false
+23	false
 25	false
 27	false
-34	false
+31	false
 39	false
 40	false
+45	false
 46	true
 PREHOOK: query: EXPLAIN SELECT p_size, p_size IN (
         SELECT MAX(p_size) FROM part p where p.p_type = part.p_type)
@@ -334,32 +334,32 @@ FROM part
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
-7	true
 1	true
 40	true
-23	true
+34	true
+42	true
 14	true
 19	true
 2	true
-17	false
 6	true
+2	true
+2	true
+39	true
 10	true
-12	true
+27	true
 6	true
+18	true
+45	true
+7	true
 46	true
-34	true
-42	true
+23	true
+17	false
 31	true
 14	true
 2	true
-2	true
-39	true
-2	true
-27	true
 25	true
 28	true
-18	true
-45	true
+12	true
 Warning: Shuffle Join JOIN[21][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product
 PREHOOK: query: explain SELECT p_size, p_size NOT IN (
         SELECT MAX(p_size) FROM part)
@@ -508,16 +508,13 @@ FROM part
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
+1	true
 10	true
 12	true
-14	true
-14	true
-23	true
+19	true
 28	true
-31	true
+34	true
 42	true
-45	true
-1	true
 2	true
 2	true
 2	true
@@ -525,14 +522,17 @@ POSTHOOK: Input: default@part
 6	true
 6	true
 7	true
+14	true
+14	true
 17	true
 18	true
-19	true
+23	true
 25	true
 27	true
-34	true
+31	true
 39	true
 40	true
+45	true
 46	false
 PREHOOK: query: EXPLAIN SELECT p_size, p_size NOT IN (
         SELECT MAX(p_size) FROM part p where p.p_type = part.p_type)
@@ -760,32 +760,32 @@ FROM part
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
-7	false
 1	false
 40	false
-23	false
+34	false
+42	false
 14	false
 19	false
 2	false
-17	true
 6	false
+2	false
+2	false
+39	false
 10	false
-12	false
+27	false
 6	false
+18	false
+45	false
+7	false
 46	false
-34	false
-42	false
+23	false
+17	true
 31	false
 14	false
 2	false
-2	false
-39	false
-2	false
-27	false
 25	false
 28	false
-18	false
-45	false
+12	false
 Warning: Shuffle Join JOIN[11][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product
 PREHOOK: query: explain SELECT p_size, EXISTS(SELECT p_size FROM part)
 FROM part
@@ -1023,31 +1023,31 @@ FROM part
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
+46	true
 1	true
-23	true
+34	true
 42	true
-14	true
+19	true
 2	true
+14	true
 6	true
+39	true
 2	true
-2	true
-10	true
-2	true
-12	true
+27	true
 6	true
 18	true
 7	true
-46	true
 40	true
-34	true
-19	true
+23	true
+14	true
 17	true
 31	true
-14	true
-39	true
-27	true
+2	true
+2	true
+10	true
 25	true
 28	true
+12	true
 45	true
 Warning: Shuffle Join JOIN[11][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product
 PREHOOK: query: explain SELECT p_size, NOT EXISTS(SELECT p_size FROM part)
@@ -1286,31 +1286,31 @@ FROM part
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
+46	false
 1	false
-23	false
+34	false
 42	false
-14	false
+19	false
 2	false
+14	false
 6	false
+39	false
 2	false
-2	false
-10	false
-2	false
-12	false
+27	false
 6	false
 18	false
 7	false
-46	false
 40	false
-34	false
-19	false
+23	false
+14	false
 17	false
 31	false
-14	false
-39	false
-27	false
+2	false
+2	false
+10	false
 25	false
 28	false
+12	false
 45	false
 PREHOOK: query: explain select p_size, (select count(p_name) from part p where p.p_type = part.p_name) from part
 PREHOOK: type: QUERY
@@ -1421,31 +1421,31 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
 31	0
+2	0
+2	0
 17	0
-34	0
+10	0
 6	0
-14	0
+19	0
+6	0
+2	0
 39	0
 28	0
 46	0
-27	0
-42	0
-25	0
 18	0
-7	0
 12	0
 23	0
-2	0
-2	0
+34	0
 14	0
-10	0
-19	0
 1	0
 45	0
-6	0
-2	0
+14	0
 40	0
+27	0
 2	0
+42	0
+25	0
+7	0
 PREHOOK: query: explain select p_size, (select max(p_name) from part p where p.p_type = part.p_name) from part
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select p_size, (select max(p_name) from part p where p.p_type = part.p_name) from part
@@ -1555,31 +1555,31 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
 31	NULL
+2	NULL
+2	NULL
 17	NULL
-34	NULL
+10	NULL
 6	NULL
-14	NULL
+19	NULL
+6	NULL
+2	NULL
 39	NULL
 28	NULL
 46	NULL
-27	NULL
-42	NULL
-25	NULL
 18	NULL
-7	NULL
 12	NULL
 23	NULL
-2	NULL
-2	NULL
+34	NULL
 14	NULL
-10	NULL
-19	NULL
 1	NULL
 45	NULL
-6	NULL
-2	NULL
+14	NULL
 40	NULL
+27	NULL
 2	NULL
+42	NULL
+25	NULL
+7	NULL
 Warning: Shuffle Join JOIN[10][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product
 PREHOOK: query: explain SELECT p_size, (SELECT max(p_size) FROM part)
     FROM part
@@ -2053,10 +2053,6 @@ where b.key in
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
-92	val_92
-95	val_95
-95	val_95
-96	val_96
 90	val_90
 90	val_90
 90	val_90
@@ -2064,6 +2060,10 @@ POSTHOOK: Input: default@src
 97	val_97
 98	val_98
 98	val_98
+92	val_92
+95	val_95
+95	val_95
+96	val_96
 PREHOOK: query: CREATE table tnull(i int)
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
@@ -2238,16 +2238,13 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 POSTHOOK: Input: default@tnull
 #### A masked pattern was here ####
+1	NULL
 10	NULL
 12	NULL
-14	NULL
-14	NULL
-23	NULL
+19	NULL
 28	NULL
-31	NULL
+34	NULL
 42	NULL
-45	NULL
-1	NULL
 2	NULL
 2	NULL
 2	NULL
@@ -2255,14 +2252,17 @@ POSTHOOK: Input: default@tnull
 6	NULL
 6	NULL
 7	NULL
+14	NULL
+14	NULL
 17	NULL
 18	NULL
-19	NULL
+23	NULL
 25	NULL
 27	NULL
-34	NULL
+31	NULL
 39	NULL
 40	NULL
+45	NULL
 46	NULL
 PREHOOK: query: CREATE TABLE tempty(i int)
 PREHOOK: type: CREATETABLE
@@ -2644,31 +2644,31 @@ POSTHOOK: query: SELECT p_size, 1+(SELECT max(p_size) FROM part p
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
+46	47
 1	2
-23	24
+34	35
 42	43
-14	15
+19	20
 2	3
+14	15
 6	7
+39	40
 2	3
-2	3
-10	11
-2	3
-12	13
+27	28
 6	7
 18	19
 7	8
-46	47
 40	41
-34	35
-19	20
+23	24
+14	15
 17	32
 31	32
-14	15
-39	40
-27	28
+2	3
+2	3
+10	11
 25	26
 28	29
+12	13
 45	46
 PREHOOK: query: explain SELECT p_size, (SELECT count(p_size) FROM part p
     WHERE p.p_type = part.p_type) IS NULL from part
@@ -2782,31 +2782,31 @@ POSTHOOK: query: SELECT p_size, (SELECT count(p_size) FROM part p
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
+46	false
 1	false
-23	false
+34	false
 42	false
-14	false
+19	false
 2	false
+14	false
 6	false
+39	false
 2	false
-2	false
-10	false
-2	false
-12	false
+27	false
 6	false
 18	false
 7	false
-46	false
 40	false
-34	false
-19	false
+23	false
+14	false
 17	false
 31	false
-14	false
-39	false
-27	false
+2	false
+2	false
+10	false
 25	false
 28	false
+12	false
 45	false
 Warning: Shuffle Join JOIN[23][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product
 Warning: Shuffle Join JOIN[26][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Work 'Reducer 3' is a cross product
@@ -3267,31 +3267,31 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
 31	true
+2	false
+2	false
 17	false
-34	false
+10	false
 6	false
-14	false
+19	false
+6	false
+2	false
 39	false
 28	false
 46	false
-27	false
-42	false
-25	false
 18	false
-7	false
 12	false
 23	false
-2	false
-2	false
+34	false
 14	false
-10	false
-19	false
 1	false
 45	false
-6	false
-2	false
+14	false
 40	false
+27	false
 2	false
+42	false
+25	false
+7	false
 PREHOOK: query: explain SELECT p_size, NOT EXISTS(SELECT p_size FROM part pp where pp.p_type = part.p_type)
 FROM part
 PREHOOK: type: QUERY
@@ -3401,31 +3401,31 @@ FROM part
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
+46	false
 1	false
-23	false
+34	false
 42	false
-14	false
+19	false
 2	false
+14	false
 6	false
+39	false
 2	false
-2	false
-10	false
-2	false
-12	false
+27	false
 6	false
 18	false
 7	false
-46	false
 40	false
-34	false
-19	false
+23	false
+14	false
 17	false
 31	false
-14	false
-39	false
-27	false
+2	false
+2	false
+10	false
 25	false
 28	false
+12	false
 45	false
 Warning: Shuffle Join JOIN[12][tables = [$hdt$_1, $hdt$_2]] in Work 'Reducer 5' is a cross product
 Warning: Shuffle Join JOIN[41][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product
@@ -3672,16 +3672,13 @@ POSTHOOK: query: select p_size, (p_size IN
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
+1	false
 10	false
 12	false
-14	false
-14	false
-23	false
+19	false
 28	false
-31	false
+34	false
 42	false
-45	false
-1	false
 2	false
 2	false
 2	false
@@ -3689,14 +3686,17 @@ POSTHOOK: Input: default@part
 6	false
 6	false
 7	false
+14	false
+14	false
 17	false
 18	false
-19	false
+23	false
 25	false
 27	false
-34	false
+31	false
 39	false
 40	false
+45	false
 46	true
 Warning: Shuffle Join JOIN[25][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product
 Warning: Shuffle Join JOIN[28][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Work 'Reducer 3' is a cross product
@@ -4273,17 +4273,17 @@ POSTHOOK: query: select o.p_size, (select count(distinct p_type) from part p whe
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
+46	1
+27	1
 39	1
 23	1
 28	1
-25	1
+45	1
+40	1
 31	1
-46	1
-27	1
 42	1
 34	1
-45	1
-40	1
+25	1
 Warning: Shuffle Join JOIN[28][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product
 Warning: Shuffle Join JOIN[31][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Work 'Reducer 3' is a cross product
 Warning: Shuffle Join JOIN[34][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3]] in Work 'Reducer 4' is a cross product
@@ -5388,31 +5388,31 @@ POSTHOOK: query: select t1.p_size,
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
+46	1	28
+14	1	28
+1	1	28
+6	1	28
+27	1	28
 39	1	28
 10	1	28
 23	1	28
 28	1	28
+17	1	28
 14	1	28
 6	1	28
-2	2	28
-2	2	28
-25	1	28
+19	1	28
+45	1	28
 2	1	28
+40	1	28
 31	1	28
-46	1	28
-14	1	28
 7	1	28
 12	1	28
-1	1	28
-6	1	28
-27	1	28
 42	1	28
 34	1	28
-17	1	28
-19	1	28
-45	1	28
+2	2	28
+2	2	28
+25	1	28
 2	1	28
-40	1	28
 18	1	28
 PREHOOK: query: explain SELECT p_size, exp((SELECT max(p_size) FROM part p WHERE p.p_type = part.p_type)) from part
 PREHOOK: type: QUERY
@@ -5522,29 +5522,29 @@ POSTHOOK: query: SELECT p_size, exp((SELECT max(p_size) FROM part p WHERE p.p_ty
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
+46	9.496119420602448E19
 1	2.718281828459045
-23	9.744803446248903E9
+34	5.834617425274549E14
 42	1.73927494152050099E18
-14	1202604.2841647768
+19	1.7848230096318725E8
 2	7.38905609893065
+14	1202604.2841647768
 6	403.4287934927351
+39	8.6593400423993744E16
 2	7.38905609893065
-2	7.38905609893065
-10	22026.465794806718
-2	7.38905609893065
-12	162754.79141900392
+27	5.3204824060179865E11
 6	403.4287934927351
 18	6.565996913733051E7
 7	1096.6331584284585
-46	9.496119420602448E19
 40	2.3538526683702E17
-34	5.834617425274549E14
-19	1.7848230096318725E8
+23	9.744803446248903E9
+14	1202604.2841647768
 17	2.9048849665247426E13
 31	2.9048849665247426E13
-14	1202604.2841647768
-39	8.6593400423993744E16
-27	5.3204824060179865E11
+2	7.38905609893065
+2	7.38905609893065
+10	22026.465794806718
 25	7.200489933738588E10
 28	1.446257064291475E12
+12	162754.79141900392
 45	3.4934271057485095E19

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/subquery_shared_alias.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/subquery_shared_alias.q.out b/ql/src/test/results/clientpositive/spark/subquery_shared_alias.q.out
index f907f91..0507ab7 100644
--- a/ql/src/test/results/clientpositive/spark/subquery_shared_alias.q.out
+++ b/ql/src/test/results/clientpositive/spark/subquery_shared_alias.q.out
@@ -10,14 +10,14 @@ where src.key in (select key from src where key > '9')
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
-92	val_92
-96	val_96
-97	val_97
-97	val_97
 90	val_90
 90	val_90
 90	val_90
+92	val_92
 95	val_95
 95	val_95
+96	val_96
+97	val_97
+97	val_97
 98	val_98
 98	val_98

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/transform_ppr1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/transform_ppr1.q.out b/ql/src/test/results/clientpositive/spark/transform_ppr1.q.out
index a7c5243..de2efda 100644
--- a/ql/src/test/results/clientpositive/spark/transform_ppr1.q.out
+++ b/ql/src/test/results/clientpositive/spark/transform_ppr1.q.out
@@ -99,6 +99,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'
@@ -147,6 +148,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'
@@ -195,6 +197,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'
@@ -243,6 +246,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/ac6b2a3f/ql/src/test/results/clientpositive/spark/transform_ppr2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/transform_ppr2.q.out b/ql/src/test/results/clientpositive/spark/transform_ppr2.q.out
index e48e6a3..2628ae6 100644
--- a/ql/src/test/results/clientpositive/spark/transform_ppr2.q.out
+++ b/ql/src/test/results/clientpositive/spark/transform_ppr2.q.out
@@ -101,6 +101,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'
@@ -149,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/truncate_column_buckets.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/truncate_column_buckets.q.out b/ql/src/test/results/clientpositive/spark/truncate_column_buckets.q.out
index edeab0b..38965e7 100644
--- a/ql/src/test/results/clientpositive/spark/truncate_column_buckets.q.out
+++ b/ql/src/test/results/clientpositive/spark/truncate_column_buckets.q.out
@@ -30,8 +30,8 @@ test_tab GROUP BY INPUT__FILE__NAME
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_tab
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-258
-242
+248
+252
 PREHOOK: query: TRUNCATE TABLE test_tab COLUMNS (value)
 PREHOOK: type: TRUNCATETABLE
 PREHOOK: Input: default@test_tab
@@ -54,5 +54,5 @@ test_tab GROUP BY INPUT__FILE__NAME
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_tab
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-258
-242
+248
+252

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union22.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union22.q.out b/ql/src/test/results/clientpositive/spark/union22.q.out
index 9a94847..0a99d86 100644
--- a/ql/src/test/results/clientpositive/spark/union22.q.out
+++ b/ql/src/test/results/clientpositive/spark/union22.q.out
@@ -143,6 +143,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns k0,k1,k2,k3,k4,k5
                       columns.comments 
@@ -192,6 +193,7 @@ STAGE PLANS:
                             output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                             properties:
                               bucket_count -1
+                              bucketing_version 2
                               column.name.delimiter ,
                               columns k1,k2,k3,k4
                               columns.comments 
@@ -245,6 +247,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns k0,k1,k2,k3,k4,k5
                       columns.comments 
@@ -309,6 +312,7 @@ STAGE PLANS:
                                 output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                                 properties:
                                   bucket_count -1
+                                  bucketing_version 2
                                   column.name.delimiter ,
                                   columns k1,k2,k3,k4
                                   columns.comments 
@@ -364,6 +368,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns k1,k2,k3,k4
                       columns.comments 
@@ -394,6 +399,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns k1,k2,k3,k4
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union24.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union24.q.out b/ql/src/test/results/clientpositive/spark/union24.q.out
index d2e9df8..015f904 100644
--- a/ql/src/test/results/clientpositive/spark/union24.q.out
+++ b/ql/src/test/results/clientpositive/spark/union24.q.out
@@ -127,6 +127,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -148,6 +149,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -215,6 +217,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -236,6 +239,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -303,6 +307,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -324,6 +329,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -380,6 +386,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -401,6 +408,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -590,6 +598,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -611,6 +620,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -678,6 +688,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -699,6 +710,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -752,6 +764,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -773,6 +786,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -827,6 +841,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -848,6 +863,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -1030,6 +1046,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -1051,6 +1068,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -1118,6 +1136,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -1139,6 +1158,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -1192,6 +1212,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -1213,6 +1234,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 
@@ -1266,6 +1288,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,count
                     columns.comments 
@@ -1287,6 +1310,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,count
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_ppr.q.out b/ql/src/test/results/clientpositive/spark/union_ppr.q.out
index 1ef33b0..d1b9e3d 100644
--- a/ql/src/test/results/clientpositive/spark/union_ppr.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_ppr.q.out
@@ -89,6 +89,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'
@@ -137,6 +138,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'
@@ -217,6 +219,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 +268,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/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_1.q.out b/ql/src/test/results/clientpositive/spark/union_remove_1.q.out
index f6e5f98..5d17b36 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_1.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_1.q.out
@@ -158,6 +158,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
 	totalSize           	40                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_10.q.out b/ql/src/test/results/clientpositive/spark/union_remove_10.q.out
index a19bbdb..f22bb29 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_10.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_10.q.out
@@ -234,8 +234,9 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
-	totalSize           	348                 
+	totalSize           	350                 
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_11.q.out b/ql/src/test/results/clientpositive/spark/union_remove_11.q.out
index 3b60a2f..f70a2d6 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_11.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_11.q.out
@@ -223,6 +223,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	3                   
 	totalSize           	273                 
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_12.q.out b/ql/src/test/results/clientpositive/spark/union_remove_12.q.out
index b27bdec..fb83bcc 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_12.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_12.q.out
@@ -225,6 +225,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	194                 
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_13.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_13.q.out b/ql/src/test/results/clientpositive/spark/union_remove_13.q.out
index 3eb71d2..cf3e352 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_13.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_13.q.out
@@ -248,8 +248,9 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	3                   
-	totalSize           	269                 
+	totalSize           	271                 
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_14.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_14.q.out b/ql/src/test/results/clientpositive/spark/union_remove_14.q.out
index b27bdec..fb83bcc 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_14.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_14.q.out
@@ -225,6 +225,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	194                 
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_15.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_15.q.out b/ql/src/test/results/clientpositive/spark/union_remove_15.q.out
index aeed21a..41477a7 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_15.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_15.q.out
@@ -175,11 +175,12 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
 	numPartitions       	2                   
 	numRows             	0                   
 	rawDataSize         	0                   
-	totalSize           	332                 
+	totalSize           	336                 
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_16.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_16.q.out b/ql/src/test/results/clientpositive/spark/union_remove_16.q.out
index 18c479c..e39dbd4 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_16.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_16.q.out
@@ -217,11 +217,12 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
 	numPartitions       	2                   
 	numRows             	0                   
 	rawDataSize         	0                   
-	totalSize           	332                 
+	totalSize           	336                 
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_17.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_17.q.out b/ql/src/test/results/clientpositive/spark/union_remove_17.q.out
index 9782885..5a80207 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_17.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_17.q.out
@@ -152,6 +152,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_18.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_18.q.out b/ql/src/test/results/clientpositive/spark/union_remove_18.q.out
index c29113f..1f8d8a5 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_18.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_18.q.out
@@ -187,6 +187,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	12                  
 	numPartitions       	6                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_19.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_19.q.out b/ql/src/test/results/clientpositive/spark/union_remove_19.q.out
index 3ab4467..aeafa39 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_19.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_19.q.out
@@ -158,6 +158,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
 	totalSize           	40                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_2.q.out b/ql/src/test/results/clientpositive/spark/union_remove_2.q.out
index f681966..18563c7 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_2.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_2.q.out
@@ -184,6 +184,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
 	totalSize           	68                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_20.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_20.q.out b/ql/src/test/results/clientpositive/spark/union_remove_20.q.out
index 402d2b6..9f2bf0e 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_20.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_20.q.out
@@ -166,6 +166,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
 	totalSize           	40                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_21.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_21.q.out b/ql/src/test/results/clientpositive/spark/union_remove_21.q.out
index 0df7318..6ef6d4e 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_21.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_21.q.out
@@ -152,6 +152,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
 	totalSize           	20                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_22.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_22.q.out b/ql/src/test/results/clientpositive/spark/union_remove_22.q.out
index 967d6fe..16d52bb 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_22.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_22.q.out
@@ -168,6 +168,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
 	totalSize           	60                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_23.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_23.q.out b/ql/src/test/results/clientpositive/spark/union_remove_23.q.out
index 19a3262..0e25378 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_23.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_23.q.out
@@ -221,6 +221,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
 	totalSize           	40                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_24.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_24.q.out b/ql/src/test/results/clientpositive/spark/union_remove_24.q.out
index 998ffa9..16b9272 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_24.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_24.q.out
@@ -166,6 +166,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
 	totalSize           	60                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_3.q.out b/ql/src/test/results/clientpositive/spark/union_remove_3.q.out
index 30ebaf7..66b1d97 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_3.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_3.q.out
@@ -173,6 +173,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	3                   
 	totalSize           	72                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_4.q.out b/ql/src/test/results/clientpositive/spark/union_remove_4.q.out
index 2377cf6..e98da72 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_4.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_4.q.out
@@ -208,6 +208,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
 	totalSize           	40                  
 #### A masked pattern was here ####


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/vector_partitioned_date_time.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_partitioned_date_time.q.out b/ql/src/test/results/clientpositive/llap/vector_partitioned_date_time.q.out
index 687b4af..8bec959 100644
--- a/ql/src/test/results/clientpositive/llap/vector_partitioned_date_time.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_partitioned_date_time.q.out
@@ -232,17 +232,17 @@ POSTHOOK: query: select fl_date, count(*) from flights_tiny_orc group by fl_date
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@flights_tiny_orc
 #### A masked pattern was here ####
-2010-10-20	11
 2010-10-21	12
-2010-10-26	13
-2010-10-30	11
-2010-10-23	12
 2010-10-24	12
-2010-10-25	12
-2010-10-22	11
+2010-10-26	13
 2010-10-28	12
+2010-10-22	11
 2010-10-29	12
+2010-10-20	11
+2010-10-23	12
+2010-10-25	12
 2010-10-27	11
+2010-10-30	11
 2010-10-31	8
 PREHOOK: query: explain vectorization expression
 select * from flights_tiny_orc sort by fl_num, fl_date limit 25
@@ -529,17 +529,17 @@ POSTHOOK: query: select fl_date, count(*) from flights_tiny_orc group by fl_date
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@flights_tiny_orc
 #### A masked pattern was here ####
-2010-10-20	11
 2010-10-21	12
-2010-10-26	13
-2010-10-30	11
-2010-10-23	12
 2010-10-24	12
-2010-10-25	12
-2010-10-22	11
+2010-10-26	13
 2010-10-28	12
+2010-10-22	11
 2010-10-29	12
+2010-10-20	11
+2010-10-23	12
+2010-10-25	12
 2010-10-27	11
+2010-10-30	11
 2010-10-31	8
 PREHOOK: query: CREATE TABLE flights_tiny_orc_partitioned_date (
   origin_city_name STRING,
@@ -908,17 +908,17 @@ POSTHOOK: Input: default@flights_tiny_orc_partitioned_date@fl_date=2010-10-29
 POSTHOOK: Input: default@flights_tiny_orc_partitioned_date@fl_date=2010-10-30
 POSTHOOK: Input: default@flights_tiny_orc_partitioned_date@fl_date=2010-10-31
 #### A masked pattern was here ####
-2010-10-20	11
 2010-10-21	12
-2010-10-26	13
-2010-10-30	11
-2010-10-23	12
 2010-10-24	12
-2010-10-25	12
-2010-10-22	11
+2010-10-26	13
 2010-10-28	12
+2010-10-22	11
 2010-10-29	12
+2010-10-20	11
+2010-10-23	12
+2010-10-25	12
 2010-10-27	11
+2010-10-30	11
 2010-10-31	8
 PREHOOK: query: explain vectorization expression
 select * from flights_tiny_orc_partitioned_date
@@ -1484,17 +1484,17 @@ POSTHOOK: Input: default@flights_tiny_orc_partitioned_date@fl_date=2010-10-29
 POSTHOOK: Input: default@flights_tiny_orc_partitioned_date@fl_date=2010-10-30
 POSTHOOK: Input: default@flights_tiny_orc_partitioned_date@fl_date=2010-10-31
 #### A masked pattern was here ####
-2010-10-20	11
 2010-10-21	12
-2010-10-26	13
-2010-10-30	11
-2010-10-23	12
 2010-10-24	12
-2010-10-25	12
-2010-10-22	11
+2010-10-26	13
 2010-10-28	12
+2010-10-22	11
 2010-10-29	12
+2010-10-20	11
+2010-10-23	12
+2010-10-25	12
 2010-10-27	11
+2010-10-30	11
 2010-10-31	8
 PREHOOK: query: CREATE TABLE flights_tiny_orc_partitioned_timestamp (
   origin_city_name STRING,
@@ -1863,18 +1863,18 @@ POSTHOOK: Input: default@flights_tiny_orc_partitioned_timestamp@fl_time=2010-10-
 POSTHOOK: Input: default@flights_tiny_orc_partitioned_timestamp@fl_time=2010-10-30 07%3A00%3A00
 POSTHOOK: Input: default@flights_tiny_orc_partitioned_timestamp@fl_time=2010-10-31 07%3A00%3A00
 #### A masked pattern was here ####
-2010-10-20 07:00:00	11
 2010-10-23 07:00:00	12
 2010-10-25 07:00:00	12
 2010-10-22 07:00:00	11
+2010-10-24 07:00:00	12
 2010-10-26 07:00:00	13
+2010-10-20 07:00:00	11
+2010-10-28 07:00:00	12
 2010-10-29 07:00:00	12
+2010-10-30 07:00:00	11
 2010-10-31 07:00:00	8
 2010-10-21 07:00:00	12
-2010-10-24 07:00:00	12
 2010-10-27 07:00:00	11
-2010-10-28 07:00:00	12
-2010-10-30 07:00:00	11
 PREHOOK: query: explain vectorization expression
 select * from flights_tiny_orc_partitioned_timestamp
 PREHOOK: type: QUERY
@@ -2439,18 +2439,18 @@ POSTHOOK: Input: default@flights_tiny_orc_partitioned_timestamp@fl_time=2010-10-
 POSTHOOK: Input: default@flights_tiny_orc_partitioned_timestamp@fl_time=2010-10-30 07%3A00%3A00
 POSTHOOK: Input: default@flights_tiny_orc_partitioned_timestamp@fl_time=2010-10-31 07%3A00%3A00
 #### A masked pattern was here ####
-2010-10-20 07:00:00	11
 2010-10-23 07:00:00	12
 2010-10-25 07:00:00	12
 2010-10-22 07:00:00	11
+2010-10-24 07:00:00	12
 2010-10-26 07:00:00	13
+2010-10-20 07:00:00	11
+2010-10-28 07:00:00	12
 2010-10-29 07:00:00	12
+2010-10-30 07:00:00	11
 2010-10-31 07:00:00	8
 2010-10-21 07:00:00	12
-2010-10-24 07:00:00	12
 2010-10-27 07:00:00	11
-2010-10-28 07:00:00	12
-2010-10-30 07:00:00	11
 PREHOOK: query: CREATE TABLE flights_tiny_parquet STORED AS PARQUET AS
 SELECT origin_city_name, dest_city_name, fl_date, to_utc_timestamp(fl_date, 'America/Los_Angeles') as fl_time, arr_delay, fl_num
 FROM flights_tiny
@@ -2657,17 +2657,17 @@ POSTHOOK: query: select fl_date, count(*) from flights_tiny_parquet group by fl_
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@flights_tiny_parquet
 #### A masked pattern was here ####
-2010-10-20	11
 2010-10-21	12
-2010-10-26	13
-2010-10-30	11
-2010-10-23	12
 2010-10-24	12
-2010-10-25	12
-2010-10-22	11
+2010-10-26	13
 2010-10-28	12
+2010-10-22	11
 2010-10-29	12
+2010-10-20	11
+2010-10-23	12
+2010-10-25	12
 2010-10-27	11
+2010-10-30	11
 2010-10-31	8
 PREHOOK: query: explain vectorization expression
 select * from flights_tiny_parquet sort by fl_num, fl_date limit 25
@@ -2954,17 +2954,17 @@ POSTHOOK: query: select fl_date, count(*) from flights_tiny_parquet group by fl_
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@flights_tiny_parquet
 #### A masked pattern was here ####
-2010-10-20	11
 2010-10-21	12
-2010-10-26	13
-2010-10-30	11
-2010-10-23	12
 2010-10-24	12
-2010-10-25	12
-2010-10-22	11
+2010-10-26	13
 2010-10-28	12
+2010-10-22	11
 2010-10-29	12
+2010-10-20	11
+2010-10-23	12
+2010-10-25	12
 2010-10-27	11
+2010-10-30	11
 2010-10-31	8
 PREHOOK: query: CREATE TABLE flights_tiny_parquet_partitioned_date (
   origin_city_name STRING,
@@ -3333,17 +3333,17 @@ POSTHOOK: Input: default@flights_tiny_parquet_partitioned_date@fl_date=2010-10-2
 POSTHOOK: Input: default@flights_tiny_parquet_partitioned_date@fl_date=2010-10-30
 POSTHOOK: Input: default@flights_tiny_parquet_partitioned_date@fl_date=2010-10-31
 #### A masked pattern was here ####
-2010-10-20	11
 2010-10-21	12
-2010-10-26	13
-2010-10-30	11
-2010-10-23	12
 2010-10-24	12
-2010-10-25	12
-2010-10-22	11
+2010-10-26	13
 2010-10-28	12
+2010-10-22	11
 2010-10-29	12
+2010-10-20	11
+2010-10-23	12
+2010-10-25	12
 2010-10-27	11
+2010-10-30	11
 2010-10-31	8
 PREHOOK: query: explain vectorization expression
 select * from flights_tiny_parquet_partitioned_date
@@ -3909,17 +3909,17 @@ POSTHOOK: Input: default@flights_tiny_parquet_partitioned_date@fl_date=2010-10-2
 POSTHOOK: Input: default@flights_tiny_parquet_partitioned_date@fl_date=2010-10-30
 POSTHOOK: Input: default@flights_tiny_parquet_partitioned_date@fl_date=2010-10-31
 #### A masked pattern was here ####
-2010-10-20	11
 2010-10-21	12
-2010-10-26	13
-2010-10-30	11
-2010-10-23	12
 2010-10-24	12
-2010-10-25	12
-2010-10-22	11
+2010-10-26	13
 2010-10-28	12
+2010-10-22	11
 2010-10-29	12
+2010-10-20	11
+2010-10-23	12
+2010-10-25	12
 2010-10-27	11
+2010-10-30	11
 2010-10-31	8
 PREHOOK: query: CREATE TABLE flights_tiny_parquet_partitioned_timestamp (
   origin_city_name STRING,
@@ -4288,18 +4288,18 @@ POSTHOOK: Input: default@flights_tiny_parquet_partitioned_timestamp@fl_time=2010
 POSTHOOK: Input: default@flights_tiny_parquet_partitioned_timestamp@fl_time=2010-10-30 07%3A00%3A00
 POSTHOOK: Input: default@flights_tiny_parquet_partitioned_timestamp@fl_time=2010-10-31 07%3A00%3A00
 #### A masked pattern was here ####
-2010-10-20 07:00:00	11
 2010-10-23 07:00:00	12
 2010-10-25 07:00:00	12
 2010-10-22 07:00:00	11
+2010-10-24 07:00:00	12
 2010-10-26 07:00:00	13
+2010-10-20 07:00:00	11
+2010-10-28 07:00:00	12
 2010-10-29 07:00:00	12
+2010-10-30 07:00:00	11
 2010-10-31 07:00:00	8
 2010-10-21 07:00:00	12
-2010-10-24 07:00:00	12
 2010-10-27 07:00:00	11
-2010-10-28 07:00:00	12
-2010-10-30 07:00:00	11
 PREHOOK: query: explain vectorization expression
 select * from flights_tiny_parquet_partitioned_timestamp
 PREHOOK: type: QUERY
@@ -4864,15 +4864,15 @@ POSTHOOK: Input: default@flights_tiny_parquet_partitioned_timestamp@fl_time=2010
 POSTHOOK: Input: default@flights_tiny_parquet_partitioned_timestamp@fl_time=2010-10-30 07%3A00%3A00
 POSTHOOK: Input: default@flights_tiny_parquet_partitioned_timestamp@fl_time=2010-10-31 07%3A00%3A00
 #### A masked pattern was here ####
-2010-10-20 07:00:00	11
 2010-10-23 07:00:00	12
 2010-10-25 07:00:00	12
 2010-10-22 07:00:00	11
+2010-10-24 07:00:00	12
 2010-10-26 07:00:00	13
+2010-10-20 07:00:00	11
+2010-10-28 07:00:00	12
 2010-10-29 07:00:00	12
+2010-10-30 07:00:00	11
 2010-10-31 07:00:00	8
 2010-10-21 07:00:00	12
-2010-10-24 07:00:00	12
 2010-10-27 07:00:00	11
-2010-10-28 07:00:00	12
-2010-10-30 07:00:00	11


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/keyseries/VectorKeySeriesSerializedImpl.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/keyseries/VectorKeySeriesSerializedImpl.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/keyseries/VectorKeySeriesSerializedImpl.java
index 86f466f..77c9ecc 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/keyseries/VectorKeySeriesSerializedImpl.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/keyseries/VectorKeySeriesSerializedImpl.java
@@ -21,9 +21,9 @@ package org.apache.hadoop.hive.ql.exec.vector.keyseries;
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 import org.apache.hadoop.hive.serde2.ByteStream.Output;
 import org.apache.hadoop.hive.serde2.fast.SerializeWrite;
-import org.apache.hive.common.util.HashCodeUtil;
 
 import com.google.common.base.Preconditions;
+import org.apache.hive.common.util.Murmur3;
 
 /**
  * Implementation of base serialization interface.
@@ -103,7 +103,7 @@ public abstract class VectorKeySeriesSerializedImpl<T extends SerializeWrite>
     byte[] bytes = output.getData();
     for (int i = 0; i < nonNullKeyCount; i++) {
       keyLength = serializedKeyLengths[i];
-      hashCodes[i] = HashCodeUtil.murmurHash(bytes, offset, keyLength);
+      hashCodes[i] = Murmur3.hash32(bytes, offset, keyLength, 0);
       offset += keyLength;
     }
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/reducesink/VectorReduceSinkObjectHashOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/reducesink/VectorReduceSinkObjectHashOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/reducesink/VectorReduceSinkObjectHashOperator.java
index 1bc3fda..42b7784 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/reducesink/VectorReduceSinkObjectHashOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/reducesink/VectorReduceSinkObjectHashOperator.java
@@ -32,6 +32,7 @@ import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.ql.plan.OperatorDesc;
 import org.apache.hadoop.hive.ql.plan.VectorDesc;
+import org.apache.hadoop.hive.serde2.ByteStream;
 import org.apache.hadoop.hive.serde2.ByteStream.Output;
 import org.apache.hadoop.hive.serde2.binarysortable.fast.BinarySortableSerializeWrite;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
@@ -40,6 +41,7 @@ import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo;
 import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils;
 
 import com.google.common.base.Preconditions;
+import org.apache.hive.common.util.Murmur3;
 
 /**
  * This class is the object hash (not Uniform Hash) operator class for native vectorized reduce sink.
@@ -226,61 +228,110 @@ public class VectorReduceSinkObjectHashOperator extends VectorReduceSinkCommonOp
       int[] selected = batch.selected;
 
       final int size = batch.size;
-      for (int logical = 0; logical < size; logical++) {
-        final int batchIndex = (selectedInUse ? selected[logical] : logical);
-
-        final int hashCode;
-        if (isEmptyBuckets) {
-          if (isEmptyPartitions) {
-            hashCode = nonPartitionRandom.nextInt();
-          } else {
+
+      // EmptyBuckets = true
+      if (isEmptyBuckets) {
+        if (isEmptyPartitions) {
+          for (int logical = 0; logical< size; logical++) {
+            final int batchIndex = (selectedInUse ? selected[logical] : logical);
+            final int hashCode = nonPartitionRandom.nextInt();
+            postProcess(batch, batchIndex, tag, hashCode);
+          }
+        } else { // isEmptyPartition = false
+          for (int logical = 0; logical< size; logical++) {
+            final int batchIndex = (selectedInUse ? selected[logical] : logical);
             partitionVectorExtractRow.extractRow(batch, batchIndex, partitionFieldValues);
-            hashCode =
+            final int hashCode = bucketingVersion == 2 && !vectorDesc.getIsAcidChange() ?
                 ObjectInspectorUtils.getBucketHashCode(
+                    partitionFieldValues, partitionObjectInspectors) :
+                ObjectInspectorUtils.getBucketHashCodeOld(
                     partitionFieldValues, partitionObjectInspectors);
+            postProcess(batch, batchIndex, tag, hashCode);
           }
-        } else {
-          bucketVectorExtractRow.extractRow(batch, batchIndex, bucketFieldValues);
-          final int bucketNum =
-              ObjectInspectorUtils.getBucketNumber(
+        }
+      } else { // EmptyBuckets = false
+        if (isEmptyPartitions) {
+          for (int logical = 0; logical< size; logical++) {
+            final int batchIndex = (selectedInUse ? selected[logical] : logical);
+            bucketVectorExtractRow.extractRow(batch, batchIndex, bucketFieldValues);
+            final int bucketNum = bucketingVersion == 2 ?
+                ObjectInspectorUtils.getBucketNumber(bucketFieldValues,
+                  bucketObjectInspectors, numBuckets) :
+                ObjectInspectorUtils.getBucketNumberOld(
                   bucketFieldValues, bucketObjectInspectors, numBuckets);
-          if (isEmptyPartitions) {
-            hashCode = nonPartitionRandom.nextInt() * 31 + bucketNum;
-          } else {
+            final int hashCode = nonPartitionRandom.nextInt() * 31 + bucketNum;
+            postProcess(batch, batchIndex, tag, hashCode);
+          }
+        } else { // isEmptyPartition = false
+          for (int logical = 0; logical< size; logical++) {
+            final int batchIndex = (selectedInUse ? selected[logical] : logical);
             partitionVectorExtractRow.extractRow(batch, batchIndex, partitionFieldValues);
-            hashCode =
-                ObjectInspectorUtils.getBucketHashCode(
-                    partitionFieldValues, partitionObjectInspectors) * 31 + bucketNum;
+            bucketVectorExtractRow.extractRow(batch, batchIndex, bucketFieldValues);
+            final int hashCode, bucketNum;
+            if (bucketingVersion == 2 && !vectorDesc.getIsAcidChange()) {
+              bucketNum =
+                  ObjectInspectorUtils.getBucketNumber(
+                      bucketFieldValues, bucketObjectInspectors, numBuckets);
+              hashCode = ObjectInspectorUtils.getBucketHashCode(
+                  partitionFieldValues, partitionObjectInspectors) * 31 + bucketNum;
+            } else { // old bucketing logic
+              bucketNum =
+                  ObjectInspectorUtils.getBucketNumberOld(
+                      bucketFieldValues, bucketObjectInspectors, numBuckets);
+              hashCode = ObjectInspectorUtils.getBucketHashCodeOld(
+                  partitionFieldValues, partitionObjectInspectors) * 31 + bucketNum;
+            }
+            postProcess(batch, batchIndex, tag, hashCode);
           }
         }
+      }
+    } catch (Exception e) {
+      throw new HiveException(e);
+    }
+  }
 
-        if (!isEmptyKey) {
-          keyBinarySortableSerializeWrite.reset();
-          keyVectorSerializeRow.serializeWrite(batch, batchIndex);
-
-          // One serialized key for 1 or more rows for the duplicate keys.
-          final int keyLength = keyOutput.getLength();
-          if (tag == -1 || reduceSkipTag) {
-            keyWritable.set(keyOutput.getData(), 0, keyLength);
-          } else {
-            keyWritable.setSize(keyLength + 1);
-            System.arraycopy(keyOutput.getData(), 0, keyWritable.get(), 0, keyLength);
-            keyWritable.get()[keyLength] = reduceTagByte;
-          }
-          keyWritable.setDistKeyLength(keyLength);
-        }
+  private void processKey(VectorizedRowBatch batch, int batchIndex, int tag)
+  throws HiveException{
+    if (isEmptyKey) return;
 
-        keyWritable.setHashCode(hashCode);
+    try {
+      keyBinarySortableSerializeWrite.reset();
+      keyVectorSerializeRow.serializeWrite(batch, batchIndex);
+
+      // One serialized key for 1 or more rows for the duplicate keys.
+      final int keyLength = keyOutput.getLength();
+      if (tag == -1 || reduceSkipTag) {
+        keyWritable.set(keyOutput.getData(), 0, keyLength);
+      } else {
+        keyWritable.setSize(keyLength + 1);
+        System.arraycopy(keyOutput.getData(), 0, keyWritable.get(), 0, keyLength);
+        keyWritable.get()[keyLength] = reduceTagByte;
+      }
+      keyWritable.setDistKeyLength(keyLength);
+    } catch (Exception e) {
+      throw new HiveException(e);
+    }
+  }
 
-        if (!isEmptyValue) {
-          valueLazyBinarySerializeWrite.reset();
-          valueVectorSerializeRow.serializeWrite(batch, batchIndex);
+  private void processValue(VectorizedRowBatch batch, int batchIndex)  throws HiveException {
+    if (isEmptyValue) return;
 
-          valueBytesWritable.set(valueOutput.getData(), 0, valueOutput.getLength());
-        }
+    try {
+      valueLazyBinarySerializeWrite.reset();
+      valueVectorSerializeRow.serializeWrite(batch, batchIndex);
 
-        collect(keyWritable, valueBytesWritable);
-      }
+      valueBytesWritable.set(valueOutput.getData(), 0, valueOutput.getLength());
+    } catch (Exception e) {
+      throw new HiveException(e);
+    }
+  }
+
+  private void postProcess(VectorizedRowBatch batch, int batchIndex, int tag, int hashCode) throws HiveException {
+    try {
+      processKey(batch, batchIndex, tag);
+      keyWritable.setHashCode(hashCode);
+      processValue(batch, batchIndex);
+      collect(keyWritable, valueBytesWritable);
     } catch (Exception e) {
       throw new HiveException(e);
     }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/io/HiveFileFormatUtils.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/HiveFileFormatUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/io/HiveFileFormatUtils.java
index 71498a1..9a21503 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/HiveFileFormatUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/HiveFileFormatUtils.java
@@ -91,6 +91,7 @@ public final class HiveFileFormatUtils {
 
     // immutable maps
     Map<Class<? extends InputFormat>, Class<? extends InputFormatChecker>> inputFormatCheckerMap;
+    Map<Class<? extends InputFormat>, Class<? extends InputFormatChecker>> textInputFormatCheckerMap;
     Map<Class<?>, Class<? extends OutputFormat>> outputFormatSubstituteMap;
 
     // mutable thread-safe map to store instances
@@ -114,6 +115,10 @@ public final class HiveFileFormatUtils {
           .put(RCFileInputFormat.class, RCFileInputFormat.class)
           .put(OrcInputFormat.class, OrcInputFormat.class)
           .build();
+      textInputFormatCheckerMap = ImmutableMap
+          .<Class<? extends InputFormat>, Class<? extends InputFormatChecker>>builder()
+          .put(SequenceFileInputFormat.class, SequenceFileInputFormatChecker.class)
+          .build();
       outputFormatSubstituteMap = ImmutableMap
           .<Class<?>, Class<? extends OutputFormat>>builder()
           .put(IgnoreKeyTextOutputFormat.class, HiveIgnoreKeyTextOutputFormat.class)
@@ -129,6 +134,10 @@ public final class HiveFileFormatUtils {
       return inputFormatCheckerMap.keySet();
     }
 
+    public Set<Class<? extends InputFormat>> registeredTextClasses() {
+      return textInputFormatCheckerMap.keySet();
+    }
+
     public Class<? extends OutputFormat> getOutputFormatSubstiture(Class<?> origin) {
       return outputFormatSubstituteMap.get(origin);
     }
@@ -214,7 +223,7 @@ public final class HiveFileFormatUtils {
       }
     }
     if (files2.isEmpty()) return true;
-    Set<Class<? extends InputFormat>> inputFormatter = FileChecker.getInstance().registeredClasses();
+    Set<Class<? extends InputFormat>> inputFormatter = FileChecker.getInstance().registeredTextClasses();
     for (Class<? extends InputFormat> reg : inputFormatter) {
       boolean result = checkInputFormat(fs, conf, reg, files2);
       if (result) {

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java
index 019682f..2337a35 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java
@@ -555,9 +555,11 @@ public class OrcInputFormat implements InputFormat<NullWritable, OrcStruct>,
       return false;
     }
     for (FileStatus file : files) {
-      // 0 length files cannot be ORC files
-      if (file.getLen() == 0) {
-        return false;
+      if (!HiveConf.getVar(conf, ConfVars.HIVE_EXECUTION_ENGINE).equals("mr")) {
+        // 0 length files cannot be ORC files, not valid for MR.
+        if (file.getLen() == 0) {
+          return false;
+        }
       }
       try {
         OrcFile.createReader(file.getPath(),

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java
index a51fdd3..abd678b 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java
@@ -188,6 +188,9 @@ public class Table implements Serializable {
       // set create time
       t.setCreateTime((int) (System.currentTimeMillis() / 1000));
     }
+    // Explictly set the bucketing version
+    t.getParameters().put(hive_metastoreConstants.TABLE_BUCKETING_VERSION,
+        "2");
     return t;
   }
 
@@ -399,6 +402,9 @@ public class Table implements Serializable {
     tTable.getParameters().put(name, value);
   }
 
+  // Please note : Be very careful in using this function. If not used carefully,
+  // you may end up overwriting all the existing properties. If the usecase is to
+  // add or update certain properties use setProperty() instead.
   public void setParameters(Map<String, String> params) {
     tTable.setParameters(params);
   }
@@ -450,6 +456,11 @@ public class Table implements Serializable {
     }
   }
 
+  public int getBucketingVersion() {
+    return Utilities.getBucketingVersion(
+        getProperty(hive_metastoreConstants.TABLE_BUCKETING_VERSION));
+  }
+
    @Override
   public String toString() {
     return tTable.getTableName();

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java
index 7121bce..5d4774d 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java
@@ -26,6 +26,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.Stack;
 
+import com.google.common.base.Preconditions;
 import org.apache.hadoop.hive.common.JavaUtils;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
@@ -153,15 +154,16 @@ public class ConvertJoinMapJoin implements NodeProcessor {
       }
     }
 
-    if (context.conf.getBoolVar(HiveConf.ConfVars.HIVE_CONVERT_JOIN_BUCKET_MAPJOIN_TEZ)) {
-      // Check if we are in LLAP, if so it needs to be determined if we should use BMJ or DPHJ
-      if (llapInfo != null) {
-        if (selectJoinForLlap(context, joinOp, tezBucketJoinProcCtx, llapInfo, mapJoinConversionPos, numBuckets)) {
+    if (numBuckets > 1) {
+      if (context.conf.getBoolVar(HiveConf.ConfVars.HIVE_CONVERT_JOIN_BUCKET_MAPJOIN_TEZ)) {
+        // Check if we are in LLAP, if so it needs to be determined if we should use BMJ or DPHJ
+        if (llapInfo != null) {
+          if (selectJoinForLlap(context, joinOp, tezBucketJoinProcCtx, llapInfo, mapJoinConversionPos, numBuckets)) {
+            return null;
+          }
+        } else if (convertJoinBucketMapJoin(joinOp, context, mapJoinConversionPos, tezBucketJoinProcCtx)) {
           return null;
         }
-      } else if (numBuckets > 1 &&
-              convertJoinBucketMapJoin(joinOp, context, mapJoinConversionPos, tezBucketJoinProcCtx)) {
-        return null;
       }
     }
 
@@ -180,7 +182,8 @@ public class ConvertJoinMapJoin implements NodeProcessor {
     MapJoinOperator mapJoinOp = convertJoinMapJoin(joinOp, context, mapJoinConversionPos, true);
     // map join operator by default has no bucket cols and num of reduce sinks
     // reduced by 1
-    mapJoinOp.setOpTraits(new OpTraits(null, -1, null, joinOp.getOpTraits().getNumReduceSinks()));
+    mapJoinOp.setOpTraits(new OpTraits(null, -1, null,
+        joinOp.getOpTraits().getNumReduceSinks(), joinOp.getOpTraits().getBucketingVersion()));
     preserveOperatorInfos(mapJoinOp, joinOp, context);
     // propagate this change till the next RS
     for (Operator<? extends OperatorDesc> childOp : mapJoinOp.getChildOperators()) {
@@ -381,7 +384,8 @@ public class ConvertJoinMapJoin implements NodeProcessor {
     context.parseContext.getContext().getPlanMapper().link(joinOp, mergeJoinOp);
     int numReduceSinks = joinOp.getOpTraits().getNumReduceSinks();
     OpTraits opTraits = new OpTraits(joinOp.getOpTraits().getBucketColNames(), numBuckets,
-      joinOp.getOpTraits().getSortCols(), numReduceSinks);
+      joinOp.getOpTraits().getSortCols(), numReduceSinks,
+      joinOp.getOpTraits().getBucketingVersion());
     mergeJoinOp.setOpTraits(opTraits);
     preserveOperatorInfos(mergeJoinOp, joinOp, context);
 
@@ -448,7 +452,8 @@ public class ConvertJoinMapJoin implements NodeProcessor {
       return;
     }
     currentOp.setOpTraits(new OpTraits(opTraits.getBucketColNames(),
-      opTraits.getNumBuckets(), opTraits.getSortCols(), opTraits.getNumReduceSinks()));
+      opTraits.getNumBuckets(), opTraits.getSortCols(), opTraits.getNumReduceSinks(),
+            opTraits.getBucketingVersion()));
     for (Operator<? extends OperatorDesc> childOp : currentOp.getChildOperators()) {
       if ((childOp instanceof ReduceSinkOperator) || (childOp instanceof GroupByOperator)) {
         break;
@@ -501,7 +506,8 @@ public class ConvertJoinMapJoin implements NodeProcessor {
 
     // we can set the traits for this join operator
     opTraits = new OpTraits(joinOp.getOpTraits().getBucketColNames(),
-        tezBucketJoinProcCtx.getNumBuckets(), null, joinOp.getOpTraits().getNumReduceSinks());
+        tezBucketJoinProcCtx.getNumBuckets(), null, joinOp.getOpTraits().getNumReduceSinks(),
+        joinOp.getOpTraits().getBucketingVersion());
     mapJoinOp.setOpTraits(opTraits);
     preserveOperatorInfos(mapJoinOp, joinOp, context);
     setNumberOfBucketsOnChildren(mapJoinOp);
@@ -612,6 +618,38 @@ public class ConvertJoinMapJoin implements NodeProcessor {
       numBuckets = bigTableRS.getConf().getNumReducers();
     }
     tezBucketJoinProcCtx.setNumBuckets(numBuckets);
+
+    // With bucketing using two different versions. Version 1 for exiting
+    // tables and version 2 for new tables. All the inputs to the SMB must be
+    // from same version. This only applies to tables read directly and not
+    // intermediate outputs of joins/groupbys
+    int bucketingVersion = -1;
+    for (Operator<? extends OperatorDesc> parentOp : joinOp.getParentOperators()) {
+      // Check if the parent is coming from a table scan, if so, what is the version of it.
+      assert parentOp.getParentOperators() != null && parentOp.getParentOperators().size() == 1;
+      Operator<?> op = parentOp.getParentOperators().get(0);
+      while(op != null && !(op instanceof TableScanOperator
+              || op instanceof ReduceSinkOperator
+              || op instanceof CommonJoinOperator)) {
+        // If op has parents it is guaranteed to be 1.
+        List<Operator<?>> parents = op.getParentOperators();
+        Preconditions.checkState(parents.size() == 0 || parents.size() == 1);
+        op = parents.size() == 1 ? parents.get(0) : null;
+      }
+
+      if (op instanceof TableScanOperator) {
+        int localVersion = ((TableScanOperator)op).getConf().
+                getTableMetadata().getBucketingVersion();
+        if (bucketingVersion == -1) {
+          bucketingVersion = localVersion;
+        } else if (bucketingVersion != localVersion) {
+          // versions dont match, return false.
+          LOG.debug("SMB Join can't be performed due to bucketing version mismatch");
+          return false;
+        }
+      }
+    }
+
     LOG.info("We can convert the join to an SMB join.");
     return true;
   }
@@ -1189,7 +1227,8 @@ public class ConvertJoinMapJoin implements NodeProcessor {
             joinOp.getOpTraits().getBucketColNames(),
             numReducers,
             null,
-            joinOp.getOpTraits().getNumReduceSinks());
+            joinOp.getOpTraits().getNumReduceSinks(),
+            joinOp.getOpTraits().getBucketingVersion());
         mapJoinOp.setOpTraits(opTraits);
         preserveOperatorInfos(mapJoinOp, joinOp, context);
         // propagate this change till the next RS

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/optimizer/FixedBucketPruningOptimizer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/FixedBucketPruningOptimizer.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/FixedBucketPruningOptimizer.java
index 5f65f63..4f7d3c2 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/FixedBucketPruningOptimizer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/FixedBucketPruningOptimizer.java
@@ -28,7 +28,6 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hive.ql.exec.FilterOperator;
 import org.apache.hadoop.hive.ql.exec.TableScanOperator;
-import org.apache.hadoop.hive.ql.exec.UDFArgumentException;
 import org.apache.hadoop.hive.ql.io.sarg.ConvertAstToSearchArg;
 import org.apache.hadoop.hive.ql.io.sarg.ExpressionTree;
 import org.apache.hadoop.hive.ql.io.sarg.ExpressionTree.Operator;
@@ -84,8 +83,7 @@ public class FixedBucketPruningOptimizer extends Transform {
 
     @Override
     protected void generatePredicate(NodeProcessorCtx procCtx,
-        FilterOperator fop, TableScanOperator top) throws SemanticException,
-        UDFArgumentException {
+        FilterOperator fop, TableScanOperator top) throws SemanticException {
       FixedBucketPruningOptimizerCtxt ctxt = ((FixedBucketPruningOptimizerCtxt) procCtx);
       Table tbl = top.getConf().getTableMetadata();
       if (tbl.getNumBuckets() > 0) {
@@ -122,8 +120,7 @@ public class FixedBucketPruningOptimizer extends Transform {
 
     @Override
     protected void generatePredicate(NodeProcessorCtx procCtx,
-        FilterOperator fop, TableScanOperator top) throws SemanticException,
-        UDFArgumentException {
+        FilterOperator fop, TableScanOperator top) throws SemanticException {
       FixedBucketPruningOptimizerCtxt ctxt = ((FixedBucketPruningOptimizerCtxt) procCtx);
       if (ctxt.getNumBuckets() <= 0 || ctxt.getBucketCols().size() != 1) {
         // bucketing isn't consistent or there are >1 bucket columns
@@ -225,6 +222,9 @@ public class FixedBucketPruningOptimizer extends Transform {
       bs.clear();
       PrimitiveObjectInspector bucketOI = (PrimitiveObjectInspector)bucketField.getFieldObjectInspector();
       PrimitiveObjectInspector constOI = PrimitiveObjectInspectorFactory.getPrimitiveWritableObjectInspector(bucketOI.getPrimitiveCategory());
+      // Fetch the bucketing version from table scan operator
+      int bucketingVersion = top.getConf().getTableMetadata().getBucketingVersion();
+
       for (Object literal: literals) {
         PrimitiveObjectInspector origOI = PrimitiveObjectInspectorFactory.getPrimitiveObjectInspectorFromClass(literal.getClass());
         Converter conv = ObjectInspectorConverters.getConverter(origOI, constOI);
@@ -233,10 +233,12 @@ public class FixedBucketPruningOptimizer extends Transform {
           return;
         }
         Object convCols[] = new Object[] {conv.convert(literal)};
-        int n = ObjectInspectorUtils.getBucketNumber(convCols, new ObjectInspector[]{constOI}, ctxt.getNumBuckets());
+        int n = bucketingVersion == 2 ?
+            ObjectInspectorUtils.getBucketNumber(convCols, new ObjectInspector[]{constOI}, ctxt.getNumBuckets()) :
+            ObjectInspectorUtils.getBucketNumberOld(convCols, new ObjectInspector[]{constOI}, ctxt.getNumBuckets());
         bs.set(n);
-        if (ctxt.isCompat()) {
-          int h = ObjectInspectorUtils.getBucketHashCode(convCols, new ObjectInspector[]{constOI});
+        if (bucketingVersion == 1 && ctxt.isCompat()) {
+          int h = ObjectInspectorUtils.getBucketHashCodeOld(convCols, new ObjectInspector[]{constOI});
           // -ve hashcodes had conversion to positive done in different ways in the past
           // abs() is now obsolete and all inserts now use & Integer.MAX_VALUE 
           // the compat mode assumes that old data could've been loaded using the other conversion

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/optimizer/PrunerOperatorFactory.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/PrunerOperatorFactory.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/PrunerOperatorFactory.java
index 2be3c9b..1626e26 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/PrunerOperatorFactory.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/PrunerOperatorFactory.java
@@ -31,6 +31,7 @@ import org.apache.hadoop.hive.ql.metadata.Partition;
 import org.apache.hadoop.hive.ql.parse.SemanticException;
 import org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory;
 import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
+import org.apache.hadoop.hive.serde2.SerDeException;
 
 /**
  * Operator factory for pruning processing of operator graph We find
@@ -101,7 +102,7 @@ public abstract class PrunerOperatorFactory {
      * @throws UDFArgumentException
      */
     protected abstract void generatePredicate(NodeProcessorCtx procCtx, FilterOperator fop,
-        TableScanOperator top) throws SemanticException, UDFArgumentException;
+        TableScanOperator top) throws SemanticException;
     /**
      * Add pruning predicate.
      *

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java
index 1c56562..51010aa 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java
@@ -245,7 +245,7 @@ public class SortedDynPartitionOptimizer extends Transform {
 
       // Create ReduceSink operator
       ReduceSinkOperator rsOp = getReduceSinkOp(partitionPositions, sortPositions, sortOrder, sortNullOrder,
-          allRSCols, bucketColumns, numBuckets, fsParent);
+          allRSCols, bucketColumns, numBuckets, fsParent, fsOp.getConf().getWriteType());
 
       List<ExprNodeDesc> descs = new ArrayList<ExprNodeDesc>(allRSCols.size());
       List<String> colNames = new ArrayList<String>();
@@ -442,7 +442,7 @@ public class SortedDynPartitionOptimizer extends Transform {
     public ReduceSinkOperator getReduceSinkOp(List<Integer> partitionPositions,
         List<Integer> sortPositions, List<Integer> sortOrder, List<Integer> sortNullOrder,
         ArrayList<ExprNodeDesc> allCols, ArrayList<ExprNodeDesc> bucketColumns, int numBuckets,
-        Operator<? extends OperatorDesc> parent) throws SemanticException {
+        Operator<? extends OperatorDesc> parent, AcidUtils.Operation writeType) throws SemanticException {
 
       // Order of KEY columns
       // 1) Partition columns
@@ -577,7 +577,7 @@ public class SortedDynPartitionOptimizer extends Transform {
       // Number of reducers is set to default (-1)
       ReduceSinkDesc rsConf = new ReduceSinkDesc(keyCols, keyCols.size(), valCols,
           keyColNames, distinctColumnIndices, valColNames, -1, partCols, -1, keyTable,
-          valueTable);
+          valueTable, writeType);
       rsConf.setBucketCols(bucketColumns);
       rsConf.setNumBuckets(numBuckets);
 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionTimeGranularityOptimizer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionTimeGranularityOptimizer.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionTimeGranularityOptimizer.java
index 0e995d7..0ce359f 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionTimeGranularityOptimizer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionTimeGranularityOptimizer.java
@@ -31,6 +31,7 @@ import org.apache.hadoop.hive.ql.exec.SelectOperator;
 import org.apache.hadoop.hive.ql.exec.UDF;
 import org.apache.hadoop.hive.ql.exec.Utilities;
 import org.apache.hadoop.hive.ql.exec.Utilities.ReduceField;
+import org.apache.hadoop.hive.ql.io.AcidUtils;
 import org.apache.hadoop.hive.ql.lib.DefaultGraphWalker;
 import org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher;
 import org.apache.hadoop.hive.ql.lib.Dispatcher;
@@ -209,7 +210,7 @@ public class SortedDynPartitionTimeGranularityOptimizer extends Transform {
         sortNullOrder = Lists.newArrayList(0); // nulls first
       }
       ReduceSinkOperator rsOp = getReduceSinkOp(keyPositions, sortOrder,
-          sortNullOrder, allRSCols, granularitySelOp);
+          sortNullOrder, allRSCols, granularitySelOp, fsOp.getConf().getWriteType());
 
       // Create backtrack SelectOp
       final List<ExprNodeDesc> descs = new ArrayList<>(allRSCols.size());
@@ -393,8 +394,8 @@ public class SortedDynPartitionTimeGranularityOptimizer extends Transform {
     }
 
     private ReduceSinkOperator getReduceSinkOp(List<Integer> keyPositions, List<Integer> sortOrder,
-        List<Integer> sortNullOrder, ArrayList<ExprNodeDesc> allCols, Operator<? extends OperatorDesc> parent
-    ) {
+        List<Integer> sortNullOrder, ArrayList<ExprNodeDesc> allCols, Operator<? extends OperatorDesc> parent,
+        AcidUtils.Operation writeType) {
       // we will clone here as RS will update bucket column key with its
       // corresponding with bucket number and hence their OIs
       final ArrayList<ExprNodeDesc> keyCols = keyPositions.stream()
@@ -452,7 +453,7 @@ public class SortedDynPartitionTimeGranularityOptimizer extends Transform {
       // Number of reducers is set to default (-1)
       final ReduceSinkDesc rsConf = new ReduceSinkDesc(keyCols, keyCols.size(), valCols,
           keyColNames, distinctColumnIndices, valColNames, -1, partCols, -1, keyTable,
-          valueTable);
+          valueTable, writeType);
 
       final ArrayList<ColumnInfo> signature =
           parent.getSchema().getSignature()

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/optimizer/metainfo/annotation/OpTraitsRulesProcFactory.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/metainfo/annotation/OpTraitsRulesProcFactory.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/metainfo/annotation/OpTraitsRulesProcFactory.java
index 69d9f31..9e54465 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/metainfo/annotation/OpTraitsRulesProcFactory.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/metainfo/annotation/OpTraitsRulesProcFactory.java
@@ -92,10 +92,12 @@ public class OpTraitsRulesProcFactory {
       List<List<String>> listBucketCols = new ArrayList<List<String>>();
       int numBuckets = -1;
       int numReduceSinks = 1;
+      int bucketingVersion = -1;
       OpTraits parentOpTraits = rs.getParentOperators().get(0).getOpTraits();
       if (parentOpTraits != null) {
         numBuckets = parentOpTraits.getNumBuckets();
         numReduceSinks += parentOpTraits.getNumReduceSinks();
+        bucketingVersion = parentOpTraits.getBucketingVersion();
       }
 
       List<String> bucketCols = new ArrayList<>();
@@ -134,8 +136,10 @@ public class OpTraitsRulesProcFactory {
       }
 
       listBucketCols.add(bucketCols);
-      OpTraits opTraits = new OpTraits(listBucketCols, numBuckets, listBucketCols, numReduceSinks);
+      OpTraits opTraits = new OpTraits(listBucketCols, numBuckets,
+              listBucketCols, numReduceSinks, bucketingVersion);
       rs.setOpTraits(opTraits);
+      rs.setBucketingVersion(bucketingVersion);
       return null;
     }
   }
@@ -213,7 +217,8 @@ public class OpTraitsRulesProcFactory {
         sortedColsList.add(sortCols);
       }
       // num reduce sinks hardcoded to 0 because TS has no parents
-      OpTraits opTraits = new OpTraits(bucketColsList, numBuckets, sortedColsList, 0);
+      OpTraits opTraits = new OpTraits(bucketColsList, numBuckets,
+              sortedColsList, 0, table.getBucketingVersion());
       ts.setOpTraits(opTraits);
       return null;
     }
@@ -239,12 +244,15 @@ public class OpTraitsRulesProcFactory {
 
       List<List<String>> listBucketCols = new ArrayList<List<String>>();
       int numReduceSinks = 0;
+      int bucketingVersion = -1;
       OpTraits parentOpTraits = gbyOp.getParentOperators().get(0).getOpTraits();
       if (parentOpTraits != null) {
         numReduceSinks = parentOpTraits.getNumReduceSinks();
+        bucketingVersion = parentOpTraits.getBucketingVersion();
       }
       listBucketCols.add(gbyKeys);
-      OpTraits opTraits = new OpTraits(listBucketCols, -1, listBucketCols, numReduceSinks);
+      OpTraits opTraits = new OpTraits(listBucketCols, -1, listBucketCols,
+              numReduceSinks, bucketingVersion);
       gbyOp.setOpTraits(opTraits);
       return null;
     }
@@ -298,12 +306,15 @@ public class OpTraitsRulesProcFactory {
 
       int numBuckets = -1;
       int numReduceSinks = 0;
+      int bucketingVersion = -1;
       OpTraits parentOpTraits = selOp.getParentOperators().get(0).getOpTraits();
       if (parentOpTraits != null) {
         numBuckets = parentOpTraits.getNumBuckets();
         numReduceSinks = parentOpTraits.getNumReduceSinks();
+        bucketingVersion = parentOpTraits.getBucketingVersion();
       }
-      OpTraits opTraits = new OpTraits(listBucketCols, numBuckets, listSortCols, numReduceSinks);
+      OpTraits opTraits = new OpTraits(listBucketCols, numBuckets, listSortCols,
+              numReduceSinks, bucketingVersion);
       selOp.setOpTraits(opTraits);
       return null;
     }
@@ -338,7 +349,10 @@ public class OpTraitsRulesProcFactory {
         pos++;
       }
 
-      joinOp.setOpTraits(new OpTraits(bucketColsList, -1, bucketColsList, numReduceSinks));
+      // The bucketingVersion is not relevant here as it is never used.
+      // For SMB, we look at the parent tables' bucketing versions and for
+      // bucket map join the big table's bucketing version is considered.
+      joinOp.setOpTraits(new OpTraits(bucketColsList, -1, bucketColsList, numReduceSinks, 2));
       return null;
     }
 
@@ -392,6 +406,8 @@ public class OpTraitsRulesProcFactory {
       Operator<? extends OperatorDesc> operator = (Operator<? extends OperatorDesc>) nd;
 
       int numReduceSinks = 0;
+      int bucketingVersion = -1;
+      boolean bucketingVersionSeen = false;
       for (Operator<?> parentOp : operator.getParentOperators()) {
         if (parentOp.getOpTraits() == null) {
           continue;
@@ -399,8 +415,17 @@ public class OpTraitsRulesProcFactory {
         if (parentOp.getOpTraits().getNumReduceSinks() > numReduceSinks) {
           numReduceSinks = parentOp.getOpTraits().getNumReduceSinks();
         }
+        // If there is mismatch in bucketingVersion, then it should be set to
+        // -1, that way SMB will be disabled.
+        if (bucketingVersion == -1 && !bucketingVersionSeen) {
+          bucketingVersion = parentOp.getOpTraits().getBucketingVersion();
+          bucketingVersionSeen = true;
+        } else if (bucketingVersion != parentOp.getOpTraits().getBucketingVersion()) {
+          bucketingVersion = -1;
+        }
       }
-      OpTraits opTraits = new OpTraits(null, -1, null, numReduceSinks);
+      OpTraits opTraits = new OpTraits(null, -1,
+              null, numReduceSinks, bucketingVersion);
       operator.setOpTraits(opTraits);
       return null;
     }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
index 068f25e..394f826 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
@@ -40,6 +40,8 @@ import java.util.regex.Pattern;
 
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.hadoop.hive.ql.exec.vector.reducesink.*;
+import org.apache.hadoop.hive.ql.io.AcidUtils;
 import org.apache.hadoop.hive.ql.parse.spark.SparkPartitionPruningSinkOperator;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -68,11 +70,6 @@ import org.apache.hadoop.hive.ql.exec.vector.mapjoin.VectorMapJoinOuterLongOpera
 import org.apache.hadoop.hive.ql.exec.vector.mapjoin.VectorMapJoinOuterMultiKeyOperator;
 import org.apache.hadoop.hive.ql.exec.vector.mapjoin.VectorMapJoinOuterStringOperator;
 import org.apache.hadoop.hive.ql.exec.vector.ptf.VectorPTFOperator;
-import org.apache.hadoop.hive.ql.exec.vector.reducesink.VectorReduceSinkEmptyKeyOperator;
-import org.apache.hadoop.hive.ql.exec.vector.reducesink.VectorReduceSinkLongOperator;
-import org.apache.hadoop.hive.ql.exec.vector.reducesink.VectorReduceSinkMultiKeyOperator;
-import org.apache.hadoop.hive.ql.exec.vector.reducesink.VectorReduceSinkObjectHashOperator;
-import org.apache.hadoop.hive.ql.exec.vector.reducesink.VectorReduceSinkStringOperator;
 import org.apache.hadoop.hive.ql.exec.vector.udf.VectorUDFAdaptor;
 import org.apache.hadoop.hive.ql.exec.vector.ColumnVector;
 import org.apache.hadoop.hive.ql.exec.vector.ColumnVector.Type;
@@ -3808,6 +3805,9 @@ public class Vectorizer implements PhysicalPlanResolver {
 
     LOG.info("Vectorizer vectorizeOperator reduce sink class " + opClass.getSimpleName());
 
+    // Get the bucketing version
+    int bucketingVersion = ((ReduceSinkOperator)op).getBucketingVersion();
+
     Operator<? extends OperatorDesc> vectorOp = null;
     try {
       vectorOp = OperatorFactory.getVectorOperator(
@@ -3819,6 +3819,10 @@ public class Vectorizer implements PhysicalPlanResolver {
       throw new HiveException(e);
     }
 
+    // Set the bucketing version
+    Preconditions.checkArgument(vectorOp instanceof VectorReduceSinkCommonOperator);
+    vectorOp.setBucketingVersion(bucketingVersion);
+
     return vectorOp;
   }
 
@@ -4026,6 +4030,8 @@ public class Vectorizer implements PhysicalPlanResolver {
     vectorDesc.setHasDistinctColumns(hasDistinctColumns);
     vectorDesc.setIsKeyBinarySortable(isKeyBinarySortable);
     vectorDesc.setIsValueLazyBinary(isValueLazyBinary);
+    vectorDesc.setIsAcidChange(desc.getWriteType() == AcidUtils.Operation.DELETE ||
+                               desc.getWriteType() == AcidUtils.Operation.UPDATE);
 
     // This indicates we logged an inconsistency (from our point-of-view) and will not make this
     // operator native...

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/optimizer/spark/SparkMapJoinOptimizer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/spark/SparkMapJoinOptimizer.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/spark/SparkMapJoinOptimizer.java
index 7b1fd5f..8e75db9 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/spark/SparkMapJoinOptimizer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/spark/SparkMapJoinOptimizer.java
@@ -121,7 +121,8 @@ public class SparkMapJoinOptimizer implements NodeProcessor {
     }
 
     // we can set the traits for this join operator
-    OpTraits opTraits = new OpTraits(bucketColNames, numBuckets, null, joinOp.getOpTraits().getNumReduceSinks());
+    OpTraits opTraits = new OpTraits(bucketColNames, numBuckets, null,
+            joinOp.getOpTraits().getNumReduceSinks(), joinOp.getOpTraits().getBucketingVersion());
     mapJoinOp.setOpTraits(opTraits);
     mapJoinOp.setStatistics(joinOp.getStatistics());
     setNumberOfBucketsOnChildren(mapJoinOp);

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
index 1dccf96..0205650 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
@@ -235,6 +235,7 @@ import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator;
 import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.Mode;
 import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCardinalityViolation;
 import org.apache.hadoop.hive.ql.udf.generic.GenericUDFHash;
+import org.apache.hadoop.hive.ql.udf.generic.GenericUDFMurmurHash;
 import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPOr;
 import org.apache.hadoop.hive.ql.udf.generic.GenericUDTF;
 import org.apache.hadoop.hive.ql.udf.generic.GenericUDTFInline;
@@ -8411,9 +8412,15 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
         sortCols.add(exprNode);
       }
     }
+
+    Table dest_tab = qb.getMetaData().getDestTableForAlias(dest);
+    AcidUtils.Operation acidOp = Operation.NOT_ACID;
+    if (AcidUtils.isFullAcidTable(dest_tab)) {
+      acidOp = getAcidType(Utilities.getTableDesc(dest_tab).getOutputFileFormatClass(), dest);
+    }
     Operator result = genReduceSinkPlan(
         input, partCols, sortCols, order.toString(), nullOrder.toString(),
-        numReducers, Operation.NOT_ACID, true);
+        numReducers, acidOp, true);
     if (result.getParentOperators().size() == 1 &&
         result.getParentOperators().get(0) instanceof ReduceSinkOperator) {
       ((ReduceSinkOperator) result.getParentOperators().get(0))
@@ -10806,7 +10813,8 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
    */
   private ExprNodeDesc genSamplePredicate(TableSample ts,
                                           List<String> bucketCols, boolean useBucketCols, String alias,
-                                          RowResolver rwsch, QBMetaData qbm, ExprNodeDesc planExpr)
+                                          RowResolver rwsch, QBMetaData qbm, ExprNodeDesc planExpr,
+                                          int bucketingVersion)
       throws SemanticException {
 
     ExprNodeDesc numeratorExpr = new ExprNodeConstantDesc(
@@ -10836,22 +10844,19 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
     ExprNodeDesc equalsExpr = null;
     {
       ExprNodeDesc hashfnExpr = new ExprNodeGenericFuncDesc(
-          TypeInfoFactory.intTypeInfo, new GenericUDFHash(), args);
-      assert (hashfnExpr != null);
+          TypeInfoFactory.intTypeInfo,
+              bucketingVersion == 2 ? new GenericUDFMurmurHash() : new GenericUDFHash(), args);
       LOG.info("hashfnExpr = " + hashfnExpr);
       ExprNodeDesc andExpr = TypeCheckProcFactory.DefaultExprProcessor
           .getFuncExprNodeDesc("&", hashfnExpr, intMaxExpr);
-      assert (andExpr != null);
       LOG.info("andExpr = " + andExpr);
       ExprNodeDesc modExpr = TypeCheckProcFactory.DefaultExprProcessor
           .getFuncExprNodeDesc("%", andExpr, denominatorExpr);
-      assert (modExpr != null);
       LOG.info("modExpr = " + modExpr);
       LOG.info("numeratorExpr = " + numeratorExpr);
       equalsExpr = TypeCheckProcFactory.DefaultExprProcessor
           .getFuncExprNodeDesc("==", modExpr, numeratorExpr);
       LOG.info("equalsExpr = " + equalsExpr);
-      assert (equalsExpr != null);
     }
     return equalsExpr;
   }
@@ -10952,6 +10957,9 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
         topToTableProps.put(top, properties);
         tsDesc.setOpProps(properties);
       }
+
+      // Set the bucketing Version
+      top.setBucketingVersion(tsDesc.getTableMetadata().getBucketingVersion());
     } else {
       rwsch = opParseCtx.get(top).getRowResolver();
       top.setChildOperators(null);
@@ -11020,7 +11028,8 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
         // later
         LOG.info("No need for sample filter");
         ExprNodeDesc samplePredicate = genSamplePredicate(ts, tabBucketCols,
-            colsEqual, alias, rwsch, qb.getMetaData(), null);
+            colsEqual, alias, rwsch, qb.getMetaData(), null,
+                tab.getBucketingVersion());
         FilterDesc filterDesc = new FilterDesc(
             samplePredicate, true, new SampleDesc(ts.getNumerator(),
             ts.getDenominator(), tabBucketCols, true));
@@ -11032,7 +11041,8 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
         // create tableOp to be filterDesc and set as child to 'top'
         LOG.info("Need sample filter");
         ExprNodeDesc samplePredicate = genSamplePredicate(ts, tabBucketCols,
-            colsEqual, alias, rwsch, qb.getMetaData(), null);
+            colsEqual, alias, rwsch, qb.getMetaData(), null,
+                tab.getBucketingVersion());
         FilterDesc filterDesc = new FilterDesc(samplePredicate, true);
         filterDesc.setGenerated(true);
         op = OperatorFactory.getAndMakeChild(filterDesc,
@@ -11063,7 +11073,8 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
             tsSample.setInputPruning(true);
             qb.getParseInfo().setTabSample(alias, tsSample);
             ExprNodeDesc samplePred = genSamplePredicate(tsSample, tab
-                .getBucketCols(), true, alias, rwsch, qb.getMetaData(), null);
+                .getBucketCols(), true, alias, rwsch, qb.getMetaData(), null,
+                    tab.getBucketingVersion());
             FilterDesc filterDesc = new FilterDesc(samplePred, true,
                 new SampleDesc(tsSample.getNumerator(), tsSample
                     .getDenominator(), tab.getBucketCols(), true));
@@ -11082,7 +11093,7 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
                 .getFuncExprNodeDesc("rand", new ExprNodeConstantDesc(Integer
                     .valueOf(460476415)));
             ExprNodeDesc samplePred = genSamplePredicate(tsSample, null, false,
-                alias, rwsch, qb.getMetaData(), randFunc);
+                alias, rwsch, qb.getMetaData(), randFunc, tab.getBucketingVersion());
             FilterDesc filterDesc = new FilterDesc(samplePred, true);
             filterDesc.setGenerated(true);
             op = OperatorFactory.getAndMakeChild(filterDesc,

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/plan/OpTraits.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/OpTraits.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/OpTraits.java
index 9621c3b..d3b62ce 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/OpTraits.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/OpTraits.java
@@ -22,17 +22,20 @@ import java.util.List;
 
 public class OpTraits {
 
-  List<List<String>> bucketColNames;
-  List<List<String>> sortColNames;
-  int numBuckets;
-  int numReduceSinks;
+  private List<List<String>> bucketColNames;
+  private List<List<String>> sortColNames;
+  private int numBuckets;
+  private int numReduceSinks;
+  private int bucketingVersion;
 
   public OpTraits(List<List<String>> bucketColNames, int numBuckets,
-      List<List<String>> sortColNames, int numReduceSinks) {
+      List<List<String>> sortColNames, int numReduceSinks,
+                  int bucketingVersion) {
     this.bucketColNames = bucketColNames;
     this.numBuckets = numBuckets;
     this.sortColNames = sortColNames;
     this.numReduceSinks = numReduceSinks;
+    this.bucketingVersion = bucketingVersion;
   }
 
   public List<List<String>> getBucketColNames() {
@@ -68,10 +71,17 @@ public class OpTraits {
     return this.numReduceSinks;
   }
 
-  
+  public void setBucketingVersion(int bucketingVersion) {
+    this.bucketingVersion = bucketingVersion;
+  }
+
+  public int getBucketingVersion() {
+    return bucketingVersion;
+  }
+
   @Override
   public String toString() {
     return "{ bucket column names: " + bucketColNames + "; sort column names: "
-        + sortColNames + "; bucket count: " + numBuckets + " }";
+        + sortColNames + "; bucket count: " + numBuckets + "; bucketing version: " + bucketingVersion + " }";
   }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java
index 056dfa4..2c5b655 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java
@@ -790,7 +790,7 @@ public final class PlanUtils {
     return new ReduceSinkDesc(keyCols, numKeys, valueCols, outputKeyCols,
         distinctColIndices, outputValCols,
         tag, partitionCols, numReducers, keyTable,
-        valueTable);
+        valueTable, writeType);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/plan/ReduceSinkDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/ReduceSinkDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/ReduceSinkDesc.java
index aa3c72b..61216bc 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/ReduceSinkDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/ReduceSinkDesc.java
@@ -27,6 +27,7 @@ import java.util.Objects;
 import java.util.Set;
 
 import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.hive.ql.io.AcidUtils;
 import org.apache.hadoop.hive.ql.optimizer.signature.Signature;
 import org.apache.hadoop.hive.ql.plan.Explain.Level;
 import org.apache.hadoop.hive.ql.plan.Explain.Vectorization;
@@ -127,6 +128,8 @@ public class ReduceSinkDesc extends AbstractOperatorDesc {
 
   private static transient Logger LOG = LoggerFactory.getLogger(ReduceSinkDesc.class);
 
+  private AcidUtils.Operation writeType;
+
   public ReduceSinkDesc() {
   }
 
@@ -137,7 +140,8 @@ public class ReduceSinkDesc extends AbstractOperatorDesc {
       List<List<Integer>> distinctColumnIndices,
       ArrayList<String> outputValueColumnNames, int tag,
       ArrayList<ExprNodeDesc> partitionCols, int numReducers,
-      final TableDesc keySerializeInfo, final TableDesc valueSerializeInfo) {
+      final TableDesc keySerializeInfo, final TableDesc valueSerializeInfo,
+      AcidUtils.Operation writeType) {
     this.keyCols = keyCols;
     this.numDistributionKeys = numDistributionKeys;
     this.valueCols = valueCols;
@@ -151,6 +155,7 @@ public class ReduceSinkDesc extends AbstractOperatorDesc {
     this.distinctColumnIndices = distinctColumnIndices;
     this.setNumBuckets(-1);
     this.setBucketCols(null);
+    this.writeType = writeType;
   }
 
   @Override
@@ -669,4 +674,7 @@ public class ReduceSinkDesc extends AbstractOperatorDesc {
     return false;
   }
 
+  public AcidUtils.Operation getWriteType() {
+    return writeType;
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/plan/TableDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/TableDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/TableDesc.java
index 25b9189..4068e56 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/TableDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/TableDesc.java
@@ -184,6 +184,11 @@ public class TableDesc implements Serializable, Cloneable {
     return (properties.getProperty(hive_metastoreConstants.META_TABLE_STORAGE) != null);
   }
 
+  public int getBucketingVersion() {
+    return Utilities.getBucketingVersion(
+        properties.getProperty(hive_metastoreConstants.TABLE_BUCKETING_VERSION));
+  }
+
   @Override
   public Object clone() {
     TableDesc ret = new TableDesc();

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/plan/VectorReduceSinkDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/VectorReduceSinkDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/VectorReduceSinkDesc.java
index adea3b5..97e4284 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/VectorReduceSinkDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/VectorReduceSinkDesc.java
@@ -73,6 +73,7 @@ public class VectorReduceSinkDesc extends AbstractVectorDesc  {
   private boolean isKeyBinarySortable;
   private boolean isValueLazyBinary;
   private boolean isUnexpectedCondition;
+  private boolean isAcidChange;
 
   /*
    * The following conditions are for native Vector ReduceSink.
@@ -143,4 +144,12 @@ public class VectorReduceSinkDesc extends AbstractVectorDesc  {
   public boolean getIsUnexpectedCondition() {
     return isUnexpectedCondition;
   }
+
+  public void setIsAcidChange(boolean isAcidChange) {
+    this.isAcidChange = isAcidChange;
+  }
+
+  public boolean getIsAcidChange() {
+    return isAcidChange;
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFHash.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFHash.java b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFHash.java
index 7cd5718..1a75843 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFHash.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFHash.java
@@ -29,6 +29,7 @@ import org.apache.hadoop.io.IntWritable;
 /**
  * GenericUDF Class for computing hash values.
  */
+@Deprecated
 @Description(name = "hash", value = "_FUNC_(a1, a2, ...) - Returns a hash value of the arguments")
 public class GenericUDFHash extends GenericUDF {
   private transient ObjectInspector[] argumentOIs;
@@ -48,7 +49,7 @@ public class GenericUDFHash extends GenericUDF {
     for(int i = 0; i < arguments.length; i++) {
       fieldValues[i] = arguments[i].get();
     }
-    int r = ObjectInspectorUtils.getBucketHashCode(fieldValues, argumentOIs);
+    int r = ObjectInspectorUtils.getBucketHashCodeOld(fieldValues, argumentOIs);
     result.set(r);
     return result;
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMurmurHash.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMurmurHash.java b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMurmurHash.java
new file mode 100644
index 0000000..f55ab9d
--- /dev/null
+++ b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMurmurHash.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.ql.udf.generic;
+
+import org.apache.hadoop.hive.ql.exec.Description;
+import org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException;
+import org.apache.hadoop.hive.ql.metadata.HiveException;
+import org.apache.hadoop.hive.serde2.ByteStream;
+import org.apache.hadoop.hive.serde2.SerDeException;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils;
+import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
+import org.apache.hadoop.io.IntWritable;
+import org.apache.hive.common.util.Murmur3;
+
+/**
+ * GenericUDF Class for computing murmurhash values.
+ */
+@Description(name = "hash", value = "_FUNC_(a1, a2, ...) - Returns a hash value of the arguments")
+public class GenericUDFMurmurHash extends GenericUDF {
+  private transient ObjectInspector[] argumentOIs;
+
+  @Override
+  public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentTypeException {
+
+    argumentOIs = arguments;
+    return PrimitiveObjectInspectorFactory.writableIntObjectInspector;
+  }
+
+  private final IntWritable result = new IntWritable();
+
+  @Override
+  public Object evaluate(DeferredObject[] arguments) throws HiveException {
+    Object[] fieldValues = new Object[arguments.length];
+    for(int i = 0; i < arguments.length; i++) {
+      fieldValues[i] = arguments[i].get();
+    }
+    int r = ObjectInspectorUtils.getBucketHashCode(fieldValues, argumentOIs);
+    result.set(r);
+    return result;
+  }
+
+  @Override
+  public String getDisplayString(String[] children) {
+    return getStandardDisplayString("hash", children, ",");
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/org/apache/hadoop/hive/ql/TestTxnAddPartition.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnAddPartition.java b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnAddPartition.java
index 7f7bc11..589e3b7 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnAddPartition.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnAddPartition.java
@@ -63,6 +63,7 @@ public class TestTxnAddPartition extends TxnCommandsBaseForTests {
 
   @Test
   public void addPartition() throws Exception {
+
     addPartition(false);
   }
 
@@ -222,9 +223,9 @@ public class TestTxnAddPartition extends TxnCommandsBaseForTests {
     List<String> rs = runStatementOnDriver(
         "select ROW__ID, p, a, b, INPUT__FILE__NAME from T order by p, ROW__ID");
     String[][] expected = new String[][]{
-        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":0}\t0\t0\t2",
-            "warehouse/t/p=0/delta_0000001_0000001_0000/000000_0"},
         {"{\"writeid\":1,\"bucketid\":536936448,\"rowid\":0}\t0\t1\t4",
+            "warehouse/t/p=0/delta_0000001_0000001_0000/000001_0"},
+        {"{\"writeid\":1,\"bucketid\":536936448,\"rowid\":1}\t0\t0\t2",
             "warehouse/t/p=0/delta_0000001_0000001_0000/000001_0"}};
     checkExpected(rs, expected, "add partition (p=0)");
   }
@@ -238,7 +239,7 @@ public class TestTxnAddPartition extends TxnCommandsBaseForTests {
    * renamed during add.
    */
   @Test
-  public void addPartitionReaname() throws Exception {
+  public void addPartitionRename() throws Exception {
     runStatementOnDriver("drop table if exists T");
     runStatementOnDriver("drop table if exists Tstage");
     runStatementOnDriver("create table T (a int, b int) partitioned by (p int) " +
@@ -261,9 +262,9 @@ public class TestTxnAddPartition extends TxnCommandsBaseForTests {
     List<String> rs = runStatementOnDriver(
         "select ROW__ID, p, a, b, INPUT__FILE__NAME from T order by p, ROW__ID");
     String[][] expected = new String[][]{
-        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":0}\t0\t0\t2",
-            "warehouse/t/p=0/delta_0000001_0000001_0000/000000_0"},
         {"{\"writeid\":1,\"bucketid\":536936448,\"rowid\":0}\t0\t1\t4",
+            "warehouse/t/p=0/delta_0000001_0000001_0000/000001_0"},
+        {"{\"writeid\":1,\"bucketid\":536936448,\"rowid\":1}\t0\t0\t2",
             "warehouse/t/p=0/delta_0000001_0000001_0000/000001_0"}};
     checkExpected(rs, expected, "add partition (p=0)");
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands.java b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands.java
index 12d57c6..6a3be39 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands.java
@@ -765,13 +765,13 @@ public class TestTxnCommands extends TxnCommandsBaseForTests {
       BucketCodec.V1.encode(new AcidOutputFormat.Options(hiveConf).bucket(1)));
     Assert.assertEquals("", 4, rs.size());
     Assert.assertTrue(rs.get(0),
-            rs.get(0).startsWith("{\"writeid\":0,\"bucketid\":536870912,\"rowid\":0}\t0\t12"));
-    Assert.assertTrue(rs.get(0), rs.get(0).endsWith("nonacidorctbl/000000_0_copy_1"));
+            rs.get(0).startsWith("{\"writeid\":0,\"bucketid\":536936448,\"rowid\":0}\t1\t2"));
+    Assert.assertTrue(rs.get(0), rs.get(0).endsWith("nonacidorctbl/000001_0"));
     Assert.assertTrue(rs.get(1),
-            rs.get(1).startsWith("{\"writeid\":0,\"bucketid\":536936448,\"rowid\":0}\t1\t2"));
-    Assert.assertTrue(rs.get(1), rs.get(1).endsWith("nonacidorctbl/000001_0"));
+            rs.get(1).startsWith("{\"writeid\":0,\"bucketid\":536936448,\"rowid\":1}\t1\t5"));
+    Assert.assertTrue(rs.get(1), rs.get(1).endsWith("nonacidorctbl/000001_0_copy_1"));
     Assert.assertTrue(rs.get(2),
-            rs.get(2).startsWith("{\"writeid\":0,\"bucketid\":536936448,\"rowid\":1}\t1\t5"));
+            rs.get(2).startsWith("{\"writeid\":0,\"bucketid\":536936448,\"rowid\":2}\t0\t12"));
     Assert.assertTrue(rs.get(2), rs.get(2).endsWith("nonacidorctbl/000001_0_copy_1"));
     Assert.assertTrue(rs.get(3),
             rs.get(3).startsWith("{\"writeid\":1,\"bucketid\":536936448,\"rowid\":0}\t1\t17"));
@@ -786,13 +786,13 @@ public class TestTxnCommands extends TxnCommandsBaseForTests {
     }
     Assert.assertEquals("", 4, rs.size());
     Assert.assertTrue(rs.get(0),
-            rs.get(0).startsWith("{\"writeid\":0,\"bucketid\":536870912,\"rowid\":0}\t0\t12"));
-    Assert.assertTrue(rs.get(0), rs.get(0).endsWith("nonacidorctbl/base_0000001/bucket_00000"));
+            rs.get(0).startsWith("{\"writeid\":0,\"bucketid\":536936448,\"rowid\":0}\t1\t2"));
+    Assert.assertTrue(rs.get(0), rs.get(0).endsWith("nonacidorctbl/base_0000001/bucket_00001"));
     Assert.assertTrue(rs.get(1),
-            rs.get(1).startsWith("{\"writeid\":0,\"bucketid\":536936448,\"rowid\":0}\t1\t2"));
+            rs.get(1).startsWith("{\"writeid\":0,\"bucketid\":536936448,\"rowid\":1}\t1\t5"));
     Assert.assertTrue(rs.get(1), rs.get(1).endsWith("nonacidorctbl/base_0000001/bucket_00001"));
     Assert.assertTrue(rs.get(2),
-            rs.get(2).startsWith("{\"writeid\":0,\"bucketid\":536936448,\"rowid\":1}\t1\t5"));
+            rs.get(2).startsWith("{\"writeid\":0,\"bucketid\":536936448,\"rowid\":2}\t0\t12"));
     Assert.assertTrue(rs.get(2), rs.get(2).endsWith("nonacidorctbl/base_0000001/bucket_00001"));
     Assert.assertTrue(rs.get(3),
             rs.get(3).startsWith("{\"writeid\":1,\"bucketid\":536936448,\"rowid\":0}\t1\t17"));
@@ -820,7 +820,7 @@ public class TestTxnCommands extends TxnCommandsBaseForTests {
     int[][] expected = {{0, -1}, {1, -1}, {3, -1}};
     Assert.assertEquals(stringifyValues(expected), r);
   }
-  //@Ignore("see bucket_num_reducers_acid2.q")
+  @Ignore("Moved to Tez")
   @Test
   public void testMoreBucketsThanReducers2() throws Exception {
     //todo: try using set VerifyNumReducersHook.num.reducers=10;

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java
index dc19752..e882e40 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java
@@ -368,14 +368,14 @@ public class TestTxnCommands2 {
      * Note: order of rows in a file ends up being the reverse of order in values clause (why?!)
      */
     String[][] expected = {
-        {"{\"writeid\":0,\"bucketid\":536870912,\"rowid\":0}\t0\t13",  "bucket_00000"},
-        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":0}\t0\t15", "bucket_00000"},
-        {"{\"writeid\":3,\"bucketid\":536870912,\"rowid\":0}\t0\t17", "bucket_00000"},
-        {"{\"writeid\":2,\"bucketid\":536870912,\"rowid\":0}\t0\t120", "bucket_00000"},
+        {"{\"writeid\":0,\"bucketid\":536936448,\"rowid\":4}\t0\t13",  "bucket_00001"},
+        {"{\"writeid\":1,\"bucketid\":536936448,\"rowid\":1}\t0\t15", "bucket_00001"},
+        {"{\"writeid\":3,\"bucketid\":536936448,\"rowid\":0}\t0\t17", "bucket_00001"},
+        {"{\"writeid\":2,\"bucketid\":536936448,\"rowid\":0}\t0\t120", "bucket_00001"},
         {"{\"writeid\":0,\"bucketid\":536936448,\"rowid\":1}\t1\t2",   "bucket_00001"},
         {"{\"writeid\":0,\"bucketid\":536936448,\"rowid\":3}\t1\t4",   "bucket_00001"},
         {"{\"writeid\":0,\"bucketid\":536936448,\"rowid\":2}\t1\t5",   "bucket_00001"},
-        {"{\"writeid\":0,\"bucketid\":536936448,\"rowid\":4}\t1\t6",   "bucket_00001"},
+        {"{\"writeid\":0,\"bucketid\":536936448,\"rowid\":6}\t1\t6",   "bucket_00001"},
         {"{\"writeid\":1,\"bucketid\":536936448,\"rowid\":0}\t1\t16", "bucket_00001"}
     };
     Assert.assertEquals("Unexpected row count before compaction", expected.length, rs.size());
@@ -469,7 +469,7 @@ public class TestTxnCommands2 {
         sawNewDelta = true;
         FileStatus[] buckets = fs.listStatus(status[i].getPath(), FileUtils.HIDDEN_FILES_PATH_FILTER);
         Assert.assertEquals(1, buckets.length); // only one bucket file
-        Assert.assertTrue(buckets[0].getPath().getName().matches("bucket_00001"));
+        Assert.assertTrue(buckets[0].getPath().getName().matches("bucket_00000"));
       } else {
         Assert.assertTrue(status[i].getPath().getName().matches("00000[01]_0"));
       }
@@ -495,14 +495,14 @@ public class TestTxnCommands2 {
       if (status[i].getPath().getName().matches("base_.*")) {
         sawNewBase = true;
         FileStatus[] buckets = fs.listStatus(status[i].getPath(), FileUtils.HIDDEN_FILES_PATH_FILTER);
-        Assert.assertEquals(1, buckets.length);
+        Assert.assertEquals(2, buckets.length);
         Assert.assertTrue(buckets[0].getPath().getName().matches("bucket_00001"));
       }
     }
     Assert.assertTrue(sawNewBase);
     rs = runStatementOnDriver("select a,b from " + Table.NONACIDORCTBL);
-    resultData = new int[][] {{1, 2}, {3, 4}};
-    Assert.assertEquals(stringifyValues(resultData), rs);
+    resultData = new int[][] {{3, 4}, {1, 2}};
+    Assert.assertEquals(stringifyValuesNoSort(resultData), rs);
     rs = runStatementOnDriver("select count(*) from " + Table.NONACIDORCTBL);
     resultCount = 2;
     Assert.assertEquals(resultCount, Integer.parseInt(rs.get(0)));
@@ -528,11 +528,11 @@ public class TestTxnCommands2 {
     Assert.assertEquals(1, status.length);
     Assert.assertTrue(status[0].getPath().getName().matches("base_.*"));
     FileStatus[] buckets = fs.listStatus(status[0].getPath(), FileUtils.HIDDEN_FILES_PATH_FILTER);
-    Assert.assertEquals(1, buckets.length);
+    Assert.assertEquals(2, buckets.length);
     Assert.assertTrue(buckets[0].getPath().getName().matches("bucket_00001"));
     rs = runStatementOnDriver("select a,b from " + Table.NONACIDORCTBL);
-    resultData = new int[][] {{1, 2}, {3, 4}};
-    Assert.assertEquals(stringifyValues(resultData), rs);
+    resultData = new int[][] {{3, 4}, {1, 2}};
+    Assert.assertEquals(stringifyValuesNoSort(resultData), rs);
     rs = runStatementOnDriver("select count(*) from " + Table.NONACIDORCTBL);
     resultCount = 2;
     Assert.assertEquals(resultCount, Integer.parseInt(rs.get(0)));
@@ -767,7 +767,7 @@ public class TestTxnCommands2 {
         } else if (numDelta == 2) {
           Assert.assertEquals("delta_0000002_0000002_0000", status[i].getPath().getName());
           Assert.assertEquals(1, buckets.length);
-          Assert.assertEquals("bucket_00001", buckets[0].getPath().getName());
+          Assert.assertEquals("bucket_00000", buckets[0].getPath().getName());
         }
       } else if (status[i].getPath().getName().matches("delete_delta_.*")) {
         numDeleteDelta++;
@@ -822,15 +822,15 @@ public class TestTxnCommands2 {
         } else if (numBase == 2) {
           // The new base dir now has two bucket files, since the delta dir has two bucket files
           Assert.assertEquals("base_0000002", status[i].getPath().getName());
-          Assert.assertEquals(1, buckets.length);
-          Assert.assertEquals("bucket_00001", buckets[0].getPath().getName());
+          Assert.assertEquals(2, buckets.length);
+          Assert.assertEquals("bucket_00000", buckets[0].getPath().getName());
         }
       }
     }
     Assert.assertEquals(2, numBase);
     rs = runStatementOnDriver("select a,b from " + Table.NONACIDORCTBL);
-    resultData = new int[][] {{1, 3}, {3, 4}};
-    Assert.assertEquals(stringifyValues(resultData), rs);
+    resultData = new int[][] {{3, 4}, {1, 3}};
+    Assert.assertEquals(stringifyValuesNoSort(resultData), rs);
     rs = runStatementOnDriver("select count(*) from " + Table.NONACIDORCTBL);
     resultCount = 2;
     Assert.assertEquals(resultCount, Integer.parseInt(rs.get(0)));
@@ -850,11 +850,11 @@ public class TestTxnCommands2 {
     Assert.assertEquals("base_0000002", status[0].getPath().getName());
     FileStatus[] buckets = fs.listStatus(status[0].getPath(), FileUtils.HIDDEN_FILES_PATH_FILTER);
     Arrays.sort(buckets);
-    Assert.assertEquals(1, buckets.length);
-    Assert.assertEquals("bucket_00001", buckets[0].getPath().getName());
+    Assert.assertEquals(2, buckets.length);
+    Assert.assertEquals("bucket_00000", buckets[0].getPath().getName());
     rs = runStatementOnDriver("select a,b from " + Table.NONACIDORCTBL);
-    resultData = new int[][] {{1, 3}, {3, 4}};
-    Assert.assertEquals(stringifyValues(resultData), rs);
+    resultData = new int[][] {{3, 4}, {1, 3}};
+    Assert.assertEquals(stringifyValuesNoSort(resultData), rs);
     rs = runStatementOnDriver("select count(*) from " + Table.NONACIDORCTBL);
     resultCount = 2;
     Assert.assertEquals(resultCount, Integer.parseInt(rs.get(0)));
@@ -2176,6 +2176,27 @@ public class TestTxnCommands2 {
     }
     return rs;
   }
+
+  /**
+   * takes raw data and turns it into a string as if from Driver.getResults()
+   * sorts rows in dictionary order
+   */
+  static List<String> stringifyValuesNoSort(int[][] rowsIn) {
+    assert rowsIn.length > 0;
+    int[][] rows = rowsIn.clone();
+    List<String> rs = new ArrayList<String>();
+    for(int[] row : rows) {
+      assert row.length > 0;
+      StringBuilder sb = new StringBuilder();
+      for(int value : row) {
+        sb.append(value).append("\t");
+      }
+      sb.setLength(sb.length() - 1);
+      rs.add(sb.toString());
+    }
+    return rs;
+  }
+
   static class RowComp implements Comparator<int[]> {
     @Override
     public int compare(int[] row1, int[] row2) {

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/org/apache/hadoop/hive/ql/TestTxnNoBuckets.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnNoBuckets.java b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnNoBuckets.java
index 4b2f961..af43b14 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnNoBuckets.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnNoBuckets.java
@@ -184,7 +184,7 @@ public class TestTxnNoBuckets extends TxnCommandsBaseForTests {
     List<String> rs = runStatementOnDriver("select ROW__ID, a, b, INPUT__FILE__NAME from myctas order by ROW__ID");
     String expected[][] = {
         {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":0}\t3\t4", "warehouse/myctas/delta_0000001_0000001_0000/bucket_00000"},
-        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t2", "warehouse/myctas/delta_0000001_0000001_0000/bucket_00000"},
+        {"{\"writeid\":1,\"bucketid\":536936448,\"rowid\":0}\t1\t2", "warehouse/myctas/delta_0000001_0000001_0000/bucket_00001"},
     };
     checkExpected(rs, expected, "Unexpected row count after ctas from non acid table");
 
@@ -195,7 +195,7 @@ public class TestTxnNoBuckets extends TxnCommandsBaseForTests {
     rs = runStatementOnDriver("select ROW__ID, a, b, INPUT__FILE__NAME from myctas2 order by ROW__ID");
     String expected2[][] = {
         {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":0}\t3\t4", "warehouse/myctas2/delta_0000001_0000001_0000/bucket_00000"},
-        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t2", "warehouse/myctas2/delta_0000001_0000001_0000/bucket_00000"}
+        {"{\"writeid\":1,\"bucketid\":536936448,\"rowid\":0}\t1\t2", "warehouse/myctas2/delta_0000001_0000001_0000/bucket_00001"}
     };
     checkExpected(rs, expected2, "Unexpected row count after ctas from acid table");
 
@@ -204,10 +204,10 @@ public class TestTxnNoBuckets extends TxnCommandsBaseForTests {
       " union all select a, b from " + Table.ACIDTBL);
     rs = runStatementOnDriver("select ROW__ID, a, b, INPUT__FILE__NAME from myctas3 order by ROW__ID");
     String expected3[][] = {
-        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":0}\t3\t4", "warehouse/myctas3/delta_0000001_0000001_0000/bucket_00000"},
-        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t2", "warehouse/myctas3/delta_0000001_0000001_0000/bucket_00000"},
+        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "warehouse/myctas3/delta_0000001_0000001_0000/bucket_00000"},
         {"{\"writeid\":1,\"bucketid\":536936448,\"rowid\":0}\t3\t4", "warehouse/myctas3/delta_0000001_0000001_0000/bucket_00001"},
-        {"{\"writeid\":1,\"bucketid\":536936448,\"rowid\":1}\t1\t2", "warehouse/myctas3/delta_0000001_0000001_0000/bucket_00001"},
+        {"{\"writeid\":1,\"bucketid\":537001984,\"rowid\":0}\t3\t4", "warehouse/myctas3/delta_0000001_0000001_0000/bucket_00002"},
+        {"{\"writeid\":1,\"bucketid\":537067520,\"rowid\":0}\t1\t2", "warehouse/myctas3/delta_0000001_0000001_0000/bucket_00003"},
     };
     checkExpected(rs, expected3, "Unexpected row count after ctas from union all query");
 
@@ -269,9 +269,9 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
     String expected[][] = {
         {"{\"writeid\":1,\"bucketid\":536870913,\"rowid\":0}\t1\t2", "/delta_0000001_0000001_0001/bucket_00000"},
         {"{\"writeid\":1,\"bucketid\":536870913,\"rowid\":1}\t3\t4", "/delta_0000001_0000001_0001/bucket_00000"},
-        {"{\"writeid\":1,\"bucketid\":536870914,\"rowid\":0}\t7\t8", "/delta_0000001_0000001_0002/bucket_00000"},
-        {"{\"writeid\":1,\"bucketid\":536870914,\"rowid\":1}\t5\t6", "/delta_0000001_0000001_0002/bucket_00000"},
+        {"{\"writeid\":1,\"bucketid\":536870914,\"rowid\":0}\t5\t6", "/delta_0000001_0000001_0002/bucket_00000"},
         {"{\"writeid\":1,\"bucketid\":536870915,\"rowid\":0}\t9\t10", "/delta_0000001_0000001_0003/bucket_00000"},
+        {"{\"writeid\":1,\"bucketid\":536936450,\"rowid\":0}\t7\t8", "/delta_0000001_0000001_0002/bucket_00001"},
     };
     checkExpected(rs, expected, "Unexpected row count after ctas");
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/org/apache/hadoop/hive/ql/parse/authorization/TestPrivilegesV1.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/parse/authorization/TestPrivilegesV1.java b/ql/src/test/org/apache/hadoop/hive/ql/parse/authorization/TestPrivilegesV1.java
index 4a33885..1fa11fc 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/parse/authorization/TestPrivilegesV1.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/parse/authorization/TestPrivilegesV1.java
@@ -41,9 +41,9 @@ public class TestPrivilegesV1 extends PrivilegesTestBase{
   public void setup() throws Exception {
     queryState = new QueryState.Builder().build();
     db = Mockito.mock(Hive.class);
+    HiveConf hiveConf = queryState.getConf();
     table = new Table(DB, TABLE);
     partition = new Partition(table);
-    HiveConf hiveConf = queryState.getConf();
     hiveConf
     .setVar(HiveConf.ConfVars.HIVE_AUTHORIZATION_MANAGER,
         "org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory");

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/queries/clientpositive/archive_excludeHadoop20.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/archive_excludeHadoop20.q b/ql/src/test/queries/clientpositive/archive_excludeHadoop20.q
index 75bd579..6d5e2ac 100644
--- a/ql/src/test/queries/clientpositive/archive_excludeHadoop20.q
+++ b/ql/src/test/queries/clientpositive/archive_excludeHadoop20.q
@@ -47,7 +47,7 @@ CREATE TABLE harbucket(key INT)
 PARTITIONED by (ds STRING)
 CLUSTERED BY (key) INTO 10 BUCKETS;
 
-INSERT OVERWRITE TABLE harbucket PARTITION(ds='1') SELECT CAST(key AS INT) AS a FROM tstsrc WHERE key < 50;
+INSERT OVERWRITE TABLE harbucket PARTITION(ds='1') SELECT CAST(key AS INT) AS a FROM tstsrc WHERE key > 50;
 
 SELECT key FROM harbucket TABLESAMPLE(BUCKET 1 OUT OF 10) SORT BY key;
 ALTER TABLE tstsrcpart ARCHIVE PARTITION (ds='2008-04-08', hr='12');
@@ -59,7 +59,7 @@ SELECT key FROM harbucket TABLESAMPLE(BUCKET 1 OUT OF 10) SORT BY key;
 CREATE TABLE old_name(key INT)
 PARTITIONED by (ds STRING);
 
-INSERT OVERWRITE TABLE old_name PARTITION(ds='1') SELECT CAST(key AS INT) AS a FROM tstsrc WHERE key < 50;
+INSERT OVERWRITE TABLE old_name PARTITION(ds='1') SELECT CAST(key AS INT) AS a FROM tstsrc WHERE key > 50;
 ALTER TABLE old_name ARCHIVE PARTITION (ds='1');
 SELECT SUM(hash(col)) FROM (SELECT transform(*) using 'tr "\t" "_"' AS col
 FROM (SELECT * FROM old_name WHERE ds='1') subq1) subq2;

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/queries/clientpositive/bucket_many.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/bucket_many.q b/ql/src/test/queries/clientpositive/bucket_many.q
index 6cd3004..8abcdc7 100644
--- a/ql/src/test/queries/clientpositive/bucket_many.q
+++ b/ql/src/test/queries/clientpositive/bucket_many.q
@@ -12,6 +12,6 @@ insert overwrite table bucket_many
 select * from src;
 
 explain
-select * from bucket_many tablesample (bucket 1 out of 256) s;
+select * from bucket_many tablesample (bucket 2 out of 256) s;
 
-select * from bucket_many tablesample (bucket 1 out of 256) s;
+select * from bucket_many tablesample (bucket 2 out of 256) s;

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/queries/clientpositive/bucket_map_join_tez1.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/bucket_map_join_tez1.q b/ql/src/test/queries/clientpositive/bucket_map_join_tez1.q
index 725dd4c..5622ce2 100644
--- a/ql/src/test/queries/clientpositive/bucket_map_join_tez1.q
+++ b/ql/src/test/queries/clientpositive/bucket_map_join_tez1.q
@@ -227,7 +227,7 @@ from tab1 a join tab_part b on a.key = b.key;
 
 -- No map joins should be created.
 set hive.convert.join.bucket.mapjoin.tez = false;
-set hive.auto.convert.join.noconditionaltask.size=1500;
+set hive.auto.convert.join.noconditionaltask.size=15000;
 explain select a.key, b.key from tab_part a join tab_part c on a.key = c.key join tab_part b on a.value = b.value;
 set hive.convert.join.bucket.mapjoin.tez = true;
 explain select a.key, b.key from tab_part a join tab_part c on a.key = c.key join tab_part b on a.value = b.value;

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/queries/clientpositive/bucket_num_reducers.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/bucket_num_reducers.q b/ql/src/test/queries/clientpositive/bucket_num_reducers.q
index 48f7b75..6345166 100644
--- a/ql/src/test/queries/clientpositive/bucket_num_reducers.q
+++ b/ql/src/test/queries/clientpositive/bucket_num_reducers.q
@@ -9,11 +9,10 @@ set mapred.reduce.tasks = 10;
 -- and uses a post-hook to confirm that 10 tasks were created
 
 CREATE TABLE bucket_nr(key int, value string) CLUSTERED BY (key) INTO 50 BUCKETS;
-set hive.exec.post.hooks=org.apache.hadoop.hive.ql.hooks.VerifyNumReducersHook;
-set VerifyNumReducersHook.num.reducers=10;
 
+explain extended insert overwrite table bucket_nr
+  select * from src;
 insert overwrite table bucket_nr
 select * from src;
 
-set hive.exec.post.hooks=;
 drop table bucket_nr;

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/queries/clientpositive/bucket_num_reducers2.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/bucket_num_reducers2.q b/ql/src/test/queries/clientpositive/bucket_num_reducers2.q
index 6d5716d..40965da 100644
--- a/ql/src/test/queries/clientpositive/bucket_num_reducers2.q
+++ b/ql/src/test/queries/clientpositive/bucket_num_reducers2.q
@@ -8,10 +8,10 @@ set hive.exec.reducers.max = 2;
 -- table with 3 buckets, and uses a post-hook to confirm that 1 reducer was used
 
 CREATE TABLE test_table(key int, value string) CLUSTERED BY (key) INTO 3 BUCKETS;
-set hive.exec.post.hooks=org.apache.hadoop.hive.ql.hooks.VerifyNumReducersHook;
-set VerifyNumReducersHook.num.reducers=1;
 
+explain extended insert overwrite table test_table
+  select * from src;
 insert overwrite table test_table
 select * from src;
 
-set hive.exec.post.hooks=;
+drop table test_table;

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/queries/clientpositive/bucket_num_reducers_acid2.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/bucket_num_reducers_acid2.q b/ql/src/test/queries/clientpositive/bucket_num_reducers_acid2.q
index 9776785..51b5885 100644
--- a/ql/src/test/queries/clientpositive/bucket_num_reducers_acid2.q
+++ b/ql/src/test/queries/clientpositive/bucket_num_reducers_acid2.q
@@ -10,8 +10,6 @@ set mapred.reduce.tasks = 2;
 
 drop table if exists bucket_nr_acid2;
 create table bucket_nr_acid2 (a int, b int) clustered by (a) into 4 buckets stored as orc TBLPROPERTIES ('transactional'='true');
-set hive.exec.post.hooks=org.apache.hadoop.hive.ql.hooks.VerifyNumReducersHook;
-set VerifyNumReducersHook.num.reducers=2;
 
 -- txn X write to b0 + b1
 insert into bucket_nr_acid2 values(0,1),(1,1);
@@ -27,7 +25,6 @@ insert into bucket_nr_acid2 values(2,4),(3,4);
 
 
 update bucket_nr_acid2 set b = -1;
-set hive.exec.post.hooks=;
 select * from bucket_nr_acid2 order by a, b;
 
 drop table bucket_nr_acid2;

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/queries/clientpositive/insert_update_delete.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/insert_update_delete.q b/ql/src/test/queries/clientpositive/insert_update_delete.q
index bd9f777..06f4db6 100644
--- a/ql/src/test/queries/clientpositive/insert_update_delete.q
+++ b/ql/src/test/queries/clientpositive/insert_update_delete.q
@@ -3,7 +3,6 @@ set hive.mapred.mode=nonstrict;
 set hive.support.concurrency=true;
 set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
 
-
 create table acid_iud(a int, b varchar(128)) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true');
 
 insert into table acid_iud select cint, cast(cstring1 as varchar(128)) from alltypesorc where cint < 0 order by cint limit 10;

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/queries/clientpositive/sample10.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/sample10.q b/ql/src/test/queries/clientpositive/sample10.q
index 7c2de2e..b0aab14 100644
--- a/ql/src/test/queries/clientpositive/sample10.q
+++ b/ql/src/test/queries/clientpositive/sample10.q
@@ -17,9 +17,9 @@ create table srcpartbucket (key string, value string) partitioned by (ds string,
 insert overwrite table srcpartbucket partition(ds, hr) select * from srcpart where ds is not null and key < 10;
 
 explain extended
-select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC;
+select ds, count(1) from srcpartbucket tablesample (bucket 2 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC;
 
-select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC;
+select ds, count(1) from srcpartbucket tablesample (bucket 2 out of 4 on key) where ds is not null group by ds ORDER BY ds ASC;
 
 select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 2 on key) where ds is not null group by ds ORDER BY ds ASC;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/queries/clientpositive/tez_dynpart_hashjoin_3.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/tez_dynpart_hashjoin_3.q b/ql/src/test/queries/clientpositive/tez_dynpart_hashjoin_3.q
index d318f7d..0500a62 100644
--- a/ql/src/test/queries/clientpositive/tez_dynpart_hashjoin_3.q
+++ b/ql/src/test/queries/clientpositive/tez_dynpart_hashjoin_3.q
@@ -16,8 +16,8 @@ limit 1;
 
 set hive.auto.convert.join=true;
 set hive.optimize.dynamic.partition.hashjoin=true;
-set hive.auto.convert.join.noconditionaltask.size=200000;
-set hive.exec.reducers.bytes.per.reducer=200000;
+set hive.auto.convert.join.noconditionaltask.size=20000;
+set hive.exec.reducers.bytes.per.reducer=2000;
 
 explain
 select a.*

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/queries/clientpositive/tez_smb_1.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/tez_smb_1.q b/ql/src/test/queries/clientpositive/tez_smb_1.q
index ecfb0dc..0f8f22f 100644
--- a/ql/src/test/queries/clientpositive/tez_smb_1.q
+++ b/ql/src/test/queries/clientpositive/tez_smb_1.q
@@ -34,7 +34,7 @@ select key,value from srcbucket_mapjoin;
 set hive.convert.join.bucket.mapjoin.tez = true;
 set hive.auto.convert.sortmerge.join = true;
 
-set hive.auto.convert.join.noconditionaltask.size=500;
+set hive.auto.convert.join.noconditionaltask.size=50;
 
 explain
 select count(*) from tab s1 join tab s3 on s1.key=s3.key;


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/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/ac6b2a3f/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/ac6b2a3f/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/ac6b2a3f/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/ac6b2a3f/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/ac6b2a3f/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 95cbbc5..8bdba66 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/ac6b2a3f/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/ac6b2a3f/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 5fa01eb..74f52f5 100644
--- a/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out
+++ b/ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out
@@ -124,6 +124,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'
@@ -145,6 +146,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'
@@ -170,6 +172,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'
@@ -191,6 +194,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'
@@ -241,6 +245,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'
@@ -289,6 +294,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'
@@ -337,6 +343,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'
@@ -385,6 +392,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/ac6b2a3f/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 fe0efbb..2c8f398 100644
--- a/ql/src/test/results/clientpositive/masking_5.q.out
+++ b/ql/src/test/results/clientpositive/masking_5.q.out
@@ -185,8 +185,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/ac6b2a3f/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 8a33f12..aaa7702 100644
--- a/ql/src/test/results/clientpositive/merge3.q.out
+++ b/ql/src/test/results/clientpositive/merge3.q.out
@@ -113,6 +113,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -134,6 +135,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -2337,6 +2339,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	2000                
 	rawDataSize         	21248               
@@ -2476,6 +2479,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 
@@ -2523,6 +2527,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 
@@ -4918,6 +4923,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 
@@ -4965,6 +4971,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/ac6b2a3f/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/ac6b2a3f/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/ac6b2a3f/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/ac6b2a3f/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/ac6b2a3f/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/ac6b2a3f/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 03cffc1..fcd3bd0 100644
--- a/ql/src/test/results/clientpositive/nonmr_fetch.q.out
+++ b/ql/src/test/results/clientpositive/nonmr_fetch.q.out
@@ -601,13 +601,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)
@@ -648,34 +655,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/ac6b2a3f/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/ac6b2a3f/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 68851c6..76f6723 100644
--- a/ql/src/test/results/clientpositive/nullformatCTAS.q.out
+++ b/ql/src/test/results/clientpositive/nullformatCTAS.q.out
@@ -174,6 +174,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/ac6b2a3f/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 cdce3ec..cce59b0 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
@@ -66,6 +66,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'
@@ -114,6 +115,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'
@@ -162,6 +164,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'
@@ -210,6 +213,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'
@@ -363,6 +367,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'
@@ -411,6 +416,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'
@@ -459,6 +465,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'
@@ -507,6 +514,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'
@@ -660,6 +668,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'
@@ -708,6 +717,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'
@@ -756,6 +766,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'
@@ -804,6 +815,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'
@@ -967,6 +979,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'
@@ -1015,6 +1028,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'
@@ -1063,6 +1077,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'
@@ -1111,6 +1126,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'
@@ -1854,6 +1870,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'
@@ -1902,6 +1919,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'
@@ -1950,6 +1968,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'
@@ -1998,6 +2017,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'
@@ -2151,6 +2171,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'
@@ -2199,6 +2220,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'
@@ -2247,6 +2269,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'
@@ -2295,6 +2318,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'
@@ -2448,6 +2472,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'
@@ -2496,6 +2521,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'
@@ -2544,6 +2570,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'
@@ -2592,6 +2619,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'
@@ -2755,6 +2783,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'
@@ -2803,6 +2832,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'
@@ -2851,6 +2881,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'
@@ -2899,6 +2930,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/ac6b2a3f/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/ac6b2a3f/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 6b8ee52..c6351eb 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/ac6b2a3f/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/ac6b2a3f/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/ac6b2a3f/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/ac6b2a3f/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/ac6b2a3f/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/ac6b2a3f/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/ac6b2a3f/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/ac6b2a3f/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/ac6b2a3f/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                   


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/smb_mapjoin_12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/smb_mapjoin_12.q.out b/ql/src/test/results/clientpositive/spark/smb_mapjoin_12.q.out
index ec8b046..9b421d5 100644
--- a/ql/src/test/results/clientpositive/spark/smb_mapjoin_12.q.out
+++ b/ql/src/test/results/clientpositive/spark/smb_mapjoin_12.q.out
@@ -141,6 +141,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -181,6 +182,7 @@ STAGE PLANS:
                         SORTBUCKETCOLSPREFIX TRUE
                         bucket_count 16
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -213,6 +215,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -267,7 +270,7 @@ POSTHOOK: Input: default@test_table1@ds=1
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-879
+420
 PREHOOK: query: explain extended
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '2') 
 SELECT /*+mapjoin(b)*/ a.key, concat(a.value, b.value) FROM test_table3 a JOIN test_table1 b ON a.key = b.key AND a.ds = '1' AND b.ds='1'
@@ -359,6 +362,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -399,6 +403,7 @@ STAGE PLANS:
                         SORTBUCKETCOLSPREFIX TRUE
                         bucket_count 16
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -431,6 +436,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -479,4 +485,4 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=2
 #### A masked pattern was here ####
-879
+420

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/smb_mapjoin_13.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/smb_mapjoin_13.q.out b/ql/src/test/results/clientpositive/spark/smb_mapjoin_13.q.out
index f8d0fb2..a364374 100644
--- a/ql/src/test/results/clientpositive/spark/smb_mapjoin_13.q.out
+++ b/ql/src/test/results/clientpositive/spark/smb_mapjoin_13.q.out
@@ -124,6 +124,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -147,6 +148,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -273,6 +275,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -296,6 +299,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -373,6 +377,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -396,6 +401,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/smb_mapjoin_15.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/smb_mapjoin_15.q.out b/ql/src/test/results/clientpositive/spark/smb_mapjoin_15.q.out
index f73d383..2768710 100644
--- a/ql/src/test/results/clientpositive/spark/smb_mapjoin_15.q.out
+++ b/ql/src/test/results/clientpositive/spark/smb_mapjoin_15.q.out
@@ -87,6 +87,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -110,6 +111,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -166,6 +168,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -189,6 +192,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -396,6 +400,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,key2,value
                     columns.comments 
@@ -419,6 +424,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,key2,value
                       columns.comments 
@@ -475,6 +481,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,key2,value
                     columns.comments 
@@ -498,6 +505,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,key2,value
                       columns.comments 
@@ -653,6 +661,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,key2,value
                     columns.comments 
@@ -676,6 +685,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,key2,value
                       columns.comments 
@@ -732,6 +742,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,key2,value
                     columns.comments 
@@ -755,6 +766,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,key2,value
                       columns.comments 
@@ -910,6 +922,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,key2,value
                     columns.comments 
@@ -933,6 +946,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,key2,value
                       columns.comments 
@@ -989,6 +1003,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 16
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,key2,value
                     columns.comments 
@@ -1012,6 +1027,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 16
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,key2,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/smb_mapjoin_18.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/smb_mapjoin_18.q.out b/ql/src/test/results/clientpositive/spark/smb_mapjoin_18.q.out
index 175fe77..bb79025 100644
--- a/ql/src/test/results/clientpositive/spark/smb_mapjoin_18.q.out
+++ b/ql/src/test/results/clientpositive/spark/smb_mapjoin_18.q.out
@@ -138,7 +138,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table1
 POSTHOOK: Input: default@test_table1@ds=1
 #### A masked pattern was here ####
-247
+243
 PREHOOK: query: select count(*) from test_table1 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table1
@@ -149,7 +149,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table1
 POSTHOOK: Input: default@test_table1@ds=1
 #### A masked pattern was here ####
-253
+257
 PREHOOK: query: select count(*) from test_table2 where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table2
@@ -191,7 +191,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 POSTHOOK: Input: default@test_table2@ds=1
 #### A masked pattern was here ####
-247
+243
 PREHOOK: query: select count(*) from test_table2 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table2
@@ -202,7 +202,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 POSTHOOK: Input: default@test_table2@ds=1
 #### A masked pattern was here ####
-253
+257
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table2 PARTITION (ds = '2')
 SELECT a.key, a.value FROM test_table1 a WHERE a.ds = '1' and a.key = 238

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/smb_mapjoin_19.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/smb_mapjoin_19.q.out b/ql/src/test/results/clientpositive/spark/smb_mapjoin_19.q.out
index d6d5c98..fbc4d28 100644
--- a/ql/src/test/results/clientpositive/spark/smb_mapjoin_19.q.out
+++ b/ql/src/test/results/clientpositive/spark/smb_mapjoin_19.q.out
@@ -160,7 +160,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table1
 POSTHOOK: Input: default@test_table1@ds=1
 #### A masked pattern was here ####
-40
+19
 PREHOOK: query: select count(*) from test_table1 tablesample (bucket 13 out of 16) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table1
@@ -171,7 +171,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table1
 POSTHOOK: Input: default@test_table1@ds=1
 #### A masked pattern was here ####
-29
+33
 PREHOOK: query: select count(*) from test_table2 where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table2
@@ -235,7 +235,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 POSTHOOK: Input: default@test_table2@ds=1
 #### A masked pattern was here ####
-40
+19
 PREHOOK: query: select count(*) from test_table2 tablesample (bucket 13 out of 16) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table2
@@ -246,4 +246,4 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 POSTHOOK: Input: default@test_table2@ds=1
 #### A masked pattern was here ####
-29
+33

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/smb_mapjoin_20.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/smb_mapjoin_20.q.out b/ql/src/test/results/clientpositive/spark/smb_mapjoin_20.q.out
index e56b64d..df97a2b 100644
--- a/ql/src/test/results/clientpositive/spark/smb_mapjoin_20.q.out
+++ b/ql/src/test/results/clientpositive/spark/smb_mapjoin_20.q.out
@@ -278,7 +278,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-247
+243
 PREHOOK: query: select count(*) from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -289,7 +289,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-253
+257
 PREHOOK: query: select * from test_table3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -300,104 +300,93 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-val_0	0	val_0	1
-val_0	0	val_0	1
-val_0	0	val_0	1
 val_2	2	val_2	1
-val_4	4	val_4	1
-val_8	8	val_8	1
 val_10	10	val_10	1
-val_12	12	val_12	1
-val_12	12	val_12	1
-val_18	18	val_18	1
-val_18	18	val_18	1
+val_17	17	val_17	1
+val_19	19	val_19	1
 val_20	20	val_20	1
-val_24	24	val_24	1
-val_24	24	val_24	1
-val_26	26	val_26	1
-val_26	26	val_26	1
-val_28	28	val_28	1
+val_27	27	val_27	1
 val_30	30	val_30	1
-val_34	34	val_34	1
-val_42	42	val_42	1
-val_42	42	val_42	1
-val_44	44	val_44	1
+val_41	41	val_41	1
+val_43	43	val_43	1
+val_51	51	val_51	1
+val_51	51	val_51	1
 val_54	54	val_54	1
+val_57	57	val_57	1
 val_58	58	val_58	1
 val_58	58	val_58	1
 val_64	64	val_64	1
-val_66	66	val_66	1
+val_65	65	val_65	1
+val_67	67	val_67	1
+val_67	67	val_67	1
+val_69	69	val_69	1
 val_70	70	val_70	1
 val_70	70	val_70	1
 val_70	70	val_70	1
-val_72	72	val_72	1
-val_72	72	val_72	1
-val_74	74	val_74	1
-val_76	76	val_76	1
-val_76	76	val_76	1
-val_78	78	val_78	1
+val_77	77	val_77	1
 val_80	80	val_80	1
-val_82	82	val_82	1
+val_83	83	val_83	1
+val_83	83	val_83	1
 val_84	84	val_84	1
 val_84	84	val_84	1
+val_85	85	val_85	1
 val_86	86	val_86	1
 val_90	90	val_90	1
 val_90	90	val_90	1
 val_90	90	val_90	1
-val_92	92	val_92	1
 val_96	96	val_96	1
+val_97	97	val_97	1
+val_97	97	val_97	1
 val_98	98	val_98	1
 val_98	98	val_98	1
-val_100	100	val_100	1
-val_100	100	val_100	1
-val_104	104	val_104	1
-val_104	104	val_104	1
-val_114	114	val_114	1
+val_105	105	val_105	1
+val_113	113	val_113	1
+val_113	113	val_113	1
 val_116	116	val_116	1
-val_118	118	val_118	1
-val_118	118	val_118	1
-val_120	120	val_120	1
-val_120	120	val_120	1
+val_119	119	val_119	1
+val_119	119	val_119	1
+val_119	119	val_119	1
 val_126	126	val_126	1
-val_128	128	val_128	1
-val_128	128	val_128	1
-val_128	128	val_128	1
+val_133	133	val_133	1
 val_134	134	val_134	1
 val_134	134	val_134	1
-val_136	136	val_136	1
-val_138	138	val_138	1
-val_138	138	val_138	1
-val_138	138	val_138	1
-val_138	138	val_138	1
+val_137	137	val_137	1
+val_137	137	val_137	1
 val_146	146	val_146	1
 val_146	146	val_146	1
-val_150	150	val_150	1
-val_152	152	val_152	1
-val_152	152	val_152	1
+val_149	149	val_149	1
+val_149	149	val_149	1
+val_153	153	val_153	1
 val_156	156	val_156	1
+val_157	157	val_157	1
 val_158	158	val_158	1
-val_160	160	val_160	1
 val_162	162	val_162	1
+val_163	163	val_163	1
 val_164	164	val_164	1
 val_164	164	val_164	1
-val_166	166	val_166	1
-val_168	168	val_168	1
-val_170	170	val_170	1
-val_172	172	val_172	1
-val_172	172	val_172	1
-val_174	174	val_174	1
-val_174	174	val_174	1
-val_176	176	val_176	1
-val_176	176	val_176	1
+val_165	165	val_165	1
+val_165	165	val_165	1
+val_169	169	val_169	1
+val_169	169	val_169	1
+val_169	169	val_169	1
+val_169	169	val_169	1
+val_177	177	val_177	1
 val_178	178	val_178	1
-val_180	180	val_180	1
-val_186	186	val_186	1
+val_181	181	val_181	1
+val_187	187	val_187	1
+val_187	187	val_187	1
+val_187	187	val_187	1
 val_190	190	val_190	1
-val_192	192	val_192	1
-val_194	194	val_194	1
-val_196	196	val_196	1
-val_200	200	val_200	1
-val_200	200	val_200	1
+val_191	191	val_191	1
+val_191	191	val_191	1
+val_195	195	val_195	1
+val_195	195	val_195	1
+val_197	197	val_197	1
+val_197	197	val_197	1
+val_199	199	val_199	1
+val_199	199	val_199	1
+val_199	199	val_199	1
+val_201	201	val_201	1
 val_202	202	val_202	1
 val_208	208	val_208	1
 val_208	208	val_208	1
@@ -405,63 +394,60 @@ val_208	208	val_208	1
 val_214	214	val_214	1
 val_216	216	val_216	1
 val_216	216	val_216	1
-val_218	218	val_218	1
-val_222	222	val_222	1
-val_224	224	val_224	1
-val_224	224	val_224	1
+val_221	221	val_221	1
+val_221	221	val_221	1
 val_226	226	val_226	1
-val_228	228	val_228	1
-val_230	230	val_230	1
-val_230	230	val_230	1
-val_230	230	val_230	1
-val_230	230	val_230	1
-val_230	230	val_230	1
+val_229	229	val_229	1
+val_229	229	val_229	1
+val_233	233	val_233	1
+val_233	233	val_233	1
+val_237	237	val_237	1
+val_237	237	val_237	1
 val_238	238	val_238	1
 val_238	238	val_238	1
-val_242	242	val_242	1
-val_242	242	val_242	1
+val_239	239	val_239	1
+val_239	239	val_239	1
 val_244	244	val_244	1
 val_248	248	val_248	1
+val_249	249	val_249	1
 val_252	252	val_252	1
+val_255	255	val_255	1
+val_255	255	val_255	1
 val_256	256	val_256	1
 val_256	256	val_256	1
-val_258	258	val_258	1
 val_260	260	val_260	1
-val_262	262	val_262	1
 val_266	266	val_266	1
 val_272	272	val_272	1
 val_272	272	val_272	1
-val_274	274	val_274	1
-val_278	278	val_278	1
-val_278	278	val_278	1
-val_280	280	val_280	1
-val_280	280	val_280	1
-val_282	282	val_282	1
-val_282	282	val_282	1
 val_284	284	val_284	1
 val_286	286	val_286	1
-val_288	288	val_288	1
-val_288	288	val_288	1
+val_287	287	val_287	1
+val_289	289	val_289	1
+val_291	291	val_291	1
 val_292	292	val_292	1
-val_296	296	val_296	1
-val_298	298	val_298	1
-val_298	298	val_298	1
-val_298	298	val_298	1
-val_302	302	val_302	1
-val_306	306	val_306	1
+val_307	307	val_307	1
+val_307	307	val_307	1
 val_308	308	val_308	1
 val_310	310	val_310	1
+val_311	311	val_311	1
+val_311	311	val_311	1
+val_311	311	val_311	1
+val_315	315	val_315	1
 val_316	316	val_316	1
 val_316	316	val_316	1
 val_316	316	val_316	1
-val_318	318	val_318	1
-val_318	318	val_318	1
-val_318	318	val_318	1
-val_322	322	val_322	1
-val_322	322	val_322	1
+val_317	317	val_317	1
+val_317	317	val_317	1
+val_325	325	val_325	1
+val_325	325	val_325	1
+val_327	327	val_327	1
+val_327	327	val_327	1
+val_327	327	val_327	1
 val_332	332	val_332	1
 val_336	336	val_336	1
 val_338	338	val_338	1
+val_339	339	val_339	1
+val_341	341	val_341	1
 val_342	342	val_342	1
 val_342	342	val_342	1
 val_344	344	val_344	1
@@ -471,176 +457,197 @@ val_348	348	val_348	1
 val_348	348	val_348	1
 val_348	348	val_348	1
 val_348	348	val_348	1
-val_356	356	val_356	1
+val_351	351	val_351	1
+val_353	353	val_353	1
+val_353	353	val_353	1
 val_360	360	val_360	1
 val_362	362	val_362	1
 val_364	364	val_364	1
-val_366	366	val_366	1
+val_365	365	val_365	1
 val_368	368	val_368	1
-val_374	374	val_374	1
+val_369	369	val_369	1
+val_369	369	val_369	1
+val_369	369	val_369	1
+val_377	377	val_377	1
 val_378	378	val_378	1
-val_382	382	val_382	1
-val_382	382	val_382	1
 val_384	384	val_384	1
 val_384	384	val_384	1
 val_384	384	val_384	1
 val_386	386	val_386	1
 val_392	392	val_392	1
+val_393	393	val_393	1
 val_394	394	val_394	1
 val_396	396	val_396	1
 val_396	396	val_396	1
 val_396	396	val_396	1
-val_400	400	val_400	1
+val_397	397	val_397	1
+val_397	397	val_397	1
+val_399	399	val_399	1
+val_399	399	val_399	1
 val_402	402	val_402	1
 val_404	404	val_404	1
 val_404	404	val_404	1
-val_406	406	val_406	1
-val_406	406	val_406	1
-val_406	406	val_406	1
-val_406	406	val_406	1
+val_407	407	val_407	1
+val_409	409	val_409	1
+val_409	409	val_409	1
+val_409	409	val_409	1
+val_411	411	val_411	1
 val_414	414	val_414	1
 val_414	414	val_414	1
-val_418	418	val_418	1
-val_424	424	val_424	1
-val_424	424	val_424	1
+val_417	417	val_417	1
+val_417	417	val_417	1
+val_417	417	val_417	1
+val_419	419	val_419	1
+val_421	421	val_421	1
+val_427	427	val_427	1
 val_430	430	val_430	1
 val_430	430	val_430	1
 val_430	430	val_430	1
 val_432	432	val_432	1
-val_436	436	val_436	1
-val_438	438	val_438	1
-val_438	438	val_438	1
-val_438	438	val_438	1
+val_435	435	val_435	1
+val_437	437	val_437	1
+val_443	443	val_443	1
 val_444	444	val_444	1
 val_446	446	val_446	1
-val_448	448	val_448	1
+val_449	449	val_449	1
 val_452	452	val_452	1
+val_453	453	val_453	1
 val_454	454	val_454	1
 val_454	454	val_454	1
 val_454	454	val_454	1
 val_458	458	val_458	1
 val_458	458	val_458	1
-val_460	460	val_460	1
-val_462	462	val_462	1
-val_462	462	val_462	1
+val_459	459	val_459	1
+val_459	459	val_459	1
+val_463	463	val_463	1
+val_463	463	val_463	1
 val_466	466	val_466	1
 val_466	466	val_466	1
 val_466	466	val_466	1
-val_468	468	val_468	1
-val_468	468	val_468	1
-val_468	468	val_468	1
-val_468	468	val_468	1
-val_470	470	val_470	1
+val_467	467	val_467	1
 val_472	472	val_472	1
 val_478	478	val_478	1
 val_478	478	val_478	1
+val_479	479	val_479	1
 val_480	480	val_480	1
 val_480	480	val_480	1
 val_480	480	val_480	1
 val_482	482	val_482	1
+val_483	483	val_483	1
 val_484	484	val_484	1
+val_485	485	val_485	1
 val_490	490	val_490	1
-val_492	492	val_492	1
-val_492	492	val_492	1
-val_494	494	val_494	1
-val_496	496	val_496	1
+val_491	491	val_491	1
+val_495	495	val_495	1
+val_497	497	val_497	1
 val_498	498	val_498	1
 val_498	498	val_498	1
 val_498	498	val_498	1
+val_0	0	val_0	1
+val_0	0	val_0	1
+val_0	0	val_0	1
+val_4	4	val_4	1
 val_5	5	val_5	1
-val_5	5	val_5	1
-val_5	5	val_5	1
+val_5	5	val_5	1
+val_5	5	val_5	1
+val_8	8	val_8	1
 val_9	9	val_9	1
 val_11	11	val_11	1
+val_12	12	val_12	1
+val_12	12	val_12	1
 val_15	15	val_15	1
 val_15	15	val_15	1
-val_17	17	val_17	1
-val_19	19	val_19	1
-val_27	27	val_27	1
+val_18	18	val_18	1
+val_18	18	val_18	1
+val_24	24	val_24	1
+val_24	24	val_24	1
+val_26	26	val_26	1
+val_26	26	val_26	1
+val_28	28	val_28	1
 val_33	33	val_33	1
+val_34	34	val_34	1
 val_35	35	val_35	1
 val_35	35	val_35	1
 val_35	35	val_35	1
 val_37	37	val_37	1
 val_37	37	val_37	1
-val_41	41	val_41	1
-val_43	43	val_43	1
+val_42	42	val_42	1
+val_42	42	val_42	1
+val_44	44	val_44	1
 val_47	47	val_47	1
-val_51	51	val_51	1
-val_51	51	val_51	1
 val_53	53	val_53	1
-val_57	57	val_57	1
-val_65	65	val_65	1
-val_67	67	val_67	1
-val_67	67	val_67	1
-val_69	69	val_69	1
-val_77	77	val_77	1
-val_83	83	val_83	1
-val_83	83	val_83	1
-val_85	85	val_85	1
+val_66	66	val_66	1
+val_72	72	val_72	1
+val_72	72	val_72	1
+val_74	74	val_74	1
+val_76	76	val_76	1
+val_76	76	val_76	1
+val_78	78	val_78	1
+val_82	82	val_82	1
 val_87	87	val_87	1
+val_92	92	val_92	1
 val_95	95	val_95	1
 val_95	95	val_95	1
-val_97	97	val_97	1
-val_97	97	val_97	1
+val_100	100	val_100	1
+val_100	100	val_100	1
 val_103	103	val_103	1
 val_103	103	val_103	1
-val_105	105	val_105	1
+val_104	104	val_104	1
+val_104	104	val_104	1
 val_111	111	val_111	1
-val_113	113	val_113	1
-val_113	113	val_113	1
-val_119	119	val_119	1
-val_119	119	val_119	1
-val_119	119	val_119	1
+val_114	114	val_114	1
+val_118	118	val_118	1
+val_118	118	val_118	1
+val_120	120	val_120	1
+val_120	120	val_120	1
 val_125	125	val_125	1
 val_125	125	val_125	1
+val_128	128	val_128	1
+val_128	128	val_128	1
+val_128	128	val_128	1
 val_129	129	val_129	1
 val_129	129	val_129	1
 val_131	131	val_131	1
-val_133	133	val_133	1
-val_137	137	val_137	1
-val_137	137	val_137	1
+val_136	136	val_136	1
+val_138	138	val_138	1
+val_138	138	val_138	1
+val_138	138	val_138	1
+val_138	138	val_138	1
 val_143	143	val_143	1
 val_145	145	val_145	1
-val_149	149	val_149	1
-val_149	149	val_149	1
-val_153	153	val_153	1
+val_150	150	val_150	1
+val_152	152	val_152	1
+val_152	152	val_152	1
 val_155	155	val_155	1
-val_157	157	val_157	1
-val_163	163	val_163	1
-val_165	165	val_165	1
-val_165	165	val_165	1
+val_160	160	val_160	1
+val_166	166	val_166	1
 val_167	167	val_167	1
 val_167	167	val_167	1
 val_167	167	val_167	1
-val_169	169	val_169	1
-val_169	169	val_169	1
-val_169	169	val_169	1
-val_169	169	val_169	1
+val_168	168	val_168	1
+val_170	170	val_170	1
+val_172	172	val_172	1
+val_172	172	val_172	1
+val_174	174	val_174	1
+val_174	174	val_174	1
 val_175	175	val_175	1
 val_175	175	val_175	1
-val_177	177	val_177	1
+val_176	176	val_176	1
+val_176	176	val_176	1
 val_179	179	val_179	1
 val_179	179	val_179	1
-val_181	181	val_181	1
+val_180	180	val_180	1
 val_183	183	val_183	1
-val_187	187	val_187	1
-val_187	187	val_187	1
-val_187	187	val_187	1
+val_186	186	val_186	1
 val_189	189	val_189	1
-val_191	191	val_191	1
-val_191	191	val_191	1
+val_192	192	val_192	1
 val_193	193	val_193	1
 val_193	193	val_193	1
 val_193	193	val_193	1
-val_195	195	val_195	1
-val_195	195	val_195	1
-val_197	197	val_197	1
-val_197	197	val_197	1
-val_199	199	val_199	1
-val_199	199	val_199	1
-val_199	199	val_199	1
-val_201	201	val_201	1
+val_194	194	val_194	1
+val_196	196	val_196	1
+val_200	200	val_200	1
+val_200	200	val_200	1
 val_203	203	val_203	1
 val_203	203	val_203	1
 val_205	205	val_205	1
@@ -653,93 +660,89 @@ val_213	213	val_213	1
 val_213	213	val_213	1
 val_217	217	val_217	1
 val_217	217	val_217	1
+val_218	218	val_218	1
 val_219	219	val_219	1
 val_219	219	val_219	1
-val_221	221	val_221	1
-val_221	221	val_221	1
+val_222	222	val_222	1
 val_223	223	val_223	1
 val_223	223	val_223	1
-val_229	229	val_229	1
-val_229	229	val_229	1
-val_233	233	val_233	1
-val_233	233	val_233	1
+val_224	224	val_224	1
+val_224	224	val_224	1
+val_228	228	val_228	1
+val_230	230	val_230	1
+val_230	230	val_230	1
+val_230	230	val_230	1
+val_230	230	val_230	1
+val_230	230	val_230	1
 val_235	235	val_235	1
-val_237	237	val_237	1
-val_237	237	val_237	1
-val_239	239	val_239	1
-val_239	239	val_239	1
 val_241	241	val_241	1
+val_242	242	val_242	1
+val_242	242	val_242	1
 val_247	247	val_247	1
-val_249	249	val_249	1
-val_255	255	val_255	1
-val_255	255	val_255	1
 val_257	257	val_257	1
+val_258	258	val_258	1
+val_262	262	val_262	1
 val_263	263	val_263	1
 val_265	265	val_265	1
 val_265	265	val_265	1
 val_273	273	val_273	1
 val_273	273	val_273	1
 val_273	273	val_273	1
+val_274	274	val_274	1
 val_275	275	val_275	1
 val_277	277	val_277	1
 val_277	277	val_277	1
 val_277	277	val_277	1
 val_277	277	val_277	1
+val_278	278	val_278	1
+val_278	278	val_278	1
+val_280	280	val_280	1
+val_280	280	val_280	1
 val_281	281	val_281	1
 val_281	281	val_281	1
+val_282	282	val_282	1
+val_282	282	val_282	1
 val_283	283	val_283	1
 val_285	285	val_285	1
-val_287	287	val_287	1
-val_289	289	val_289	1
-val_291	291	val_291	1
+val_288	288	val_288	1
+val_288	288	val_288	1
+val_296	296	val_296	1
+val_298	298	val_298	1
+val_298	298	val_298	1
+val_298	298	val_298	1
+val_302	302	val_302	1
 val_305	305	val_305	1
-val_307	307	val_307	1
-val_307	307	val_307	1
+val_306	306	val_306	1
 val_309	309	val_309	1
 val_309	309	val_309	1
-val_311	311	val_311	1
-val_311	311	val_311	1
-val_311	311	val_311	1
-val_315	315	val_315	1
-val_317	317	val_317	1
-val_317	317	val_317	1
+val_318	318	val_318	1
+val_318	318	val_318	1
+val_318	318	val_318	1
 val_321	321	val_321	1
 val_321	321	val_321	1
+val_322	322	val_322	1
+val_322	322	val_322	1
 val_323	323	val_323	1
-val_325	325	val_325	1
-val_325	325	val_325	1
-val_327	327	val_327	1
-val_327	327	val_327	1
-val_327	327	val_327	1
 val_331	331	val_331	1
 val_331	331	val_331	1
 val_333	333	val_333	1
 val_333	333	val_333	1
 val_335	335	val_335	1
-val_339	339	val_339	1
-val_341	341	val_341	1
 val_345	345	val_345	1
-val_351	351	val_351	1
-val_353	353	val_353	1
-val_353	353	val_353	1
-val_365	365	val_365	1
+val_356	356	val_356	1
+val_366	366	val_366	1
 val_367	367	val_367	1
 val_367	367	val_367	1
-val_369	369	val_369	1
-val_369	369	val_369	1
-val_369	369	val_369	1
 val_373	373	val_373	1
+val_374	374	val_374	1
 val_375	375	val_375	1
-val_377	377	val_377	1
 val_379	379	val_379	1
+val_382	382	val_382	1
+val_382	382	val_382	1
 val_389	389	val_389	1
-val_393	393	val_393	1
 val_395	395	val_395	1
 val_395	395	val_395	1
-val_397	397	val_397	1
-val_397	397	val_397	1
-val_399	399	val_399	1
-val_399	399	val_399	1
+val_400	400	val_400	1
 val_401	401	val_401	1
 val_401	401	val_401	1
 val_401	401	val_401	1
@@ -748,58 +751,55 @@ val_401	401	val_401	1
 val_403	403	val_403	1
 val_403	403	val_403	1
 val_403	403	val_403	1
-val_407	407	val_407	1
-val_409	409	val_409	1
-val_409	409	val_409	1
-val_409	409	val_409	1
-val_411	411	val_411	1
+val_406	406	val_406	1
+val_406	406	val_406	1
+val_406	406	val_406	1
+val_406	406	val_406	1
 val_413	413	val_413	1
 val_413	413	val_413	1
-val_417	417	val_417	1
-val_417	417	val_417	1
-val_417	417	val_417	1
-val_419	419	val_419	1
-val_421	421	val_421	1
-val_427	427	val_427	1
+val_418	418	val_418	1
+val_424	424	val_424	1
+val_424	424	val_424	1
 val_429	429	val_429	1
 val_429	429	val_429	1
 val_431	431	val_431	1
 val_431	431	val_431	1
 val_431	431	val_431	1
-val_435	435	val_435	1
-val_437	437	val_437	1
+val_436	436	val_436	1
+val_438	438	val_438	1
+val_438	438	val_438	1
+val_438	438	val_438	1
 val_439	439	val_439	1
 val_439	439	val_439	1
-val_443	443	val_443	1
-val_449	449	val_449	1
-val_453	453	val_453	1
+val_448	448	val_448	1
 val_455	455	val_455	1
 val_457	457	val_457	1
-val_459	459	val_459	1
-val_459	459	val_459	1
-val_463	463	val_463	1
-val_463	463	val_463	1
-val_467	467	val_467	1
+val_460	460	val_460	1
+val_462	462	val_462	1
+val_462	462	val_462	1
+val_468	468	val_468	1
+val_468	468	val_468	1
+val_468	468	val_468	1
+val_468	468	val_468	1
 val_469	469	val_469	1
 val_469	469	val_469	1
 val_469	469	val_469	1
 val_469	469	val_469	1
 val_469	469	val_469	1
+val_470	470	val_470	1
 val_475	475	val_475	1
 val_477	477	val_477	1
-val_479	479	val_479	1
 val_481	481	val_481	1
-val_483	483	val_483	1
-val_485	485	val_485	1
 val_487	487	val_487	1
 val_489	489	val_489	1
 val_489	489	val_489	1
 val_489	489	val_489	1
 val_489	489	val_489	1
-val_491	491	val_491	1
+val_492	492	val_492	1
+val_492	492	val_492	1
 val_493	493	val_493	1
-val_495	495	val_495	1
-val_497	497	val_497	1
+val_494	494	val_494	1
+val_496	496	val_496	1
 PREHOOK: query: INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
 SELECT a.value, a.key, a.value FROM test_table1 a WHERE a.ds = '1'
 PREHOOK: type: QUERY
@@ -825,104 +825,93 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-val_0	0	val_0	1
-val_0	0	val_0	1
-val_0	0	val_0	1
 val_2	2	val_2	1
-val_4	4	val_4	1
-val_8	8	val_8	1
 val_10	10	val_10	1
-val_12	12	val_12	1
-val_12	12	val_12	1
-val_18	18	val_18	1
-val_18	18	val_18	1
+val_17	17	val_17	1
+val_19	19	val_19	1
 val_20	20	val_20	1
-val_24	24	val_24	1
-val_24	24	val_24	1
-val_26	26	val_26	1
-val_26	26	val_26	1
-val_28	28	val_28	1
+val_27	27	val_27	1
 val_30	30	val_30	1
-val_34	34	val_34	1
-val_42	42	val_42	1
-val_42	42	val_42	1
-val_44	44	val_44	1
+val_41	41	val_41	1
+val_43	43	val_43	1
+val_51	51	val_51	1
+val_51	51	val_51	1
 val_54	54	val_54	1
+val_57	57	val_57	1
 val_58	58	val_58	1
 val_58	58	val_58	1
 val_64	64	val_64	1
-val_66	66	val_66	1
+val_65	65	val_65	1
+val_67	67	val_67	1
+val_67	67	val_67	1
+val_69	69	val_69	1
 val_70	70	val_70	1
 val_70	70	val_70	1
 val_70	70	val_70	1
-val_72	72	val_72	1
-val_72	72	val_72	1
-val_74	74	val_74	1
-val_76	76	val_76	1
-val_76	76	val_76	1
-val_78	78	val_78	1
+val_77	77	val_77	1
 val_80	80	val_80	1
-val_82	82	val_82	1
+val_83	83	val_83	1
+val_83	83	val_83	1
 val_84	84	val_84	1
 val_84	84	val_84	1
+val_85	85	val_85	1
 val_86	86	val_86	1
 val_90	90	val_90	1
 val_90	90	val_90	1
 val_90	90	val_90	1
-val_92	92	val_92	1
 val_96	96	val_96	1
+val_97	97	val_97	1
+val_97	97	val_97	1
 val_98	98	val_98	1
 val_98	98	val_98	1
-val_100	100	val_100	1
-val_100	100	val_100	1
-val_104	104	val_104	1
-val_104	104	val_104	1
-val_114	114	val_114	1
+val_105	105	val_105	1
+val_113	113	val_113	1
+val_113	113	val_113	1
 val_116	116	val_116	1
-val_118	118	val_118	1
-val_118	118	val_118	1
-val_120	120	val_120	1
-val_120	120	val_120	1
+val_119	119	val_119	1
+val_119	119	val_119	1
+val_119	119	val_119	1
 val_126	126	val_126	1
-val_128	128	val_128	1
-val_128	128	val_128	1
-val_128	128	val_128	1
+val_133	133	val_133	1
 val_134	134	val_134	1
 val_134	134	val_134	1
-val_136	136	val_136	1
-val_138	138	val_138	1
-val_138	138	val_138	1
-val_138	138	val_138	1
-val_138	138	val_138	1
+val_137	137	val_137	1
+val_137	137	val_137	1
 val_146	146	val_146	1
 val_146	146	val_146	1
-val_150	150	val_150	1
-val_152	152	val_152	1
-val_152	152	val_152	1
+val_149	149	val_149	1
+val_149	149	val_149	1
+val_153	153	val_153	1
 val_156	156	val_156	1
+val_157	157	val_157	1
 val_158	158	val_158	1
-val_160	160	val_160	1
 val_162	162	val_162	1
+val_163	163	val_163	1
 val_164	164	val_164	1
 val_164	164	val_164	1
-val_166	166	val_166	1
-val_168	168	val_168	1
-val_170	170	val_170	1
-val_172	172	val_172	1
-val_172	172	val_172	1
-val_174	174	val_174	1
-val_174	174	val_174	1
-val_176	176	val_176	1
-val_176	176	val_176	1
+val_165	165	val_165	1
+val_165	165	val_165	1
+val_169	169	val_169	1
+val_169	169	val_169	1
+val_169	169	val_169	1
+val_169	169	val_169	1
+val_177	177	val_177	1
 val_178	178	val_178	1
-val_180	180	val_180	1
-val_186	186	val_186	1
+val_181	181	val_181	1
+val_187	187	val_187	1
+val_187	187	val_187	1
+val_187	187	val_187	1
 val_190	190	val_190	1
-val_192	192	val_192	1
-val_194	194	val_194	1
-val_196	196	val_196	1
-val_200	200	val_200	1
-val_200	200	val_200	1
+val_191	191	val_191	1
+val_191	191	val_191	1
+val_195	195	val_195	1
+val_195	195	val_195	1
+val_197	197	val_197	1
+val_197	197	val_197	1
+val_199	199	val_199	1
+val_199	199	val_199	1
+val_199	199	val_199	1
+val_201	201	val_201	1
 val_202	202	val_202	1
 val_208	208	val_208	1
 val_208	208	val_208	1
@@ -930,63 +919,60 @@ val_208	208	val_208	1
 val_214	214	val_214	1
 val_216	216	val_216	1
 val_216	216	val_216	1
-val_218	218	val_218	1
-val_222	222	val_222	1
-val_224	224	val_224	1
-val_224	224	val_224	1
+val_221	221	val_221	1
+val_221	221	val_221	1
 val_226	226	val_226	1
-val_228	228	val_228	1
-val_230	230	val_230	1
-val_230	230	val_230	1
-val_230	230	val_230	1
-val_230	230	val_230	1
-val_230	230	val_230	1
+val_229	229	val_229	1
+val_229	229	val_229	1
+val_233	233	val_233	1
+val_233	233	val_233	1
+val_237	237	val_237	1
+val_237	237	val_237	1
 val_238	238	val_238	1
 val_238	238	val_238	1
-val_242	242	val_242	1
-val_242	242	val_242	1
+val_239	239	val_239	1
+val_239	239	val_239	1
 val_244	244	val_244	1
 val_248	248	val_248	1
+val_249	249	val_249	1
 val_252	252	val_252	1
+val_255	255	val_255	1
+val_255	255	val_255	1
 val_256	256	val_256	1
 val_256	256	val_256	1
-val_258	258	val_258	1
 val_260	260	val_260	1
-val_262	262	val_262	1
 val_266	266	val_266	1
 val_272	272	val_272	1
 val_272	272	val_272	1
-val_274	274	val_274	1
-val_278	278	val_278	1
-val_278	278	val_278	1
-val_280	280	val_280	1
-val_280	280	val_280	1
-val_282	282	val_282	1
-val_282	282	val_282	1
 val_284	284	val_284	1
 val_286	286	val_286	1
-val_288	288	val_288	1
-val_288	288	val_288	1
+val_287	287	val_287	1
+val_289	289	val_289	1
+val_291	291	val_291	1
 val_292	292	val_292	1
-val_296	296	val_296	1
-val_298	298	val_298	1
-val_298	298	val_298	1
-val_298	298	val_298	1
-val_302	302	val_302	1
-val_306	306	val_306	1
+val_307	307	val_307	1
+val_307	307	val_307	1
 val_308	308	val_308	1
 val_310	310	val_310	1
+val_311	311	val_311	1
+val_311	311	val_311	1
+val_311	311	val_311	1
+val_315	315	val_315	1
 val_316	316	val_316	1
 val_316	316	val_316	1
 val_316	316	val_316	1
-val_318	318	val_318	1
-val_318	318	val_318	1
-val_318	318	val_318	1
-val_322	322	val_322	1
-val_322	322	val_322	1
+val_317	317	val_317	1
+val_317	317	val_317	1
+val_325	325	val_325	1
+val_325	325	val_325	1
+val_327	327	val_327	1
+val_327	327	val_327	1
+val_327	327	val_327	1
 val_332	332	val_332	1
 val_336	336	val_336	1
 val_338	338	val_338	1
+val_339	339	val_339	1
+val_341	341	val_341	1
 val_342	342	val_342	1
 val_342	342	val_342	1
 val_344	344	val_344	1
@@ -996,176 +982,197 @@ val_348	348	val_348	1
 val_348	348	val_348	1
 val_348	348	val_348	1
 val_348	348	val_348	1
-val_356	356	val_356	1
+val_351	351	val_351	1
+val_353	353	val_353	1
+val_353	353	val_353	1
 val_360	360	val_360	1
 val_362	362	val_362	1
 val_364	364	val_364	1
-val_366	366	val_366	1
+val_365	365	val_365	1
 val_368	368	val_368	1
-val_374	374	val_374	1
+val_369	369	val_369	1
+val_369	369	val_369	1
+val_369	369	val_369	1
+val_377	377	val_377	1
 val_378	378	val_378	1
-val_382	382	val_382	1
-val_382	382	val_382	1
 val_384	384	val_384	1
 val_384	384	val_384	1
 val_384	384	val_384	1
 val_386	386	val_386	1
 val_392	392	val_392	1
+val_393	393	val_393	1
 val_394	394	val_394	1
 val_396	396	val_396	1
 val_396	396	val_396	1
 val_396	396	val_396	1
-val_400	400	val_400	1
+val_397	397	val_397	1
+val_397	397	val_397	1
+val_399	399	val_399	1
+val_399	399	val_399	1
 val_402	402	val_402	1
 val_404	404	val_404	1
 val_404	404	val_404	1
-val_406	406	val_406	1
-val_406	406	val_406	1
-val_406	406	val_406	1
-val_406	406	val_406	1
+val_407	407	val_407	1
+val_409	409	val_409	1
+val_409	409	val_409	1
+val_409	409	val_409	1
+val_411	411	val_411	1
 val_414	414	val_414	1
 val_414	414	val_414	1
-val_418	418	val_418	1
-val_424	424	val_424	1
-val_424	424	val_424	1
+val_417	417	val_417	1
+val_417	417	val_417	1
+val_417	417	val_417	1
+val_419	419	val_419	1
+val_421	421	val_421	1
+val_427	427	val_427	1
 val_430	430	val_430	1
 val_430	430	val_430	1
 val_430	430	val_430	1
 val_432	432	val_432	1
-val_436	436	val_436	1
-val_438	438	val_438	1
-val_438	438	val_438	1
-val_438	438	val_438	1
+val_435	435	val_435	1
+val_437	437	val_437	1
+val_443	443	val_443	1
 val_444	444	val_444	1
 val_446	446	val_446	1
-val_448	448	val_448	1
+val_449	449	val_449	1
 val_452	452	val_452	1
+val_453	453	val_453	1
 val_454	454	val_454	1
 val_454	454	val_454	1
 val_454	454	val_454	1
 val_458	458	val_458	1
 val_458	458	val_458	1
-val_460	460	val_460	1
-val_462	462	val_462	1
-val_462	462	val_462	1
+val_459	459	val_459	1
+val_459	459	val_459	1
+val_463	463	val_463	1
+val_463	463	val_463	1
 val_466	466	val_466	1
 val_466	466	val_466	1
 val_466	466	val_466	1
-val_468	468	val_468	1
-val_468	468	val_468	1
-val_468	468	val_468	1
-val_468	468	val_468	1
-val_470	470	val_470	1
+val_467	467	val_467	1
 val_472	472	val_472	1
 val_478	478	val_478	1
 val_478	478	val_478	1
+val_479	479	val_479	1
 val_480	480	val_480	1
 val_480	480	val_480	1
 val_480	480	val_480	1
 val_482	482	val_482	1
+val_483	483	val_483	1
 val_484	484	val_484	1
+val_485	485	val_485	1
 val_490	490	val_490	1
-val_492	492	val_492	1
-val_492	492	val_492	1
-val_494	494	val_494	1
-val_496	496	val_496	1
+val_491	491	val_491	1
+val_495	495	val_495	1
+val_497	497	val_497	1
 val_498	498	val_498	1
 val_498	498	val_498	1
 val_498	498	val_498	1
+val_0	0	val_0	1
+val_0	0	val_0	1
+val_0	0	val_0	1
+val_4	4	val_4	1
 val_5	5	val_5	1
 val_5	5	val_5	1
 val_5	5	val_5	1
+val_8	8	val_8	1
 val_9	9	val_9	1
 val_11	11	val_11	1
+val_12	12	val_12	1
+val_12	12	val_12	1
 val_15	15	val_15	1
 val_15	15	val_15	1
-val_17	17	val_17	1
-val_19	19	val_19	1
-val_27	27	val_27	1
+val_18	18	val_18	1
+val_18	18	val_18	1
+val_24	24	val_24	1
+val_24	24	val_24	1
+val_26	26	val_26	1
+val_26	26	val_26	1
+val_28	28	val_28	1
 val_33	33	val_33	1
+val_34	34	val_34	1
 val_35	35	val_35	1
 val_35	35	val_35	1
 val_35	35	val_35	1
 val_37	37	val_37	1
 val_37	37	val_37	1
-val_41	41	val_41	1
-val_43	43	val_43	1
+val_42	42	val_42	1
+val_42	42	val_42	1
+val_44	44	val_44	1
 val_47	47	val_47	1
-val_51	51	val_51	1
-val_51	51	val_51	1
 val_53	53	val_53	1
-val_57	57	val_57	1
-val_65	65	val_65	1
-val_67	67	val_67	1
-val_67	67	val_67	1
-val_69	69	val_69	1
-val_77	77	val_77	1
-val_83	83	val_83	1
-val_83	83	val_83	1
-val_85	85	val_85	1
+val_66	66	val_66	1
+val_72	72	val_72	1
+val_72	72	val_72	1
+val_74	74	val_74	1
+val_76	76	val_76	1
+val_76	76	val_76	1
+val_78	78	val_78	1
+val_82	82	val_82	1
 val_87	87	val_87	1
+val_92	92	val_92	1
 val_95	95	val_95	1
 val_95	95	val_95	1
-val_97	97	val_97	1
-val_97	97	val_97	1
+val_100	100	val_100	1
+val_100	100	val_100	1
 val_103	103	val_103	1
 val_103	103	val_103	1
-val_105	105	val_105	1
+val_104	104	val_104	1
+val_104	104	val_104	1
 val_111	111	val_111	1
-val_113	113	val_113	1
-val_113	113	val_113	1
-val_119	119	val_119	1
-val_119	119	val_119	1
-val_119	119	val_119	1
+val_114	114	val_114	1
+val_118	118	val_118	1
+val_118	118	val_118	1
+val_120	120	val_120	1
+val_120	120	val_120	1
 val_125	125	val_125	1
 val_125	125	val_125	1
+val_128	128	val_128	1
+val_128	128	val_128	1
+val_128	128	val_128	1
 val_129	129	val_129	1
 val_129	129	val_129	1
 val_131	131	val_131	1
-val_133	133	val_133	1
-val_137	137	val_137	1
-val_137	137	val_137	1
+val_136	136	val_136	1
+val_138	138	val_138	1
+val_138	138	val_138	1
+val_138	138	val_138	1
+val_138	138	val_138	1
 val_143	143	val_143	1
 val_145	145	val_145	1
-val_149	149	val_149	1
-val_149	149	val_149	1
-val_153	153	val_153	1
+val_150	150	val_150	1
+val_152	152	val_152	1
+val_152	152	val_152	1
 val_155	155	val_155	1
-val_157	157	val_157	1
-val_163	163	val_163	1
-val_165	165	val_165	1
-val_165	165	val_165	1
+val_160	160	val_160	1
+val_166	166	val_166	1
 val_167	167	val_167	1
 val_167	167	val_167	1
 val_167	167	val_167	1
-val_169	169	val_169	1
-val_169	169	val_169	1
-val_169	169	val_169	1
-val_169	169	val_169	1
+val_168	168	val_168	1
+val_170	170	val_170	1
+val_172	172	val_172	1
+val_172	172	val_172	1
+val_174	174	val_174	1
+val_174	174	val_174	1
 val_175	175	val_175	1
 val_175	175	val_175	1
-val_177	177	val_177	1
+val_176	176	val_176	1
+val_176	176	val_176	1
 val_179	179	val_179	1
 val_179	179	val_179	1
-val_181	181	val_181	1
+val_180	180	val_180	1
 val_183	183	val_183	1
-val_187	187	val_187	1
-val_187	187	val_187	1
-val_187	187	val_187	1
+val_186	186	val_186	1
 val_189	189	val_189	1
-val_191	191	val_191	1
-val_191	191	val_191	1
+val_192	192	val_192	1
 val_193	193	val_193	1
 val_193	193	val_193	1
 val_193	193	val_193	1
-val_195	195	val_195	1
-val_195	195	val_195	1
-val_197	197	val_197	1
-val_197	197	val_197	1
-val_199	199	val_199	1
-val_199	199	val_199	1
-val_199	199	val_199	1
-val_201	201	val_201	1
+val_194	194	val_194	1
+val_196	196	val_196	1
+val_200	200	val_200	1
+val_200	200	val_200	1
 val_203	203	val_203	1
 val_203	203	val_203	1
 val_205	205	val_205	1
@@ -1178,93 +1185,89 @@ val_213	213	val_213	1
 val_213	213	val_213	1
 val_217	217	val_217	1
 val_217	217	val_217	1
+val_218	218	val_218	1
 val_219	219	val_219	1
 val_219	219	val_219	1
-val_221	221	val_221	1
-val_221	221	val_221	1
+val_222	222	val_222	1
 val_223	223	val_223	1
 val_223	223	val_223	1
-val_229	229	val_229	1
-val_229	229	val_229	1
-val_233	233	val_233	1
-val_233	233	val_233	1
+val_224	224	val_224	1
+val_224	224	val_224	1
+val_228	228	val_228	1
+val_230	230	val_230	1
+val_230	230	val_230	1
+val_230	230	val_230	1
+val_230	230	val_230	1
+val_230	230	val_230	1
 val_235	235	val_235	1
-val_237	237	val_237	1
-val_237	237	val_237	1
-val_239	239	val_239	1
-val_239	239	val_239	1
 val_241	241	val_241	1
+val_242	242	val_242	1
+val_242	242	val_242	1
 val_247	247	val_247	1
-val_249	249	val_249	1
-val_255	255	val_255	1
-val_255	255	val_255	1
 val_257	257	val_257	1
+val_258	258	val_258	1
+val_262	262	val_262	1
 val_263	263	val_263	1
 val_265	265	val_265	1
 val_265	265	val_265	1
 val_273	273	val_273	1
 val_273	273	val_273	1
 val_273	273	val_273	1
+val_274	274	val_274	1
 val_275	275	val_275	1
 val_277	277	val_277	1
 val_277	277	val_277	1
 val_277	277	val_277	1
 val_277	277	val_277	1
+val_278	278	val_278	1
+val_278	278	val_278	1
+val_280	280	val_280	1
+val_280	280	val_280	1
 val_281	281	val_281	1
 val_281	281	val_281	1
+val_282	282	val_282	1
+val_282	282	val_282	1
 val_283	283	val_283	1
 val_285	285	val_285	1
-val_287	287	val_287	1
-val_289	289	val_289	1
-val_291	291	val_291	1
+val_288	288	val_288	1
+val_288	288	val_288	1
+val_296	296	val_296	1
+val_298	298	val_298	1
+val_298	298	val_298	1
+val_298	298	val_298	1
+val_302	302	val_302	1
 val_305	305	val_305	1
-val_307	307	val_307	1
-val_307	307	val_307	1
+val_306	306	val_306	1
 val_309	309	val_309	1
 val_309	309	val_309	1
-val_311	311	val_311	1
-val_311	311	val_311	1
-val_311	311	val_311	1
-val_315	315	val_315	1
-val_317	317	val_317	1
-val_317	317	val_317	1
+val_318	318	val_318	1
+val_318	318	val_318	1
+val_318	318	val_318	1
 val_321	321	val_321	1
 val_321	321	val_321	1
+val_322	322	val_322	1
+val_322	322	val_322	1
 val_323	323	val_323	1
-val_325	325	val_325	1
-val_325	325	val_325	1
-val_327	327	val_327	1
-val_327	327	val_327	1
-val_327	327	val_327	1
 val_331	331	val_331	1
 val_331	331	val_331	1
 val_333	333	val_333	1
 val_333	333	val_333	1
 val_335	335	val_335	1
-val_339	339	val_339	1
-val_341	341	val_341	1
 val_345	345	val_345	1
-val_351	351	val_351	1
-val_353	353	val_353	1
-val_353	353	val_353	1
-val_365	365	val_365	1
+val_356	356	val_356	1
+val_366	366	val_366	1
 val_367	367	val_367	1
 val_367	367	val_367	1
-val_369	369	val_369	1
-val_369	369	val_369	1
-val_369	369	val_369	1
 val_373	373	val_373	1
+val_374	374	val_374	1
 val_375	375	val_375	1
-val_377	377	val_377	1
 val_379	379	val_379	1
+val_382	382	val_382	1
+val_382	382	val_382	1
 val_389	389	val_389	1
-val_393	393	val_393	1
 val_395	395	val_395	1
 val_395	395	val_395	1
-val_397	397	val_397	1
-val_397	397	val_397	1
-val_399	399	val_399	1
-val_399	399	val_399	1
+val_400	400	val_400	1
 val_401	401	val_401	1
 val_401	401	val_401	1
 val_401	401	val_401	1
@@ -1273,58 +1276,55 @@ val_401	401	val_401	1
 val_403	403	val_403	1
 val_403	403	val_403	1
 val_403	403	val_403	1
-val_407	407	val_407	1
-val_409	409	val_409	1
-val_409	409	val_409	1
-val_409	409	val_409	1
-val_411	411	val_411	1
+val_406	406	val_406	1
+val_406	406	val_406	1
+val_406	406	val_406	1
+val_406	406	val_406	1
 val_413	413	val_413	1
 val_413	413	val_413	1
-val_417	417	val_417	1
-val_417	417	val_417	1
-val_417	417	val_417	1
-val_419	419	val_419	1
-val_421	421	val_421	1
-val_427	427	val_427	1
+val_418	418	val_418	1
+val_424	424	val_424	1
+val_424	424	val_424	1
 val_429	429	val_429	1
 val_429	429	val_429	1
 val_431	431	val_431	1
 val_431	431	val_431	1
 val_431	431	val_431	1
-val_435	435	val_435	1
-val_437	437	val_437	1
+val_436	436	val_436	1
+val_438	438	val_438	1
+val_438	438	val_438	1
+val_438	438	val_438	1
 val_439	439	val_439	1
 val_439	439	val_439	1
-val_443	443	val_443	1
-val_449	449	val_449	1
-val_453	453	val_453	1
+val_448	448	val_448	1
 val_455	455	val_455	1
 val_457	457	val_457	1
-val_459	459	val_459	1
-val_459	459	val_459	1
-val_463	463	val_463	1
-val_463	463	val_463	1
-val_467	467	val_467	1
+val_460	460	val_460	1
+val_462	462	val_462	1
+val_462	462	val_462	1
+val_468	468	val_468	1
+val_468	468	val_468	1
+val_468	468	val_468	1
+val_468	468	val_468	1
 val_469	469	val_469	1
 val_469	469	val_469	1
 val_469	469	val_469	1
 val_469	469	val_469	1
 val_469	469	val_469	1
+val_470	470	val_470	1
 val_475	475	val_475	1
 val_477	477	val_477	1
-val_479	479	val_479	1
 val_481	481	val_481	1
-val_483	483	val_483	1
-val_485	485	val_485	1
 val_487	487	val_487	1
 val_489	489	val_489	1
 val_489	489	val_489	1
 val_489	489	val_489	1
 val_489	489	val_489	1
-val_491	491	val_491	1
+val_492	492	val_492	1
+val_492	492	val_492	1
 val_493	493	val_493	1
-val_495	495	val_495	1
-val_497	497	val_497	1
+val_494	494	val_494	1
+val_496	496	val_496	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table2 PARTITION (ds = '2')
 SELECT a.key+a.key, a.value, a.value FROM test_table1 a WHERE a.ds = '1'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/smb_mapjoin_22.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/smb_mapjoin_22.q.out b/ql/src/test/results/clientpositive/spark/smb_mapjoin_22.q.out
index 154d7ff..ee661ec 100644
--- a/ql/src/test/results/clientpositive/spark/smb_mapjoin_22.q.out
+++ b/ql/src/test/results/clientpositive/spark/smb_mapjoin_22.q.out
@@ -108,7 +108,7 @@ POSTHOOK: query: select count(*) from test_table1 tablesample (bucket 2 out of 2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table1
 #### A masked pattern was here ####
-253
+257
 PREHOOK: query: select count(*) from test_table2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table2
@@ -126,7 +126,7 @@ POSTHOOK: query: select count(*) from test_table2 tablesample (bucket 2 out of 2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 #### A masked pattern was here ####
-253
+257
 PREHOOK: query: drop table test_table1
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@test_table1
@@ -253,7 +253,7 @@ POSTHOOK: query: select count(*) from test_table1 tablesample (bucket 2 out of 2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table1
 #### A masked pattern was here ####
-253
+257
 PREHOOK: query: select count(*) from test_table2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table2
@@ -271,4 +271,4 @@ POSTHOOK: query: select count(*) from test_table2 tablesample (bucket 2 out of 2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 #### A masked pattern was here ####
-253
+257

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/spark_union_merge.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/spark_union_merge.q.out b/ql/src/test/results/clientpositive/spark/spark_union_merge.q.out
index f1a1826..3ff7466 100644
--- a/ql/src/test/results/clientpositive/spark/spark_union_merge.q.out
+++ b/ql/src/test/results/clientpositive/spark/spark_union_merge.q.out
@@ -68,6 +68,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'
@@ -89,6 +90,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'
@@ -153,6 +155,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'
@@ -174,6 +177,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'
@@ -296,6 +300,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'
@@ -317,6 +322,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'
@@ -381,6 +387,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'
@@ -402,6 +409,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/stats0.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/stats0.q.out b/ql/src/test/results/clientpositive/spark/stats0.q.out
index 1fa0df8..2a113ae 100644
--- a/ql/src/test/results/clientpositive/spark/stats0.q.out
+++ b/ql/src/test/results/clientpositive/spark/stats0.q.out
@@ -47,6 +47,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 
@@ -78,6 +79,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'
@@ -99,6 +101,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'
@@ -130,6 +133,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 
@@ -1367,6 +1371,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 
@@ -1398,6 +1403,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'
@@ -1419,6 +1425,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'
@@ -1450,6 +1457,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 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/stats1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/stats1.q.out b/ql/src/test/results/clientpositive/spark/stats1.q.out
index 720a0f1..c94bf54 100644
--- a/ql/src/test/results/clientpositive/spark/stats1.q.out
+++ b/ql/src/test/results/clientpositive/spark/stats1.q.out
@@ -174,6 +174,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	26                  
 	rawDataSize         	199                 
@@ -215,6 +216,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	3                   
 	numRows             	26                  
 	rawDataSize         	199                 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/stats10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/stats10.q.out b/ql/src/test/results/clientpositive/spark/stats10.q.out
index 60830d4..bd5cfaf 100644
--- a/ql/src/test/results/clientpositive/spark/stats10.q.out
+++ b/ql/src/test/results/clientpositive/spark/stats10.q.out
@@ -119,104 +119,93 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucket3_1
 POSTHOOK: Input: default@bucket3_1@ds=1
 #### A masked pattern was here ####
-0	val_0	1
-0	val_0	1
-0	val_0	1
 2	val_2	1
-4	val_4	1
-8	val_8	1
 10	val_10	1
-12	val_12	1
-12	val_12	1
-18	val_18	1
-18	val_18	1
+17	val_17	1
+19	val_19	1
 20	val_20	1
-24	val_24	1
-24	val_24	1
-26	val_26	1
-26	val_26	1
-28	val_28	1
+27	val_27	1
 30	val_30	1
-34	val_34	1
-42	val_42	1
-42	val_42	1
-44	val_44	1
+41	val_41	1
+43	val_43	1
+51	val_51	1
+51	val_51	1
 54	val_54	1
+57	val_57	1
 58	val_58	1
 58	val_58	1
 64	val_64	1
-66	val_66	1
+65	val_65	1
+67	val_67	1
+67	val_67	1
+69	val_69	1
 70	val_70	1
 70	val_70	1
 70	val_70	1
-72	val_72	1
-72	val_72	1
-74	val_74	1
-76	val_76	1
-76	val_76	1
-78	val_78	1
+77	val_77	1
 80	val_80	1
-82	val_82	1
+83	val_83	1
+83	val_83	1
 84	val_84	1
 84	val_84	1
+85	val_85	1
 86	val_86	1
 90	val_90	1
 90	val_90	1
 90	val_90	1
-92	val_92	1
 96	val_96	1
+97	val_97	1
+97	val_97	1
 98	val_98	1
 98	val_98	1
-100	val_100	1
-100	val_100	1
-104	val_104	1
-104	val_104	1
-114	val_114	1
+105	val_105	1
+113	val_113	1
+113	val_113	1
 116	val_116	1
-118	val_118	1
-118	val_118	1
-120	val_120	1
-120	val_120	1
+119	val_119	1
+119	val_119	1
+119	val_119	1
 126	val_126	1
-128	val_128	1
-128	val_128	1
-128	val_128	1
+133	val_133	1
 134	val_134	1
 134	val_134	1
-136	val_136	1
-138	val_138	1
-138	val_138	1
-138	val_138	1
-138	val_138	1
+137	val_137	1
+137	val_137	1
 146	val_146	1
 146	val_146	1
-150	val_150	1
-152	val_152	1
-152	val_152	1
+149	val_149	1
+149	val_149	1
+153	val_153	1
 156	val_156	1
+157	val_157	1
 158	val_158	1
-160	val_160	1
 162	val_162	1
+163	val_163	1
 164	val_164	1
 164	val_164	1
-166	val_166	1
-168	val_168	1
-170	val_170	1
-172	val_172	1
-172	val_172	1
-174	val_174	1
-174	val_174	1
-176	val_176	1
-176	val_176	1
+165	val_165	1
+165	val_165	1
+169	val_169	1
+169	val_169	1
+169	val_169	1
+169	val_169	1
+177	val_177	1
 178	val_178	1
-180	val_180	1
-186	val_186	1
+181	val_181	1
+187	val_187	1
+187	val_187	1
+187	val_187	1
 190	val_190	1
-192	val_192	1
-194	val_194	1
-196	val_196	1
-200	val_200	1
-200	val_200	1
+191	val_191	1
+191	val_191	1
+195	val_195	1
+195	val_195	1
+197	val_197	1
+197	val_197	1
+199	val_199	1
+199	val_199	1
+199	val_199	1
+201	val_201	1
 202	val_202	1
 208	val_208	1
 208	val_208	1
@@ -224,63 +213,60 @@ POSTHOOK: Input: default@bucket3_1@ds=1
 214	val_214	1
 216	val_216	1
 216	val_216	1
-218	val_218	1
-222	val_222	1
-224	val_224	1
-224	val_224	1
+221	val_221	1
+221	val_221	1
 226	val_226	1
-228	val_228	1
-230	val_230	1
-230	val_230	1
-230	val_230	1
-230	val_230	1
-230	val_230	1
+229	val_229	1
+229	val_229	1
+233	val_233	1
+233	val_233	1
+237	val_237	1
+237	val_237	1
 238	val_238	1
 238	val_238	1
-242	val_242	1
-242	val_242	1
+239	val_239	1
+239	val_239	1
 244	val_244	1
 248	val_248	1
+249	val_249	1
 252	val_252	1
+255	val_255	1
+255	val_255	1
 256	val_256	1
 256	val_256	1
-258	val_258	1
 260	val_260	1
-262	val_262	1
 266	val_266	1
 272	val_272	1
 272	val_272	1
-274	val_274	1
-278	val_278	1
-278	val_278	1
-280	val_280	1
-280	val_280	1
-282	val_282	1
-282	val_282	1
 284	val_284	1
 286	val_286	1
-288	val_288	1
-288	val_288	1
+287	val_287	1
+289	val_289	1
+291	val_291	1
 292	val_292	1
-296	val_296	1
-298	val_298	1
-298	val_298	1
-298	val_298	1
-302	val_302	1
-306	val_306	1
+307	val_307	1
+307	val_307	1
 308	val_308	1
 310	val_310	1
+311	val_311	1
+311	val_311	1
+311	val_311	1
+315	val_315	1
 316	val_316	1
 316	val_316	1
 316	val_316	1
-318	val_318	1
-318	val_318	1
-318	val_318	1
-322	val_322	1
-322	val_322	1
+317	val_317	1
+317	val_317	1
+325	val_325	1
+325	val_325	1
+327	val_327	1
+327	val_327	1
+327	val_327	1
 332	val_332	1
 336	val_336	1
 338	val_338	1
+339	val_339	1
+341	val_341	1
 342	val_342	1
 342	val_342	1
 344	val_344	1
@@ -290,79 +276,89 @@ POSTHOOK: Input: default@bucket3_1@ds=1
 348	val_348	1
 348	val_348	1
 348	val_348	1
-356	val_356	1
+351	val_351	1
+353	val_353	1
+353	val_353	1
 360	val_360	1
 362	val_362	1
 364	val_364	1
-366	val_366	1
+365	val_365	1
 368	val_368	1
-374	val_374	1
+369	val_369	1
+369	val_369	1
+369	val_369	1
+377	val_377	1
 378	val_378	1
-382	val_382	1
-382	val_382	1
 384	val_384	1
 384	val_384	1
 384	val_384	1
 386	val_386	1
 392	val_392	1
+393	val_393	1
 394	val_394	1
 396	val_396	1
 396	val_396	1
 396	val_396	1
-400	val_400	1
+397	val_397	1
+397	val_397	1
+399	val_399	1
+399	val_399	1
 402	val_402	1
 404	val_404	1
 404	val_404	1
-406	val_406	1
-406	val_406	1
-406	val_406	1
-406	val_406	1
+407	val_407	1
+409	val_409	1
+409	val_409	1
+409	val_409	1
+411	val_411	1
 414	val_414	1
 414	val_414	1
-418	val_418	1
-424	val_424	1
-424	val_424	1
+417	val_417	1
+417	val_417	1
+417	val_417	1
+419	val_419	1
+421	val_421	1
+427	val_427	1
 430	val_430	1
 430	val_430	1
 430	val_430	1
 432	val_432	1
-436	val_436	1
-438	val_438	1
-438	val_438	1
-438	val_438	1
+435	val_435	1
+437	val_437	1
+443	val_443	1
 444	val_444	1
 446	val_446	1
-448	val_448	1
+449	val_449	1
 452	val_452	1
+453	val_453	1
 454	val_454	1
 454	val_454	1
 454	val_454	1
 458	val_458	1
 458	val_458	1
-460	val_460	1
-462	val_462	1
-462	val_462	1
+459	val_459	1
+459	val_459	1
+463	val_463	1
+463	val_463	1
 466	val_466	1
 466	val_466	1
 466	val_466	1
-468	val_468	1
-468	val_468	1
-468	val_468	1
-468	val_468	1
-470	val_470	1
+467	val_467	1
 472	val_472	1
 478	val_478	1
 478	val_478	1
+479	val_479	1
 480	val_480	1
 480	val_480	1
 480	val_480	1
 482	val_482	1
+483	val_483	1
 484	val_484	1
+485	val_485	1
 490	val_490	1
-492	val_492	1
-492	val_492	1
-494	val_494	1
-496	val_496	1
+491	val_491	1
+495	val_495	1
+497	val_497	1
 498	val_498	1
 498	val_498	1
 498	val_498	1
@@ -501,6 +497,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	4                   
 	numPartitions       	2                   
 	numRows             	1000                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/stats16.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/stats16.q.out b/ql/src/test/results/clientpositive/spark/stats16.q.out
index 659d581..ba56284 100644
--- a/ql/src/test/results/clientpositive/spark/stats16.q.out
+++ b/ql/src/test/results/clientpositive/spark/stats16.q.out
@@ -27,6 +27,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -75,6 +76,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	5312                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/stats3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/stats3.q.out b/ql/src/test/results/clientpositive/spark/stats3.q.out
index 212ddcc..2c2801d 100644
--- a/ql/src/test/results/clientpositive/spark/stats3.q.out
+++ b/ql/src/test/results/clientpositive/spark/stats3.q.out
@@ -36,6 +36,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"col1":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns col1
                 columns.comments 
@@ -81,6 +82,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -219,6 +221,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numPartitions       	1                   
 	numRows             	6                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/stats5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/stats5.q.out b/ql/src/test/results/clientpositive/spark/stats5.q.out
index 1204200..6e88634 100644
--- a/ql/src/test/results/clientpositive/spark/stats5.q.out
+++ b/ql/src/test/results/clientpositive/spark/stats5.q.out
@@ -59,6 +59,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	5312                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/stats_noscan_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/stats_noscan_2.q.out b/ql/src/test/results/clientpositive/spark/stats_noscan_2.q.out
index 70eaf11..9a58d26 100644
--- a/ql/src/test/results/clientpositive/spark/stats_noscan_2.q.out
+++ b/ql/src/test/results/clientpositive/spark/stats_noscan_2.q.out
@@ -48,6 +48,7 @@ Table Type:         	EXTERNAL_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	numFiles            	1                   
 	totalSize           	11                  
 #### A masked pattern was here ####
@@ -88,6 +89,7 @@ Table Type:         	EXTERNAL_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	6                   
 	rawDataSize         	6                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/statsfs.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/statsfs.q.out b/ql/src/test/results/clientpositive/spark/statsfs.q.out
index fef2040..1af1495 100644
--- a/ql/src/test/results/clientpositive/spark/statsfs.q.out
+++ b/ql/src/test/results/clientpositive/spark/statsfs.q.out
@@ -274,6 +274,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	5312                
@@ -334,6 +335,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	5312                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/subquery_nested_subquery.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/subquery_nested_subquery.q.out b/ql/src/test/results/clientpositive/spark/subquery_nested_subquery.q.out
index 15f33f0..0d894e3 100644
--- a/ql/src/test/results/clientpositive/spark/subquery_nested_subquery.q.out
+++ b/ql/src/test/results/clientpositive/spark/subquery_nested_subquery.q.out
@@ -11,28 +11,28 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
 192697	almond antique blue firebrick mint	Manufacturer#5	Brand#52	MEDIUM BURNISHED TIN	31	LG DRUM	1789.69	ickly ir
+121152	almond antique burnished rose metallic	Manufacturer#1	Brand#14	PROMO PLATED TIN	2	JUMBO BOX	1173.15	e pinto beans h
+121152	almond antique burnished rose metallic	Manufacturer#1	Brand#14	PROMO PLATED TIN	2	JUMBO BOX	1173.15	e pinto beans h
 90681	almond antique chartreuse khaki white	Manufacturer#3	Brand#31	MEDIUM BURNISHED TIN	17	SM CASE	1671.68	are slyly after the sl
-85768	almond antique chartreuse lavender yellow	Manufacturer#1	Brand#12	LARGE BRUSHED STEEL	34	SM BAG	1753.76	refull
+49671	almond antique gainsboro frosted violet	Manufacturer#4	Brand#41	SMALL BRUSHED BRASS	10	SM BOX	1620.67	ccounts run quick
 42669	almond antique medium spring khaki	Manufacturer#5	Brand#51	STANDARD BURNISHED TIN	6	MED CAN	1611.66	sits haggl
-105685	almond antique violet chocolate turquoise	Manufacturer#2	Brand#22	MEDIUM ANODIZED COPPER	14	MED CAN	1690.68	ly pending requ
+112398	almond antique metallic orange dim	Manufacturer#3	Brand#32	MEDIUM BURNISHED BRASS	19	JUMBO JAR	1410.39	ole car
+110592	almond antique salmon chartreuse burlywood	Manufacturer#1	Brand#15	PROMO BURNISHED NICKEL	6	JUMBO PKG	1602.59	 to the furiously
+155733	almond antique sky peru orange	Manufacturer#5	Brand#53	SMALL PLATED BRASS	2	WRAP DRUM	1788.73	furiously. bra
 48427	almond antique violet mint lemon	Manufacturer#4	Brand#42	PROMO POLISHED STEEL	39	SM CASE	1375.42	hely ironic i
 86428	almond aquamarine burnished black steel	Manufacturer#1	Brand#12	STANDARD ANODIZED STEEL	28	WRAP BAG	1414.42	arefully 
 15103	almond aquamarine dodger light gainsboro	Manufacturer#5	Brand#53	ECONOMY BURNISHED STEEL	46	LG PACK	1018.1	packages hinder carefu
-45261	almond aquamarine floral ivory bisque	Manufacturer#4	Brand#42	SMALL PLATED STEEL	27	WRAP CASE	1206.26	careful
-65667	almond aquamarine pink moccasin thistle	Manufacturer#1	Brand#12	LARGE BURNISHED STEEL	42	JUMBO CASE	1632.66	e across the expr
-132666	almond aquamarine rose maroon antique	Manufacturer#2	Brand#24	SMALL POLISHED NICKEL	25	MED BOX	1698.66	even 
 195606	almond aquamarine sandy cyan gainsboro	Manufacturer#2	Brand#25	STANDARD PLATED TIN	18	SM PKG	1701.6	ic de
-17927	almond aquamarine yellow dodger mint	Manufacturer#4	Brand#41	ECONOMY BRUSHED COPPER	7	SM PKG	1844.92	ites. eve
 33357	almond azure aquamarine papaya violet	Manufacturer#4	Brand#41	STANDARD ANODIZED TIN	12	WRAP CASE	1290.35	reful
 78486	almond azure blanched chiffon midnight	Manufacturer#5	Brand#52	LARGE BRUSHED BRASS	23	MED BAG	1464.48	hely blith
-121152	almond antique burnished rose metallic	Manufacturer#1	Brand#14	PROMO PLATED TIN	2	JUMBO BOX	1173.15	e pinto beans h
-121152	almond antique burnished rose metallic	Manufacturer#1	Brand#14	PROMO PLATED TIN	2	JUMBO BOX	1173.15	e pinto beans h
+85768	almond antique chartreuse lavender yellow	Manufacturer#1	Brand#12	LARGE BRUSHED STEEL	34	SM BAG	1753.76	refull
 17273	almond antique forest lavender goldenrod	Manufacturer#3	Brand#35	PROMO ANODIZED TIN	14	JUMBO CASE	1190.27	along the
-49671	almond antique gainsboro frosted violet	Manufacturer#4	Brand#41	SMALL BRUSHED BRASS	10	SM BOX	1620.67	ccounts run quick
-112398	almond antique metallic orange dim	Manufacturer#3	Brand#32	MEDIUM BURNISHED BRASS	19	JUMBO JAR	1410.39	ole car
 40982	almond antique misty red olive	Manufacturer#3	Brand#32	ECONOMY PLATED COPPER	1	LG PKG	1922.98	c foxes can s
 144293	almond antique olive coral navajo	Manufacturer#3	Brand#34	STANDARD POLISHED STEEL	45	JUMBO CAN	1337.29	ag furiously about 
-110592	almond antique salmon chartreuse burlywood	Manufacturer#1	Brand#15	PROMO BURNISHED NICKEL	6	JUMBO PKG	1602.59	 to the furiously
-155733	almond antique sky peru orange	Manufacturer#5	Brand#53	SMALL PLATED BRASS	2	WRAP DRUM	1788.73	furiously. bra
+105685	almond antique violet chocolate turquoise	Manufacturer#2	Brand#22	MEDIUM ANODIZED COPPER	14	MED CAN	1690.68	ly pending requ
 191709	almond antique violet turquoise frosted	Manufacturer#2	Brand#22	ECONOMY POLISHED STEEL	40	MED BOX	1800.7	 haggle
+45261	almond aquamarine floral ivory bisque	Manufacturer#4	Brand#42	SMALL PLATED STEEL	27	WRAP CASE	1206.26	careful
 146985	almond aquamarine midnight light salmon	Manufacturer#2	Brand#23	MEDIUM BURNISHED COPPER	2	SM CASE	2031.98	s cajole caref
+65667	almond aquamarine pink moccasin thistle	Manufacturer#1	Brand#12	LARGE BURNISHED STEEL	42	JUMBO CASE	1632.66	e across the expr
+132666	almond aquamarine rose maroon antique	Manufacturer#2	Brand#24	SMALL POLISHED NICKEL	25	MED BOX	1698.66	even 
+17927	almond aquamarine yellow dodger mint	Manufacturer#4	Brand#41	ECONOMY BRUSHED COPPER	7	SM PKG	1844.92	ites. eve


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/smb_mapjoin_46.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/smb_mapjoin_46.q.out b/ql/src/test/results/clientpositive/smb_mapjoin_46.q.out
index 383ab31..f259c06 100644
--- a/ql/src/test/results/clientpositive/smb_mapjoin_46.q.out
+++ b/ql/src/test/results/clientpositive/smb_mapjoin_46.q.out
@@ -143,11 +143,11 @@ POSTHOOK: Input: default@test2
 #### A masked pattern was here ####
 98	NULL	None	NULL	NULL	NULL
 NULL	NULL	None	NULL	NULL	NULL
-99	0	Alice	NULL	NULL	NULL
 101	2	Car	103	2	Ema
 101	2	Car	102	2	Del
 99	2	Mat	103	2	Ema
 99	2	Mat	102	2	Del
+99	0	Alice	NULL	NULL	NULL
 100	1	Bob	NULL	NULL	NULL
 PREHOOK: query: EXPLAIN
 SELECT *
@@ -221,9 +221,9 @@ POSTHOOK: Input: default@test2
 #### A masked pattern was here ####
 98	NULL	None	NULL	NULL	NULL
 NULL	NULL	None	NULL	NULL	NULL
-99	0	Alice	NULL	NULL	NULL
 101	2	Car	102	2	Del
 99	2	Mat	NULL	NULL	NULL
+99	0	Alice	NULL	NULL	NULL
 100	1	Bob	NULL	NULL	NULL
 Warning: Map Join MAPJOIN[11][bigTable=?] in task 'Stage-3:MAPRED' is a cross product
 PREHOOK: query: EXPLAIN
@@ -327,9 +327,9 @@ POSTHOOK: Input: default@test2
 #### A masked pattern was here ####
 98	NULL	None	NULL	NULL	NULL
 NULL	NULL	None	NULL	NULL	NULL
-99	0	Alice	NULL	NULL	NULL
 101	2	Car	102	2	Del
 99	2	Mat	NULL	NULL	NULL
+99	0	Alice	NULL	NULL	NULL
 100	1	Bob	102	2	Del
 PREHOOK: query: EXPLAIN
 SELECT *
@@ -491,12 +491,12 @@ POSTHOOK: Input: default@test2
 #### A masked pattern was here ####
 98	NULL	None	NULL	NULL	NULL
 NULL	NULL	None	NULL	NULL	NULL
-99	0	Alice	NULL	NULL	NULL
 101	2	Car	105	NULL	None
 101	2	Car	103	2	Ema
 101	2	Car	102	2	Del
 101	2	Car	104	3	Fli
 99	2	Mat	NULL	NULL	NULL
+99	0	Alice	NULL	NULL	NULL
 100	1	Bob	105	NULL	None
 100	1	Bob	103	2	Ema
 100	1	Bob	102	2	Del
@@ -598,13 +598,13 @@ POSTHOOK: Input: default@test2
 #### A masked pattern was here ####
 98	NULL	None	102	2	Del
 NULL	NULL	None	102	2	Del
-99	0	Alice	102	2	Del
 101	2	Car	105	NULL	None
 101	2	Car	103	2	Ema
 101	2	Car	102	2	Del
 101	2	Car	104	3	Fli
 99	2	Mat	103	2	Ema
 99	2	Mat	102	2	Del
+99	0	Alice	102	2	Del
 100	1	Bob	105	NULL	None
 100	1	Bob	103	2	Ema
 100	1	Bob	102	2	Del
@@ -702,13 +702,13 @@ POSTHOOK: Input: default@test2
 #### A masked pattern was here ####
 98	NULL	None	NULL	NULL	NULL
 NULL	NULL	None	NULL	NULL	NULL
-99	0	Alice	NULL	NULL	NULL
 101	2	Car	105	NULL	None
 101	2	Car	103	2	Ema
 101	2	Car	102	2	Del
 101	2	Car	104	3	Fli
 99	2	Mat	103	2	Ema
 99	2	Mat	102	2	Del
+99	0	Alice	NULL	NULL	NULL
 100	1	Bob	105	NULL	None
 100	1	Bob	103	2	Ema
 100	1	Bob	102	2	Del
@@ -806,11 +806,11 @@ POSTHOOK: Input: default@test2
 #### A masked pattern was here ####
 98	NULL	None	102	2	Del
 NULL	NULL	None	102	2	Del
-99	0	Alice	102	2	Del
 101	2	Car	103	2	Ema
 101	2	Car	102	2	Del
 99	2	Mat	103	2	Ema
 99	2	Mat	102	2	Del
+99	0	Alice	102	2	Del
 100	1	Bob	102	2	Del
 PREHOOK: query: EXPLAIN
 SELECT *
@@ -882,10 +882,10 @@ POSTHOOK: Input: default@test2
 #### A masked pattern was here ####
 98	NULL	None	NULL	NULL	NULL
 NULL	NULL	None	NULL	NULL	NULL
-99	0	Alice	NULL	NULL	NULL
 101	2	Car	103	2	Ema
 101	2	Car	102	2	Del
 99	2	Mat	102	2	Del
+99	0	Alice	NULL	NULL	NULL
 100	1	Bob	NULL	NULL	NULL
 Warning: Map Join MAPJOIN[9][bigTable=?] in task 'Stage-3:MAPRED' is a cross product
 PREHOOK: query: EXPLAIN
@@ -989,9 +989,9 @@ POSTHOOK: Input: default@test2
 100	1	Bob	103	2	Ema
 98	NULL	None	102	2	Del
 NULL	NULL	None	102	2	Del
-99	0	Alice	102	2	Del
 101	2	Car	102	2	Del
 99	2	Mat	102	2	Del
+99	0	Alice	102	2	Del
 100	1	Bob	102	2	Del
 101	2	Car	104	3	Fli
 100	1	Bob	104	3	Fli
@@ -1192,9 +1192,9 @@ NULL	NULL	NULL	105	NULL	None
 99	2	Mat	103	2	Ema
 98	NULL	None	102	2	Del
 NULL	NULL	None	102	2	Del
-99	0	Alice	102	2	Del
 101	2	Car	102	2	Del
 99	2	Mat	102	2	Del
+99	0	Alice	102	2	Del
 100	1	Bob	102	2	Del
 NULL	NULL	NULL	104	3	Fli
 PREHOOK: query: EXPLAIN
@@ -1358,17 +1358,17 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test1
 POSTHOOK: Input: default@test2
 #### A masked pattern was here ####
+100	1	Bob	104	3	Fli
 100	1	Bob	102	2	Del
 100	1	Bob	103	2	Ema
 100	1	Bob	105	NULL	None
-100	1	Bob	104	3	Fli
+99	0	Alice	102	2	Del
 99	2	Mat	102	2	Del
 99	2	Mat	103	2	Ema
+101	2	Car	104	3	Fli
 101	2	Car	102	2	Del
 101	2	Car	103	2	Ema
 101	2	Car	105	NULL	None
-101	2	Car	104	3	Fli
-99	0	Alice	102	2	Del
 NULL	NULL	None	102	2	Del
 98	NULL	None	102	2	Del
 Warning: Shuffle Join JOIN[6][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
@@ -1455,17 +1455,17 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test1
 POSTHOOK: Input: default@test2
 #### A masked pattern was here ####
+100	1	Bob	104	3	Fli
 100	1	Bob	102	2	Del
 100	1	Bob	103	2	Ema
 100	1	Bob	105	NULL	None
-100	1	Bob	104	3	Fli
+99	0	Alice	NULL	NULL	NULL
 99	2	Mat	102	2	Del
 99	2	Mat	103	2	Ema
+101	2	Car	104	3	Fli
 101	2	Car	102	2	Del
 101	2	Car	103	2	Ema
 101	2	Car	105	NULL	None
-101	2	Car	104	3	Fli
-99	0	Alice	NULL	NULL	NULL
 NULL	NULL	None	NULL	NULL	NULL
 98	NULL	None	NULL	NULL	NULL
 Warning: Shuffle Join JOIN[6][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
@@ -1553,15 +1553,15 @@ POSTHOOK: Input: default@test1
 POSTHOOK: Input: default@test2
 #### A masked pattern was here ####
 100	1	Bob	102	2	Del
+99	0	Alice	102	2	Del
 99	2	Mat	102	2	Del
 99	2	Mat	103	2	Ema
 101	2	Car	102	2	Del
 101	2	Car	103	2	Ema
-99	0	Alice	102	2	Del
 NULL	NULL	None	102	2	Del
 98	NULL	None	102	2	Del
-NULL	NULL	NULL	105	NULL	None
 NULL	NULL	NULL	104	3	Fli
+NULL	NULL	NULL	105	NULL	None
 PREHOOK: query: EXPLAIN
 SELECT *
 FROM test1 FULL OUTER JOIN test2

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/smb_mapjoin_47.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/smb_mapjoin_47.q.out b/ql/src/test/results/clientpositive/smb_mapjoin_47.q.out
index ab14bb9..73b295c 100644
--- a/ql/src/test/results/clientpositive/smb_mapjoin_47.q.out
+++ b/ql/src/test/results/clientpositive/smb_mapjoin_47.q.out
@@ -445,13 +445,13 @@ POSTHOOK: Input: default@test2
 #### A masked pattern was here ####
 98	NULL	None	102	2	Del
 NULL	NULL	None	102	2	Del
-99	0	Alice	102	2	Del
 101	2	Car	105	NULL	None
 101	2	Car	103	2	Ema
 101	2	Car	102	2	Del
 101	2	Car	104	3	Fli
 99	2	Mat	103	2	Ema
 99	2	Mat	102	2	Del
+99	0	Alice	102	2	Del
 100	1	Bob	105	NULL	None
 Warning: Map Join MAPJOIN[10][bigTable=?] in task 'Stage-3:MAPRED' is a cross product
 PREHOOK: query: EXPLAIN
@@ -653,12 +653,12 @@ POSTHOOK: Input: default@test2
 98	NULL	None	103	2	Ema
 98	NULL	None	102	2	Del
 98	NULL	None	104	3	Fli
-99	0	Alice	105	NULL	None
-99	0	Alice	103	2	Ema
-99	0	Alice	102	2	Del
-99	0	Alice	104	3	Fli
 101	2	Car	105	NULL	None
 101	2	Car	103	2	Ema
+101	2	Car	102	2	Del
+101	2	Car	104	3	Fli
+99	2	Mat	105	NULL	None
+99	2	Mat	103	2	Ema
 Warning: Map Join MAPJOIN[10][bigTable=?] in task 'Stage-3:MAPRED' is a cross product
 PREHOOK: query: EXPLAIN
 SELECT *
@@ -850,16 +850,16 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test1
 POSTHOOK: Input: default@test2
 #### A masked pattern was here ####
-104	3	Fli	99	2	Mat	NULL	NULL	NULL
-104	3	Fli	101	2	Car	NULL	NULL	NULL
-102	2	Del	99	2	Mat	99	2	Mat
-102	2	Del	101	2	Car	99	2	Mat
-103	2	Ema	99	2	Mat	99	2	Mat
-103	2	Ema	101	2	Car	99	2	Mat
-102	2	Del	99	2	Mat	101	2	Car
-102	2	Del	101	2	Car	101	2	Car
-103	2	Ema	99	2	Mat	101	2	Car
-103	2	Ema	101	2	Car	101	2	Car
+104	3	Fli	100	1	Bob	NULL	NULL	NULL
+104	3	Fli	99	0	Alice	NULL	NULL	NULL
+102	2	Del	100	1	Bob	99	2	Mat
+102	2	Del	99	0	Alice	99	2	Mat
+103	2	Ema	100	1	Bob	99	2	Mat
+103	2	Ema	99	0	Alice	99	2	Mat
+102	2	Del	100	1	Bob	101	2	Car
+102	2	Del	99	0	Alice	101	2	Car
+103	2	Ema	100	1	Bob	101	2	Car
+103	2	Ema	99	0	Alice	101	2	Car
 Warning: Shuffle Join JOIN[11][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: EXPLAIN
 SELECT *
@@ -1146,14 +1146,14 @@ POSTHOOK: Input: default@test2
 #### A masked pattern was here ####
 NULL	NULL	NULL	NULL	NULL	NULL	98	NULL	None
 NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	None
-NULL	NULL	NULL	NULL	NULL	NULL	99	0	Alice
 103	2	Ema	98	NULL	None	101	2	Car
 102	2	Del	98	NULL	None	101	2	Car
-103	2	Ema	99	0	Alice	101	2	Car
-102	2	Del	99	0	Alice	101	2	Car
 103	2	Ema	101	2	Car	101	2	Car
 102	2	Del	101	2	Car	101	2	Car
 103	2	Ema	99	2	Mat	101	2	Car
+102	2	Del	99	2	Mat	101	2	Car
+103	2	Ema	99	0	Alice	101	2	Car
+102	2	Del	99	0	Alice	101	2	Car
 Warning: Shuffle Join JOIN[11][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: EXPLAIN
 SELECT *
@@ -1375,15 +1375,15 @@ POSTHOOK: Input: default@test1
 POSTHOOK: Input: default@test2
 #### A masked pattern was here ####
 105	NULL	None	100	1	Bob	NULL	NULL	NULL
-105	NULL	None	101	2	Car	NULL	NULL	NULL
-105	NULL	None	98	NULL	None	NULL	NULL	NULL
-105	NULL	None	99	2	Mat	NULL	NULL	NULL
 105	NULL	None	99	0	Alice	NULL	NULL	NULL
-NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	None
+105	NULL	None	99	2	Mat	NULL	NULL	NULL
+105	NULL	None	98	NULL	None	NULL	NULL	NULL
+105	NULL	None	101	2	Car	NULL	NULL	NULL
 NULL	NULL	NULL	NULL	NULL	NULL	98	NULL	None
+NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	None
 NULL	NULL	NULL	NULL	NULL	NULL	99	0	Alice
 NULL	NULL	NULL	NULL	NULL	NULL	100	1	Bob
-102	2	Del	100	1	Bob	99	2	Mat
+102	2	Del	100	1	Bob	101	2	Car
 Warning: Map Join MAPJOIN[17][bigTable=?] in task 'Stage-5:MAPRED' is a cross product
 PREHOOK: query: EXPLAIN
 SELECT *

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/sort_merge_join_desc_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/sort_merge_join_desc_5.q.out b/ql/src/test/results/clientpositive/sort_merge_join_desc_5.q.out
index 5754a74..38d2b96 100644
--- a/ql/src/test/results/clientpositive/sort_merge_join_desc_5.q.out
+++ b/ql/src/test/results/clientpositive/sort_merge_join_desc_5.q.out
@@ -128,6 +128,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 1
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/sort_merge_join_desc_6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/sort_merge_join_desc_6.q.out b/ql/src/test/results/clientpositive/sort_merge_join_desc_6.q.out
index 23cb97a..64bf678 100644
--- a/ql/src/test/results/clientpositive/sort_merge_join_desc_6.q.out
+++ b/ql/src/test/results/clientpositive/sort_merge_join_desc_6.q.out
@@ -101,6 +101,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -212,6 +213,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/sort_merge_join_desc_7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/sort_merge_join_desc_7.q.out b/ql/src/test/results/clientpositive/sort_merge_join_desc_7.q.out
index 426f63f..77f7792 100644
--- a/ql/src/test/results/clientpositive/sort_merge_join_desc_7.q.out
+++ b/ql/src/test/results/clientpositive/sort_merge_join_desc_7.q.out
@@ -137,6 +137,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -184,6 +185,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -286,6 +288,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -335,6 +338,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/alter_merge_stats_orc.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/alter_merge_stats_orc.q.out b/ql/src/test/results/clientpositive/spark/alter_merge_stats_orc.q.out
index 2b069ec..9337387 100644
--- a/ql/src/test/results/clientpositive/spark/alter_merge_stats_orc.q.out
+++ b/ql/src/test/results/clientpositive/spark/alter_merge_stats_orc.q.out
@@ -89,6 +89,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	3                   
 	numRows             	1500                
 	rawDataSize         	141000              
@@ -139,6 +140,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1500                
 	rawDataSize         	141000              

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/auto_join_reordering_values.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/auto_join_reordering_values.q.out b/ql/src/test/results/clientpositive/spark/auto_join_reordering_values.q.out
index fa8ff3e..2cc4eee 100644
--- a/ql/src/test/results/clientpositive/spark/auto_join_reordering_values.q.out
+++ b/ql/src/test/results/clientpositive/spark/auto_join_reordering_values.q.out
@@ -129,6 +129,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns dealid,date,time,cityid,userid
                     columns.comments 
@@ -150,6 +151,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns dealid,date,time,cityid,userid
                       columns.comments 
@@ -203,6 +205,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns dealid,date,time,cityid,userid
                     columns.comments 
@@ -224,6 +227,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns dealid,date,time,cityid,userid
                       columns.comments 
@@ -277,6 +281,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns dealid,date,time,cityid,userid
                     columns.comments 
@@ -298,6 +303,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns dealid,date,time,cityid,userid
                       columns.comments 
@@ -351,6 +357,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns dealid,date,time,cityid,userid
                     columns.comments 
@@ -372,6 +379,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns dealid,date,time,cityid,userid
                       columns.comments 
@@ -425,6 +433,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns userid
                     columns.comments 
@@ -446,6 +455,7 @@ STAGE PLANS:
                     properties:
                       COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns userid
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_1.q.out b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_1.q.out
index a2b5d0f..66168eb 100644
--- a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_1.q.out
+++ b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_1.q.out
@@ -186,6 +186,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -235,6 +236,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -395,6 +397,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -444,6 +447,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -604,6 +608,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -653,6 +658,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_12.q.out b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_12.q.out
index 449630b..78d2860 100644
--- a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_12.q.out
+++ b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_12.q.out
@@ -212,6 +212,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -261,6 +262,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -339,6 +341,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -416,6 +419,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -485,6 +489,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_2.q.out b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_2.q.out
index bb5c2a0..23cb078 100644
--- a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_2.q.out
+++ b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_2.q.out
@@ -168,6 +168,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -217,6 +218,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -377,6 +379,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -426,6 +429,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_3.q.out b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_3.q.out
index e5dcbed..7205eef 100644
--- a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_3.q.out
+++ b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_3.q.out
@@ -168,6 +168,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -327,6 +328,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -486,6 +488,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_4.q.out b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_4.q.out
index 348a5ea..7e0355e 100644
--- a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_4.q.out
+++ b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_4.q.out
@@ -184,6 +184,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -343,6 +344,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -502,6 +504,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_5.q.out b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_5.q.out
index fa3dfcc..137ba99 100644
--- a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_5.q.out
+++ b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_5.q.out
@@ -124,6 +124,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -146,6 +147,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -276,6 +278,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -298,6 +301,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -428,6 +432,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -450,6 +455,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_7.q.out b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_7.q.out
index 99dd880..348765f 100644
--- a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_7.q.out
+++ b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_7.q.out
@@ -201,6 +201,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -250,6 +251,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -412,6 +414,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -461,6 +464,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -623,6 +627,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -672,6 +677,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_8.q.out b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_8.q.out
index a1aa8cd..6ef2a4f 100644
--- a/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_8.q.out
+++ b/ql/src/test/results/clientpositive/spark/auto_sortmerge_join_8.q.out
@@ -201,6 +201,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -250,6 +251,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -412,6 +414,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -461,6 +464,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -623,6 +627,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -672,6 +677,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucket2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucket2.q.out b/ql/src/test/results/clientpositive/spark/bucket2.q.out
index 11b232d..1e0fbe5 100644
--- a/ql/src/test/results/clientpositive/spark/bucket2.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucket2.q.out
@@ -56,6 +56,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'
@@ -77,6 +78,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'
@@ -118,6 +120,7 @@ STAGE PLANS:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                         bucket_count 2
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -150,6 +153,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -215,66 +219,59 @@ POSTHOOK: query: select * from bucket2_1 tablesample (bucket 1 out of 2) s
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucket2_1
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
 10	val_10
-100	val_100
-100	val_100
-104	val_104
-104	val_104
-114	val_114
+105	val_105
+113	val_113
+113	val_113
 116	val_116
-118	val_118
-118	val_118
-12	val_12
-12	val_12
-120	val_120
-120	val_120
+119	val_119
+119	val_119
+119	val_119
 126	val_126
-128	val_128
-128	val_128
-128	val_128
+133	val_133
 134	val_134
 134	val_134
-136	val_136
-138	val_138
-138	val_138
-138	val_138
-138	val_138
+137	val_137
+137	val_137
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
+149	val_149
+149	val_149
+153	val_153
 156	val_156
+157	val_157
 158	val_158
-160	val_160
 162	val_162
+163	val_163
 164	val_164
 164	val_164
-166	val_166
-168	val_168
-170	val_170
-172	val_172
-172	val_172
-174	val_174
-174	val_174
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+17	val_17
+177	val_177
 178	val_178
-18	val_18
-18	val_18
-180	val_180
-186	val_186
+181	val_181
+187	val_187
+187	val_187
+187	val_187
+19	val_19
 190	val_190
-192	val_192
-194	val_194
-196	val_196
+191	val_191
+191	val_191
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+199	val_199
+199	val_199
+199	val_199
 2	val_2
 20	val_20
-200	val_200
-200	val_200
+201	val_201
 202	val_202
 208	val_208
 208	val_208
@@ -282,70 +279,62 @@ POSTHOOK: Input: default@bucket2_1
 214	val_214
 216	val_216
 216	val_216
-218	val_218
-222	val_222
-224	val_224
-224	val_224
+221	val_221
+221	val_221
 226	val_226
-228	val_228
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
-24	val_24
-24	val_24
-242	val_242
-242	val_242
+239	val_239
+239	val_239
 244	val_244
 248	val_248
+249	val_249
 252	val_252
+255	val_255
+255	val_255
 256	val_256
 256	val_256
-258	val_258
-26	val_26
-26	val_26
 260	val_260
-262	val_262
 266	val_266
+27	val_27
 272	val_272
 272	val_272
-274	val_274
-278	val_278
-278	val_278
-28	val_28
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 286	val_286
-288	val_288
-288	val_288
+287	val_287
+289	val_289
+291	val_291
 292	val_292
-296	val_296
-298	val_298
-298	val_298
-298	val_298
 30	val_30
-302	val_302
-306	val_306
+307	val_307
+307	val_307
 308	val_308
 310	val_310
+311	val_311
+311	val_311
+311	val_311
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-322	val_322
-322	val_322
+317	val_317
+317	val_317
+325	val_325
+325	val_325
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 336	val_336
 338	val_338
-34	val_34
+339	val_339
+341	val_341
 342	val_342
 342	val_342
 344	val_344
@@ -355,110 +344,121 @@ POSTHOOK: Input: default@bucket2_1
 348	val_348
 348	val_348
 348	val_348
-356	val_356
+351	val_351
+353	val_353
+353	val_353
 360	val_360
 362	val_362
 364	val_364
-366	val_366
+365	val_365
 368	val_368
-374	val_374
+369	val_369
+369	val_369
+369	val_369
+377	val_377
 378	val_378
-382	val_382
-382	val_382
 384	val_384
 384	val_384
 384	val_384
 386	val_386
 392	val_392
+393	val_393
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-4	val_4
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
 402	val_402
 404	val_404
 404	val_404
-406	val_406
-406	val_406
-406	val_406
-406	val_406
+407	val_407
+409	val_409
+409	val_409
+409	val_409
+41	val_41
+411	val_411
 414	val_414
 414	val_414
-418	val_418
-42	val_42
-42	val_42
-424	val_424
-424	val_424
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+427	val_427
+43	val_43
 430	val_430
 430	val_430
 430	val_430
 432	val_432
-436	val_436
-438	val_438
-438	val_438
-438	val_438
-44	val_44
+435	val_435
+437	val_437
+443	val_443
 444	val_444
 446	val_446
-448	val_448
+449	val_449
 452	val_452
+453	val_453
 454	val_454
 454	val_454
 454	val_454
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
+459	val_459
+459	val_459
+463	val_463
+463	val_463
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-470	val_470
+467	val_467
 472	val_472
 478	val_478
 478	val_478
+479	val_479
 480	val_480
 480	val_480
 480	val_480
 482	val_482
+483	val_483
 484	val_484
+485	val_485
 490	val_490
-492	val_492
-492	val_492
-494	val_494
-496	val_496
+491	val_491
+495	val_495
+497	val_497
 498	val_498
 498	val_498
 498	val_498
+51	val_51
+51	val_51
 54	val_54
+57	val_57
 58	val_58
 58	val_58
 64	val_64
-66	val_66
+65	val_65
+67	val_67
+67	val_67
+69	val_69
 70	val_70
 70	val_70
 70	val_70
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-78	val_78
-8	val_8
+77	val_77
 80	val_80
-82	val_82
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
 86	val_86
 90	val_90
 90	val_90
 90	val_90
-92	val_92
 96	val_96
+97	val_97
+97	val_97
 98	val_98
 98	val_98

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucket3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucket3.q.out b/ql/src/test/results/clientpositive/spark/bucket3.q.out
index ed6766d..8771c8f 100644
--- a/ql/src/test/results/clientpositive/spark/bucket3.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucket3.q.out
@@ -56,6 +56,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'
@@ -77,6 +78,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'
@@ -118,6 +120,7 @@ STAGE PLANS:
                       properties:
                         bucket_count 2
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -149,6 +152,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -226,66 +230,59 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucket3_1
 POSTHOOK: Input: default@bucket3_1@ds=1
 #### A masked pattern was here ####
-0	val_0	1
-0	val_0	1
-0	val_0	1
 10	val_10	1
-100	val_100	1
-100	val_100	1
-104	val_104	1
-104	val_104	1
-114	val_114	1
+105	val_105	1
+113	val_113	1
+113	val_113	1
 116	val_116	1
-118	val_118	1
-118	val_118	1
-12	val_12	1
-12	val_12	1
-120	val_120	1
-120	val_120	1
+119	val_119	1
+119	val_119	1
+119	val_119	1
 126	val_126	1
-128	val_128	1
-128	val_128	1
-128	val_128	1
+133	val_133	1
 134	val_134	1
 134	val_134	1
-136	val_136	1
-138	val_138	1
-138	val_138	1
-138	val_138	1
-138	val_138	1
+137	val_137	1
+137	val_137	1
 146	val_146	1
 146	val_146	1
-150	val_150	1
-152	val_152	1
-152	val_152	1
+149	val_149	1
+149	val_149	1
+153	val_153	1
 156	val_156	1
+157	val_157	1
 158	val_158	1
-160	val_160	1
 162	val_162	1
+163	val_163	1
 164	val_164	1
 164	val_164	1
-166	val_166	1
-168	val_168	1
-170	val_170	1
-172	val_172	1
-172	val_172	1
-174	val_174	1
-174	val_174	1
-176	val_176	1
-176	val_176	1
+165	val_165	1
+165	val_165	1
+169	val_169	1
+169	val_169	1
+169	val_169	1
+169	val_169	1
+17	val_17	1
+177	val_177	1
 178	val_178	1
-18	val_18	1
-18	val_18	1
-180	val_180	1
-186	val_186	1
+181	val_181	1
+187	val_187	1
+187	val_187	1
+187	val_187	1
+19	val_19	1
 190	val_190	1
-192	val_192	1
-194	val_194	1
-196	val_196	1
+191	val_191	1
+191	val_191	1
+195	val_195	1
+195	val_195	1
+197	val_197	1
+197	val_197	1
+199	val_199	1
+199	val_199	1
+199	val_199	1
 2	val_2	1
 20	val_20	1
-200	val_200	1
-200	val_200	1
+201	val_201	1
 202	val_202	1
 208	val_208	1
 208	val_208	1
@@ -293,70 +290,62 @@ POSTHOOK: Input: default@bucket3_1@ds=1
 214	val_214	1
 216	val_216	1
 216	val_216	1
-218	val_218	1
-222	val_222	1
-224	val_224	1
-224	val_224	1
+221	val_221	1
+221	val_221	1
 226	val_226	1
-228	val_228	1
-230	val_230	1
-230	val_230	1
-230	val_230	1
-230	val_230	1
-230	val_230	1
+229	val_229	1
+229	val_229	1
+233	val_233	1
+233	val_233	1
+237	val_237	1
+237	val_237	1
 238	val_238	1
 238	val_238	1
-24	val_24	1
-24	val_24	1
-242	val_242	1
-242	val_242	1
+239	val_239	1
+239	val_239	1
 244	val_244	1
 248	val_248	1
+249	val_249	1
 252	val_252	1
+255	val_255	1
+255	val_255	1
 256	val_256	1
 256	val_256	1
-258	val_258	1
-26	val_26	1
-26	val_26	1
 260	val_260	1
-262	val_262	1
 266	val_266	1
+27	val_27	1
 272	val_272	1
 272	val_272	1
-274	val_274	1
-278	val_278	1
-278	val_278	1
-28	val_28	1
-280	val_280	1
-280	val_280	1
-282	val_282	1
-282	val_282	1
 284	val_284	1
 286	val_286	1
-288	val_288	1
-288	val_288	1
+287	val_287	1
+289	val_289	1
+291	val_291	1
 292	val_292	1
-296	val_296	1
-298	val_298	1
-298	val_298	1
-298	val_298	1
 30	val_30	1
-302	val_302	1
-306	val_306	1
+307	val_307	1
+307	val_307	1
 308	val_308	1
 310	val_310	1
+311	val_311	1
+311	val_311	1
+311	val_311	1
+315	val_315	1
 316	val_316	1
 316	val_316	1
 316	val_316	1
-318	val_318	1
-318	val_318	1
-318	val_318	1
-322	val_322	1
-322	val_322	1
+317	val_317	1
+317	val_317	1
+325	val_325	1
+325	val_325	1
+327	val_327	1
+327	val_327	1
+327	val_327	1
 332	val_332	1
 336	val_336	1
 338	val_338	1
-34	val_34	1
+339	val_339	1
+341	val_341	1
 342	val_342	1
 342	val_342	1
 344	val_344	1
@@ -366,110 +355,121 @@ POSTHOOK: Input: default@bucket3_1@ds=1
 348	val_348	1
 348	val_348	1
 348	val_348	1
-356	val_356	1
+351	val_351	1
+353	val_353	1
+353	val_353	1
 360	val_360	1
 362	val_362	1
 364	val_364	1
-366	val_366	1
+365	val_365	1
 368	val_368	1
-374	val_374	1
+369	val_369	1
+369	val_369	1
+369	val_369	1
+377	val_377	1
 378	val_378	1
-382	val_382	1
-382	val_382	1
 384	val_384	1
 384	val_384	1
 384	val_384	1
 386	val_386	1
 392	val_392	1
+393	val_393	1
 394	val_394	1
 396	val_396	1
 396	val_396	1
 396	val_396	1
-4	val_4	1
-400	val_400	1
+397	val_397	1
+397	val_397	1
+399	val_399	1
+399	val_399	1
 402	val_402	1
 404	val_404	1
 404	val_404	1
-406	val_406	1
-406	val_406	1
-406	val_406	1
-406	val_406	1
+407	val_407	1
+409	val_409	1
+409	val_409	1
+409	val_409	1
+41	val_41	1
+411	val_411	1
 414	val_414	1
 414	val_414	1
-418	val_418	1
-42	val_42	1
-42	val_42	1
-424	val_424	1
-424	val_424	1
+417	val_417	1
+417	val_417	1
+417	val_417	1
+419	val_419	1
+421	val_421	1
+427	val_427	1
+43	val_43	1
 430	val_430	1
 430	val_430	1
 430	val_430	1
 432	val_432	1
-436	val_436	1
-438	val_438	1
-438	val_438	1
-438	val_438	1
-44	val_44	1
+435	val_435	1
+437	val_437	1
+443	val_443	1
 444	val_444	1
 446	val_446	1
-448	val_448	1
+449	val_449	1
 452	val_452	1
+453	val_453	1
 454	val_454	1
 454	val_454	1
 454	val_454	1
 458	val_458	1
 458	val_458	1
-460	val_460	1
-462	val_462	1
-462	val_462	1
+459	val_459	1
+459	val_459	1
+463	val_463	1
+463	val_463	1
 466	val_466	1
 466	val_466	1
 466	val_466	1
-468	val_468	1
-468	val_468	1
-468	val_468	1
-468	val_468	1
-470	val_470	1
+467	val_467	1
 472	val_472	1
 478	val_478	1
 478	val_478	1
+479	val_479	1
 480	val_480	1
 480	val_480	1
 480	val_480	1
 482	val_482	1
+483	val_483	1
 484	val_484	1
+485	val_485	1
 490	val_490	1
-492	val_492	1
-492	val_492	1
-494	val_494	1
-496	val_496	1
+491	val_491	1
+495	val_495	1
+497	val_497	1
 498	val_498	1
 498	val_498	1
 498	val_498	1
+51	val_51	1
+51	val_51	1
 54	val_54	1
+57	val_57	1
 58	val_58	1
 58	val_58	1
 64	val_64	1
-66	val_66	1
+65	val_65	1
+67	val_67	1
+67	val_67	1
+69	val_69	1
 70	val_70	1
 70	val_70	1
 70	val_70	1
-72	val_72	1
-72	val_72	1
-74	val_74	1
-76	val_76	1
-76	val_76	1
-78	val_78	1
-8	val_8	1
+77	val_77	1
 80	val_80	1
-82	val_82	1
+83	val_83	1
+83	val_83	1
 84	val_84	1
 84	val_84	1
+85	val_85	1
 86	val_86	1
 90	val_90	1
 90	val_90	1
 90	val_90	1
-92	val_92	1
 96	val_96	1
+97	val_97	1
+97	val_97	1
 98	val_98	1
 98	val_98	1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucket4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucket4.q.out b/ql/src/test/results/clientpositive/spark/bucket4.q.out
index cc2cced..043c038 100644
--- a/ql/src/test/results/clientpositive/spark/bucket4.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucket4.q.out
@@ -57,6 +57,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'
@@ -79,6 +80,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'
@@ -122,6 +124,7 @@ STAGE PLANS:
                         SORTBUCKETCOLSPREFIX TRUE
                         bucket_count 2
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -156,6 +159,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -222,104 +226,93 @@ POSTHOOK: query: select * from bucket4_1 tablesample (bucket 1 out of 2) s
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucket4_1
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-0	val_0
-0	val_0
-0	val_0
 2	val_2
-4	val_4
-8	val_8
 10	val_10
-12	val_12
-12	val_12
-18	val_18
-18	val_18
+17	val_17
+19	val_19
 20	val_20
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
+27	val_27
 30	val_30
-34	val_34
-42	val_42
-42	val_42
-44	val_44
+41	val_41
+43	val_43
+51	val_51
+51	val_51
 54	val_54
+57	val_57
 58	val_58
 58	val_58
 64	val_64
-66	val_66
+65	val_65
+67	val_67
+67	val_67
+69	val_69
 70	val_70
 70	val_70
 70	val_70
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-78	val_78
+77	val_77
 80	val_80
-82	val_82
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
 86	val_86
 90	val_90
 90	val_90
 90	val_90
-92	val_92
 96	val_96
+97	val_97
+97	val_97
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-104	val_104
-104	val_104
-114	val_114
+105	val_105
+113	val_113
+113	val_113
 116	val_116
-118	val_118
-118	val_118
-120	val_120
-120	val_120
+119	val_119
+119	val_119
+119	val_119
 126	val_126
-128	val_128
-128	val_128
-128	val_128
+133	val_133
 134	val_134
 134	val_134
-136	val_136
-138	val_138
-138	val_138
-138	val_138
-138	val_138
+137	val_137
+137	val_137
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
+149	val_149
+149	val_149
+153	val_153
 156	val_156
+157	val_157
 158	val_158
-160	val_160
 162	val_162
+163	val_163
 164	val_164
 164	val_164
-166	val_166
-168	val_168
-170	val_170
-172	val_172
-172	val_172
-174	val_174
-174	val_174
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+177	val_177
 178	val_178
-180	val_180
-186	val_186
+181	val_181
+187	val_187
+187	val_187
+187	val_187
 190	val_190
-192	val_192
-194	val_194
-196	val_196
-200	val_200
-200	val_200
+191	val_191
+191	val_191
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+199	val_199
+199	val_199
+199	val_199
+201	val_201
 202	val_202
 208	val_208
 208	val_208
@@ -327,63 +320,60 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 214	val_214
 216	val_216
 216	val_216
-218	val_218
-222	val_222
-224	val_224
-224	val_224
+221	val_221
+221	val_221
 226	val_226
-228	val_228
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
-242	val_242
-242	val_242
+239	val_239
+239	val_239
 244	val_244
 248	val_248
+249	val_249
 252	val_252
+255	val_255
+255	val_255
 256	val_256
 256	val_256
-258	val_258
 260	val_260
-262	val_262
 266	val_266
 272	val_272
 272	val_272
-274	val_274
-278	val_278
-278	val_278
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 286	val_286
-288	val_288
-288	val_288
+287	val_287
+289	val_289
+291	val_291
 292	val_292
-296	val_296
-298	val_298
-298	val_298
-298	val_298
-302	val_302
-306	val_306
+307	val_307
+307	val_307
 308	val_308
 310	val_310
+311	val_311
+311	val_311
+311	val_311
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-322	val_322
-322	val_322
+317	val_317
+317	val_317
+325	val_325
+325	val_325
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 336	val_336
 338	val_338
+339	val_339
+341	val_341
 342	val_342
 342	val_342
 344	val_344
@@ -393,79 +383,89 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 348	val_348
 348	val_348
 348	val_348
-356	val_356
+351	val_351
+353	val_353
+353	val_353
 360	val_360
 362	val_362
 364	val_364
-366	val_366
+365	val_365
 368	val_368
-374	val_374
+369	val_369
+369	val_369
+369	val_369
+377	val_377
 378	val_378
-382	val_382
-382	val_382
 384	val_384
 384	val_384
 384	val_384
 386	val_386
 392	val_392
+393	val_393
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
 402	val_402
 404	val_404
 404	val_404
-406	val_406
-406	val_406
-406	val_406
-406	val_406
+407	val_407
+409	val_409
+409	val_409
+409	val_409
+411	val_411
 414	val_414
 414	val_414
-418	val_418
-424	val_424
-424	val_424
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+427	val_427
 430	val_430
 430	val_430
 430	val_430
 432	val_432
-436	val_436
-438	val_438
-438	val_438
-438	val_438
+435	val_435
+437	val_437
+443	val_443
 444	val_444
 446	val_446
-448	val_448
+449	val_449
 452	val_452
+453	val_453
 454	val_454
 454	val_454
 454	val_454
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
+459	val_459
+459	val_459
+463	val_463
+463	val_463
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-470	val_470
+467	val_467
 472	val_472
 478	val_478
 478	val_478
+479	val_479
 480	val_480
 480	val_480
 480	val_480
 482	val_482
+483	val_483
 484	val_484
+485	val_485
 490	val_490
-492	val_492
-492	val_492
-494	val_494
-496	val_496
+491	val_491
+495	val_495
+497	val_497
 498	val_498
 498	val_498
 498	val_498

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucket4.q.out_spark
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucket4.q.out_spark b/ql/src/test/results/clientpositive/spark/bucket4.q.out_spark
index 1e2cb9a..e11219d 100644
--- a/ql/src/test/results/clientpositive/spark/bucket4.q.out_spark
+++ b/ql/src/test/results/clientpositive/spark/bucket4.q.out_spark
@@ -57,6 +57,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'
@@ -78,6 +79,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'
@@ -120,6 +122,7 @@ STAGE PLANS:
                         SORTBUCKETCOLSPREFIX TRUE
                         bucket_count 2
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -153,6 +156,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -218,104 +222,93 @@ POSTHOOK: query: select * from bucket4_1 tablesample (bucket 1 out of 2) s
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucket4_1
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
 2	val_2
-4	val_4
-8	val_8
 10	val_10
-12	val_12
-12	val_12
-18	val_18
-18	val_18
+17	val_17
+19	val_19
 20	val_20
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
+27	val_27
 30	val_30
-34	val_34
-42	val_42
-42	val_42
-44	val_44
+41	val_41
+43	val_43
+51	val_51
+51	val_51
 54	val_54
+57	val_57
 58	val_58
 58	val_58
 64	val_64
-66	val_66
+65	val_65
+67	val_67
+67	val_67
+69	val_69
 70	val_70
 70	val_70
 70	val_70
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-78	val_78
+77	val_77
 80	val_80
-82	val_82
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
 86	val_86
 90	val_90
 90	val_90
 90	val_90
-92	val_92
 96	val_96
+97	val_97
+97	val_97
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-104	val_104
-104	val_104
-114	val_114
+105	val_105
+113	val_113
+113	val_113
 116	val_116
-118	val_118
-118	val_118
-120	val_120
-120	val_120
+119	val_119
+119	val_119
+119	val_119
 126	val_126
-128	val_128
-128	val_128
-128	val_128
+133	val_133
 134	val_134
 134	val_134
-136	val_136
-138	val_138
-138	val_138
-138	val_138
-138	val_138
+137	val_137
+137	val_137
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
+149	val_149
+149	val_149
+153	val_153
 156	val_156
+157	val_157
 158	val_158
-160	val_160
 162	val_162
+163	val_163
 164	val_164
 164	val_164
-166	val_166
-168	val_168
-170	val_170
-172	val_172
-172	val_172
-174	val_174
-174	val_174
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+177	val_177
 178	val_178
-180	val_180
-186	val_186
+181	val_181
+187	val_187
+187	val_187
+187	val_187
 190	val_190
-192	val_192
-194	val_194
-196	val_196
-200	val_200
-200	val_200
+191	val_191
+191	val_191
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+199	val_199
+199	val_199
+199	val_199
+201	val_201
 202	val_202
 208	val_208
 208	val_208
@@ -323,63 +316,60 @@ POSTHOOK: Input: default@bucket4_1
 214	val_214
 216	val_216
 216	val_216
-218	val_218
-222	val_222
-224	val_224
-224	val_224
+221	val_221
+221	val_221
 226	val_226
-228	val_228
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
-242	val_242
-242	val_242
+239	val_239
+239	val_239
 244	val_244
 248	val_248
+249	val_249
 252	val_252
+255	val_255
+255	val_255
 256	val_256
 256	val_256
-258	val_258
 260	val_260
-262	val_262
 266	val_266
 272	val_272
 272	val_272
-274	val_274
-278	val_278
-278	val_278
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 286	val_286
-288	val_288
-288	val_288
+287	val_287
+289	val_289
+291	val_291
 292	val_292
-296	val_296
-298	val_298
-298	val_298
-298	val_298
-302	val_302
-306	val_306
+307	val_307
+307	val_307
 308	val_308
 310	val_310
+311	val_311
+311	val_311
+311	val_311
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-322	val_322
-322	val_322
+317	val_317
+317	val_317
+325	val_325
+325	val_325
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 336	val_336
 338	val_338
+339	val_339
+341	val_341
 342	val_342
 342	val_342
 344	val_344
@@ -389,79 +379,89 @@ POSTHOOK: Input: default@bucket4_1
 348	val_348
 348	val_348
 348	val_348
-356	val_356
+351	val_351
+353	val_353
+353	val_353
 360	val_360
 362	val_362
 364	val_364
-366	val_366
+365	val_365
 368	val_368
-374	val_374
+369	val_369
+369	val_369
+369	val_369
+377	val_377
 378	val_378
-382	val_382
-382	val_382
 384	val_384
 384	val_384
 384	val_384
 386	val_386
 392	val_392
+393	val_393
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
 402	val_402
 404	val_404
 404	val_404
-406	val_406
-406	val_406
-406	val_406
-406	val_406
+407	val_407
+409	val_409
+409	val_409
+409	val_409
+411	val_411
 414	val_414
 414	val_414
-418	val_418
-424	val_424
-424	val_424
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+427	val_427
 430	val_430
 430	val_430
 430	val_430
 432	val_432
-436	val_436
-438	val_438
-438	val_438
-438	val_438
+435	val_435
+437	val_437
+443	val_443
 444	val_444
 446	val_446
-448	val_448
+449	val_449
 452	val_452
+453	val_453
 454	val_454
 454	val_454
 454	val_454
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
+459	val_459
+459	val_459
+463	val_463
+463	val_463
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-470	val_470
+467	val_467
 472	val_472
 478	val_478
 478	val_478
+479	val_479
 480	val_480
 480	val_480
 480	val_480
 482	val_482
+483	val_483
 484	val_484
+485	val_485
 490	val_490
-492	val_492
-492	val_492
-494	val_494
-496	val_496
+491	val_491
+495	val_495
+497	val_497
 498	val_498
 498	val_498
 498	val_498

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucket5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucket5.q.out b/ql/src/test/results/clientpositive/spark/bucket5.q.out
index 51a6711..125f52e 100644
--- a/ql/src/test/results/clientpositive/spark/bucket5.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucket5.q.out
@@ -70,6 +70,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'
@@ -92,6 +93,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'
@@ -143,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'
@@ -165,6 +168,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'
@@ -208,6 +212,7 @@ STAGE PLANS:
                         SORTBUCKETCOLSPREFIX TRUE
                         bucket_count 2
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -249,6 +254,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 
@@ -283,6 +289,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -317,6 +324,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 
@@ -377,6 +385,7 @@ Table Type:         	MANAGED_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
 	SORTBUCKETCOLSPREFIX	TRUE                
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	500                 
 	rawDataSize         	5312                
@@ -401,16 +410,16 @@ POSTHOOK: query: SELECT * FROM bucketed_table TABLESAMPLE (BUCKET 1 OUT OF 2) s
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucketed_table
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-0	val_0
-0	val_0
-0	val_0
 2	val_2
-4	val_4
-8	val_8
 10	val_10
-12	val_12
-12	val_12
-18	val_18
+17	val_17
+19	val_19
+20	val_20
+27	val_27
+30	val_30
+41	val_41
+43	val_43
+51	val_51
 PREHOOK: query: SELECT * FROM bucketed_table TABLESAMPLE (BUCKET 2 OUT OF 2) s LIMIT 10
 PREHOOK: type: QUERY
 PREHOOK: Input: default@bucketed_table
@@ -419,16 +428,16 @@ POSTHOOK: query: SELECT * FROM bucketed_table TABLESAMPLE (BUCKET 2 OUT OF 2) s
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucketed_table
 POSTHOOK: Output: hdfs://### HDFS PATH ###
+0	val_0
+0	val_0
+0	val_0
+4	val_4
 5	val_5
 5	val_5
 5	val_5
+8	val_8
 9	val_9
 11	val_11
-15	val_15
-15	val_15
-17	val_17
-19	val_19
-27	val_27
 PREHOOK: query: SELECT COUNT(DISTINCT INPUT__FILE__NAME) FROM bucketed_table
 PREHOOK: type: QUERY
 PREHOOK: Input: default@bucketed_table

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucket6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucket6.q.out b/ql/src/test/results/clientpositive/spark/bucket6.q.out
index 4a9e99f..20745df 100644
--- a/ql/src/test/results/clientpositive/spark/bucket6.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucket6.q.out
@@ -96,42 +96,18 @@ POSTHOOK: query: select * from src_bucket limit 100
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src_bucket
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-103	val_103
-103	val_103
-103	val_103
-103	val_103
-103	val_103
-103	val_103
-103	val_103
-103	val_103
-105	val_105
-105	val_105
-105	val_105
-105	val_105
-11	val_11
-11	val_11
-11	val_11
-11	val_11
-114	val_114
-114	val_114
-114	val_114
-114	val_114
-116	val_116
-116	val_116
-116	val_116
-116	val_116
+10	val_10
+10	val_10
+10	val_10
+10	val_10
+104	val_104
+104	val_104
+104	val_104
+104	val_104
+104	val_104
+104	val_104
+104	val_104
+104	val_104
 118	val_118
 118	val_118
 118	val_118
@@ -140,34 +116,50 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 118	val_118
 118	val_118
 118	val_118
-125	val_125
-125	val_125
-125	val_125
-125	val_125
-125	val_125
-125	val_125
-125	val_125
-125	val_125
-129	val_129
-129	val_129
-129	val_129
-129	val_129
-129	val_129
-129	val_129
-129	val_129
-129	val_129
-134	val_134
-134	val_134
-134	val_134
-134	val_134
-134	val_134
-134	val_134
-134	val_134
-134	val_134
-136	val_136
-136	val_136
-136	val_136
-136	val_136
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+120	val_120
+120	val_120
+120	val_120
+120	val_120
+120	val_120
+120	val_120
+120	val_120
+120	val_120
+126	val_126
+126	val_126
+126	val_126
+126	val_126
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+131	val_131
+131	val_131
+131	val_131
+131	val_131
+133	val_133
+133	val_133
+133	val_133
+133	val_133
 138	val_138
 138	val_138
 138	val_138
@@ -184,10 +176,6 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 138	val_138
 138	val_138
 138	val_138
-143	val_143
-143	val_143
-143	val_143
-143	val_143
 145	val_145
 145	val_145
 145	val_145
@@ -196,3 +184,15 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 149	val_149
 149	val_149
 149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+15	val_15
+15	val_15
+15	val_15
+15	val_15
+15	val_15
+15	val_15
+15	val_15
+15	val_15

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucket_map_join_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucket_map_join_1.q.out b/ql/src/test/results/clientpositive/spark/bucket_map_join_1.q.out
index 02902ab..bc7702d 100644
--- a/ql/src/test/results/clientpositive/spark/bucket_map_join_1.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucket_map_join_1.q.out
@@ -88,6 +88,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 1
                     bucket_field_name value
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -110,6 +111,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 1
                       bucket_field_name value
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -183,6 +185,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 1
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -205,6 +208,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 1
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucket_map_join_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucket_map_join_2.q.out b/ql/src/test/results/clientpositive/spark/bucket_map_join_2.q.out
index 34650ef..21b6fc1 100644
--- a/ql/src/test/results/clientpositive/spark/bucket_map_join_2.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucket_map_join_2.q.out
@@ -88,6 +88,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 1
                     bucket_field_name value
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -110,6 +111,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 1
                       bucket_field_name value
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -183,6 +185,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 1
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -205,6 +208,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 1
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucket_map_join_spark1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucket_map_join_spark1.q.out b/ql/src/test/results/clientpositive/spark/bucket_map_join_spark1.q.out
index 5de2016..dcbbcf4 100644
--- a/ql/src/test/results/clientpositive/spark/bucket_map_join_spark1.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucket_map_join_spark1.q.out
@@ -189,6 +189,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -254,6 +255,7 @@ STAGE PLANS:
                                 properties:
                                   COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                                   bucket_count -1
+                                  bucketing_version 2
                                   column.name.delimiter ,
                                   columns key,value1,value2
                                   columns.comments 
@@ -316,6 +318,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -345,6 +348,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -492,6 +496,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -556,6 +561,7 @@ STAGE PLANS:
                                 properties:
                                   COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                   bucket_count -1
+                                  bucketing_version 2
                                   column.name.delimiter ,
                                   columns key,value1,value2
                                   columns.comments 
@@ -613,6 +619,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -642,6 +649,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucket_map_join_spark2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucket_map_join_spark2.q.out b/ql/src/test/results/clientpositive/spark/bucket_map_join_spark2.q.out
index 22fa0cf..2845b32 100644
--- a/ql/src/test/results/clientpositive/spark/bucket_map_join_spark2.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucket_map_join_spark2.q.out
@@ -173,6 +173,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -238,6 +239,7 @@ STAGE PLANS:
                                 properties:
                                   COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                                   bucket_count -1
+                                  bucketing_version 2
                                   column.name.delimiter ,
                                   columns key,value1,value2
                                   columns.comments 
@@ -300,6 +302,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -329,6 +332,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -481,6 +485,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -546,6 +551,7 @@ STAGE PLANS:
                                 properties:
                                   COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                   bucket_count -1
+                                  bucketing_version 2
                                   column.name.delimiter ,
                                   columns key,value1,value2
                                   columns.comments 
@@ -608,6 +614,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -637,6 +644,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucket_map_join_spark3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucket_map_join_spark3.q.out b/ql/src/test/results/clientpositive/spark/bucket_map_join_spark3.q.out
index 71c2817..41add79 100644
--- a/ql/src/test/results/clientpositive/spark/bucket_map_join_spark3.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucket_map_join_spark3.q.out
@@ -173,6 +173,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -238,6 +239,7 @@ STAGE PLANS:
                                 properties:
                                   COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                                   bucket_count -1
+                                  bucketing_version 2
                                   column.name.delimiter ,
                                   columns key,value1,value2
                                   columns.comments 
@@ -300,6 +302,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -329,6 +332,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -476,6 +480,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -540,6 +545,7 @@ STAGE PLANS:
                                 properties:
                                   COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                   bucket_count -1
+                                  bucketing_version 2
                                   column.name.delimiter ,
                                   columns key,value1,value2
                                   columns.comments 
@@ -597,6 +603,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -626,6 +633,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/vector_ptf_part_simple.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_ptf_part_simple.q.out b/ql/src/test/results/clientpositive/llap/vector_ptf_part_simple.q.out
index 9aeb650..ec8611d 100644
--- a/ql/src/test/results/clientpositive/llap/vector_ptf_part_simple.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_ptf_part_simple.q.out
@@ -309,46 +309,46 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@vector_ptf_part_simple_orc
 #### A masked pattern was here ####
 p_mfgr	p_name	p_retailprice	rn	r	dr	fv	lv	c	cs
-Manufacturer#4	almond azure aquamarine papaya violet	1290.35	1	1	1	1290.35	1206.26	4	6
-Manufacturer#4	almond antique violet mint lemon	1375.42	2	1	1	1290.35	1206.26	4	6
-Manufacturer#4	almond aquamarine floral ivory bisque	NULL	3	1	1	1290.35	1206.26	4	6
-Manufacturer#4	almond antique gainsboro frosted violet	NULL	4	1	1	1290.35	1206.26	4	6
-Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	5	1	1	1290.35	1206.26	4	6
-Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	6	1	1	1290.35	1206.26	4	6
-Manufacturer#5	almond azure blanched chiffon midnight	1464.48	1	1	1	1464.48	1788.73	6	6
-Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	2	1	1	1464.48	1788.73	6	6
-Manufacturer#5	almond antique medium spring khaki	1611.66	3	1	1	1464.48	1788.73	6	6
-Manufacturer#5	almond antique blue firebrick mint	1789.69	4	1	1	1464.48	1788.73	6	6
-Manufacturer#5	almond antique medium spring khaki	1611.66	5	1	1	1464.48	1788.73	6	6
-Manufacturer#5	almond antique sky peru orange	1788.73	6	1	1	1464.48	1788.73	6	6
-Manufacturer#2	almond aquamarine rose maroon antique	900.66	1	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond aquamarine rose maroon antique	1698.66	2	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond antique violet turquoise frosted	1800.7	3	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond antique violet chocolate turquoise	1690.68	4	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond antique violet turquoise frosted	1800.7	5	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.6	6	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond aquamarine midnight light salmon	2031.98	7	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond antique violet turquoise frosted	1800.7	8	1	1	900.66	1800.7	8	8
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	2	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	3	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	4	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond aquamarine burnished black steel	1414.42	5	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique burnished rose metallic	1173.15	6	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	7	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	8	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique burnished rose metallic	1173.15	9	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	10	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	11	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	12	1	1	1753.76	1632.66	11	12
-Manufacturer#3	almond antique forest lavender goldenrod	590.27	1	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique metallic orange dim	55.39	2	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	3	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique olive coral navajo	1337.29	4	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique misty red olive	1922.98	5	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	6	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique forest lavender goldenrod	NULL	7	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique chartreuse khaki white	99.68	8	1	1	590.27	99.68	7	8
+Manufacturer#2	almond aquamarine rose maroon antique	900.66	1	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond aquamarine rose maroon antique	1698.66	2	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond antique violet turquoise frosted	1800.7	3	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond antique violet chocolate turquoise	1690.68	4	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond antique violet turquoise frosted	1800.7	5	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond antique violet turquoise frosted	1800.7	6	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.6	7	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond aquamarine midnight light salmon	2031.98	8	1	1	900.66	2031.98	8	8
+Manufacturer#3	almond antique forest lavender goldenrod	NULL	1	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	2	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique forest lavender goldenrod	590.27	3	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	4	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique metallic orange dim	55.39	5	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique olive coral navajo	1337.29	6	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique chartreuse khaki white	99.68	7	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique misty red olive	1922.98	8	1	1	NULL	1922.98	7	8
+Manufacturer#4	almond aquamarine floral ivory bisque	NULL	1	1	1	NULL	1375.42	4	6
+Manufacturer#4	almond antique gainsboro frosted violet	NULL	2	1	1	NULL	1375.42	4	6
+Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	3	1	1	NULL	1375.42	4	6
+Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	4	1	1	NULL	1375.42	4	6
+Manufacturer#4	almond azure aquamarine papaya violet	1290.35	5	1	1	NULL	1375.42	4	6
+Manufacturer#4	almond antique violet mint lemon	1375.42	6	1	1	NULL	1375.42	4	6
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	2	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	3	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	4	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	5	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	6	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	7	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique burnished rose metallic	1173.15	8	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond aquamarine burnished black steel	1414.42	9	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	10	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	11	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique burnished rose metallic	1173.15	12	1	1	1632.66	1173.15	11	12
+Manufacturer#5	almond antique medium spring khaki	1611.66	1	1	1	1611.66	1789.69	6	6
+Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	2	1	1	1611.66	1789.69	6	6
+Manufacturer#5	almond antique sky peru orange	1788.73	3	1	1	1611.66	1789.69	6	6
+Manufacturer#5	almond antique medium spring khaki	1611.66	4	1	1	1611.66	1789.69	6	6
+Manufacturer#5	almond azure blanched chiffon midnight	1464.48	5	1	1	1611.66	1789.69	6	6
+Manufacturer#5	almond antique blue firebrick mint	1789.69	6	1	1	1611.66	1789.69	6	6
 PREHOOK: query: explain vectorization detail
 select p_mfgr,p_name, p_retailprice,
 row_number() over(partition by p_mfgr range between unbounded preceding and unbounded following) as rn,
@@ -538,46 +538,46 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@vector_ptf_part_simple_orc
 #### A masked pattern was here ####
 p_mfgr	p_name	p_retailprice	rn	r	dr	fv	lv	c	cs
-Manufacturer#4	almond azure aquamarine papaya violet	1290.35	1	1	1	1290.35	1206.26	4	6
-Manufacturer#4	almond antique violet mint lemon	1375.42	2	1	1	1290.35	1206.26	4	6
-Manufacturer#4	almond aquamarine floral ivory bisque	NULL	3	1	1	1290.35	1206.26	4	6
-Manufacturer#4	almond antique gainsboro frosted violet	NULL	4	1	1	1290.35	1206.26	4	6
-Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	5	1	1	1290.35	1206.26	4	6
-Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	6	1	1	1290.35	1206.26	4	6
-Manufacturer#5	almond azure blanched chiffon midnight	1464.48	1	1	1	1464.48	1788.73	6	6
-Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	2	1	1	1464.48	1788.73	6	6
-Manufacturer#5	almond antique medium spring khaki	1611.66	3	1	1	1464.48	1788.73	6	6
-Manufacturer#5	almond antique blue firebrick mint	1789.69	4	1	1	1464.48	1788.73	6	6
-Manufacturer#5	almond antique medium spring khaki	1611.66	5	1	1	1464.48	1788.73	6	6
-Manufacturer#5	almond antique sky peru orange	1788.73	6	1	1	1464.48	1788.73	6	6
-Manufacturer#2	almond aquamarine rose maroon antique	900.66	1	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond aquamarine rose maroon antique	1698.66	2	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond antique violet turquoise frosted	1800.7	3	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond antique violet chocolate turquoise	1690.68	4	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond antique violet turquoise frosted	1800.7	5	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.6	6	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond aquamarine midnight light salmon	2031.98	7	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond antique violet turquoise frosted	1800.7	8	1	1	900.66	1800.7	8	8
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	2	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	3	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	4	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond aquamarine burnished black steel	1414.42	5	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique burnished rose metallic	1173.15	6	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	7	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	8	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique burnished rose metallic	1173.15	9	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	10	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	11	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	12	1	1	1753.76	1632.66	11	12
-Manufacturer#3	almond antique forest lavender goldenrod	590.27	1	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique metallic orange dim	55.39	2	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	3	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique olive coral navajo	1337.29	4	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique misty red olive	1922.98	5	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	6	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique forest lavender goldenrod	NULL	7	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique chartreuse khaki white	99.68	8	1	1	590.27	99.68	7	8
+Manufacturer#2	almond aquamarine rose maroon antique	900.66	1	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond aquamarine rose maroon antique	1698.66	2	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond antique violet turquoise frosted	1800.7	3	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond antique violet chocolate turquoise	1690.68	4	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond antique violet turquoise frosted	1800.7	5	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond antique violet turquoise frosted	1800.7	6	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.6	7	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond aquamarine midnight light salmon	2031.98	8	1	1	900.66	2031.98	8	8
+Manufacturer#3	almond antique forest lavender goldenrod	NULL	1	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	2	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique forest lavender goldenrod	590.27	3	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	4	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique metallic orange dim	55.39	5	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique olive coral navajo	1337.29	6	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique chartreuse khaki white	99.68	7	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique misty red olive	1922.98	8	1	1	NULL	1922.98	7	8
+Manufacturer#4	almond aquamarine floral ivory bisque	NULL	1	1	1	NULL	1375.42	4	6
+Manufacturer#4	almond antique gainsboro frosted violet	NULL	2	1	1	NULL	1375.42	4	6
+Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	3	1	1	NULL	1375.42	4	6
+Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	4	1	1	NULL	1375.42	4	6
+Manufacturer#4	almond azure aquamarine papaya violet	1290.35	5	1	1	NULL	1375.42	4	6
+Manufacturer#4	almond antique violet mint lemon	1375.42	6	1	1	NULL	1375.42	4	6
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	2	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	3	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	4	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	5	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	6	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	7	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique burnished rose metallic	1173.15	8	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond aquamarine burnished black steel	1414.42	9	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	10	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	11	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique burnished rose metallic	1173.15	12	1	1	1632.66	1173.15	11	12
+Manufacturer#5	almond antique medium spring khaki	1611.66	1	1	1	1611.66	1789.69	6	6
+Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	2	1	1	1611.66	1789.69	6	6
+Manufacturer#5	almond antique sky peru orange	1788.73	3	1	1	1611.66	1789.69	6	6
+Manufacturer#5	almond antique medium spring khaki	1611.66	4	1	1	1611.66	1789.69	6	6
+Manufacturer#5	almond azure blanched chiffon midnight	1464.48	5	1	1	1611.66	1789.69	6	6
+Manufacturer#5	almond antique blue firebrick mint	1789.69	6	1	1	1611.66	1789.69	6	6
 PREHOOK: query: explain vectorization detail
 select p_mfgr,p_name, p_retailprice,
 row_number() over(partition by p_mfgr rows between unbounded preceding and unbounded following) as rn,
@@ -767,46 +767,46 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@vector_ptf_part_simple_orc
 #### A masked pattern was here ####
 p_mfgr	p_name	p_retailprice	rn	r	dr	fv	lv	c	cs
-Manufacturer#4	almond azure aquamarine papaya violet	1290.35	1	1	1	1290.35	1290.35	1	1
-Manufacturer#4	almond antique violet mint lemon	1375.42	2	1	1	1290.35	1375.42	2	2
-Manufacturer#4	almond aquamarine floral ivory bisque	NULL	3	1	1	1290.35	NULL	2	3
-Manufacturer#4	almond antique gainsboro frosted violet	NULL	4	1	1	1290.35	NULL	2	4
-Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	5	1	1	1290.35	1844.92	3	5
-Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	6	1	1	1290.35	1206.26	4	6
-Manufacturer#5	almond azure blanched chiffon midnight	1464.48	1	1	1	1464.48	1464.48	1	1
-Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	2	1	1	1464.48	1018.1	2	2
-Manufacturer#5	almond antique medium spring khaki	1611.66	3	1	1	1464.48	1611.66	3	3
-Manufacturer#5	almond antique blue firebrick mint	1789.69	4	1	1	1464.48	1789.69	4	4
-Manufacturer#5	almond antique medium spring khaki	1611.66	5	1	1	1464.48	1611.66	5	5
-Manufacturer#5	almond antique sky peru orange	1788.73	6	1	1	1464.48	1788.73	6	6
 Manufacturer#2	almond aquamarine rose maroon antique	900.66	1	1	1	900.66	900.66	1	1
 Manufacturer#2	almond aquamarine rose maroon antique	1698.66	2	1	1	900.66	1698.66	2	2
 Manufacturer#2	almond antique violet turquoise frosted	1800.7	3	1	1	900.66	1800.7	3	3
 Manufacturer#2	almond antique violet chocolate turquoise	1690.68	4	1	1	900.66	1690.68	4	4
 Manufacturer#2	almond antique violet turquoise frosted	1800.7	5	1	1	900.66	1800.7	5	5
-Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.6	6	1	1	900.66	1000.6	6	6
-Manufacturer#2	almond aquamarine midnight light salmon	2031.98	7	1	1	900.66	2031.98	7	7
-Manufacturer#2	almond antique violet turquoise frosted	1800.7	8	1	1	900.66	1800.7	8	8
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1	1	1	1753.76	1753.76	1	1
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	2	1	1	1753.76	1632.66	2	2
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	3	1	1	1753.76	1632.66	3	3
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	4	1	1	1753.76	1753.76	4	4
-Manufacturer#1	almond aquamarine burnished black steel	1414.42	5	1	1	1753.76	1414.42	5	5
-Manufacturer#1	almond antique burnished rose metallic	1173.15	6	1	1	1753.76	1173.15	6	6
-Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	7	1	1	1753.76	1602.59	7	7
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	8	1	1	1753.76	1753.76	8	8
-Manufacturer#1	almond antique burnished rose metallic	1173.15	9	1	1	1753.76	1173.15	9	9
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	10	1	1	1753.76	1753.76	10	10
-Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	11	1	1	1753.76	NULL	10	11
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	12	1	1	1753.76	1632.66	11	12
-Manufacturer#3	almond antique forest lavender goldenrod	590.27	1	1	1	590.27	590.27	1	1
-Manufacturer#3	almond antique metallic orange dim	55.39	2	1	1	590.27	55.39	2	2
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	3	1	1	590.27	1190.27	3	3
-Manufacturer#3	almond antique olive coral navajo	1337.29	4	1	1	590.27	1337.29	4	4
-Manufacturer#3	almond antique misty red olive	1922.98	5	1	1	590.27	1922.98	5	5
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	6	1	1	590.27	1190.27	6	6
-Manufacturer#3	almond antique forest lavender goldenrod	NULL	7	1	1	590.27	NULL	6	7
-Manufacturer#3	almond antique chartreuse khaki white	99.68	8	1	1	590.27	99.68	7	8
+Manufacturer#2	almond antique violet turquoise frosted	1800.7	6	1	1	900.66	1800.7	6	6
+Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.6	7	1	1	900.66	1000.6	7	7
+Manufacturer#2	almond aquamarine midnight light salmon	2031.98	8	1	1	900.66	2031.98	8	8
+Manufacturer#3	almond antique forest lavender goldenrod	NULL	1	1	1	NULL	NULL	0	1
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	2	1	1	NULL	1190.27	1	2
+Manufacturer#3	almond antique forest lavender goldenrod	590.27	3	1	1	NULL	590.27	2	3
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	4	1	1	NULL	1190.27	3	4
+Manufacturer#3	almond antique metallic orange dim	55.39	5	1	1	NULL	55.39	4	5
+Manufacturer#3	almond antique olive coral navajo	1337.29	6	1	1	NULL	1337.29	5	6
+Manufacturer#3	almond antique chartreuse khaki white	99.68	7	1	1	NULL	99.68	6	7
+Manufacturer#3	almond antique misty red olive	1922.98	8	1	1	NULL	1922.98	7	8
+Manufacturer#4	almond aquamarine floral ivory bisque	NULL	1	1	1	NULL	NULL	0	1
+Manufacturer#4	almond antique gainsboro frosted violet	NULL	2	1	1	NULL	NULL	0	2
+Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	3	1	1	NULL	1206.26	1	3
+Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	4	1	1	NULL	1844.92	2	4
+Manufacturer#4	almond azure aquamarine papaya violet	1290.35	5	1	1	NULL	1290.35	3	5
+Manufacturer#4	almond antique violet mint lemon	1375.42	6	1	1	NULL	1375.42	4	6
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1	1	1	1632.66	1632.66	1	1
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	2	1	1	1632.66	1753.76	2	2
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	3	1	1	1632.66	1632.66	3	3
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	4	1	1	1632.66	1753.76	4	4
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	5	1	1	1632.66	1632.66	5	5
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	6	1	1	1632.66	1753.76	6	6
+Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	7	1	1	1632.66	1602.59	7	7
+Manufacturer#1	almond antique burnished rose metallic	1173.15	8	1	1	1632.66	1173.15	8	8
+Manufacturer#1	almond aquamarine burnished black steel	1414.42	9	1	1	1632.66	1414.42	9	9
+Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	10	1	1	1632.66	NULL	9	10
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	11	1	1	1632.66	1753.76	10	11
+Manufacturer#1	almond antique burnished rose metallic	1173.15	12	1	1	1632.66	1173.15	11	12
+Manufacturer#5	almond antique medium spring khaki	1611.66	1	1	1	1611.66	1611.66	1	1
+Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	2	1	1	1611.66	1018.1	2	2
+Manufacturer#5	almond antique sky peru orange	1788.73	3	1	1	1611.66	1788.73	3	3
+Manufacturer#5	almond antique medium spring khaki	1611.66	4	1	1	1611.66	1611.66	4	4
+Manufacturer#5	almond azure blanched chiffon midnight	1464.48	5	1	1	1611.66	1464.48	5	5
+Manufacturer#5	almond antique blue firebrick mint	1789.69	6	1	1	1611.66	1789.69	6	6
 PREHOOK: query: explain vectorization detail
 select p_mfgr,p_name, p_retailprice,
 row_number() over(partition by p_mfgr order by p_name) as rn,
@@ -2442,46 +2442,46 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@vector_ptf_part_simple_orc
 #### A masked pattern was here ####
 p_mfgr	p_name	p_retailprice	s	mi	ma	av
-Manufacturer#4	almond azure aquamarine papaya violet	1290.35	5716.950000000001	1206.26	1844.92	1429.2375000000002
-Manufacturer#4	almond antique violet mint lemon	1375.42	5716.950000000001	1206.26	1844.92	1429.2375000000002
-Manufacturer#4	almond aquamarine floral ivory bisque	NULL	5716.950000000001	1206.26	1844.92	1429.2375000000002
-Manufacturer#4	almond antique gainsboro frosted violet	NULL	5716.950000000001	1206.26	1844.92	1429.2375000000002
-Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	5716.950000000001	1206.26	1844.92	1429.2375000000002
-Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	5716.950000000001	1206.26	1844.92	1429.2375000000002
-Manufacturer#5	almond azure blanched chiffon midnight	1464.48	9284.32	1018.1	1789.69	1547.3866666666665
-Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	9284.32	1018.1	1789.69	1547.3866666666665
-Manufacturer#5	almond antique medium spring khaki	1611.66	9284.32	1018.1	1789.69	1547.3866666666665
-Manufacturer#5	almond antique blue firebrick mint	1789.69	9284.32	1018.1	1789.69	1547.3866666666665
-Manufacturer#5	almond antique medium spring khaki	1611.66	9284.32	1018.1	1789.69	1547.3866666666665
-Manufacturer#5	almond antique sky peru orange	1788.73	9284.32	1018.1	1789.69	1547.3866666666665
 Manufacturer#2	almond aquamarine rose maroon antique	900.66	12724.68	900.66	2031.98	1590.585
 Manufacturer#2	almond aquamarine rose maroon antique	1698.66	12724.68	900.66	2031.98	1590.585
 Manufacturer#2	almond antique violet turquoise frosted	1800.7	12724.68	900.66	2031.98	1590.585
 Manufacturer#2	almond antique violet chocolate turquoise	1690.68	12724.68	900.66	2031.98	1590.585
 Manufacturer#2	almond antique violet turquoise frosted	1800.7	12724.68	900.66	2031.98	1590.585
+Manufacturer#2	almond antique violet turquoise frosted	1800.7	12724.68	900.66	2031.98	1590.585
 Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.6	12724.68	900.66	2031.98	1590.585
 Manufacturer#2	almond aquamarine midnight light salmon	2031.98	12724.68	900.66	2031.98	1590.585
-Manufacturer#2	almond antique violet turquoise frosted	1800.7	12724.68	900.66	2031.98	1590.585
+Manufacturer#3	almond antique forest lavender goldenrod	NULL	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#3	almond antique forest lavender goldenrod	590.27	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#3	almond antique metallic orange dim	55.39	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#3	almond antique olive coral navajo	1337.29	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#3	almond antique chartreuse khaki white	99.68	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#3	almond antique misty red olive	1922.98	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#4	almond aquamarine floral ivory bisque	NULL	5716.950000000001	1206.26	1844.92	1429.2375000000002
+Manufacturer#4	almond antique gainsboro frosted violet	NULL	5716.950000000001	1206.26	1844.92	1429.2375000000002
+Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	5716.950000000001	1206.26	1844.92	1429.2375000000002
+Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	5716.950000000001	1206.26	1844.92	1429.2375000000002
+Manufacturer#4	almond azure aquamarine papaya violet	1290.35	5716.950000000001	1206.26	1844.92	1429.2375000000002
+Manufacturer#4	almond antique violet mint lemon	1375.42	5716.950000000001	1206.26	1844.92	1429.2375000000002
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	17276.33	1173.15	1753.76	1570.5754545454547
 Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	17276.33	1173.15	1753.76	1570.5754545454547
 Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	17276.33	1173.15	1753.76	1570.5754545454547
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	17276.33	1173.15	1753.76	1570.5754545454547
 Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	17276.33	1173.15	1753.76	1570.5754545454547
 Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	17276.33	1173.15	1753.76	1570.5754545454547
-Manufacturer#1	almond aquamarine burnished black steel	1414.42	17276.33	1173.15	1753.76	1570.5754545454547
-Manufacturer#1	almond antique burnished rose metallic	1173.15	17276.33	1173.15	1753.76	1570.5754545454547
 Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	17276.33	1173.15	1753.76	1570.5754545454547
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	17276.33	1173.15	1753.76	1570.5754545454547
 Manufacturer#1	almond antique burnished rose metallic	1173.15	17276.33	1173.15	1753.76	1570.5754545454547
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	17276.33	1173.15	1753.76	1570.5754545454547
+Manufacturer#1	almond aquamarine burnished black steel	1414.42	17276.33	1173.15	1753.76	1570.5754545454547
 Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	17276.33	1173.15	1753.76	1570.5754545454547
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	17276.33	1173.15	1753.76	1570.5754545454547
-Manufacturer#3	almond antique forest lavender goldenrod	590.27	6386.15	55.39	1922.98	912.3071428571428
-Manufacturer#3	almond antique metallic orange dim	55.39	6386.15	55.39	1922.98	912.3071428571428
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	6386.15	55.39	1922.98	912.3071428571428
-Manufacturer#3	almond antique olive coral navajo	1337.29	6386.15	55.39	1922.98	912.3071428571428
-Manufacturer#3	almond antique misty red olive	1922.98	6386.15	55.39	1922.98	912.3071428571428
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	6386.15	55.39	1922.98	912.3071428571428
-Manufacturer#3	almond antique forest lavender goldenrod	NULL	6386.15	55.39	1922.98	912.3071428571428
-Manufacturer#3	almond antique chartreuse khaki white	99.68	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	17276.33	1173.15	1753.76	1570.5754545454547
+Manufacturer#1	almond antique burnished rose metallic	1173.15	17276.33	1173.15	1753.76	1570.5754545454547
+Manufacturer#5	almond antique medium spring khaki	1611.66	9284.32	1018.1	1789.69	1547.3866666666665
+Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	9284.32	1018.1	1789.69	1547.3866666666665
+Manufacturer#5	almond antique sky peru orange	1788.73	9284.32	1018.1	1789.69	1547.3866666666665
+Manufacturer#5	almond antique medium spring khaki	1611.66	9284.32	1018.1	1789.69	1547.3866666666665
+Manufacturer#5	almond azure blanched chiffon midnight	1464.48	9284.32	1018.1	1789.69	1547.3866666666665
+Manufacturer#5	almond antique blue firebrick mint	1789.69	9284.32	1018.1	1789.69	1547.3866666666665
 PREHOOK: query: explain vectorization detail
 select p_mfgr,p_name, p_retailprice,
 sum(p_retailprice) over(partition by p_mfgr range between unbounded preceding and current row) as s,
@@ -2670,46 +2670,46 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@vector_ptf_part_simple_orc
 #### A masked pattern was here ####
 p_mfgr	p_name	p_retailprice	s	mi	ma	av
-Manufacturer#4	almond azure aquamarine papaya violet	1290.35	5716.950000000001	1206.26	1844.92	1429.2375000000002
-Manufacturer#4	almond antique violet mint lemon	1375.42	5716.950000000001	1206.26	1844.92	1429.2375000000002
-Manufacturer#4	almond aquamarine floral ivory bisque	NULL	5716.950000000001	1206.26	1844.92	1429.2375000000002
-Manufacturer#4	almond antique gainsboro frosted violet	NULL	5716.950000000001	1206.26	1844.92	1429.2375000000002
-Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	5716.950000000001	1206.26	1844.92	1429.2375000000002
-Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	5716.950000000001	1206.26	1844.92	1429.2375000000002
-Manufacturer#5	almond azure blanched chiffon midnight	1464.48	9284.32	1018.1	1789.69	1547.3866666666665
-Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	9284.32	1018.1	1789.69	1547.3866666666665
-Manufacturer#5	almond antique medium spring khaki	1611.66	9284.32	1018.1	1789.69	1547.3866666666665
-Manufacturer#5	almond antique blue firebrick mint	1789.69	9284.32	1018.1	1789.69	1547.3866666666665
-Manufacturer#5	almond antique medium spring khaki	1611.66	9284.32	1018.1	1789.69	1547.3866666666665
-Manufacturer#5	almond antique sky peru orange	1788.73	9284.32	1018.1	1789.69	1547.3866666666665
 Manufacturer#2	almond aquamarine rose maroon antique	900.66	12724.68	900.66	2031.98	1590.585
 Manufacturer#2	almond aquamarine rose maroon antique	1698.66	12724.68	900.66	2031.98	1590.585
 Manufacturer#2	almond antique violet turquoise frosted	1800.7	12724.68	900.66	2031.98	1590.585
 Manufacturer#2	almond antique violet chocolate turquoise	1690.68	12724.68	900.66	2031.98	1590.585
 Manufacturer#2	almond antique violet turquoise frosted	1800.7	12724.68	900.66	2031.98	1590.585
+Manufacturer#2	almond antique violet turquoise frosted	1800.7	12724.68	900.66	2031.98	1590.585
 Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.6	12724.68	900.66	2031.98	1590.585
 Manufacturer#2	almond aquamarine midnight light salmon	2031.98	12724.68	900.66	2031.98	1590.585
-Manufacturer#2	almond antique violet turquoise frosted	1800.7	12724.68	900.66	2031.98	1590.585
+Manufacturer#3	almond antique forest lavender goldenrod	NULL	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#3	almond antique forest lavender goldenrod	590.27	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#3	almond antique metallic orange dim	55.39	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#3	almond antique olive coral navajo	1337.29	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#3	almond antique chartreuse khaki white	99.68	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#3	almond antique misty red olive	1922.98	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#4	almond aquamarine floral ivory bisque	NULL	5716.950000000001	1206.26	1844.92	1429.2375000000002
+Manufacturer#4	almond antique gainsboro frosted violet	NULL	5716.950000000001	1206.26	1844.92	1429.2375000000002
+Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	5716.950000000001	1206.26	1844.92	1429.2375000000002
+Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	5716.950000000001	1206.26	1844.92	1429.2375000000002
+Manufacturer#4	almond azure aquamarine papaya violet	1290.35	5716.950000000001	1206.26	1844.92	1429.2375000000002
+Manufacturer#4	almond antique violet mint lemon	1375.42	5716.950000000001	1206.26	1844.92	1429.2375000000002
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	17276.33	1173.15	1753.76	1570.5754545454547
 Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	17276.33	1173.15	1753.76	1570.5754545454547
 Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	17276.33	1173.15	1753.76	1570.5754545454547
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	17276.33	1173.15	1753.76	1570.5754545454547
 Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	17276.33	1173.15	1753.76	1570.5754545454547
 Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	17276.33	1173.15	1753.76	1570.5754545454547
-Manufacturer#1	almond aquamarine burnished black steel	1414.42	17276.33	1173.15	1753.76	1570.5754545454547
-Manufacturer#1	almond antique burnished rose metallic	1173.15	17276.33	1173.15	1753.76	1570.5754545454547
 Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	17276.33	1173.15	1753.76	1570.5754545454547
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	17276.33	1173.15	1753.76	1570.5754545454547
 Manufacturer#1	almond antique burnished rose metallic	1173.15	17276.33	1173.15	1753.76	1570.5754545454547
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	17276.33	1173.15	1753.76	1570.5754545454547
+Manufacturer#1	almond aquamarine burnished black steel	1414.42	17276.33	1173.15	1753.76	1570.5754545454547
 Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	17276.33	1173.15	1753.76	1570.5754545454547
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	17276.33	1173.15	1753.76	1570.5754545454547
-Manufacturer#3	almond antique forest lavender goldenrod	590.27	6386.15	55.39	1922.98	912.3071428571428
-Manufacturer#3	almond antique metallic orange dim	55.39	6386.15	55.39	1922.98	912.3071428571428
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	6386.15	55.39	1922.98	912.3071428571428
-Manufacturer#3	almond antique olive coral navajo	1337.29	6386.15	55.39	1922.98	912.3071428571428
-Manufacturer#3	almond antique misty red olive	1922.98	6386.15	55.39	1922.98	912.3071428571428
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	6386.15	55.39	1922.98	912.3071428571428
-Manufacturer#3	almond antique forest lavender goldenrod	NULL	6386.15	55.39	1922.98	912.3071428571428
-Manufacturer#3	almond antique chartreuse khaki white	99.68	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	17276.33	1173.15	1753.76	1570.5754545454547
+Manufacturer#1	almond antique burnished rose metallic	1173.15	17276.33	1173.15	1753.76	1570.5754545454547
+Manufacturer#5	almond antique medium spring khaki	1611.66	9284.32	1018.1	1789.69	1547.3866666666665
+Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	9284.32	1018.1	1789.69	1547.3866666666665
+Manufacturer#5	almond antique sky peru orange	1788.73	9284.32	1018.1	1789.69	1547.3866666666665
+Manufacturer#5	almond antique medium spring khaki	1611.66	9284.32	1018.1	1789.69	1547.3866666666665
+Manufacturer#5	almond azure blanched chiffon midnight	1464.48	9284.32	1018.1	1789.69	1547.3866666666665
+Manufacturer#5	almond antique blue firebrick mint	1789.69	9284.32	1018.1	1789.69	1547.3866666666665
 PREHOOK: query: explain vectorization detail
 select p_mfgr,p_name, p_retailprice,
 sum(p_retailprice) over(partition by p_mfgr rows between unbounded preceding and current row) as s,
@@ -2867,46 +2867,46 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@vector_ptf_part_simple_orc
 #### A masked pattern was here ####
 p_mfgr	p_name	p_retailprice	s	mi	ma	av
-Manufacturer#4	almond azure aquamarine papaya violet	1290.35	1290.35	1290.35	1290.35	1290.35
-Manufacturer#4	almond antique violet mint lemon	1375.42	2665.77	1290.35	1375.42	1332.885
-Manufacturer#4	almond aquamarine floral ivory bisque	NULL	2665.77	1290.35	1375.42	1332.885
-Manufacturer#4	almond antique gainsboro frosted violet	NULL	2665.77	1290.35	1375.42	1332.885
-Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	4510.6900000000005	1290.35	1844.92	1503.5633333333335
-Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	5716.950000000001	1206.26	1844.92	1429.2375000000002
-Manufacturer#5	almond azure blanched chiffon midnight	1464.48	1464.48	1464.48	1464.48	1464.48
-Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	2482.58	1018.1	1464.48	1241.29
-Manufacturer#5	almond antique medium spring khaki	1611.66	4094.24	1018.1	1611.66	1364.7466666666667
-Manufacturer#5	almond antique blue firebrick mint	1789.69	5883.93	1018.1	1789.69	1470.9825
-Manufacturer#5	almond antique medium spring khaki	1611.66	7495.59	1018.1	1789.69	1499.118
-Manufacturer#5	almond antique sky peru orange	1788.73	9284.32	1018.1	1789.69	1547.3866666666665
 Manufacturer#2	almond aquamarine rose maroon antique	900.66	900.66	900.66	900.66	900.66
 Manufacturer#2	almond aquamarine rose maroon antique	1698.66	2599.32	900.66	1698.66	1299.66
 Manufacturer#2	almond antique violet turquoise frosted	1800.7	4400.02	900.66	1800.7	1466.6733333333334
 Manufacturer#2	almond antique violet chocolate turquoise	1690.68	6090.700000000001	900.66	1800.7	1522.6750000000002
 Manufacturer#2	almond antique violet turquoise frosted	1800.7	7891.400000000001	900.66	1800.7	1578.2800000000002
-Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.6	8892.0	900.66	1800.7	1482.0
-Manufacturer#2	almond aquamarine midnight light salmon	2031.98	10923.98	900.66	2031.98	1560.5685714285714
-Manufacturer#2	almond antique violet turquoise frosted	1800.7	12724.68	900.66	2031.98	1590.585
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1753.76	1753.76	1753.76	1753.76
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	3386.42	1632.66	1753.76	1693.21
+Manufacturer#2	almond antique violet turquoise frosted	1800.7	9692.1	900.66	1800.7	1615.3500000000001
+Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.6	10692.7	900.66	1800.7	1527.5285714285715
+Manufacturer#2	almond aquamarine midnight light salmon	2031.98	12724.68	900.66	2031.98	1590.585
+Manufacturer#3	almond antique forest lavender goldenrod	NULL	NULL	NULL	NULL	NULL
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	1190.27	1190.27	1190.27	1190.27
+Manufacturer#3	almond antique forest lavender goldenrod	590.27	1780.54	590.27	1190.27	890.27
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	2970.81	590.27	1190.27	990.27
+Manufacturer#3	almond antique metallic orange dim	55.39	3026.2	55.39	1190.27	756.55
+Manufacturer#3	almond antique olive coral navajo	1337.29	4363.49	55.39	1337.29	872.698
+Manufacturer#3	almond antique chartreuse khaki white	99.68	4463.17	55.39	1337.29	743.8616666666667
+Manufacturer#3	almond antique misty red olive	1922.98	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#4	almond aquamarine floral ivory bisque	NULL	NULL	NULL	NULL	NULL
+Manufacturer#4	almond antique gainsboro frosted violet	NULL	NULL	NULL	NULL	NULL
+Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	1206.26	1206.26	1206.26	1206.26
+Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	3051.1800000000003	1206.26	1844.92	1525.5900000000001
+Manufacturer#4	almond azure aquamarine papaya violet	1290.35	4341.530000000001	1206.26	1844.92	1447.176666666667
+Manufacturer#4	almond antique violet mint lemon	1375.42	5716.950000000001	1206.26	1844.92	1429.2375000000002
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1632.66	1632.66	1632.66	1632.66
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	3386.42	1632.66	1753.76	1693.21
 Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	5019.08	1632.66	1753.76	1673.0266666666666
 Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	6772.84	1632.66	1753.76	1693.21
-Manufacturer#1	almond aquamarine burnished black steel	1414.42	8187.26	1414.42	1753.76	1637.452
-Manufacturer#1	almond antique burnished rose metallic	1173.15	9360.41	1173.15	1753.76	1560.0683333333334
-Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	10963.0	1173.15	1753.76	1566.142857142857
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	12716.76	1173.15	1753.76	1589.595
-Manufacturer#1	almond antique burnished rose metallic	1173.15	13889.91	1173.15	1753.76	1543.3233333333333
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	15643.67	1173.15	1753.76	1564.367
-Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	15643.67	1173.15	1753.76	1564.367
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	17276.33	1173.15	1753.76	1570.5754545454547
-Manufacturer#3	almond antique forest lavender goldenrod	590.27	590.27	590.27	590.27	590.27
-Manufacturer#3	almond antique metallic orange dim	55.39	645.66	55.39	590.27	322.83
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	1835.9299999999998	55.39	1190.27	611.9766666666666
-Manufacturer#3	almond antique olive coral navajo	1337.29	3173.22	55.39	1337.29	793.305
-Manufacturer#3	almond antique misty red olive	1922.98	5096.2	55.39	1922.98	1019.24
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	6286.469999999999	55.39	1922.98	1047.745
-Manufacturer#3	almond antique forest lavender goldenrod	NULL	6286.469999999999	55.39	1922.98	1047.745
-Manufacturer#3	almond antique chartreuse khaki white	99.68	6386.15	55.39	1922.98	912.3071428571428
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	8405.5	1632.66	1753.76	1681.1
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	10159.26	1632.66	1753.76	1693.21
+Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	11761.85	1602.59	1753.76	1680.2642857142857
+Manufacturer#1	almond antique burnished rose metallic	1173.15	12935.0	1173.15	1753.76	1616.875
+Manufacturer#1	almond aquamarine burnished black steel	1414.42	14349.42	1173.15	1753.76	1594.38
+Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	14349.42	1173.15	1753.76	1594.38
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	16103.18	1173.15	1753.76	1610.318
+Manufacturer#1	almond antique burnished rose metallic	1173.15	17276.33	1173.15	1753.76	1570.5754545454547
+Manufacturer#5	almond antique medium spring khaki	1611.66	1611.66	1611.66	1611.66	1611.66
+Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	2629.76	1018.1	1611.66	1314.88
+Manufacturer#5	almond antique sky peru orange	1788.73	4418.49	1018.1	1788.73	1472.83
+Manufacturer#5	almond antique medium spring khaki	1611.66	6030.15	1018.1	1788.73	1507.5375
+Manufacturer#5	almond azure blanched chiffon midnight	1464.48	7494.629999999999	1018.1	1788.73	1498.926
+Manufacturer#5	almond antique blue firebrick mint	1789.69	9284.32	1018.1	1789.69	1547.3866666666665
 PREHOOK: query: explain vectorization detail
 select p_mfgr,p_name, p_retailprice,
 sum(p_retailprice) over(partition by p_mfgr order by p_name) as s,
@@ -4456,46 +4456,46 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@vector_ptf_part_simple_orc_decimal
 #### A masked pattern was here ####
 p_mfgr	p_name	p_retailprice	s	mi	ma	av
-Manufacturer#4	almond azure aquamarine papaya violet	1290.350000000000000000	5716.950000000000000000	1206.260000000000000000	1844.920000000000000000	1429.237500000000000000
-Manufacturer#4	almond antique violet mint lemon	1375.420000000000000000	5716.950000000000000000	1206.260000000000000000	1844.920000000000000000	1429.237500000000000000
-Manufacturer#4	almond aquamarine floral ivory bisque	NULL	5716.950000000000000000	1206.260000000000000000	1844.920000000000000000	1429.237500000000000000
-Manufacturer#4	almond antique gainsboro frosted violet	NULL	5716.950000000000000000	1206.260000000000000000	1844.920000000000000000	1429.237500000000000000
-Manufacturer#4	almond aquamarine yellow dodger mint	1844.920000000000000000	5716.950000000000000000	1206.260000000000000000	1844.920000000000000000	1429.237500000000000000
-Manufacturer#4	almond aquamarine floral ivory bisque	1206.260000000000000000	5716.950000000000000000	1206.260000000000000000	1844.920000000000000000	1429.237500000000000000
-Manufacturer#5	almond azure blanched chiffon midnight	1464.480000000000000000	9284.320000000000000000	1018.100000000000000000	1789.690000000000000000	1547.386666666666666667
-Manufacturer#5	almond aquamarine dodger light gainsboro	1018.100000000000000000	9284.320000000000000000	1018.100000000000000000	1789.690000000000000000	1547.386666666666666667
-Manufacturer#5	almond antique medium spring khaki	1611.660000000000000000	9284.320000000000000000	1018.100000000000000000	1789.690000000000000000	1547.386666666666666667
-Manufacturer#5	almond antique blue firebrick mint	1789.690000000000000000	9284.320000000000000000	1018.100000000000000000	1789.690000000000000000	1547.386666666666666667
-Manufacturer#5	almond antique medium spring khaki	1611.660000000000000000	9284.320000000000000000	1018.100000000000000000	1789.690000000000000000	1547.386666666666666667
-Manufacturer#5	almond antique sky peru orange	1788.730000000000000000	9284.320000000000000000	1018.100000000000000000	1789.690000000000000000	1547.386666666666666667
 Manufacturer#2	almond aquamarine rose maroon antique	900.660000000000000000	12724.680000000000000000	900.660000000000000000	2031.980000000000000000	1590.585000000000000000
 Manufacturer#2	almond aquamarine rose maroon antique	1698.660000000000000000	12724.680000000000000000	900.660000000000000000	2031.980000000000000000	1590.585000000000000000
 Manufacturer#2	almond antique violet turquoise frosted	1800.700000000000000000	12724.680000000000000000	900.660000000000000000	2031.980000000000000000	1590.585000000000000000
 Manufacturer#2	almond antique violet chocolate turquoise	1690.680000000000000000	12724.680000000000000000	900.660000000000000000	2031.980000000000000000	1590.585000000000000000
 Manufacturer#2	almond antique violet turquoise frosted	1800.700000000000000000	12724.680000000000000000	900.660000000000000000	2031.980000000000000000	1590.585000000000000000
+Manufacturer#2	almond antique violet turquoise frosted	1800.700000000000000000	12724.680000000000000000	900.660000000000000000	2031.980000000000000000	1590.585000000000000000
 Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.600000000000000000	12724.680000000000000000	900.660000000000000000	2031.980000000000000000	1590.585000000000000000
 Manufacturer#2	almond aquamarine midnight light salmon	2031.980000000000000000	12724.680000000000000000	900.660000000000000000	2031.980000000000000000	1590.585000000000000000
-Manufacturer#2	almond antique violet turquoise frosted	1800.700000000000000000	12724.680000000000000000	900.660000000000000000	2031.980000000000000000	1590.585000000000000000
+Manufacturer#3	almond antique forest lavender goldenrod	NULL	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
+Manufacturer#3	almond antique forest lavender goldenrod	1190.270000000000000000	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
+Manufacturer#3	almond antique forest lavender goldenrod	590.270000000000000000	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
+Manufacturer#3	almond antique forest lavender goldenrod	1190.270000000000000000	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
+Manufacturer#3	almond antique metallic orange dim	55.390000000000000000	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
+Manufacturer#3	almond antique olive coral navajo	1337.290000000000000000	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
+Manufacturer#3	almond antique chartreuse khaki white	99.680000000000000000	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
+Manufacturer#3	almond antique misty red olive	1922.980000000000000000	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
+Manufacturer#4	almond aquamarine floral ivory bisque	NULL	5716.950000000000000000	1206.260000000000000000	1844.920000000000000000	1429.237500000000000000
+Manufacturer#4	almond antique gainsboro frosted violet	NULL	5716.950000000000000000	1206.260000000000000000	1844.920000000000000000	1429.237500000000000000
+Manufacturer#4	almond aquamarine floral ivory bisque	1206.260000000000000000	5716.950000000000000000	1206.260000000000000000	1844.920000000000000000	1429.237500000000000000
+Manufacturer#4	almond aquamarine yellow dodger mint	1844.920000000000000000	5716.950000000000000000	1206.260000000000000000	1844.920000000000000000	1429.237500000000000000
+Manufacturer#4	almond azure aquamarine papaya violet	1290.350000000000000000	5716.950000000000000000	1206.260000000000000000	1844.920000000000000000	1429.237500000000000000
+Manufacturer#4	almond antique violet mint lemon	1375.420000000000000000	5716.950000000000000000	1206.260000000000000000	1844.920000000000000000	1429.237500000000000000
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.660000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
 Manufacturer#1	almond antique chartreuse lavender yellow	1753.760000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
 Manufacturer#1	almond aquamarine pink moccasin thistle	1632.660000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.760000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
 Manufacturer#1	almond aquamarine pink moccasin thistle	1632.660000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
 Manufacturer#1	almond antique chartreuse lavender yellow	1753.760000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
-Manufacturer#1	almond aquamarine burnished black steel	1414.420000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
-Manufacturer#1	almond antique burnished rose metallic	1173.150000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
 Manufacturer#1	almond antique salmon chartreuse burlywood	1602.590000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.760000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
 Manufacturer#1	almond antique burnished rose metallic	1173.150000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.760000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
+Manufacturer#1	almond aquamarine burnished black steel	1414.420000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
 Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.660000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
-Manufacturer#3	almond antique forest lavender goldenrod	590.270000000000000000	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
-Manufacturer#3	almond antique metallic orange dim	55.390000000000000000	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
-Manufacturer#3	almond antique forest lavender goldenrod	1190.270000000000000000	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
-Manufacturer#3	almond antique olive coral navajo	1337.290000000000000000	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
-Manufacturer#3	almond antique misty red olive	1922.980000000000000000	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
-Manufacturer#3	almond antique forest lavender goldenrod	1190.270000000000000000	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
-Manufacturer#3	almond antique forest lavender goldenrod	NULL	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
-Manufacturer#3	almond antique chartreuse khaki white	99.680000000000000000	6386.150000000000000000	55.390000000000000000	1922.980000000000000000	912.307142857142857143
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.760000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
+Manufacturer#1	almond antique burnished rose metallic	1173.150000000000000000	17276.330000000000000000	1173.150000000000000000	1753.760000000000000000	1570.575454545454545455
+Manufacturer#5	almond antique medium spring khaki	1611.660000000000000000	9284.320000000000000000	1018.100000000000000000	1789.690000000000000000	1547.386666666666666667
+Manufacturer#5	almond aquamarine dodger light gainsboro	1018.100000000000000000	9284.320000000000000000	1018.100000000000000000	1789.690000000000000000	1547.386666666666666667
+Manufacturer#5	almond antique sky peru orange	1788.730000000000000000	9284.320000000000000000	1018.100000000000000000	1789.690000000000000000	1547.386666666666666667
+Manufacturer#5	almond antique medium spring khaki	1611.660000000000000000	9284.320000000000000000	1018.100000000000000000	1789.690000000000000000	1547.386666666666666667
+Manufacturer#5	almond azure blanched chiffon midnight	1464.480000000000000000	9284.320000000000000000	1018.100000000000000000	1789.690000000000000000	1547.386666666666666667
+Manufacturer#5	almond antique blue firebrick mint	1789.690000000000000000	9284.320000000000000000	1018.100000000000000000	1789.690000000000000000	1547.386666666666666667
 PREHOOK: query: explain vectorization detail
 select p_mfgr,p_name, p_retailprice,
 sum(p_retailprice) over(partition by p_mfgr order by p_name) as s,
@@ -4934,46 +4934,46 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@vector_ptf_part_simple_orc_long
 #### A masked pattern was here ####
 p_mfgr	p_name	p_bigint	s	mi	ma	av
-Manufacturer#4	almond azure aquamarine papaya violet	129035	571695	120626	184492	142923.75
-Manufacturer#4	almond antique violet mint lemon	137542	571695	120626	184492	142923.75
-Manufacturer#4	almond aquamarine floral ivory bisque	NULL	571695	120626	184492	142923.75
-Manufacturer#4	almond antique gainsboro frosted violet	NULL	571695	120626	184492	142923.75
-Manufacturer#4	almond aquamarine yellow dodger mint	184492	571695	120626	184492	142923.75
-Manufacturer#4	almond aquamarine floral ivory bisque	120626	571695	120626	184492	142923.75
-Manufacturer#5	almond azure blanched chiffon midnight	146448	928432	101810	178969	154738.66666666666
-Manufacturer#5	almond aquamarine dodger light gainsboro	101810	928432	101810	178969	154738.66666666666
-Manufacturer#5	almond antique medium spring khaki	161166	928432	101810	178969	154738.66666666666
-Manufacturer#5	almond antique blue firebrick mint	178969	928432	101810	178969	154738.66666666666
-Manufacturer#5	almond antique medium spring khaki	161166	928432	101810	178969	154738.66666666666
-Manufacturer#5	almond antique sky peru orange	178873	928432	101810	178969	154738.66666666666
 Manufacturer#2	almond aquamarine rose maroon antique	90066	1272468	90066	203198	159058.5
 Manufacturer#2	almond aquamarine rose maroon antique	169866	1272468	90066	203198	159058.5
 Manufacturer#2	almond antique violet turquoise frosted	180070	1272468	90066	203198	159058.5
 Manufacturer#2	almond antique violet chocolate turquoise	169068	1272468	90066	203198	159058.5
 Manufacturer#2	almond antique violet turquoise frosted	180070	1272468	90066	203198	159058.5
+Manufacturer#2	almond antique violet turquoise frosted	180070	1272468	90066	203198	159058.5
 Manufacturer#2	almond aquamarine sandy cyan gainsboro	100060	1272468	90066	203198	159058.5
 Manufacturer#2	almond aquamarine midnight light salmon	203198	1272468	90066	203198	159058.5
-Manufacturer#2	almond antique violet turquoise frosted	180070	1272468	90066	203198	159058.5
+Manufacturer#3	almond antique forest lavender goldenrod	NULL	638615	5539	192298	91230.71428571429
+Manufacturer#3	almond antique forest lavender goldenrod	119027	638615	5539	192298	91230.71428571429
+Manufacturer#3	almond antique forest lavender goldenrod	59027	638615	5539	192298	91230.71428571429
+Manufacturer#3	almond antique forest lavender goldenrod	119027	638615	5539	192298	91230.71428571429
+Manufacturer#3	almond antique metallic orange dim	5539	638615	5539	192298	91230.71428571429
+Manufacturer#3	almond antique olive coral navajo	133729	638615	5539	192298	91230.71428571429
+Manufacturer#3	almond antique chartreuse khaki white	9968	638615	5539	192298	91230.71428571429
+Manufacturer#3	almond antique misty red olive	192298	638615	5539	192298	91230.71428571429
+Manufacturer#4	almond aquamarine floral ivory bisque	NULL	571695	120626	184492	142923.75
+Manufacturer#4	almond antique gainsboro frosted violet	NULL	571695	120626	184492	142923.75
+Manufacturer#4	almond aquamarine floral ivory bisque	120626	571695	120626	184492	142923.75
+Manufacturer#4	almond aquamarine yellow dodger mint	184492	571695	120626	184492	142923.75
+Manufacturer#4	almond azure aquamarine papaya violet	129035	571695	120626	184492	142923.75
+Manufacturer#4	almond antique violet mint lemon	137542	571695	120626	184492	142923.75
+Manufacturer#1	almond aquamarine pink moccasin thistle	163266	1727633	117315	175376	157057.54545454544
 Manufacturer#1	almond antique chartreuse lavender yellow	175376	1727633	117315	175376	157057.54545454544
 Manufacturer#1	almond aquamarine pink moccasin thistle	163266	1727633	117315	175376	157057.54545454544
+Manufacturer#1	almond antique chartreuse lavender yellow	175376	1727633	117315	175376	157057.54545454544
 Manufacturer#1	almond aquamarine pink moccasin thistle	163266	1727633	117315	175376	157057.54545454544
 Manufacturer#1	almond antique chartreuse lavender yellow	175376	1727633	117315	175376	157057.54545454544
-Manufacturer#1	almond aquamarine burnished black steel	141442	1727633	117315	175376	157057.54545454544
-Manufacturer#1	almond antique burnished rose metallic	117315	1727633	117315	175376	157057.54545454544
 Manufacturer#1	almond antique salmon chartreuse burlywood	160259	1727633	117315	175376	157057.54545454544
-Manufacturer#1	almond antique chartreuse lavender yellow	175376	1727633	117315	175376	157057.54545454544
 Manufacturer#1	almond antique burnished rose metallic	117315	1727633	117315	175376	157057.54545454544
-Manufacturer#1	almond antique chartreuse lavender yellow	175376	1727633	117315	175376	157057.54545454544
+Manufacturer#1	almond aquamarine burnished black steel	141442	1727633	117315	175376	157057.54545454544
 Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	1727633	117315	175376	157057.54545454544
-Manufacturer#1	almond aquamarine pink moccasin thistle	163266	1727633	117315	175376	157057.54545454544
-Manufacturer#3	almond antique forest lavender goldenrod	59027	638615	5539	192298	91230.71428571429
-Manufacturer#3	almond antique metallic orange dim	5539	638615	5539	192298	91230.71428571429
-Manufacturer#3	almond antique forest lavender goldenrod	119027	638615	5539	192298	91230.71428571429
-Manufacturer#3	almond antique olive coral navajo	133729	638615	5539	192298	91230.71428571429
-Manufacturer#3	almond antique misty red olive	192298	638615	5539	192298	91230.71428571429
-Manufacturer#3	almond antique forest lavender goldenrod	119027	638615	5539	192298	91230.71428571429
-Manufacturer#3	almond antique forest lavender goldenrod	NULL	638615	5539	192298	91230.71428571429
-Manufacturer#3	almond antique chartreuse khaki white	9968	638615	5539	192298	91230.71428571429
+Manufacturer#1	almond antique chartreuse lavender yellow	175376	1727633	117315	175376	157057.54545454544
+Manufacturer#1	almond antique burnished rose metallic	117315	1727633	117315	175376	157057.54545454544
+Manufacturer#5	almond antique medium spring khaki	161166	928432	101810	178969	154738.66666666666
+Manufacturer#5	almond aquamarine dodger light gainsboro	101810	928432	101810	178969	154738.66666666666
+Manufacturer#5	almond antique sky peru orange	178873	928432	101810	178969	154738.66666666666
+Manufacturer#5	almond antique medium spring khaki	161166	928432	101810	178969	154738.66666666666
+Manufacturer#5	almond azure blanched chiffon midnight	146448	928432	101810	178969	154738.66666666666
+Manufacturer#5	almond antique blue firebrick mint	178969	928432	101810	178969	154738.66666666666
 PREHOOK: query: explain vectorization detail
 select p_mfgr,p_name, p_bigint,
 sum(p_bigint) over(partition by p_mfgr order by p_name) as s,
@@ -5363,46 +5363,46 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@vector_ptf_part_simple_orc
 #### A masked pattern was here ####
 p_mfgr	p_retailprice	r
-Manufacturer#4	1290.35	1
-Manufacturer#4	1375.42	1
-Manufacturer#4	NULL	1
-Manufacturer#4	NULL	1
-Manufacturer#4	1844.92	1
-Manufacturer#4	1206.26	1
-Manufacturer#5	1464.48	1
-Manufacturer#5	1018.1	1
-Manufacturer#5	1611.66	1
-Manufacturer#5	1789.69	1
-Manufacturer#5	1611.66	1
-Manufacturer#5	1788.73	1
 Manufacturer#2	900.66	1
 Manufacturer#2	1698.66	1
 Manufacturer#2	1800.7	1
 Manufacturer#2	1690.68	1
 Manufacturer#2	1800.7	1
+Manufacturer#2	1800.7	1
 Manufacturer#2	1000.6	1
 Manufacturer#2	2031.98	1
-Manufacturer#2	1800.7	1
+Manufacturer#3	NULL	1
+Manufacturer#3	1190.27	1
+Manufacturer#3	590.27	1
+Manufacturer#3	1190.27	1
+Manufacturer#3	55.39	1
+Manufacturer#3	1337.29	1
+Manufacturer#3	99.68	1
+Manufacturer#3	1922.98	1
+Manufacturer#4	NULL	1
+Manufacturer#4	NULL	1
+Manufacturer#4	1206.26	1
+Manufacturer#4	1844.92	1
+Manufacturer#4	1290.35	1
+Manufacturer#4	1375.42	1
+Manufacturer#1	1632.66	1
 Manufacturer#1	1753.76	1
 Manufacturer#1	1632.66	1
+Manufacturer#1	1753.76	1
 Manufacturer#1	1632.66	1
 Manufacturer#1	1753.76	1
-Manufacturer#1	1414.42	1
-Manufacturer#1	1173.15	1
 Manufacturer#1	1602.59	1
-Manufacturer#1	1753.76	1
 Manufacturer#1	1173.15	1
-Manufacturer#1	1753.76	1
+Manufacturer#1	1414.42	1
 Manufacturer#1	NULL	1
-Manufacturer#1	1632.66	1
-Manufacturer#3	590.27	1
-Manufacturer#3	55.39	1
-Manufacturer#3	1190.27	1
-Manufacturer#3	1337.29	1
-Manufacturer#3	1922.98	1
-Manufacturer#3	1190.27	1
-Manufacturer#3	NULL	1
-Manufacturer#3	99.68	1
+Manufacturer#1	1753.76	1
+Manufacturer#1	1173.15	1
+Manufacturer#5	1611.66	1
+Manufacturer#5	1018.1	1
+Manufacturer#5	1788.73	1
+Manufacturer#5	1611.66	1
+Manufacturer#5	1464.48	1
+Manufacturer#5	1789.69	1
 PREHOOK: query: explain vectorization detail
 select p_mfgr, p_retailprice,
 rank() over(partition by p_mfgr order by p_name) as r
@@ -5733,18 +5733,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@vector_ptf_part_simple_orc
 #### A masked pattern was here ####
 p_mfgr	p_name	p_retailprice	r
-Manufacturer#1	almond aquamarine burnished black steel	1414.42	1
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
-Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	1
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
-Manufacturer#1	almond antique burnished rose metallic	1173.15	1
-Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	1
-Manufacturer#1	almond antique burnished rose metallic	1173.15	1
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
 Manufacturer#2	almond aquamarine rose maroon antique	900.66	1
 Manufacturer#2	almond aquamarine rose maroon antique	1698.66	1
 Manufacturer#2	almond antique violet turquoise frosted	1800.7	1
@@ -5753,26 +5741,38 @@ Manufacturer#2	almond antique violet turquoise frosted	1800.7	1
 Manufacturer#2	almond antique violet turquoise frosted	1800.7	1
 Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.6	1
 Manufacturer#2	almond aquamarine midnight light salmon	2031.98	1
-Manufacturer#4	almond antique violet mint lemon	1375.42	1
-Manufacturer#4	almond antique gainsboro frosted violet	NULL	1
-Manufacturer#4	almond aquamarine floral ivory bisque	NULL	1
-Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	1
+Manufacturer#5	almond antique sky peru orange	1788.73	1
+Manufacturer#5	almond antique medium spring khaki	1611.66	1
+Manufacturer#5	almond antique medium spring khaki	1611.66	1
+Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	1
+Manufacturer#5	almond azure blanched chiffon midnight	1464.48	1
+Manufacturer#5	almond antique blue firebrick mint	1789.69	1
 Manufacturer#4	almond azure aquamarine papaya violet	1290.35	1
+Manufacturer#4	almond aquamarine floral ivory bisque	NULL	1
+Manufacturer#4	almond antique gainsboro frosted violet	NULL	1
+Manufacturer#4	almond antique violet mint lemon	1375.42	1
 Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	1
-Manufacturer#3	almond antique misty red olive	1922.98	1
-Manufacturer#3	almond antique chartreuse khaki white	99.68	1
+Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	1
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
+Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	1
+Manufacturer#1	almond antique burnished rose metallic	1173.15	1
+Manufacturer#1	almond aquamarine burnished black steel	1414.42	1
+Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	1
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
+Manufacturer#1	almond antique burnished rose metallic	1173.15	1
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	1
 Manufacturer#3	almond antique forest lavender goldenrod	1190.27	1
 Manufacturer#3	almond antique metallic orange dim	55.39	1
 Manufacturer#3	almond antique olive coral navajo	1337.29	1
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	1
+Manufacturer#3	almond antique chartreuse khaki white	99.68	1
 Manufacturer#3	almond antique forest lavender goldenrod	590.27	1
+Manufacturer#3	almond antique misty red olive	1922.98	1
 Manufacturer#3	almond antique forest lavender goldenrod	NULL	1
-Manufacturer#5	almond antique medium spring khaki	1611.66	1
-Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	1
-Manufacturer#5	almond antique sky peru orange	1788.73	1
-Manufacturer#5	almond antique medium spring khaki	1611.66	1
-Manufacturer#5	almond azure blanched chiffon midnight	1464.48	1
-Manufacturer#5	almond antique blue firebrick mint	1789.69	1
 PREHOOK: query: explain vectorization detail
 select p_mfgr, p_name, p_retailprice,
 rank() over(partition by p_mfgr, case when p_mfgr == "Manufacturer#2" then timestamp "2000-01-01 00:00:00" end order by p_name) as r
@@ -6000,46 +6000,46 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@vector_ptf_part_simple_orc
 #### A masked pattern was here ####
 p_mfgr	p_name	p_retailprice	rn	r	dr	fv	lv	c	cs
-Manufacturer#4	almond azure aquamarine papaya violet	1290.35	1	1	1	1290.35	1206.26	4	6
-Manufacturer#4	almond antique violet mint lemon	1375.42	2	1	1	1290.35	1206.26	4	6
-Manufacturer#4	almond aquamarine floral ivory bisque	NULL	3	1	1	1290.35	1206.26	4	6
-Manufacturer#4	almond antique gainsboro frosted violet	NULL	4	1	1	1290.35	1206.26	4	6
-Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	5	1	1	1290.35	1206.26	4	6
-Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	6	1	1	1290.35	1206.26	4	6
-Manufacturer#5	almond azure blanched chiffon midnight	1464.48	1	1	1	1464.48	1788.73	6	6
-Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	2	1	1	1464.48	1788.73	6	6
-Manufacturer#5	almond antique medium spring khaki	1611.66	3	1	1	1464.48	1788.73	6	6
-Manufacturer#5	almond antique blue firebrick mint	1789.69	4	1	1	1464.48	1788.73	6	6
-Manufacturer#5	almond antique medium spring khaki	1611.66	5	1	1	1464.48	1788.73	6	6
-Manufacturer#5	almond antique sky peru orange	1788.73	6	1	1	1464.48	1788.73	6	6
-Manufacturer#2	almond aquamarine rose maroon antique	900.66	1	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond aquamarine rose maroon antique	1698.66	2	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond antique violet turquoise frosted	1800.7	3	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond antique violet chocolate turquoise	1690.68	4	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond antique violet turquoise frosted	1800.7	5	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.6	6	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond aquamarine midnight light salmon	2031.98	7	1	1	900.66	1800.7	8	8
-Manufacturer#2	almond antique violet turquoise frosted	1800.7	8	1	1	900.66	1800.7	8	8
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	2	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	3	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	4	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond aquamarine burnished black steel	1414.42	5	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique burnished rose metallic	1173.15	6	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	7	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	8	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique burnished rose metallic	1173.15	9	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	10	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	11	1	1	1753.76	1632.66	11	12
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	12	1	1	1753.76	1632.66	11	12
-Manufacturer#3	almond antique forest lavender goldenrod	590.27	1	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique metallic orange dim	55.39	2	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	3	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique olive coral navajo	1337.29	4	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique misty red olive	1922.98	5	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	6	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique forest lavender goldenrod	NULL	7	1	1	590.27	99.68	7	8
-Manufacturer#3	almond antique chartreuse khaki white	99.68	8	1	1	590.27	99.68	7	8
+Manufacturer#2	almond aquamarine rose maroon antique	900.66	1	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond aquamarine rose maroon antique	1698.66	2	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond antique violet turquoise frosted	1800.7	3	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond antique violet chocolate turquoise	1690.68	4	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond antique violet turquoise frosted	1800.7	5	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond antique violet turquoise frosted	1800.7	6	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.6	7	1	1	900.66	2031.98	8	8
+Manufacturer#2	almond aquamarine midnight light salmon	2031.98	8	1	1	900.66	2031.98	8	8
+Manufacturer#3	almond antique forest lavender goldenrod	NULL	1	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	2	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique forest lavender goldenrod	590.27	3	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	4	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique metallic orange dim	55.39	5	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique olive coral navajo	1337.29	6	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique chartreuse khaki white	99.68	7	1	1	NULL	1922.98	7	8
+Manufacturer#3	almond antique misty red olive	1922.98	8	1	1	NULL	1922.98	7	8
+Manufacturer#4	almond aquamarine floral ivory bisque	NULL	1	1	1	NULL	1375.42	4	6
+Manufacturer#4	almond antique gainsboro frosted violet	NULL	2	1	1	NULL	1375.42	4	6
+Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	3	1	1	NULL	1375.42	4	6
+Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	4	1	1	NULL	1375.42	4	6
+Manufacturer#4	almond azure aquamarine papaya violet	1290.35	5	1	1	NULL	1375.42	4	6
+Manufacturer#4	almond antique violet mint lemon	1375.42	6	1	1	NULL	1375.42	4	6
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	2	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	3	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	4	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	5	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	6	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	7	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique burnished rose metallic	1173.15	8	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond aquamarine burnished black steel	1414.42	9	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	10	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	11	1	1	1632.66	1173.15	11	12
+Manufacturer#1	almond antique burnished rose metallic	1173.15	12	1	1	1632.66	1173.15	11	12
+Manufacturer#5	almond antique medium spring khaki	1611.66	1	1	1	1611.66	1789.69	6	6
+Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	2	1	1	1611.66	1789.69	6	6
+Manufacturer#5	almond antique sky peru orange	1788.73	3	1	1	1611.66	1789.69	6	6
+Manufacturer#5	almond antique medium spring khaki	1611.66	4	1	1	1611.66	1789.69	6	6
+Manufacturer#5	almond azure blanched chiffon midnight	1464.48	5	1	1	1611.66	1789.69	6	6
+Manufacturer#5	almond antique blue firebrick mint	1789.69	6	1	1	1611.66	1789.69	6	6
 PREHOOK: query: select p_mfgr,p_name, p_retailprice,
 row_number() over(partition by p_mfgr order by p_name) as rn,
 rank() over(partition by p_mfgr order by p_name) as r,
@@ -6264,46 +6264,46 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@vector_ptf_part_simple_orc
 #### A masked pattern was here ####
 p_mfgr	p_retailprice	r
-Manufacturer#4	1290.35	1
-Manufacturer#4	1375.42	1
-Manufacturer#4	NULL	1
-Manufacturer#4	NULL	1
-Manufacturer#4	1844.92	1
-Manufacturer#4	1206.26	1
-Manufacturer#5	1464.48	1
-Manufacturer#5	1018.1	1
-Manufacturer#5	1611.66	1
-Manufacturer#5	1789.69	1
-Manufacturer#5	1611.66	1
-Manufacturer#5	1788.73	1
 Manufacturer#2	900.66	1
 Manufacturer#2	1698.66	1
 Manufacturer#2	1800.7	1
 Manufacturer#2	1690.68	1
 Manufacturer#2	1800.7	1
+Manufacturer#2	1800.7	1
 Manufacturer#2	1000.6	1
 Manufacturer#2	2031.98	1
-Manufacturer#2	1800.7	1
+Manufacturer#3	NULL	1
+Manufacturer#3	1190.27	1
+Manufacturer#3	590.27	1
+Manufacturer#3	1190.27	1
+Manufacturer#3	55.39	1
+Manufacturer#3	1337.29	1
+Manufacturer#3	99.68	1
+Manufacturer#3	1922.98	1
+Manufacturer#4	NULL	1
+Manufacturer#4	NULL	1
+Manufacturer#4	1206.26	1
+Manufacturer#4	1844.92	1
+Manufacturer#4	1290.35	1
+Manufacturer#4	1375.42	1
+Manufacturer#1	1632.66	1
 Manufacturer#1	1753.76	1
 Manufacturer#1	1632.66	1
+Manufacturer#1	1753.76	1
 Manufacturer#1	1632.66	1
 Manufacturer#1	1753.76	1
-Manufacturer#1	1414.42	1
-Manufacturer#1	1173.15	1
 Manufacturer#1	1602.59	1
-Manufacturer#1	1753.76	1
 Manufacturer#1	1173.15	1
-Manufacturer#1	1753.76	1
+Manufacturer#1	1414.42	1
 Manufacturer#1	NULL	1
-Manufacturer#1	1632.66	1
-Manufacturer#3	590.27	1
-Manufacturer#3	55.39	1
-Manufacturer#3	1190.27	1
-Manufacturer#3	1337.29	1
-Manufacturer#3	1922.98	1
-Manufacturer#3	1190.27	1
-Manufacturer#3	NULL	1
-Manufacturer#3	99.68	1
+Manufacturer#1	1753.76	1
+Manufacturer#1	1173.15	1
+Manufacturer#5	1611.66	1
+Manufacturer#5	1018.1	1
+Manufacturer#5	1788.73	1
+Manufacturer#5	1611.66	1
+Manufacturer#5	1464.48	1
+Manufacturer#5	1789.69	1
 PREHOOK: query: explain vectorization detail
 select p_mfgr, p_retailprice,
 rank() over(partition by p_mfgr order by p_name) as r
@@ -6836,18 +6836,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@vector_ptf_part_simple_orc
 #### A masked pattern was here ####
 p_mfgr	p_name	p_retailprice	r
-Manufacturer#1	almond aquamarine burnished black steel	1414.42	1
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
-Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	1
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
-Manufacturer#1	almond antique burnished rose metallic	1173.15	1
-Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	1
-Manufacturer#1	almond antique burnished rose metallic	1173.15	1
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
-Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1
-Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
 Manufacturer#2	almond aquamarine rose maroon antique	900.66	1
 Manufacturer#2	almond aquamarine rose maroon antique	1698.66	1
 Manufacturer#2	almond antique violet turquoise frosted	1800.7	1
@@ -6856,23 +6844,35 @@ Manufacturer#2	almond antique violet turquoise frosted	1800.7	1
 Manufacturer#2	almond antique violet turquoise frosted	1800.7	1
 Manufacturer#2	almond aquamarine sandy cyan gainsboro	1000.6	1
 Manufacturer#2	almond aquamarine midnight light salmon	2031.98	1
-Manufacturer#4	almond antique violet mint lemon	1375.42	1
-Manufacturer#4	almond antique gainsboro frosted violet	NULL	1
-Manufacturer#4	almond aquamarine floral ivory bisque	NULL	1
-Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	1
+Manufacturer#5	almond antique sky peru orange	1788.73	1
+Manufacturer#5	almond antique medium spring khaki	1611.66	1
+Manufacturer#5	almond antique medium spring khaki	1611.66	1
+Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	1
+Manufacturer#5	almond azure blanched chiffon midnight	1464.48	1
+Manufacturer#5	almond antique blue firebrick mint	1789.69	1
 Manufacturer#4	almond azure aquamarine papaya violet	1290.35	1
+Manufacturer#4	almond aquamarine floral ivory bisque	NULL	1
+Manufacturer#4	almond antique gainsboro frosted violet	NULL	1
+Manufacturer#4	almond antique violet mint lemon	1375.42	1
 Manufacturer#4	almond aquamarine yellow dodger mint	1844.92	1
-Manufacturer#3	almond antique misty red olive	1922.98	1
-Manufacturer#3	almond antique chartreuse khaki white	99.68	1
+Manufacturer#4	almond aquamarine floral ivory bisque	1206.26	1
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
+Manufacturer#1	almond aquamarine pink moccasin thistle	1632.66	1
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
+Manufacturer#1	almond antique salmon chartreuse burlywood	1602.59	1
+Manufacturer#1	almond antique burnished rose metallic	1173.15	1
+Manufacturer#1	almond aquamarine burnished black steel	1414.42	1
+Manufacturer#1	almond aquamarine pink moccasin thistle	NULL	1
+Manufacturer#1	almond antique chartreuse lavender yellow	1753.76	1
+Manufacturer#1	almond antique burnished rose metallic	1173.15	1
+Manufacturer#3	almond antique forest lavender goldenrod	1190.27	1
 Manufacturer#3	almond antique forest lavender goldenrod	1190.27	1
 Manufacturer#3	almond antique metallic orange dim	55.39	1
 Manufacturer#3	almond antique olive coral navajo	1337.29	1
-Manufacturer#3	almond antique forest lavender goldenrod	1190.27	1
+Manufacturer#3	almond antique chartreuse khaki white	99.68	1
 Manufacturer#3	almond antique forest lavender goldenrod	590.27	1
+Manufacturer#3	almond antique misty red olive	1922.98	1
 Manufacturer#3	almond antique forest lavender goldenrod	NULL	1
-Manufacturer#5	almond antique medium spring khaki	1611.66	1
-Manufacturer#5	almond aquamarine dodger light gainsboro	1018.1	1
-Manufacturer#5	almond antique sky peru orange	1788.73	1
-Manufacturer#5	almond antique medium spring khaki	1611.66	1
-Manufacturer#5	almond azure blanched chiffon midnight	1464.48	1
-Manufacturer#5	almond antique blue firebrick mint	1789.69	1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/vector_windowing_expressions.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_windowing_expressions.q.out b/ql/src/test/results/clientpositive/llap/vector_windowing_expressions.q.out
index 401a73e..18bda85 100644
--- a/ql/src/test/results/clientpositive/llap/vector_windowing_expressions.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_windowing_expressions.q.out
@@ -1457,32 +1457,32 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
 p_mfgr	avg_window_0
-Manufacturer#2	1800.7
-Manufacturer#4	1375.42
+Manufacturer#1	1753.76
+Manufacturer#3	1410.39
 Manufacturer#4	1620.67
-Manufacturer#4	1206.26
+Manufacturer#5	1018.1
 Manufacturer#5	1788.73
-Manufacturer#1	1632.66
+Manufacturer#1	1173.15
+Manufacturer#1	1173.15
+Manufacturer#2	1800.7
 Manufacturer#2	1690.68
-Manufacturer#2	1698.66
-Manufacturer#2	1701.6
-Manufacturer#3	1337.29
+Manufacturer#3	1922.98
 Manufacturer#4	1844.92
 Manufacturer#4	1290.35
-Manufacturer#5	1018.1
 Manufacturer#5	1789.69
-Manufacturer#1	1753.76
-Manufacturer#1	1602.59
-Manufacturer#1	1173.15
-Manufacturer#1	1173.15
 Manufacturer#1	1414.42
-Manufacturer#2	2031.98
-Manufacturer#3	1922.98
-Manufacturer#3	1410.39
+Manufacturer#2	1701.6
 Manufacturer#3	1190.27
-Manufacturer#5	1464.48
+Manufacturer#3	1337.29
+Manufacturer#4	1206.26
 Manufacturer#5	1611.66
+Manufacturer#1	1632.66
+Manufacturer#1	1602.59
+Manufacturer#2	2031.98
+Manufacturer#2	1698.66
 Manufacturer#3	1671.68
+Manufacturer#4	1375.42
+Manufacturer#5	1464.48
 PREHOOK: query: explain vectorization detail
 select p_mfgr, avg(p_retailprice) over(partition by p_mfgr order by p_type,p_mfgr rows between unbounded preceding and current row) from part
 PREHOOK: type: QUERY
@@ -2145,32 +2145,32 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
 p_mfgr	avg_window_0
-Manufacturer#2	1800.7
-Manufacturer#4	1375.42
+Manufacturer#1	1753.76
+Manufacturer#3	1410.39
 Manufacturer#4	1620.67
-Manufacturer#4	1206.26
+Manufacturer#5	1018.1
 Manufacturer#5	1788.73
-Manufacturer#1	1632.66
+Manufacturer#1	1173.15
+Manufacturer#1	1173.15
+Manufacturer#2	1800.7
 Manufacturer#2	1690.68
-Manufacturer#2	1698.66
-Manufacturer#2	1701.6
-Manufacturer#3	1337.29
+Manufacturer#3	1922.98
 Manufacturer#4	1844.92
 Manufacturer#4	1290.35
-Manufacturer#5	1018.1
 Manufacturer#5	1789.69
-Manufacturer#1	1753.76
-Manufacturer#1	1602.59
-Manufacturer#1	1173.15
-Manufacturer#1	1173.15
 Manufacturer#1	1414.42
-Manufacturer#2	2031.98
-Manufacturer#3	1922.98
-Manufacturer#3	1410.39
+Manufacturer#2	1701.6
 Manufacturer#3	1190.27
-Manufacturer#5	1464.48
+Manufacturer#3	1337.29
+Manufacturer#4	1206.26
 Manufacturer#5	1611.66
+Manufacturer#1	1632.66
+Manufacturer#1	1602.59
+Manufacturer#2	2031.98
+Manufacturer#2	1698.66
 Manufacturer#3	1671.68
+Manufacturer#4	1375.42
+Manufacturer#5	1464.48
 PREHOOK: query: select p_mfgr, avg(p_retailprice) over(partition by p_mfgr order by p_type,p_mfgr rows between unbounded preceding and current row) from part
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/vector_windowing_multipartitioning.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vector_windowing_multipartitioning.q.out b/ql/src/test/results/clientpositive/llap/vector_windowing_multipartitioning.q.out
index 595b0a8..09ecb775 100644
--- a/ql/src/test/results/clientpositive/llap/vector_windowing_multipartitioning.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_windowing_multipartitioning.q.out
@@ -10724,36 +10724,36 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@over10k
 #### A masked pattern was here ####
 s	_c1	sum_window_1
-bob steinbeck	722083	38.33000183105469
-tom allen	1248023	89.88999938964844
-tom allen	1248023	83.47000122070312
-bob steinbeck	722083	47.810001373291016
-bob steinbeck	722083	68.46999740600586
-tom allen	1248023	68.46999740600586
-bob steinbeck	722083	28.479999542236328
-tom allen	1248023	2.8499999046325684
-bob steinbeck	722083	26.290000915527344
-bob steinbeck	722083	36.209999084472656
+tom allen	1248023	47.16999816894531
+tom allen	1248023	77.77999877929688
 bob steinbeck	722083	83.52999877929688
+tom allen	1248023	83.47000122070312
+tom allen	1248023	15.84000015258789
 tom allen	1248023	39.4900016784668
 bob steinbeck	722083	80.7300033569336
-tom allen	1248023	77.77999877929688
-tom allen	1248023	26.239999771118164
-tom allen	1248023	95.41000366210938
-tom allen	1248023	81.8499984741211
 tom allen	1248023	11.300000190734863
+tom allen	1248023	2.8499999046325684
+tom allen	1248023	19.459999084472656
+bob steinbeck	722083	26.290000915527344
+tom allen	1248023	14.510000228881836
+bob steinbeck	722083	83.52999877929688
+tom allen	1248023	52.779998779296875
+bob steinbeck	722083	9.699999809265137
 tom allen	1248023	55.38999938964844
 tom allen	1248023	132.82000350952148
 bob steinbeck	722083	132.82000350952148
-tom allen	1248023	47.16999816894531
 tom allen	1248023	11.069999694824219
-bob steinbeck	722083	83.52999877929688
-tom allen	1248023	19.459999084472656
-tom allen	1248023	14.510000228881836
+bob steinbeck	722083	38.33000183105469
+tom allen	1248023	26.239999771118164
+bob steinbeck	722083	47.810001373291016
+bob steinbeck	722083	68.46999740600586
+tom allen	1248023	68.46999740600586
+bob steinbeck	722083	28.479999542236328
+bob steinbeck	722083	36.209999084472656
+tom allen	1248023	95.41000366210938
+tom allen	1248023	89.88999938964844
 tom allen	1248023	38.93000030517578
-tom allen	1248023	15.84000015258789
-tom allen	1248023	52.779998779296875
-bob steinbeck	722083	9.699999809265137
+tom allen	1248023	81.8499984741211
 PREHOOK: query: explain vectorization detail
 select s, rank() over (partition by s order by bo), rank() over (partition by si order by bin desc) from over10k
 where s = 'tom allen' or s = 'bob steinbeck'


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/pcr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/pcr.q.out b/ql/src/test/results/clientpositive/pcr.q.out
index 0adee06..e30f6d1 100644
--- a/ql/src/test/results/clientpositive/pcr.q.out
+++ b/ql/src/test/results/clientpositive/pcr.q.out
@@ -116,6 +116,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 
@@ -163,6 +164,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 
@@ -306,6 +308,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 
@@ -353,6 +356,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 
@@ -400,6 +404,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 
@@ -581,6 +586,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 
@@ -628,6 +634,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 
@@ -773,6 +780,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 
@@ -820,6 +828,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 
@@ -967,6 +976,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 
@@ -1014,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 
@@ -1061,6 +1072,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 
@@ -1219,6 +1231,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 
@@ -1266,6 +1279,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 
@@ -1313,6 +1327,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 
@@ -1478,6 +1493,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 
@@ -1525,6 +1541,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 
@@ -1653,6 +1670,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 
@@ -1700,6 +1718,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 
@@ -1868,6 +1887,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 
@@ -1915,6 +1935,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 
@@ -1962,6 +1983,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 
@@ -2157,6 +2179,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 
@@ -2204,6 +2227,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 
@@ -2360,6 +2384,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 
@@ -2624,6 +2649,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 
@@ -2671,6 +2697,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 
@@ -2925,6 +2952,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 
@@ -2972,6 +3000,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 
@@ -3019,6 +3048,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 
@@ -3066,6 +3096,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 
@@ -3246,6 +3277,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 
@@ -3293,6 +3325,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 
@@ -3340,6 +3373,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 
@@ -3513,6 +3547,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 
@@ -3565,6 +3600,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 
@@ -3646,6 +3682,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 
@@ -3713,6 +3750,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 
@@ -3756,6 +3794,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 
@@ -3786,6 +3825,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 
@@ -3807,6 +3847,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 
@@ -3843,6 +3884,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 
@@ -3873,6 +3915,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 
@@ -3894,6 +3937,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 
@@ -3931,6 +3975,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 
@@ -4100,6 +4145,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 
@@ -4156,6 +4202,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 
@@ -4237,6 +4284,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 
@@ -4304,6 +4352,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 
@@ -4347,6 +4396,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 
@@ -4377,6 +4427,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 
@@ -4398,6 +4449,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 
@@ -4434,6 +4486,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 
@@ -4464,6 +4517,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 
@@ -4485,6 +4539,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 
@@ -4522,6 +4577,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 
@@ -4706,6 +4762,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'
@@ -4838,6 +4895,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'
@@ -4886,6 +4944,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'
@@ -5022,6 +5081,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'
@@ -5070,6 +5130,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/ac6b2a3f/ql/src/test/results/clientpositive/pcs.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/pcs.q.out b/ql/src/test/results/clientpositive/pcs.q.out
index 588fce0..54f802b 100644
--- a/ql/src/test/results/clientpositive/pcs.q.out
+++ b/ql/src/test/results/clientpositive/pcs.q.out
@@ -153,6 +153,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 
@@ -200,6 +201,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 
@@ -348,6 +350,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 
@@ -395,6 +398,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 
@@ -515,6 +519,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 
@@ -562,6 +567,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 
@@ -673,6 +679,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 
@@ -720,6 +727,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 
@@ -879,6 +887,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 
@@ -926,6 +935,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 
@@ -1221,6 +1231,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 
@@ -1362,6 +1373,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 
@@ -1409,6 +1421,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 
@@ -1515,6 +1528,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 
@@ -1562,6 +1576,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 
@@ -1609,6 +1624,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 
@@ -1733,6 +1749,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 
@@ -1780,6 +1797,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 
@@ -1827,6 +1845,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/ac6b2a3f/ql/src/test/results/clientpositive/pointlookup2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/pointlookup2.q.out b/ql/src/test/results/clientpositive/pointlookup2.q.out
index d70f4fe..5a4ba5a 100644
--- a/ql/src/test/results/clientpositive/pointlookup2.q.out
+++ b/ql/src/test/results/clientpositive/pointlookup2.q.out
@@ -161,6 +161,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 
@@ -208,6 +209,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 
@@ -359,6 +361,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 
@@ -583,6 +586,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 
@@ -630,6 +634,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 
@@ -848,6 +853,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 
@@ -895,6 +901,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 
@@ -918,6 +925,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns ds,key,value
               columns.comments 
@@ -939,6 +947,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns ds,key,value
                 columns.comments 
@@ -1164,6 +1173,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 
@@ -1211,6 +1221,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 
@@ -1258,6 +1269,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 
@@ -1281,6 +1293,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns ds,key,value
               columns.comments 
@@ -1302,6 +1315,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns ds,key,value
                 columns.comments 
@@ -1686,6 +1700,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 
@@ -1733,6 +1748,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 
@@ -1884,6 +1900,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 
@@ -2108,6 +2125,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 
@@ -2155,6 +2173,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 
@@ -2373,6 +2392,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 
@@ -2420,6 +2440,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 
@@ -2443,6 +2464,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns ds,key,value
               columns.comments 
@@ -2464,6 +2486,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns ds,key,value
                 columns.comments 
@@ -2689,6 +2712,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 
@@ -2736,6 +2760,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 
@@ -2783,6 +2808,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 
@@ -2806,6 +2832,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns ds,key,value
               columns.comments 
@@ -2827,6 +2854,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns ds,key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/pointlookup3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/pointlookup3.q.out b/ql/src/test/results/clientpositive/pointlookup3.q.out
index 7451616..4ebb6e4 100644
--- a/ql/src/test/results/clientpositive/pointlookup3.q.out
+++ b/ql/src/test/results/clientpositive/pointlookup3.q.out
@@ -116,6 +116,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 
@@ -164,6 +165,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 
@@ -293,6 +295,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 
@@ -444,6 +447,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 
@@ -669,6 +673,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 
@@ -717,6 +722,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 
@@ -936,6 +942,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 
@@ -984,6 +991,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 
@@ -1032,6 +1040,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 
@@ -1462,6 +1471,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 
@@ -1510,6 +1520,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 
@@ -1639,6 +1650,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 
@@ -1790,6 +1802,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 
@@ -2015,6 +2028,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 
@@ -2063,6 +2077,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 
@@ -2282,6 +2297,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 
@@ -2330,6 +2346,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 
@@ -2378,6 +2395,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/ac6b2a3f/ql/src/test/results/clientpositive/pointlookup4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/pointlookup4.q.out b/ql/src/test/results/clientpositive/pointlookup4.q.out
index ff3de9d..a914db0 100644
--- a/ql/src/test/results/clientpositive/pointlookup4.q.out
+++ b/ql/src/test/results/clientpositive/pointlookup4.q.out
@@ -116,6 +116,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 
@@ -164,6 +165,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 
@@ -312,6 +314,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 
@@ -360,6 +363,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/ac6b2a3f/ql/src/test/results/clientpositive/ppd_join_filter.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_join_filter.q.out b/ql/src/test/results/clientpositive/ppd_join_filter.q.out
index b724de8..3a19b54 100644
--- a/ql/src/test/results/clientpositive/ppd_join_filter.q.out
+++ b/ql/src/test/results/clientpositive/ppd_join_filter.q.out
@@ -68,6 +68,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'
@@ -89,6 +90,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'
@@ -210,6 +212,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'
@@ -231,6 +234,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'
@@ -398,6 +402,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'
@@ -419,6 +424,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'
@@ -540,6 +546,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'
@@ -561,6 +568,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'
@@ -728,6 +736,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'
@@ -749,6 +758,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'
@@ -870,6 +880,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'
@@ -891,6 +902,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'
@@ -1058,6 +1070,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'
@@ -1079,6 +1092,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'
@@ -1200,6 +1214,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'
@@ -1221,6 +1236,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/ppd_vc.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_vc.q.out b/ql/src/test/results/clientpositive/ppd_vc.q.out
index 296e1ba..cce46b0 100644
--- a/ql/src/test/results/clientpositive/ppd_vc.q.out
+++ b/ql/src/test/results/clientpositive/ppd_vc.q.out
@@ -82,6 +82,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'
@@ -130,6 +131,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'
@@ -178,6 +180,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'
@@ -226,6 +229,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'
@@ -376,6 +380,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'
@@ -397,6 +402,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'
@@ -447,6 +453,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'
@@ -495,6 +502,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'
@@ -543,6 +551,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'
@@ -591,6 +600,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/ac6b2a3f/ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out b/ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out
index 62a2c56..9cb2a93 100644
--- a/ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out
+++ b/ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out
@@ -95,6 +95,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'
@@ -143,6 +144,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'
@@ -289,6 +291,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'
@@ -337,6 +340,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'
@@ -385,6 +389,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'
@@ -433,6 +438,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/ac6b2a3f/ql/src/test/results/clientpositive/push_or.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/push_or.q.out b/ql/src/test/results/clientpositive/push_or.q.out
index e122859..987e66f 100644
--- a/ql/src/test/results/clientpositive/push_or.q.out
+++ b/ql/src/test/results/clientpositive/push_or.q.out
@@ -98,6 +98,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 
@@ -145,6 +146,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/ac6b2a3f/ql/src/test/results/clientpositive/quotedid_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/quotedid_stats.q.out b/ql/src/test/results/clientpositive/quotedid_stats.q.out
index b82543e..8f1464a 100644
--- a/ql/src/test/results/clientpositive/quotedid_stats.q.out
+++ b/ql/src/test/results/clientpositive/quotedid_stats.q.out
@@ -24,6 +24,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"x+1`\":\"true\",\"y&y\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -68,6 +69,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"x+1`\":\"true\",\"y&y\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/rand_partitionpruner1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/rand_partitionpruner1.q.out b/ql/src/test/results/clientpositive/rand_partitionpruner1.q.out
index 6150cda..8d4ef76 100644
--- a/ql/src/test/results/clientpositive/rand_partitionpruner1.q.out
+++ b/ql/src/test/results/clientpositive/rand_partitionpruner1.q.out
@@ -56,6 +56,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'
@@ -77,6 +78,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/rand_partitionpruner2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/rand_partitionpruner2.q.out b/ql/src/test/results/clientpositive/rand_partitionpruner2.q.out
index e0bf5a2..7a925a3 100644
--- a/ql/src/test/results/clientpositive/rand_partitionpruner2.q.out
+++ b/ql/src/test/results/clientpositive/rand_partitionpruner2.q.out
@@ -53,6 +53,7 @@ STAGE PLANS:
                       properties:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                         bucket_count -1
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value,hr,ds
                         columns.comments 
@@ -124,6 +125,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'
@@ -172,6 +174,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'
@@ -240,6 +243,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,hr,ds
                 columns.comments 
@@ -283,6 +287,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value,hr,ds
                     columns.comments 
@@ -313,6 +318,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value,hr,ds
               columns.comments 
@@ -334,6 +340,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,hr,ds
                 columns.comments 
@@ -370,6 +377,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value,hr,ds
                     columns.comments 
@@ -400,6 +408,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value,hr,ds
               columns.comments 
@@ -421,6 +430,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"ds":"true","hr":"true","key":"true","value":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value,hr,ds
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/rand_partitionpruner3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/rand_partitionpruner3.q.out b/ql/src/test/results/clientpositive/rand_partitionpruner3.q.out
index ed9635f..426d09d 100644
--- a/ql/src/test/results/clientpositive/rand_partitionpruner3.q.out
+++ b/ql/src/test/results/clientpositive/rand_partitionpruner3.q.out
@@ -41,6 +41,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'
@@ -129,6 +130,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/ac6b2a3f/ql/src/test/results/clientpositive/rcfile_default_format.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/rcfile_default_format.q.out b/ql/src/test/results/clientpositive/rcfile_default_format.q.out
index 7eed769..e552adf 100644
--- a/ql/src/test/results/clientpositive/rcfile_default_format.q.out
+++ b/ql/src/test/results/clientpositive/rcfile_default_format.q.out
@@ -23,6 +23,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                   
@@ -69,6 +70,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	4812                
@@ -119,6 +121,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	1406                
@@ -165,6 +168,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	5312                
@@ -211,6 +215,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	4812                
@@ -252,6 +257,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                   
@@ -298,6 +304,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	4812                
@@ -339,6 +346,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/ac6b2a3f/ql/src/test/results/clientpositive/regexp_extract.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/regexp_extract.q.out b/ql/src/test/results/clientpositive/regexp_extract.q.out
index 56fed9e..b76f0ff 100644
--- a/ql/src/test/results/clientpositive/regexp_extract.q.out
+++ b/ql/src/test/results/clientpositive/regexp_extract.q.out
@@ -70,6 +70,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'
@@ -91,6 +92,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'
@@ -321,6 +323,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'
@@ -342,6 +345,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/rename_external_partition_location.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/rename_external_partition_location.q.out b/ql/src/test/results/clientpositive/rename_external_partition_location.q.out
index 8e3c177..85a4739 100644
--- a/ql/src/test/results/clientpositive/rename_external_partition_location.q.out
+++ b/ql/src/test/results/clientpositive/rename_external_partition_location.q.out
@@ -102,6 +102,7 @@ Table Type:         	EXTERNAL_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numPartitions       	1                   
 	numRows             	10                  
@@ -264,6 +265,7 @@ Table Type:         	EXTERNAL_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numPartitions       	1                   
 	numRows             	10                  

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/repl_2_exim_basic.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/repl_2_exim_basic.q.out b/ql/src/test/results/clientpositive/repl_2_exim_basic.q.out
index 7f5802a..b2bcd51 100644
--- a/ql/src/test/results/clientpositive/repl_2_exim_basic.q.out
+++ b/ql/src/test/results/clientpositive/repl_2_exim_basic.q.out
@@ -182,6 +182,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: select * from managed_t_imported
 PREHOOK: type: QUERY
@@ -261,6 +262,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
   'repl.last.id'='0', 
 #### A masked pattern was here ####
 PREHOOK: query: select * from managed_t_r_imported
@@ -342,6 +344,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: select * from ext_t_imported
 PREHOOK: type: QUERY
@@ -422,6 +425,7 @@ LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
   'EXTERNAL'='FALSE', 
+  'bucketing_version'='2', 
   'repl.last.id'='0', 
 #### A masked pattern was here ####
 PREHOOK: query: select * from ext_t_r_imported

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/repl_3_exim_metadata.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/repl_3_exim_metadata.q.out b/ql/src/test/results/clientpositive/repl_3_exim_metadata.q.out
index 96297ff..e0daed5 100644
--- a/ql/src/test/results/clientpositive/repl_3_exim_metadata.q.out
+++ b/ql/src/test/results/clientpositive/repl_3_exim_metadata.q.out
@@ -116,6 +116,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
   'repl.last.id'='0', 
 #### A masked pattern was here ####
 PREHOOK: query: select * from repldst
@@ -190,6 +191,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
   'repl.last.id'='0', 
 #### A masked pattern was here ####
 PREHOOK: query: select * from repldst_md

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/router_join_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/router_join_ppr.q.out b/ql/src/test/results/clientpositive/router_join_ppr.q.out
index b599300..4b69b0d 100644
--- a/ql/src/test/results/clientpositive/router_join_ppr.q.out
+++ b/ql/src/test/results/clientpositive/router_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/ac6b2a3f/ql/src/test/results/clientpositive/row__id.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/row__id.q.out b/ql/src/test/results/clientpositive/row__id.q.out
index 49c47bb..18af000 100644
--- a/ql/src/test/results/clientpositive/row__id.q.out
+++ b/ql/src/test/results/clientpositive/row__id.q.out
@@ -62,24 +62,24 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: hello_acid
-            Statistics: Num rows: 76 Data size: 19280 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 77 Data size: 19340 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: ROW__ID.writeid (type: bigint)
               outputColumnNames: _col0
-              Statistics: Num rows: 76 Data size: 19280 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 77 Data size: 19340 Basic stats: COMPLETE Column stats: NONE
               Reduce Output Operator
                 key expressions: _col0 (type: bigint)
                 sort order: +
-                Statistics: Num rows: 76 Data size: 19280 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 77 Data size: 19340 Basic stats: COMPLETE Column stats: NONE
       Execution mode: vectorized
       Reduce Operator Tree:
         Select Operator
           expressions: KEY.reducesinkkey0 (type: bigint)
           outputColumnNames: _col0
-          Statistics: Num rows: 76 Data size: 19280 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 77 Data size: 19340 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 76 Data size: 19280 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 77 Data size: 19340 Basic stats: COMPLETE Column stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -124,17 +124,17 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: hello_acid
-            Statistics: Num rows: 76 Data size: 19280 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 77 Data size: 19340 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: (ROW__ID.writeid = 3) (type: boolean)
-              Statistics: Num rows: 38 Data size: 9640 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 38 Data size: 9544 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: ROW__ID.writeid (type: bigint)
                 outputColumnNames: _col0
-                Statistics: Num rows: 38 Data size: 9640 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 38 Data size: 9544 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 38 Data size: 9640 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 38 Data size: 9544 Basic stats: COMPLETE Column stats: NONE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/druid_basic1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/druid_basic1.q.out b/ql/src/test/results/clientpositive/druid_basic1.q.out
index 25ec0ca..a5c0687 100644
--- a/ql/src/test/results/clientpositive/druid_basic1.q.out
+++ b/ql/src/test/results/clientpositive/druid_basic1.q.out
@@ -41,6 +41,7 @@ Table Type:         	EXTERNAL_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"__time\":\"true\",\"added\":\"true\",\"anonymous\":\"true\",\"count\":\"true\",\"deleted\":\"true\",\"delta\":\"true\",\"language\":\"true\",\"namespace\":\"true\",\"newpage\":\"true\",\"page\":\"true\",\"robot\":\"true\",\"unpatrolled\":\"true\",\"user\":\"true\",\"variation\":\"true\"}}
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	druid.datasource    	wikipedia           
 	numFiles            	0                   
 	numRows             	0                   
@@ -102,6 +103,7 @@ Table Type:         	EXTERNAL_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"__time\":\"true\",\"added\":\"true\",\"anonymous\":\"true\",\"count\":\"true\",\"deleted\":\"true\",\"delta\":\"true\",\"language\":\"true\",\"namespace\":\"true\",\"newpage\":\"true\",\"page\":\"true\",\"robot\":\"true\",\"unpatrolled\":\"true\",\"user\":\"true\",\"variation\":\"true\"}}
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	druid.datasource    	wikipedia           
 	numFiles            	0                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/druid_basic2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/druid_basic2.q.out b/ql/src/test/results/clientpositive/druid_basic2.q.out
index 5ed039b..0e5e957 100644
--- a/ql/src/test/results/clientpositive/druid_basic2.q.out
+++ b/ql/src/test/results/clientpositive/druid_basic2.q.out
@@ -41,6 +41,7 @@ Table Type:         	EXTERNAL_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"__time\":\"true\",\"added\":\"true\",\"anonymous\":\"true\",\"count\":\"true\",\"deleted\":\"true\",\"delta\":\"true\",\"language\":\"true\",\"namespace\":\"true\",\"newpage\":\"true\",\"page\":\"true\",\"robot\":\"true\",\"unpatrolled\":\"true\",\"user\":\"true\",\"variation\":\"true\"}}
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	druid.datasource    	wikipedia           
 	numFiles            	0                   
 	numRows             	0                   
@@ -266,6 +267,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"__time":"true","added":"true","anonymous":"true","count":"true","deleted":"true","delta":"true","language":"true","namespace":"true","newpage":"true","page":"true","robot":"true","unpatrolled":"true","user":"true","variation":"true"}}
               EXTERNAL TRUE
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns __time,robot,namespace,anonymous,unpatrolled,page,language,newpage,user,count,added,delta,variation,deleted
               columns.comments 'from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer'
@@ -294,6 +296,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"__time":"true","added":"true","anonymous":"true","count":"true","deleted":"true","delta":"true","language":"true","namespace":"true","newpage":"true","page":"true","robot":"true","unpatrolled":"true","user":"true","variation":"true"}}
                 EXTERNAL TRUE
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns __time,robot,namespace,anonymous,unpatrolled,page,language,newpage,user,count,added,delta,variation,deleted
                 columns.comments 'from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer'
@@ -444,6 +447,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"__time":"true","added":"true","anonymous":"true","count":"true","deleted":"true","delta":"true","language":"true","namespace":"true","newpage":"true","page":"true","robot":"true","unpatrolled":"true","user":"true","variation":"true"}}
               EXTERNAL TRUE
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns __time,robot,namespace,anonymous,unpatrolled,page,language,newpage,user,count,added,delta,variation,deleted
               columns.comments 'from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer'
@@ -472,6 +476,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"__time":"true","added":"true","anonymous":"true","count":"true","deleted":"true","delta":"true","language":"true","namespace":"true","newpage":"true","page":"true","robot":"true","unpatrolled":"true","user":"true","variation":"true"}}
                 EXTERNAL TRUE
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns __time,robot,namespace,anonymous,unpatrolled,page,language,newpage,user,count,added,delta,variation,deleted
                 columns.comments 'from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer'
@@ -779,6 +784,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"__time":"true","added":"true","anonymous":"true","count":"true","deleted":"true","delta":"true","language":"true","namespace":"true","newpage":"true","page":"true","robot":"true","unpatrolled":"true","user":"true","variation":"true"}}
               EXTERNAL TRUE
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns __time,robot,namespace,anonymous,unpatrolled,page,language,newpage,user,count,added,delta,variation,deleted
               columns.comments 'from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer'
@@ -803,6 +809,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"__time":"true","added":"true","anonymous":"true","count":"true","deleted":"true","delta":"true","language":"true","namespace":"true","newpage":"true","page":"true","robot":"true","unpatrolled":"true","user":"true","variation":"true"}}
                 EXTERNAL TRUE
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns __time,robot,namespace,anonymous,unpatrolled,page,language,newpage,user,count,added,delta,variation,deleted
                 columns.comments 'from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer','from deserializer'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/druid_intervals.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/druid_intervals.q.out b/ql/src/test/results/clientpositive/druid_intervals.q.out
index 03b0706..11082ed 100644
--- a/ql/src/test/results/clientpositive/druid_intervals.q.out
+++ b/ql/src/test/results/clientpositive/druid_intervals.q.out
@@ -41,6 +41,7 @@ Table Type:         	EXTERNAL_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"__time\":\"true\",\"added\":\"true\",\"anonymous\":\"true\",\"count\":\"true\",\"deleted\":\"true\",\"delta\":\"true\",\"language\":\"true\",\"namespace\":\"true\",\"newpage\":\"true\",\"page\":\"true\",\"robot\":\"true\",\"unpatrolled\":\"true\",\"user\":\"true\",\"variation\":\"true\"}}
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	druid.datasource    	wikipedia           
 	numFiles            	0                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/druid_topn.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/druid_topn.q.out b/ql/src/test/results/clientpositive/druid_topn.q.out
index f5400a0..0dc5e2a 100644
--- a/ql/src/test/results/clientpositive/druid_topn.q.out
+++ b/ql/src/test/results/clientpositive/druid_topn.q.out
@@ -41,6 +41,7 @@ Table Type:         	EXTERNAL_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"__time\":\"true\",\"added\":\"true\",\"anonymous\":\"true\",\"count\":\"true\",\"deleted\":\"true\",\"delta\":\"true\",\"language\":\"true\",\"namespace\":\"true\",\"newpage\":\"true\",\"page\":\"true\",\"robot\":\"true\",\"unpatrolled\":\"true\",\"user\":\"true\",\"variation\":\"true\"}}
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	druid.datasource    	wikipedia           
 	numFiles            	0                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/dynamic_partition_skip_default.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/dynamic_partition_skip_default.q.out b/ql/src/test/results/clientpositive/dynamic_partition_skip_default.q.out
index b4efaf4..ee9a4af 100644
--- a/ql/src/test/results/clientpositive/dynamic_partition_skip_default.q.out
+++ b/ql/src/test/results/clientpositive/dynamic_partition_skip_default.q.out
@@ -85,6 +85,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns intcol
                 columns.comments 
@@ -154,6 +155,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns intcol
                 columns.comments 
@@ -223,6 +225,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns intcol
                 columns.comments 
@@ -269,6 +272,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns intcol
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/dynpart_sort_opt_bucketing.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/dynpart_sort_opt_bucketing.q.out b/ql/src/test/results/clientpositive/dynpart_sort_opt_bucketing.q.out
index 3fbcec8..d50d4ad 100644
--- a/ql/src/test/results/clientpositive/dynpart_sort_opt_bucketing.q.out
+++ b/ql/src/test/results/clientpositive/dynpart_sort_opt_bucketing.q.out
@@ -84,14 +84,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: _dummy_database@_dummy_table
 #### A masked pattern was here ####
 bucket_0
-fffdc9482d8a88626887d92851951b92e58dba2cfa7e22caeafe98baac4d2a3e042015-01-21
-fffd4906f05ab50dfa41f4ab226e83de981fd8aa4ce0d4f516e7ebf9566a4213\N\N2015-01-21
-fffd37a9ebbef0ed3d3440f7bacd64b823df685c90c827a75a5e9556126a8d0c\N\N2015-01-21
-fffce560fc7c69c5185eda181759a62f30f908c55f04291d612039a3ca16357a\N\N2015-01-21
-fffc502293653c4249cdeb8fad4ba2437006b56d527eae844d18e6d6324e424d002015-01-21
-fffad5028e769fdf811eea954785629c064826a5a008253136dbd4f189334827\N\N2015-01-21
-fff3474e56ee23c0df629b538268a438d74da36208bdb114bda2da4253f0b4c9\N\N2015-01-21
-fff2de7c5a9929257705996690aa45e5848e57a85eb91f83dfcfa6ac4219ae1b\N\N2015-01-21
+fff06c6e0fd675ebeff09350e6b7a3900115f72341fd353e5e185e8983d10534002015-01-21
 PREHOOK: query: select 'bucket_2'
 PREHOOK: type: QUERY
 PREHOOK: Input: _dummy_database@_dummy_table
@@ -101,13 +94,8 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: _dummy_database@_dummy_table
 #### A masked pattern was here ####
 bucket_2
-fffcf74695669d1f444936243869f3586418c6d61d3abb5cc9acb67a3ad7bd2f002015-01-21
-fffbe3c110c390ec20218e5ad4a026ff515668ed55488b717319b556daa962a1002015-01-21
-fff876f50b99444aa7ef901383336299c47f035b87d253283f737d88a05edce8\N\N2015-01-21
-fff66e6646a820cf6d39ba467a735db4ffe4df344256bb1a1cb854086e766810\N\N2015-01-21
-fff4166378aa9d94cd4f8a9cd543375890a61b4f09a57dbfb31a66b33b3e3fd9\N\N2015-01-21
-fff06e59d471f90aa055c3089c1d8e380bbb86d5642142ecd0589b544dd44688002015-01-21
-fff03007f38c32085bb4c9389270b965d371168032845555b663b7d4653ec8ee\N\N2015-01-21
+ffff67aef705abda0b89d899e408c28ef230fd0bb2cb0bb23b057e946ba9ca91\N\N2015-01-21
+fff3474e56ee23c0df629b538268a438d74da36208bdb114bda2da4253f0b4c9\N\N2015-01-21
 PREHOOK: query: select 'bucket_4'
 PREHOOK: type: QUERY
 PREHOOK: Input: _dummy_database@_dummy_table
@@ -117,11 +105,10 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: _dummy_database@_dummy_table
 #### A masked pattern was here ####
 bucket_4
-fffc0450ec9b28bae495dffc87a37cc3eea6d2d067ccea8b333185d28847ae2a\N\N2015-01-21
+fffcb494aa56beb88fddb83cc3b0296d417d3ab7782be76c8c12d33e3f3d6a3c\N\N2015-01-21
 fffad1074d813e6db5c23302a9170fe472c2968844499c90445cbc8559d64fe1082015-01-21
-fff56191e39b15f0e2f04984c70152fb1bde2ecba52ff5a73b4c28bf4d58c017002015-01-21
-fff201d3ead782d817f222c73cd241df1683cecdb109a5a22b02004b7b228b14\N\N2015-01-21
-fff0fbdf2bf7bfed9ea314bfa7fa14bf179345dde9ea79838f66acd70b943f0b\N\N2015-01-21
+fff03007f38c32085bb4c9389270b965d371168032845555b663b7d4653ec8ee\N\N2015-01-21
+ffefa017a261a0b3e94c2386e0c47a015e2095e5d56b0f4fca2033d9755c9e45012015-01-21
 PREHOOK: query: select 'bucket_6'
 PREHOOK: type: QUERY
 PREHOOK: Input: _dummy_database@_dummy_table
@@ -131,14 +118,8 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: _dummy_database@_dummy_table
 #### A masked pattern was here ####
 bucket_6
-ffff67aef705abda0b89d899e408c28ef230fd0bb2cb0bb23b057e946ba9ca91\N\N2015-01-21
-fffe069c9bba031c86f1f49ec87bf75d4feb5cc5c7d430282f739ebc4337c673002015-01-21
-fffcb494aa56beb88fddb83cc3b0296d417d3ab7782be76c8c12d33e3f3d6a3c\N\N2015-01-21
-fffb1b226efc3cfaac8d73647ce4fa4e82413d67265fb55366ac3a4996518738012015-01-21
-fff4cabcf8a5f2f8edd27d5d92659ad80e3513d15ac2df7557a82ade5ed80b86\N\N2015-01-21
-fff42e4d4463fa981df990041ba914deaa1d1c1cdcb1547678ab899e34248526012015-01-21
-ffefa017a261a0b3e94c2386e0c47a015e2095e5d56b0f4fca2033d9755c9e45012015-01-21
-ffef34be95399a087af57dd713ca3510377625811bb4232473c1ba223239f284002015-01-21
+fffee943d640a7714d09f9bd50dba08a9d0ebdd146655e4642c293a4396cb385\N\N2015-01-21
+fffc0450ec9b28bae495dffc87a37cc3eea6d2d067ccea8b333185d28847ae2a\N\N2015-01-21
 PREHOOK: query: select 'bucket_8'
 PREHOOK: type: QUERY
 PREHOOK: Input: _dummy_database@_dummy_table
@@ -148,10 +129,11 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: _dummy_database@_dummy_table
 #### A masked pattern was here ####
 bucket_8
-fffee943d640a7714d09f9bd50dba08a9d0ebdd146655e4642c293a4396cb385\N\N2015-01-21
-fffc8a89a8406ba3ed651fc9248fe9b2afb1ee672999ef75d2d9c42484435bca\N\N2015-01-21
-fff06c6e0fd675ebeff09350e6b7a3900115f72341fd353e5e185e8983d10534002015-01-21
-ffef4b7433ee6008e389a1a4121a82b828123864e563a2afe67dcf29e2b71591\N\N2015-01-21
+fffcf74695669d1f444936243869f3586418c6d61d3abb5cc9acb67a3ad7bd2f002015-01-21
+fffbe3c110c390ec20218e5ad4a026ff515668ed55488b717319b556daa962a1002015-01-21
+fffb1b226efc3cfaac8d73647ce4fa4e82413d67265fb55366ac3a4996518738012015-01-21
+fff56191e39b15f0e2f04984c70152fb1bde2ecba52ff5a73b4c28bf4d58c017002015-01-21
+fff4166378aa9d94cd4f8a9cd543375890a61b4f09a57dbfb31a66b33b3e3fd9\N\N2015-01-21
 PREHOOK: query: drop table t1
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@t1
@@ -205,14 +187,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: _dummy_database@_dummy_table
 #### A masked pattern was here ####
 bucket_0
-fffdc9482d8a88626887d92851951b92e58dba2cfa7e22caeafe98baac4d2a3e042015-01-21
-fffd4906f05ab50dfa41f4ab226e83de981fd8aa4ce0d4f516e7ebf9566a4213\N\N2015-01-21
-fffd37a9ebbef0ed3d3440f7bacd64b823df685c90c827a75a5e9556126a8d0c\N\N2015-01-21
-fffce560fc7c69c5185eda181759a62f30f908c55f04291d612039a3ca16357a\N\N2015-01-21
-fffc502293653c4249cdeb8fad4ba2437006b56d527eae844d18e6d6324e424d002015-01-21
-fffad5028e769fdf811eea954785629c064826a5a008253136dbd4f189334827\N\N2015-01-21
-fff3474e56ee23c0df629b538268a438d74da36208bdb114bda2da4253f0b4c9\N\N2015-01-21
-fff2de7c5a9929257705996690aa45e5848e57a85eb91f83dfcfa6ac4219ae1b\N\N2015-01-21
+fff06c6e0fd675ebeff09350e6b7a3900115f72341fd353e5e185e8983d10534002015-01-21
 PREHOOK: query: select 'bucket_2'
 PREHOOK: type: QUERY
 PREHOOK: Input: _dummy_database@_dummy_table
@@ -222,13 +197,8 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: _dummy_database@_dummy_table
 #### A masked pattern was here ####
 bucket_2
-fffcf74695669d1f444936243869f3586418c6d61d3abb5cc9acb67a3ad7bd2f002015-01-21
-fffbe3c110c390ec20218e5ad4a026ff515668ed55488b717319b556daa962a1002015-01-21
-fff876f50b99444aa7ef901383336299c47f035b87d253283f737d88a05edce8\N\N2015-01-21
-fff66e6646a820cf6d39ba467a735db4ffe4df344256bb1a1cb854086e766810\N\N2015-01-21
-fff4166378aa9d94cd4f8a9cd543375890a61b4f09a57dbfb31a66b33b3e3fd9\N\N2015-01-21
-fff06e59d471f90aa055c3089c1d8e380bbb86d5642142ecd0589b544dd44688002015-01-21
-fff03007f38c32085bb4c9389270b965d371168032845555b663b7d4653ec8ee\N\N2015-01-21
+ffff67aef705abda0b89d899e408c28ef230fd0bb2cb0bb23b057e946ba9ca91\N\N2015-01-21
+fff3474e56ee23c0df629b538268a438d74da36208bdb114bda2da4253f0b4c9\N\N2015-01-21
 PREHOOK: query: select 'bucket_4'
 PREHOOK: type: QUERY
 PREHOOK: Input: _dummy_database@_dummy_table
@@ -238,11 +208,10 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: _dummy_database@_dummy_table
 #### A masked pattern was here ####
 bucket_4
-fffc0450ec9b28bae495dffc87a37cc3eea6d2d067ccea8b333185d28847ae2a\N\N2015-01-21
+fffcb494aa56beb88fddb83cc3b0296d417d3ab7782be76c8c12d33e3f3d6a3c\N\N2015-01-21
 fffad1074d813e6db5c23302a9170fe472c2968844499c90445cbc8559d64fe1082015-01-21
-fff56191e39b15f0e2f04984c70152fb1bde2ecba52ff5a73b4c28bf4d58c017002015-01-21
-fff201d3ead782d817f222c73cd241df1683cecdb109a5a22b02004b7b228b14\N\N2015-01-21
-fff0fbdf2bf7bfed9ea314bfa7fa14bf179345dde9ea79838f66acd70b943f0b\N\N2015-01-21
+fff03007f38c32085bb4c9389270b965d371168032845555b663b7d4653ec8ee\N\N2015-01-21
+ffefa017a261a0b3e94c2386e0c47a015e2095e5d56b0f4fca2033d9755c9e45012015-01-21
 PREHOOK: query: select 'bucket_6'
 PREHOOK: type: QUERY
 PREHOOK: Input: _dummy_database@_dummy_table
@@ -252,14 +221,8 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: _dummy_database@_dummy_table
 #### A masked pattern was here ####
 bucket_6
-ffff67aef705abda0b89d899e408c28ef230fd0bb2cb0bb23b057e946ba9ca91\N\N2015-01-21
-fffe069c9bba031c86f1f49ec87bf75d4feb5cc5c7d430282f739ebc4337c673002015-01-21
-fffcb494aa56beb88fddb83cc3b0296d417d3ab7782be76c8c12d33e3f3d6a3c\N\N2015-01-21
-fffb1b226efc3cfaac8d73647ce4fa4e82413d67265fb55366ac3a4996518738012015-01-21
-fff4cabcf8a5f2f8edd27d5d92659ad80e3513d15ac2df7557a82ade5ed80b86\N\N2015-01-21
-fff42e4d4463fa981df990041ba914deaa1d1c1cdcb1547678ab899e34248526012015-01-21
-ffefa017a261a0b3e94c2386e0c47a015e2095e5d56b0f4fca2033d9755c9e45012015-01-21
-ffef34be95399a087af57dd713ca3510377625811bb4232473c1ba223239f284002015-01-21
+fffee943d640a7714d09f9bd50dba08a9d0ebdd146655e4642c293a4396cb385\N\N2015-01-21
+fffc0450ec9b28bae495dffc87a37cc3eea6d2d067ccea8b333185d28847ae2a\N\N2015-01-21
 PREHOOK: query: select 'bucket_8'
 PREHOOK: type: QUERY
 PREHOOK: Input: _dummy_database@_dummy_table
@@ -269,7 +232,8 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: _dummy_database@_dummy_table
 #### A masked pattern was here ####
 bucket_8
-fffee943d640a7714d09f9bd50dba08a9d0ebdd146655e4642c293a4396cb385\N\N2015-01-21
-fffc8a89a8406ba3ed651fc9248fe9b2afb1ee672999ef75d2d9c42484435bca\N\N2015-01-21
-fff06c6e0fd675ebeff09350e6b7a3900115f72341fd353e5e185e8983d10534002015-01-21
-ffef4b7433ee6008e389a1a4121a82b828123864e563a2afe67dcf29e2b71591\N\N2015-01-21
+fffcf74695669d1f444936243869f3586418c6d61d3abb5cc9acb67a3ad7bd2f002015-01-21
+fffbe3c110c390ec20218e5ad4a026ff515668ed55488b717319b556daa962a1002015-01-21
+fffb1b226efc3cfaac8d73647ce4fa4e82413d67265fb55366ac3a4996518738012015-01-21
+fff56191e39b15f0e2f04984c70152fb1bde2ecba52ff5a73b4c28bf4d58c017002015-01-21
+fff4166378aa9d94cd4f8a9cd543375890a61b4f09a57dbfb31a66b33b3e3fd9\N\N2015-01-21

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/encrypted/encryption_join_unencrypted_tbl.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/encrypted/encryption_join_unencrypted_tbl.q.out b/ql/src/test/results/clientpositive/encrypted/encryption_join_unencrypted_tbl.q.out
index 5bdc072..80ffad6 100644
--- a/ql/src/test/results/clientpositive/encrypted/encryption_join_unencrypted_tbl.q.out
+++ b/ql/src/test/results/clientpositive/encrypted/encryption_join_unencrypted_tbl.q.out
@@ -598,6 +598,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 
@@ -620,6 +621,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 
@@ -646,6 +648,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'
@@ -668,6 +671,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/encrypted/encryption_join_with_different_encryption_keys.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/encrypted/encryption_join_with_different_encryption_keys.q.out b/ql/src/test/results/clientpositive/encrypted/encryption_join_with_different_encryption_keys.q.out
index a01169c..c88a6f3 100644
--- a/ql/src/test/results/clientpositive/encrypted/encryption_join_with_different_encryption_keys.q.out
+++ b/ql/src/test/results/clientpositive/encrypted/encryption_join_with_different_encryption_keys.q.out
@@ -116,6 +116,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -138,6 +139,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -164,6 +166,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -186,6 +189,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/escape_comments.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/escape_comments.q.out b/ql/src/test/results/clientpositive/escape_comments.q.out
index 15e0bc3..2eacf22 100644
--- a/ql/src/test/results/clientpositive/escape_comments.q.out
+++ b/ql/src/test/results/clientpositive/escape_comments.q.out
@@ -70,6 +70,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: describe formatted escape_comments_tbl1
 PREHOOK: type: DESCTABLE
@@ -94,6 +95,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	comment             	a                   
 	                    	b                   
 	numFiles            	0                   
@@ -151,6 +153,7 @@ Database:           	escape_comments_db
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	comment             	a                   
 	                    	b                   
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/exim_hidden_files.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/exim_hidden_files.q.out b/ql/src/test/results/clientpositive/exim_hidden_files.q.out
index e83464c..9d92cc7 100644
--- a/ql/src/test/results/clientpositive/exim_hidden_files.q.out
+++ b/ql/src/test/results/clientpositive/exim_hidden_files.q.out
@@ -73,6 +73,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numPartitions       	1                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/extrapolate_part_stats_date.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/extrapolate_part_stats_date.q.out b/ql/src/test/results/clientpositive/extrapolate_part_stats_date.q.out
index f2e5750..58f887b 100644
--- a/ql/src/test/results/clientpositive/extrapolate_part_stats_date.q.out
+++ b/ql/src/test/results/clientpositive/extrapolate_part_stats_date.q.out
@@ -156,6 +156,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns d_date
                 columns.comments 
@@ -201,6 +202,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns d_date
                 columns.comments 
@@ -246,6 +248,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns d_date
                 columns.comments 
@@ -291,6 +294,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns d_date
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/extrapolate_part_stats_full.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/extrapolate_part_stats_full.q.out b/ql/src/test/results/clientpositive/extrapolate_part_stats_full.q.out
index deda5a0..67506bf 100644
--- a/ql/src/test/results/clientpositive/extrapolate_part_stats_full.q.out
+++ b/ql/src/test/results/clientpositive/extrapolate_part_stats_full.q.out
@@ -143,6 +143,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -188,6 +189,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -256,6 +258,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -301,6 +304,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -459,6 +463,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -505,6 +510,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -551,6 +557,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -597,6 +604,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -666,6 +674,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -712,6 +721,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -758,6 +768,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -804,6 +815,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/extrapolate_part_stats_partial.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/extrapolate_part_stats_partial.q.out b/ql/src/test/results/clientpositive/extrapolate_part_stats_partial.q.out
index a5d1724..d77286c 100644
--- a/ql/src/test/results/clientpositive/extrapolate_part_stats_partial.q.out
+++ b/ql/src/test/results/clientpositive/extrapolate_part_stats_partial.q.out
@@ -169,6 +169,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -214,6 +215,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -259,6 +261,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -304,6 +307,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -372,6 +376,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -417,6 +422,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -462,6 +468,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -507,6 +514,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -603,6 +611,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -648,6 +657,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -693,6 +703,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -738,6 +749,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -806,6 +818,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -851,6 +864,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -896,6 +910,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -941,6 +956,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,zip
                 columns.comments 
@@ -1092,6 +1108,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1138,6 +1155,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1184,6 +1202,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1230,6 +1249,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1276,6 +1296,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1322,6 +1343,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1368,6 +1390,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1414,6 +1437,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1460,6 +1484,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1506,6 +1531,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1552,6 +1578,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1621,6 +1648,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1667,6 +1695,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1713,6 +1742,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1759,6 +1789,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1805,6 +1836,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1851,6 +1883,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1897,6 +1930,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1943,6 +1977,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -1989,6 +2024,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -2035,6 +2071,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 
@@ -2081,6 +2118,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/filter_aggr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/filter_aggr.q.out b/ql/src/test/results/clientpositive/filter_aggr.q.out
index c65de54..3bb650a 100644
--- a/ql/src/test/results/clientpositive/filter_aggr.q.out
+++ b/ql/src/test/results/clientpositive/filter_aggr.q.out
@@ -59,6 +59,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'
@@ -80,6 +81,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/filter_join_breaktask.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/filter_join_breaktask.q.out b/ql/src/test/results/clientpositive/filter_join_breaktask.q.out
index 884bfcd..a2624ef 100644
--- a/ql/src/test/results/clientpositive/filter_join_breaktask.q.out
+++ b/ql/src/test/results/clientpositive/filter_join_breaktask.q.out
@@ -113,6 +113,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 
@@ -250,6 +251,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/ac6b2a3f/ql/src/test/results/clientpositive/filter_union.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/filter_union.q.out b/ql/src/test/results/clientpositive/filter_union.q.out
index 04954de..4df6ae6 100644
--- a/ql/src/test/results/clientpositive/filter_union.q.out
+++ b/ql/src/test/results/clientpositive/filter_union.q.out
@@ -69,6 +69,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'
@@ -90,6 +91,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'
@@ -283,6 +285,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'
@@ -304,6 +307,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/fouter_join_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/fouter_join_ppr.q.out b/ql/src/test/results/clientpositive/fouter_join_ppr.q.out
index 8532178..f41f121 100644
--- a/ql/src/test/results/clientpositive/fouter_join_ppr.q.out
+++ b/ql/src/test/results/clientpositive/fouter_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/ac6b2a3f/ql/src/test/results/clientpositive/groupby_map_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_map_ppr.q.out b/ql/src/test/results/clientpositive/groupby_map_ppr.q.out
index b22fa90..e9830e4 100644
--- a/ql/src/test/results/clientpositive/groupby_map_ppr.q.out
+++ b/ql/src/test/results/clientpositive/groupby_map_ppr.q.out
@@ -89,6 +89,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'
@@ -137,6 +138,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'
@@ -180,6 +182,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,c1,c2
                     columns.comments 
@@ -238,6 +241,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,c1,c2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/groupby_map_ppr_multi_distinct.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_map_ppr_multi_distinct.q.out b/ql/src/test/results/clientpositive/groupby_map_ppr_multi_distinct.q.out
index 6de0720..5757e4c 100644
--- a/ql/src/test/results/clientpositive/groupby_map_ppr_multi_distinct.q.out
+++ b/ql/src/test/results/clientpositive/groupby_map_ppr_multi_distinct.q.out
@@ -89,6 +89,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'
@@ -137,6 +138,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'
@@ -180,6 +182,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","c3":"true","c4":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,c1,c2,c3,c4
                     columns.comments 
@@ -238,6 +241,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","c3":"true","c4":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,c1,c2,c3,c4
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/groupby_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_ppr.q.out b/ql/src/test/results/clientpositive/groupby_ppr.q.out
index 481c66d..231c703 100644
--- a/ql/src/test/results/clientpositive/groupby_ppr.q.out
+++ b/ql/src/test/results/clientpositive/groupby_ppr.q.out
@@ -83,6 +83,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'
@@ -131,6 +132,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'
@@ -174,6 +176,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,c1,c2
                     columns.comments 
@@ -227,6 +230,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,c1,c2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/groupby_ppr_multi_distinct.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_ppr_multi_distinct.q.out b/ql/src/test/results/clientpositive/groupby_ppr_multi_distinct.q.out
index 55d8679..a7c209d 100644
--- a/ql/src/test/results/clientpositive/groupby_ppr_multi_distinct.q.out
+++ b/ql/src/test/results/clientpositive/groupby_ppr_multi_distinct.q.out
@@ -83,6 +83,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'
@@ -131,6 +132,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'
@@ -174,6 +176,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","c3":"true","c4":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,c1,c2,c3,c4
                     columns.comments 
@@ -227,6 +230,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","c3":"true","c4":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,c1,c2,c3,c4
                 columns.comments 
@@ -444,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'
@@ -492,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'
@@ -535,6 +541,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","c3":"true","c4":"true","key":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,c1,c2,c3,c4
                     columns.comments 
@@ -588,6 +595,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"c1":"true","c2":"true","c3":"true","c4":"true","key":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,c1,c2,c3,c4
                 columns.comments 


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/default_constraint.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/default_constraint.q.out b/ql/src/test/results/clientpositive/llap/default_constraint.q.out
index 15cbd84..d987ef2 100644
--- a/ql/src/test/results/clientpositive/llap/default_constraint.q.out
+++ b/ql/src/test/results/clientpositive/llap/default_constraint.q.out
@@ -31,6 +31,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -301,6 +302,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -530,6 +532,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -788,6 +791,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -1059,6 +1063,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -1336,6 +1341,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -1490,8 +1496,9 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
-	totalSize           	1062                
+	totalSize           	1070                
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -1658,9 +1665,10 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
-	totalSize           	2124                
+	totalSize           	2140                
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -1737,9 +1745,10 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
-	totalSize           	2124                
+	totalSize           	2140                
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -1913,9 +1922,10 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	3                   
-	totalSize           	3188                
+	totalSize           	3199                
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -1991,9 +2001,10 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	3                   
-	totalSize           	3188                
+	totalSize           	3199                
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -2070,9 +2081,10 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	3                   
-	totalSize           	3188                
+	totalSize           	3199                
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -2259,6 +2271,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -2490,6 +2503,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -2644,8 +2658,9 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
-	totalSize           	1062                
+	totalSize           	1070                
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/deleteAnalyze.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/deleteAnalyze.q.out b/ql/src/test/results/clientpositive/llap/deleteAnalyze.q.out
index 16b1152..0d8ad05 100644
--- a/ql/src/test/results/clientpositive/llap/deleteAnalyze.q.out
+++ b/ql/src/test/results/clientpositive/llap/deleteAnalyze.q.out
@@ -50,6 +50,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"amount\":\"true\",\"id\":\"true\",\"item\":\"true\",\"sales_tax\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	2                   
 	rawDataSize         	634                 
@@ -116,6 +117,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"amount\":\"true\",\"id\":\"true\",\"item\":\"true\",\"sales_tax\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/disable_merge_for_bucketing.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/disable_merge_for_bucketing.q.out b/ql/src/test/results/clientpositive/llap/disable_merge_for_bucketing.q.out
index 6030b56..eecec13 100644
--- a/ql/src/test/results/clientpositive/llap/disable_merge_for_bucketing.q.out
+++ b/ql/src/test/results/clientpositive/llap/disable_merge_for_bucketing.q.out
@@ -59,6 +59,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'
@@ -80,6 +81,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'
@@ -121,6 +123,7 @@ STAGE PLANS:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                         bucket_count 2
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -191,6 +194,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -296,104 +300,93 @@ POSTHOOK: query: select * from bucket2_1 tablesample (bucket 1 out of 2) s order
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucket2_1
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
 2	val_2
-4	val_4
-8	val_8
 10	val_10
-12	val_12
-12	val_12
-18	val_18
-18	val_18
+17	val_17
+19	val_19
 20	val_20
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
+27	val_27
 30	val_30
-34	val_34
-42	val_42
-42	val_42
-44	val_44
+41	val_41
+43	val_43
+51	val_51
+51	val_51
 54	val_54
+57	val_57
 58	val_58
 58	val_58
 64	val_64
-66	val_66
+65	val_65
+67	val_67
+67	val_67
+69	val_69
 70	val_70
 70	val_70
 70	val_70
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-78	val_78
+77	val_77
 80	val_80
-82	val_82
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
 86	val_86
 90	val_90
 90	val_90
 90	val_90
-92	val_92
 96	val_96
+97	val_97
+97	val_97
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-104	val_104
-104	val_104
-114	val_114
+105	val_105
+113	val_113
+113	val_113
 116	val_116
-118	val_118
-118	val_118
-120	val_120
-120	val_120
+119	val_119
+119	val_119
+119	val_119
 126	val_126
-128	val_128
-128	val_128
-128	val_128
+133	val_133
 134	val_134
 134	val_134
-136	val_136
-138	val_138
-138	val_138
-138	val_138
-138	val_138
+137	val_137
+137	val_137
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
+149	val_149
+149	val_149
+153	val_153
 156	val_156
+157	val_157
 158	val_158
-160	val_160
 162	val_162
+163	val_163
 164	val_164
 164	val_164
-166	val_166
-168	val_168
-170	val_170
-172	val_172
-172	val_172
-174	val_174
-174	val_174
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+177	val_177
 178	val_178
-180	val_180
-186	val_186
+181	val_181
+187	val_187
+187	val_187
+187	val_187
 190	val_190
-192	val_192
-194	val_194
-196	val_196
-200	val_200
-200	val_200
+191	val_191
+191	val_191
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+199	val_199
+199	val_199
+199	val_199
+201	val_201
 202	val_202
 208	val_208
 208	val_208
@@ -401,63 +394,60 @@ POSTHOOK: Input: default@bucket2_1
 214	val_214
 216	val_216
 216	val_216
-218	val_218
-222	val_222
-224	val_224
-224	val_224
+221	val_221
+221	val_221
 226	val_226
-228	val_228
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
-242	val_242
-242	val_242
+239	val_239
+239	val_239
 244	val_244
 248	val_248
+249	val_249
 252	val_252
+255	val_255
+255	val_255
 256	val_256
 256	val_256
-258	val_258
 260	val_260
-262	val_262
 266	val_266
 272	val_272
 272	val_272
-274	val_274
-278	val_278
-278	val_278
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 286	val_286
-288	val_288
-288	val_288
+287	val_287
+289	val_289
+291	val_291
 292	val_292
-296	val_296
-298	val_298
-298	val_298
-298	val_298
-302	val_302
-306	val_306
+307	val_307
+307	val_307
 308	val_308
 310	val_310
+311	val_311
+311	val_311
+311	val_311
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-322	val_322
-322	val_322
+317	val_317
+317	val_317
+325	val_325
+325	val_325
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 336	val_336
 338	val_338
+339	val_339
+341	val_341
 342	val_342
 342	val_342
 344	val_344
@@ -467,79 +457,89 @@ POSTHOOK: Input: default@bucket2_1
 348	val_348
 348	val_348
 348	val_348
-356	val_356
+351	val_351
+353	val_353
+353	val_353
 360	val_360
 362	val_362
 364	val_364
-366	val_366
+365	val_365
 368	val_368
-374	val_374
+369	val_369
+369	val_369
+369	val_369
+377	val_377
 378	val_378
-382	val_382
-382	val_382
 384	val_384
 384	val_384
 384	val_384
 386	val_386
 392	val_392
+393	val_393
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
 402	val_402
 404	val_404
 404	val_404
-406	val_406
-406	val_406
-406	val_406
-406	val_406
+407	val_407
+409	val_409
+409	val_409
+409	val_409
+411	val_411
 414	val_414
 414	val_414
-418	val_418
-424	val_424
-424	val_424
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+427	val_427
 430	val_430
 430	val_430
 430	val_430
 432	val_432
-436	val_436
-438	val_438
-438	val_438
-438	val_438
+435	val_435
+437	val_437
+443	val_443
 444	val_444
 446	val_446
-448	val_448
+449	val_449
 452	val_452
+453	val_453
 454	val_454
 454	val_454
 454	val_454
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
+459	val_459
+459	val_459
+463	val_463
+463	val_463
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-470	val_470
+467	val_467
 472	val_472
 478	val_478
 478	val_478
+479	val_479
 480	val_480
 480	val_480
 480	val_480
 482	val_482
+483	val_483
 484	val_484
+485	val_485
 490	val_490
-492	val_492
-492	val_492
-494	val_494
-496	val_496
+491	val_491
+495	val_495
+497	val_497
 498	val_498
 498	val_498
 498	val_498

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/dynamic_partition_pruning.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/dynamic_partition_pruning.q.out b/ql/src/test/results/clientpositive/llap/dynamic_partition_pruning.q.out
index f468b90..2606363 100644
--- a/ql/src/test/results/clientpositive/llap/dynamic_partition_pruning.q.out
+++ b/ql/src/test/results/clientpositive/llap/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
@@ -3679,8 +3679,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 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 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)
@@ -5843,8 +5843,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/ac6b2a3f/ql/src/test/results/clientpositive/llap/dynamic_semijoin_reduction.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/dynamic_semijoin_reduction.q.out b/ql/src/test/results/clientpositive/llap/dynamic_semijoin_reduction.q.out
index e5a8e68..c609820 100644
--- a/ql/src/test/results/clientpositive/llap/dynamic_semijoin_reduction.q.out
+++ b/ql/src/test/results/clientpositive/llap/dynamic_semijoin_reduction.q.out
@@ -1608,6 +1608,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1651,6 +1652,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1742,6 +1744,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key1,value1
                       columns.comments 
@@ -1785,6 +1788,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key1,value1
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/dynamic_semijoin_user_level.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/dynamic_semijoin_user_level.q.out b/ql/src/test/results/clientpositive/llap/dynamic_semijoin_user_level.q.out
index af4004e..9b73c34 100644
--- a/ql/src/test/results/clientpositive/llap/dynamic_semijoin_user_level.q.out
+++ b/ql/src/test/results/clientpositive/llap/dynamic_semijoin_user_level.q.out
@@ -874,6 +874,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -919,6 +920,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1013,6 +1015,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key1,value1
                       columns.comments 
@@ -1058,6 +1061,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key1,value1
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/dynpart_sort_optimization_acid.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/dynpart_sort_optimization_acid.q.out b/ql/src/test/results/clientpositive/llap/dynpart_sort_optimization_acid.q.out
index ba443d4..fa51dd3 100644
--- a/ql/src/test/results/clientpositive/llap/dynpart_sort_optimization_acid.q.out
+++ b/ql/src/test/results/clientpositive/llap/dynpart_sort_optimization_acid.q.out
@@ -94,19 +94,19 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: acid_part
-                  Statistics: Num rows: 158 Data size: 60354 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 158 Data size: 60174 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: (key = 'foo') (type: boolean)
-                    Statistics: Num rows: 5 Data size: 1909 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 5 Data size: 1904 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ROW__ID (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 5 Data size: 1909 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 5 Data size: 1904 Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                         sort order: +
                         Map-reduce partition columns: UDFToInteger(_col0) (type: int)
-                        Statistics: Num rows: 5 Data size: 1909 Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 5 Data size: 1904 Basic stats: COMPLETE Column stats: NONE
             Execution mode: llap
             LLAP IO: may be used (ACID table)
         Reducer 2 
@@ -115,10 +115,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>), 'foo' (type: string), 'bar' (type: string), '2008-04-08' (type: string)
                 outputColumnNames: _col0, _col1, _col2, _col3
-                Statistics: Num rows: 5 Data size: 1909 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 5 Data size: 1904 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 5 Data size: 1909 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 5 Data size: 1904 Basic stats: COMPLETE Column stats: NONE
                   table:
                       input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
                       output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
@@ -189,7 +189,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: acid_part
-                  Statistics: Num rows: 157 Data size: 102875 Basic stats: COMPLETE Column stats: PARTIAL
+                  Statistics: Num rows: 156 Data size: 102424 Basic stats: COMPLETE Column stats: PARTIAL
                   Filter Operator
                     predicate: (key = 'foo') (type: boolean)
                     Statistics: Num rows: 5 Data size: 1355 Basic stats: COMPLETE Column stats: PARTIAL
@@ -380,19 +380,19 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: acid_part_sdpo
-                  Statistics: Num rows: 174 Data size: 66349 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 173 Data size: 66062 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: (key = 'foo') (type: boolean)
-                    Statistics: Num rows: 5 Data size: 1906 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 5 Data size: 1909 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ROW__ID (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 5 Data size: 1906 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 5 Data size: 1909 Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                         sort order: +
                         Map-reduce partition columns: UDFToInteger(_col0) (type: int)
-                        Statistics: Num rows: 5 Data size: 1906 Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 5 Data size: 1909 Basic stats: COMPLETE Column stats: NONE
             Execution mode: llap
             LLAP IO: may be used (ACID table)
         Reducer 2 
@@ -401,10 +401,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>), 'foo' (type: string), 'bar' (type: string), '2008-04-08' (type: string)
                 outputColumnNames: _col0, _col1, _col2, _col3
-                Statistics: Num rows: 5 Data size: 1906 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 5 Data size: 1909 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 5 Data size: 1906 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 5 Data size: 1909 Basic stats: COMPLETE Column stats: NONE
                   table:
                       input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
                       output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
@@ -475,7 +475,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: acid_part_sdpo
-                  Statistics: Num rows: 169 Data size: 110730 Basic stats: COMPLETE Column stats: PARTIAL
+                  Statistics: Num rows: 168 Data size: 110259 Basic stats: COMPLETE Column stats: PARTIAL
                   Filter Operator
                     predicate: (key = 'foo') (type: boolean)
                     Statistics: Num rows: 5 Data size: 1355 Basic stats: COMPLETE Column stats: PARTIAL
@@ -675,19 +675,19 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: acid_2l_part
-                  Statistics: Num rows: 154 Data size: 59446 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 155 Data size: 59623 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: (key = 'foo') (type: boolean)
-                    Statistics: Num rows: 5 Data size: 1930 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 5 Data size: 1923 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ROW__ID (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 5 Data size: 1930 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 5 Data size: 1923 Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                         sort order: +
                         Map-reduce partition columns: UDFToInteger(_col0) (type: int)
-                        Statistics: Num rows: 5 Data size: 1930 Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 5 Data size: 1923 Basic stats: COMPLETE Column stats: NONE
             Execution mode: llap
             LLAP IO: may be used (ACID table)
         Reducer 2 
@@ -696,10 +696,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>), 'foo' (type: string), 'bar' (type: string), '2008-04-08' (type: string), 11 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4
-                Statistics: Num rows: 5 Data size: 1930 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 5 Data size: 1923 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 5 Data size: 1930 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 5 Data size: 1923 Basic stats: COMPLETE Column stats: NONE
                   table:
                       input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
                       output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
@@ -1095,19 +1095,19 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: acid_2l_part_sdpo
-                  Statistics: Num rows: 154 Data size: 59446 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 155 Data size: 59623 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: (key = 'foo') (type: boolean)
-                    Statistics: Num rows: 5 Data size: 1930 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 5 Data size: 1923 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ROW__ID (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 5 Data size: 1930 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 5 Data size: 1923 Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                         sort order: +
                         Map-reduce partition columns: UDFToInteger(_col0) (type: int)
-                        Statistics: Num rows: 5 Data size: 1930 Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 5 Data size: 1923 Basic stats: COMPLETE Column stats: NONE
             Execution mode: llap
             LLAP IO: may be used (ACID table)
         Reducer 2 
@@ -1116,10 +1116,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>), 'foo' (type: string), 'bar' (type: string), '2008-04-08' (type: string), 11 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4
-                Statistics: Num rows: 5 Data size: 1930 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 5 Data size: 1923 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 5 Data size: 1930 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 5 Data size: 1923 Basic stats: COMPLETE Column stats: NONE
                   table:
                       input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
                       output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
@@ -1515,7 +1515,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: acid_2l_part_sdpo_no_cp
-                  Statistics: Num rows: 95 Data size: 81358 Basic stats: COMPLETE Column stats: PARTIAL
+                  Statistics: Num rows: 95 Data size: 81448 Basic stats: COMPLETE Column stats: PARTIAL
                   Filter Operator
                     predicate: (key = 'foo') (type: boolean)
                     Statistics: Num rows: 5 Data size: 1860 Basic stats: COMPLETE Column stats: PARTIAL

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/enforce_constraint_notnull.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/enforce_constraint_notnull.q.out b/ql/src/test/results/clientpositive/llap/enforce_constraint_notnull.q.out
index fc60683..8d0e051 100644
--- a/ql/src/test/results/clientpositive/llap/enforce_constraint_notnull.q.out
+++ b/ql/src/test/results/clientpositive/llap/enforce_constraint_notnull.q.out
@@ -3233,19 +3233,19 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: acid_uami
-                  Statistics: Num rows: 239 Data size: 75112 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 262 Data size: 82000 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: (((de = 109.23) or (de = 119.23)) and enforce_constraint(vc is not null)) (type: boolean)
-                    Statistics: Num rows: 5 Data size: 1571 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 5 Data size: 1564 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ROW__ID (type: struct<writeid:bigint,bucketid:int,rowid:bigint>), i (type: int), vc (type: varchar(128))
                       outputColumnNames: _col0, _col1, _col3
-                      Statistics: Num rows: 5 Data size: 1571 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 5 Data size: 1564 Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                         sort order: +
                         Map-reduce partition columns: UDFToInteger(_col0) (type: int)
-                        Statistics: Num rows: 5 Data size: 1571 Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 5 Data size: 1564 Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col1 (type: int), _col3 (type: varchar(128))
             Execution mode: vectorized, llap
             LLAP IO: may be used (ACID table)
@@ -3255,10 +3255,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>), VALUE._col0 (type: int), 3.14 (type: decimal(5,2)), VALUE._col1 (type: varchar(128))
                 outputColumnNames: _col0, _col1, _col2, _col3
-                Statistics: Num rows: 5 Data size: 1571 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 5 Data size: 1564 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 5 Data size: 1571 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 5 Data size: 1564 Basic stats: COMPLETE Column stats: NONE
                   table:
                       input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
                       output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
@@ -3326,19 +3326,19 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: acid_uami
-                  Statistics: Num rows: 276 Data size: 86592 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 300 Data size: 93808 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: ((de = 3.14) and enforce_constraint((i is not null and vc is not null))) (type: boolean)
-                    Statistics: Num rows: 2 Data size: 627 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 2 Data size: 625 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ROW__ID (type: struct<writeid:bigint,bucketid:int,rowid:bigint>), i (type: int), vc (type: varchar(128))
                       outputColumnNames: _col0, _col1, _col3
-                      Statistics: Num rows: 2 Data size: 627 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 2 Data size: 625 Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
                         key expressions: _col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                         sort order: +
                         Map-reduce partition columns: UDFToInteger(_col0) (type: int)
-                        Statistics: Num rows: 2 Data size: 627 Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 2 Data size: 625 Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col1 (type: int), _col3 (type: varchar(128))
             Execution mode: vectorized, llap
             LLAP IO: may be used (ACID table)
@@ -3348,10 +3348,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>), VALUE._col0 (type: int), 3.14 (type: decimal(5,2)), VALUE._col1 (type: varchar(128))
                 outputColumnNames: _col0, _col1, _col2, _col3
-                Statistics: Num rows: 2 Data size: 627 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 2 Data size: 625 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 2 Data size: 627 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 2 Data size: 625 Basic stats: COMPLETE Column stats: NONE
                   table:
                       input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
                       output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/except_distinct.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/except_distinct.q.out b/ql/src/test/results/clientpositive/llap/except_distinct.q.out
index 1a385ac..96b0e59 100644
--- a/ql/src/test/results/clientpositive/llap/except_distinct.q.out
+++ b/ql/src/test/results/clientpositive/llap/except_distinct.q.out
@@ -199,8 +199,8 @@ POSTHOOK: Input: default@a
 POSTHOOK: Input: default@b
 POSTHOOK: Output: hdfs://### HDFS PATH ###
 2	3
-2	20
 1	2
+2	20
 PREHOOK: query: explain select * from src except distinct select * from src
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select * from src except distinct select * from src

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/explainuser_4.q.out b/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
index 49a8fe2..44f078b 100644
--- a/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
@@ -471,10 +471,10 @@ order by c1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc
 #### A masked pattern was here ####
+-13036	1
 -8915	1
 -3799	1
 10782	1
--13036	1
 NULL	6
 Warning: Shuffle Join MERGEJOIN[9][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
 PREHOOK: query: explain

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/extrapolate_part_stats_partial_ndv.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/extrapolate_part_stats_partial_ndv.q.out b/ql/src/test/results/clientpositive/llap/extrapolate_part_stats_partial_ndv.q.out
index aa44d33..2b1ec3c 100644
--- a/ql/src/test/results/clientpositive/llap/extrapolate_part_stats_partial_ndv.q.out
+++ b/ql/src/test/results/clientpositive/llap/extrapolate_part_stats_partial_ndv.q.out
@@ -293,6 +293,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt,zip
                 columns.comments 
@@ -338,6 +339,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt,zip
                 columns.comments 
@@ -383,6 +385,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt,zip
                 columns.comments 
@@ -428,6 +431,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt,zip
                 columns.comments 
@@ -666,6 +670,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt,zip
                 columns.comments 
@@ -711,6 +716,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt,zip
                 columns.comments 
@@ -756,6 +762,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt,zip
                 columns.comments 
@@ -801,6 +808,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt,zip
                 columns.comments 
@@ -1075,6 +1083,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt
                 columns.comments 
@@ -1121,6 +1130,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt
                 columns.comments 
@@ -1167,6 +1177,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt
                 columns.comments 
@@ -1213,6 +1224,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt
                 columns.comments 
@@ -1259,6 +1271,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt
                 columns.comments 
@@ -1305,6 +1318,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt
                 columns.comments 
@@ -1351,6 +1365,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt
                 columns.comments 
@@ -1397,6 +1412,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt
                 columns.comments 
@@ -1443,6 +1459,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt
                 columns.comments 
@@ -1489,6 +1506,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt
                 columns.comments 
@@ -1535,6 +1553,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns state,locid,cnt
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/filter_join_breaktask.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/filter_join_breaktask.q.out b/ql/src/test/results/clientpositive/llap/filter_join_breaktask.q.out
index 3607edf..c473183 100644
--- a/ql/src/test/results/clientpositive/llap/filter_join_breaktask.q.out
+++ b/ql/src/test/results/clientpositive/llap/filter_join_breaktask.q.out
@@ -100,6 +100,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 
@@ -177,6 +178,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 
@@ -253,6 +255,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/ac6b2a3f/ql/src/test/results/clientpositive/llap/filter_union.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/filter_union.q.out b/ql/src/test/results/clientpositive/llap/filter_union.q.out
index 926c2fb..f300240 100644
--- a/ql/src/test/results/clientpositive/llap/filter_union.q.out
+++ b/ql/src/test/results/clientpositive/llap/filter_union.q.out
@@ -75,6 +75,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'
@@ -96,6 +97,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'
@@ -153,6 +155,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'
@@ -174,6 +177,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_2.q.out b/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_2.q.out
index d09f42a..67555c0 100644
--- a/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_2.q.out
@@ -850,8 +850,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 ####
-452
 428
+452
 PREHOOK: query: EXPLAIN
 SELECT COUNT(*)
 FROM src1 x JOIN srcpart z ON (x.key = z.key)
@@ -1100,8 +1100,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 ####
-452
 428
+452
 PREHOOK: query: SELECT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: _dummy_database@_dummy_table

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/infer_bucket_sort_bucketed_table.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/infer_bucket_sort_bucketed_table.q.out b/ql/src/test/results/clientpositive/llap/infer_bucket_sort_bucketed_table.q.out
index 1520232..ac58737 100644
--- a/ql/src/test/results/clientpositive/llap/infer_bucket_sort_bucketed_table.q.out
+++ b/ql/src/test/results/clientpositive/llap/infer_bucket_sort_bucketed_table.q.out
@@ -67,7 +67,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table_bucketed
 POSTHOOK: Input: default@test_table_bucketed@part=1
 #### A masked pattern was here ####
-31
+177
 PREHOOK: query: SELECT COUNT(*) FROM test_table_bucketed TABLESAMPLE (BUCKET 2 OUT OF 3) WHERE part = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table_bucketed
@@ -78,7 +78,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table_bucketed
 POSTHOOK: Input: default@test_table_bucketed@part=1
 #### A masked pattern was here ####
-179
+126
 PREHOOK: query: SELECT COUNT(*) FROM test_table_bucketed TABLESAMPLE (BUCKET 3 OUT OF 3) WHERE part = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table_bucketed
@@ -89,7 +89,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table_bucketed
 POSTHOOK: Input: default@test_table_bucketed@part=1
 #### A masked pattern was here ####
-99
+6
 PREHOOK: query: SELECT cnt FROM (SELECT INPUT__FILE__NAME, COUNT(*) cnt FROM test_table_bucketed WHERE part = '1'
 GROUP BY INPUT__FILE__NAME ORDER BY INPUT__FILE__NAME ASC LIMIT 3) a
 PREHOOK: type: QUERY
@@ -102,6 +102,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table_bucketed
 POSTHOOK: Input: default@test_table_bucketed@part=1
 #### A masked pattern was here ####
-31
-179
-99
+177
+126
+6

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/insert_into_default_keyword.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/insert_into_default_keyword.q.out b/ql/src/test/results/clientpositive/llap/insert_into_default_keyword.q.out
index 80c2a02..b1a00cf 100644
--- a/ql/src/test/results/clientpositive/llap/insert_into_default_keyword.q.out
+++ b/ql/src/test/results/clientpositive/llap/insert_into_default_keyword.q.out
@@ -2368,15 +2368,15 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: t
-                  Statistics: Num rows: 19 Data size: 76 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 20 Data size: 80 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: enforce_constraint(key is not null) (type: boolean)
-                    Statistics: Num rows: 9 Data size: 36 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 10 Data size: 40 Basic stats: COMPLETE Column stats: NONE
                     Reduce Output Operator
                       key expressions: key (type: int)
                       sort order: +
                       Map-reduce partition columns: key (type: int)
-                      Statistics: Num rows: 9 Data size: 36 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 10 Data size: 40 Basic stats: COMPLETE Column stats: NONE
             Execution mode: vectorized, llap
             LLAP IO: may be used (ACID table)
         Map 5 
@@ -2404,18 +2404,18 @@ STAGE PLANS:
                   0 key (type: int)
                   1 key (type: int)
                 outputColumnNames: _col0, _col6
-                Statistics: Num rows: 9 Data size: 39 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 11 Data size: 44 Basic stats: COMPLETE Column stats: NONE
                 Filter Operator
                   predicate: _col0 is null (type: boolean)
-                  Statistics: Num rows: 4 Data size: 17 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 5 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                   Select Operator
                     expressions: _col6 (type: int)
                     outputColumnNames: _col0
-                    Statistics: Num rows: 4 Data size: 17 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 5 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                     Reduce Output Operator
                       sort order: 
                       Map-reduce partition columns: null (type: string)
-                      Statistics: Num rows: 4 Data size: 17 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 5 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                       value expressions: _col0 (type: int)
         Reducer 3 
             Execution mode: llap
@@ -2423,10 +2423,10 @@ STAGE PLANS:
               Select Operator
                 expressions: VALUE._col0 (type: int), 'a1' (type: string), null (type: string)
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 4 Data size: 17 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 5 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 4 Data size: 17 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 5 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                   table:
                       input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
                       output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
@@ -2436,7 +2436,7 @@ STAGE PLANS:
                 Select Operator
                   expressions: _col0 (type: int), 'a1' (type: string), null (type: string)
                   outputColumnNames: key, a1, value
-                  Statistics: Num rows: 4 Data size: 17 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 5 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                   Group By Operator
                     aggregations: compute_stats(key, 'hll'), compute_stats(a1, 'hll'), compute_stats(value, 'hll')
                     mode: hash

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/insert_values_orig_table_use_metadata.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/insert_values_orig_table_use_metadata.q.out b/ql/src/test/results/clientpositive/llap/insert_values_orig_table_use_metadata.q.out
index 083ea03..b0089ef 100644
--- a/ql/src/test/results/clientpositive/llap/insert_values_orig_table_use_metadata.q.out
+++ b/ql/src/test/results/clientpositive/llap/insert_values_orig_table_use_metadata.q.out
@@ -102,6 +102,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	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\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -167,6 +168,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
 	totalSize           	295436              
 	transactional       	true                
@@ -372,6 +374,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
 	totalSize           	1572                
 	transactional       	true                
@@ -504,6 +507,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	3146                
 	transactional       	true                
@@ -632,6 +636,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	3                   
 	totalSize           	298582              
 	transactional       	true                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/intersect_all.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/intersect_all.q.out b/ql/src/test/results/clientpositive/llap/intersect_all.q.out
index f8fd3e1..acbf5fa 100644
--- a/ql/src/test/results/clientpositive/llap/intersect_all.q.out
+++ b/ql/src/test/results/clientpositive/llap/intersect_all.q.out
@@ -290,506 +290,506 @@ POSTHOOK: query: select * from src intersect all select * from src
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-0	val_0
-0	val_0
-0	val_0
-103	val_103
-103	val_103
+104	val_104
+104	val_104
 105	val_105
-116	val_116
+113	val_113
+113	val_113
+118	val_118
+118	val_118
+12	val_12
+12	val_12
 120	val_120
 120	val_120
-129	val_129
-129	val_129
-131	val_131
+133	val_133
 136	val_136
 155	val_155
-157	val_157
+158	val_158
 160	val_160
+162	val_162
+168	val_168
+17	val_17
+170	val_170
+175	val_175
+175	val_175
+18	val_18
+18	val_18
 180	val_180
-183	val_183
-190	val_190
-191	val_191
-191	val_191
-193	val_193
-193	val_193
-193	val_193
-205	val_205
-205	val_205
-207	val_207
-207	val_207
-213	val_213
-213	val_213
-223	val_223
-223	val_223
+186	val_186
+19	val_19
+197	val_197
+197	val_197
+200	val_200
+200	val_200
+216	val_216
+216	val_216
+218	val_218
+222	val_222
+224	val_224
+224	val_224
+228	val_228
 235	val_235
-238	val_238
-238	val_238
+237	val_237
+237	val_237
 239	val_239
 239	val_239
-24	val_24
-24	val_24
-248	val_248
-260	val_260
+244	val_244
+247	val_247
+256	val_256
+256	val_256
+263	val_263
+273	val_273
+273	val_273
+273	val_273
 28	val_28
+283	val_283
 286	val_286
-298	val_298
-298	val_298
-298	val_298
-305	val_305
+292	val_292
 306	val_306
-307	val_307
-307	val_307
 308	val_308
-315	val_315
-317	val_317
-317	val_317
-321	val_321
-321	val_321
+327	val_327
+327	val_327
+327	val_327
 33	val_33
-331	val_331
-331	val_331
-356	val_356
-360	val_360
+348	val_348
+348	val_348
+348	val_348
+348	val_348
+348	val_348
+353	val_353
+353	val_353
+362	val_362
 366	val_366
-367	val_367
-367	val_367
-368	val_368
-37	val_37
-37	val_37
-378	val_378
-379	val_379
-382	val_382
-382	val_382
-389	val_389
-395	val_395
-395	val_395
-400	val_400
-402	val_402
-406	val_406
-406	val_406
-406	val_406
-406	val_406
-407	val_407
-42	val_42
-42	val_42
-430	val_430
-430	val_430
-430	val_430
+396	val_396
+396	val_396
+396	val_396
+397	val_397
+397	val_397
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+409	val_409
+409	val_409
+409	val_409
+411	val_411
+419	val_419
+427	val_427
+43	val_43
+432	val_432
 436	val_436
-44	val_44
-452	val_452
-466	val_466
-466	val_466
-466	val_466
-467	val_467
+439	val_439
+439	val_439
+443	val_443
+453	val_453
+460	val_460
+462	val_462
+462	val_462
+47	val_47
 472	val_472
-480	val_480
-480	val_480
-480	val_480
-484	val_484
 485	val_485
-487	val_487
-495	val_495
 496	val_496
-498	val_498
-498	val_498
-498	val_498
-51	val_51
-51	val_51
-57	val_57
-58	val_58
-58	val_58
-65	val_65
-66	val_66
-69	val_69
+54	val_54
+64	val_64
 70	val_70
 70	val_70
 70	val_70
-78	val_78
 8	val_8
-92	val_92
-96	val_96
-104	val_104
-104	val_104
-111	val_111
+83	val_83
+83	val_83
+84	val_84
+84	val_84
+85	val_85
+90	val_90
+90	val_90
+90	val_90
+0	val_0
+0	val_0
+0	val_0
+103	val_103
+103	val_103
 114	val_114
-118	val_118
-118	val_118
-12	val_12
-12	val_12
-133	val_133
+125	val_125
+125	val_125
 138	val_138
 138	val_138
 138	val_138
 138	val_138
+146	val_146
+146	val_146
+150	val_150
+152	val_152
+152	val_152
 153	val_153
 156	val_156
-162	val_162
-168	val_168
-174	val_174
-174	val_174
-176	val_176
-176	val_176
-178	val_178
-181	val_181
-186	val_186
+157	val_157
+165	val_165
+165	val_165
+172	val_172
+172	val_172
+177	val_177
+179	val_179
+179	val_179
 187	val_187
 187	val_187
 187	val_187
-192	val_192
-197	val_197
-197	val_197
-199	val_199
-199	val_199
-199	val_199
-2	val_2
-201	val_201
-203	val_203
-203	val_203
-208	val_208
-208	val_208
-208	val_208
-214	val_214
-218	val_218
-219	val_219
-219	val_219
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-237	val_237
-237	val_237
-249	val_249
-256	val_256
-256	val_256
-257	val_257
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-278	val_278
-278	val_278
-284	val_284
-285	val_285
-310	val_310
+195	val_195
+195	val_195
+196	val_196
+217	val_217
+217	val_217
+242	val_242
+242	val_242
+248	val_248
+252	val_252
+265	val_265
+265	val_265
+27	val_27
+272	val_272
+272	val_272
+280	val_280
+280	val_280
+291	val_291
+305	val_305
+309	val_309
+309	val_309
+311	val_311
+311	val_311
+311	val_311
+315	val_315
+317	val_317
+317	val_317
 322	val_322
 322	val_322
-327	val_327
-327	val_327
-327	val_327
 333	val_333
 333	val_333
-336	val_336
-338	val_338
-341	val_341
-344	val_344
-344	val_344
-348	val_348
-348	val_348
-348	val_348
-348	val_348
-348	val_348
-351	val_351
-362	val_362
+34	val_34
+345	val_345
+35	val_35
+35	val_35
+35	val_35
+356	val_356
 364	val_364
-374	val_374
-392	val_392
-397	val_397
-397	val_397
+368	val_368
+369	val_369
+369	val_369
+369	val_369
+37	val_37
+37	val_37
+373	val_373
+377	val_377
 4	val_4
-403	val_403
-403	val_403
-403	val_403
+402	val_402
 404	val_404
 404	val_404
-419	val_419
-421	val_421
-427	val_427
-429	val_429
-429	val_429
-437	val_437
-438	val_438
-438	val_438
-438	val_438
-439	val_439
-439	val_439
+413	val_413
+413	val_413
+42	val_42
+42	val_42
+430	val_430
+430	val_430
+430	val_430
+431	val_431
+431	val_431
+431	val_431
+444	val_444
+449	val_449
+452	val_452
 454	val_454
 454	val_454
 454	val_454
-455	val_455
-460	val_460
+457	val_457
 463	val_463
 463	val_463
+466	val_466
+466	val_466
+466	val_466
 470	val_470
-478	val_478
-478	val_478
-479	val_479
+475	val_475
+481	val_481
 489	val_489
 489	val_489
 489	val_489
 489	val_489
 491	val_491
-492	val_492
-492	val_492
-53	val_53
-67	val_67
-67	val_67
-82	val_82
-90	val_90
-90	val_90
-90	val_90
-97	val_97
-97	val_97
-10	val_10
-125	val_125
-125	val_125
-134	val_134
-134	val_134
-143	val_143
+57	val_57
+65	val_65
+66	val_66
+74	val_74
+76	val_76
+76	val_76
+78	val_78
+9	val_9
+92	val_92
+95	val_95
+95	val_95
+100	val_100
+100	val_100
+119	val_119
+119	val_119
+119	val_119
+128	val_128
+128	val_128
+128	val_128
+129	val_129
+129	val_129
 145	val_145
-149	val_149
-149	val_149
-150	val_150
-158	val_158
-163	val_163
-164	val_164
-164	val_164
-166	val_166
-17	val_17
-170	val_170
-172	val_172
-172	val_172
-189	val_189
-19	val_19
-195	val_195
-195	val_195
-196	val_196
+167	val_167
+167	val_167
+167	val_167
+174	val_174
+174	val_174
+178	val_178
+181	val_181
+193	val_193
+193	val_193
+193	val_193
+199	val_199
+199	val_199
+199	val_199
 20	val_20
-209	val_209
-209	val_209
-216	val_216
-216	val_216
-217	val_217
-217	val_217
-224	val_224
-224	val_224
-228	val_228
-229	val_229
-229	val_229
+201	val_201
+213	val_213
+213	val_213
+214	val_214
+219	val_219
+219	val_219
+221	val_221
+221	val_221
+223	val_223
+223	val_223
+226	val_226
 233	val_233
 233	val_233
 241	val_241
-244	val_244
-247	val_247
-255	val_255
-255	val_255
-258	val_258
-26	val_26
-26	val_26
-263	val_263
-265	val_265
-265	val_265
-266	val_266
-272	val_272
-272	val_272
-273	val_273
-273	val_273
-273	val_273
-274	val_274
+249	val_249
+260	val_260
+262	val_262
+277	val_277
+277	val_277
+277	val_277
+277	val_277
 281	val_281
 281	val_281
-291	val_291
-296	val_296
-30	val_30
+287	val_287
+288	val_288
+288	val_288
+298	val_298
+298	val_298
+298	val_298
 302	val_302
-309	val_309
-309	val_309
-316	val_316
-316	val_316
-316	val_316
-318	val_318
-318	val_318
-318	val_318
-325	val_325
-325	val_325
-332	val_332
-335	val_335
-339	val_339
-342	val_342
-342	val_342
-345	val_345
-353	val_353
-353	val_353
-369	val_369
-369	val_369
-369	val_369
-373	val_373
+310	val_310
+323	val_323
+336	val_336
+341	val_341
+344	val_344
+344	val_344
+351	val_351
 375	val_375
-377	val_377
+382	val_382
+382	val_382
 384	val_384
 384	val_384
 384	val_384
-386	val_386
-394	val_394
-396	val_396
-396	val_396
-396	val_396
+393	val_393
+395	val_395
+395	val_395
 399	val_399
 399	val_399
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-41	val_41
-413	val_413
-413	val_413
-414	val_414
-414	val_414
-431	val_431
-431	val_431
-431	val_431
-446	val_446
-448	val_448
-449	val_449
+403	val_403
+403	val_403
+403	val_403
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+418	val_418
+435	val_435
+455	val_455
 459	val_459
 459	val_459
-462	val_462
-462	val_462
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-47	val_47
+477	val_477
+478	val_478
+478	val_478
+479	val_479
 482	val_482
-490	val_490
 493	val_493
 494	val_494
+495	val_495
 497	val_497
 5	val_5
 5	val_5
 5	val_5
-54	val_54
-74	val_74
+58	val_58
+58	val_58
+67	val_67
+67	val_67
 77	val_77
 80	val_80
-84	val_84
-84	val_84
-85	val_85
-87	val_87
-9	val_9
-95	val_95
-95	val_95
-100	val_100
-100	val_100
+86	val_86
+97	val_97
+97	val_97
+98	val_98
+98	val_98
+10	val_10
 11	val_11
-113	val_113
-113	val_113
-119	val_119
-119	val_119
-119	val_119
+111	val_111
+116	val_116
 126	val_126
-128	val_128
-128	val_128
-128	val_128
+131	val_131
+134	val_134
+134	val_134
 137	val_137
 137	val_137
-146	val_146
-146	val_146
+143	val_143
+149	val_149
+149	val_149
 15	val_15
 15	val_15
-152	val_152
-152	val_152
-165	val_165
-165	val_165
-167	val_167
-167	val_167
-167	val_167
+163	val_163
+164	val_164
+164	val_164
+166	val_166
 169	val_169
 169	val_169
 169	val_169
 169	val_169
-175	val_175
-175	val_175
-177	val_177
-179	val_179
-179	val_179
-18	val_18
-18	val_18
+176	val_176
+176	val_176
+183	val_183
+189	val_189
+190	val_190
+191	val_191
+191	val_191
+192	val_192
 194	val_194
-200	val_200
-200	val_200
+2	val_2
 202	val_202
-221	val_221
-221	val_221
-222	val_222
-226	val_226
-242	val_242
-242	val_242
-252	val_252
-262	val_262
-27	val_27
+203	val_203
+203	val_203
+205	val_205
+205	val_205
+207	val_207
+207	val_207
+208	val_208
+208	val_208
+208	val_208
+209	val_209
+209	val_209
+229	val_229
+229	val_229
+230	val_230
+230	val_230
+230	val_230
+230	val_230
+230	val_230
+238	val_238
+238	val_238
+24	val_24
+24	val_24
+255	val_255
+255	val_255
+257	val_257
+258	val_258
+26	val_26
+26	val_26
+266	val_266
+274	val_274
 275	val_275
-280	val_280
-280	val_280
+278	val_278
+278	val_278
 282	val_282
 282	val_282
-283	val_283
-287	val_287
-288	val_288
-288	val_288
+284	val_284
+285	val_285
 289	val_289
-292	val_292
-311	val_311
-311	val_311
-311	val_311
-323	val_323
-34	val_34
-35	val_35
-35	val_35
-35	val_35
+296	val_296
+30	val_30
+307	val_307
+307	val_307
+316	val_316
+316	val_316
+316	val_316
+318	val_318
+318	val_318
+318	val_318
+321	val_321
+321	val_321
+325	val_325
+325	val_325
+331	val_331
+331	val_331
+332	val_332
+335	val_335
+338	val_338
+339	val_339
+342	val_342
+342	val_342
+360	val_360
 365	val_365
-393	val_393
-409	val_409
-409	val_409
-409	val_409
-411	val_411
+367	val_367
+367	val_367
+374	val_374
+378	val_378
+379	val_379
+386	val_386
+389	val_389
+392	val_392
+394	val_394
+400	val_400
+407	val_407
+41	val_41
+414	val_414
+414	val_414
 417	val_417
 417	val_417
 417	val_417
-418	val_418
+421	val_421
 424	val_424
 424	val_424
-43	val_43
-432	val_432
-435	val_435
-443	val_443
-444	val_444
-453	val_453
-457	val_457
+429	val_429
+429	val_429
+437	val_437
+438	val_438
+438	val_438
+438	val_438
+44	val_44
+446	val_446
+448	val_448
 458	val_458
 458	val_458
+467	val_467
+468	val_468
+468	val_468
+468	val_468
+468	val_468
 469	val_469
 469	val_469
 469	val_469
 469	val_469
 469	val_469
-475	val_475
-477	val_477
-481	val_481
+480	val_480
+480	val_480
+480	val_480
 483	val_483
-64	val_64
+484	val_484
+487	val_487
+490	val_490
+492	val_492
+492	val_492
+498	val_498
+498	val_498
+498	val_498
+51	val_51
+51	val_51
+53	val_53
+69	val_69
 72	val_72
 72	val_72
-76	val_76
-76	val_76
-83	val_83
-83	val_83
-86	val_86
-98	val_98
-98	val_98
+82	val_82
+87	val_87
+96	val_96
 PREHOOK: query: explain select * from src intersect all select * from src intersect all select * from src intersect all select * from src
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select * from src intersect all select * from src intersect all select * from src intersect all select * from src
@@ -1033,506 +1033,506 @@ POSTHOOK: query: select * from src intersect all select * from src intersect all
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-0	val_0
-0	val_0
-0	val_0
-103	val_103
-103	val_103
+104	val_104
+104	val_104
 105	val_105
-116	val_116
+113	val_113
+113	val_113
+118	val_118
+118	val_118
+12	val_12
+12	val_12
 120	val_120
 120	val_120
-129	val_129
-129	val_129
-131	val_131
+133	val_133
 136	val_136
 155	val_155
-157	val_157
+158	val_158
 160	val_160
+162	val_162
+168	val_168
+17	val_17
+170	val_170
+175	val_175
+175	val_175
+18	val_18
+18	val_18
 180	val_180
-183	val_183
-190	val_190
-191	val_191
-191	val_191
-193	val_193
-193	val_193
-193	val_193
-205	val_205
-205	val_205
-207	val_207
-207	val_207
-213	val_213
-213	val_213
-223	val_223
-223	val_223
+186	val_186
+19	val_19
+197	val_197
+197	val_197
+200	val_200
+200	val_200
+216	val_216
+216	val_216
+218	val_218
+222	val_222
+224	val_224
+224	val_224
+228	val_228
 235	val_235
-238	val_238
-238	val_238
+237	val_237
+237	val_237
 239	val_239
 239	val_239
-24	val_24
-24	val_24
-248	val_248
-260	val_260
+244	val_244
+247	val_247
+256	val_256
+256	val_256
+263	val_263
+273	val_273
+273	val_273
+273	val_273
 28	val_28
+283	val_283
 286	val_286
-298	val_298
-298	val_298
-298	val_298
-305	val_305
+292	val_292
 306	val_306
-307	val_307
-307	val_307
 308	val_308
+327	val_327
+327	val_327
+327	val_327
+33	val_33
+348	val_348
+348	val_348
+348	val_348
+348	val_348
+348	val_348
+353	val_353
+353	val_353
+362	val_362
+366	val_366
+396	val_396
+396	val_396
+396	val_396
+397	val_397
+397	val_397
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+401	val_401
+409	val_409
+409	val_409
+409	val_409
+411	val_411
+419	val_419
+427	val_427
+43	val_43
+432	val_432
+436	val_436
+439	val_439
+439	val_439
+443	val_443
+453	val_453
+460	val_460
+462	val_462
+462	val_462
+47	val_47
+472	val_472
+485	val_485
+496	val_496
+54	val_54
+64	val_64
+70	val_70
+70	val_70
+70	val_70
+8	val_8
+83	val_83
+83	val_83
+84	val_84
+84	val_84
+85	val_85
+90	val_90
+90	val_90
+90	val_90
+0	val_0
+0	val_0
+0	val_0
+103	val_103
+103	val_103
+114	val_114
+125	val_125
+125	val_125
+138	val_138
+138	val_138
+138	val_138
+138	val_138
+146	val_146
+146	val_146
+150	val_150
+152	val_152
+152	val_152
+153	val_153
+156	val_156
+157	val_157
+165	val_165
+165	val_165
+172	val_172
+172	val_172
+177	val_177
+179	val_179
+179	val_179
+187	val_187
+187	val_187
+187	val_187
+195	val_195
+195	val_195
+196	val_196
+217	val_217
+217	val_217
+242	val_242
+242	val_242
+248	val_248
+252	val_252
+265	val_265
+265	val_265
+27	val_27
+272	val_272
+272	val_272
+280	val_280
+280	val_280
+291	val_291
+305	val_305
+309	val_309
+309	val_309
+311	val_311
+311	val_311
+311	val_311
 315	val_315
 317	val_317
 317	val_317
-321	val_321
-321	val_321
-33	val_33
-331	val_331
-331	val_331
+322	val_322
+322	val_322
+333	val_333
+333	val_333
+34	val_34
+345	val_345
+35	val_35
+35	val_35
+35	val_35
 356	val_356
-360	val_360
-366	val_366
-367	val_367
-367	val_367
+364	val_364
 368	val_368
+369	val_369
+369	val_369
+369	val_369
 37	val_37
 37	val_37
-378	val_378
-379	val_379
-382	val_382
-382	val_382
-389	val_389
-395	val_395
-395	val_395
-400	val_400
+373	val_373
+377	val_377
+4	val_4
 402	val_402
-406	val_406
-406	val_406
-406	val_406
-406	val_406
-407	val_407
+404	val_404
+404	val_404
+413	val_413
+413	val_413
 42	val_42
 42	val_42
 430	val_430
 430	val_430
 430	val_430
-436	val_436
-44	val_44
+431	val_431
+431	val_431
+431	val_431
+444	val_444
+449	val_449
 452	val_452
+454	val_454
+454	val_454
+454	val_454
+457	val_457
+463	val_463
+463	val_463
 466	val_466
 466	val_466
 466	val_466
-467	val_467
-472	val_472
-480	val_480
-480	val_480
-480	val_480
-484	val_484
-485	val_485
-487	val_487
-495	val_495
-496	val_496
-498	val_498
-498	val_498
-498	val_498
-51	val_51
-51	val_51
+470	val_470
+475	val_475
+481	val_481
+489	val_489
+489	val_489
+489	val_489
+489	val_489
+491	val_491
 57	val_57
-58	val_58
-58	val_58
 65	val_65
 66	val_66
-69	val_69
-70	val_70
-70	val_70
-70	val_70
+74	val_74
+76	val_76
+76	val_76
 78	val_78
-8	val_8
+9	val_9
 92	val_92
-96	val_96
-104	val_104
-104	val_104
-111	val_111
-114	val_114
-118	val_118
-118	val_118
-12	val_12
-12	val_12
-133	val_133
-138	val_138
-138	val_138
-138	val_138
-138	val_138
-153	val_153
-156	val_156
-162	val_162
-168	val_168
+95	val_95
+95	val_95
+100	val_100
+100	val_100
+119	val_119
+119	val_119
+119	val_119
+128	val_128
+128	val_128
+128	val_128
+129	val_129
+129	val_129
+145	val_145
+167	val_167
+167	val_167
+167	val_167
 174	val_174
 174	val_174
-176	val_176
-176	val_176
 178	val_178
 181	val_181
-186	val_186
-187	val_187
-187	val_187
-187	val_187
-192	val_192
-197	val_197
-197	val_197
+193	val_193
+193	val_193
+193	val_193
 199	val_199
 199	val_199
 199	val_199
-2	val_2
+20	val_20
 201	val_201
-203	val_203
-203	val_203
-208	val_208
-208	val_208
-208	val_208
+213	val_213
+213	val_213
 214	val_214
-218	val_218
 219	val_219
 219	val_219
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-237	val_237
-237	val_237
+221	val_221
+221	val_221
+223	val_223
+223	val_223
+226	val_226
+233	val_233
+233	val_233
+241	val_241
 249	val_249
-256	val_256
-256	val_256
-257	val_257
+260	val_260
+262	val_262
 277	val_277
 277	val_277
 277	val_277
 277	val_277
-278	val_278
-278	val_278
-284	val_284
-285	val_285
+281	val_281
+281	val_281
+287	val_287
+288	val_288
+288	val_288
+298	val_298
+298	val_298
+298	val_298
+302	val_302
 310	val_310
-322	val_322
-322	val_322
-327	val_327
-327	val_327
-327	val_327
-333	val_333
-333	val_333
+323	val_323
 336	val_336
-338	val_338
 341	val_341
 344	val_344
 344	val_344
-348	val_348
-348	val_348
-348	val_348
-348	val_348
-348	val_348
 351	val_351
-362	val_362
-364	val_364
-374	val_374
-392	val_392
-397	val_397
-397	val_397
-4	val_4
+375	val_375
+382	val_382
+382	val_382
+384	val_384
+384	val_384
+384	val_384
+393	val_393
+395	val_395
+395	val_395
+399	val_399
+399	val_399
 403	val_403
 403	val_403
 403	val_403
-404	val_404
-404	val_404
-419	val_419
-421	val_421
-427	val_427
-429	val_429
-429	val_429
-437	val_437
-438	val_438
-438	val_438
-438	val_438
-439	val_439
-439	val_439
-454	val_454
-454	val_454
-454	val_454
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+418	val_418
+435	val_435
 455	val_455
-460	val_460
-463	val_463
-463	val_463
-470	val_470
+459	val_459
+459	val_459
+477	val_477
 478	val_478
 478	val_478
 479	val_479
-489	val_489
-489	val_489
-489	val_489
-489	val_489
-491	val_491
-492	val_492
-492	val_492
-53	val_53
+482	val_482
+493	val_493
+494	val_494
+495	val_495
+497	val_497
+5	val_5
+5	val_5
+5	val_5
+58	val_58
+58	val_58
 67	val_67
 67	val_67
-82	val_82
-90	val_90
-90	val_90
-90	val_90
+77	val_77
+80	val_80
+86	val_86
 97	val_97
 97	val_97
+98	val_98
+98	val_98
 10	val_10
-125	val_125
-125	val_125
+11	val_11
+111	val_111
+116	val_116
+126	val_126
+131	val_131
 134	val_134
 134	val_134
+137	val_137
+137	val_137
 143	val_143
-145	val_145
 149	val_149
 149	val_149
-150	val_150
-158	val_158
+15	val_15
+15	val_15
 163	val_163
 164	val_164
 164	val_164
 166	val_166
-17	val_17
-170	val_170
-172	val_172
-172	val_172
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+176	val_176
+176	val_176
+183	val_183
 189	val_189
-19	val_19
-195	val_195
-195	val_195
-196	val_196
-20	val_20
+190	val_190
+191	val_191
+191	val_191
+192	val_192
+194	val_194
+2	val_2
+202	val_202
+203	val_203
+203	val_203
+205	val_205
+205	val_205
+207	val_207
+207	val_207
+208	val_208
+208	val_208
+208	val_208
 209	val_209
 209	val_209
-216	val_216
-216	val_216
-217	val_217
-217	val_217
-224	val_224
-224	val_224
-228	val_228
 229	val_229
 229	val_229
-233	val_233
-233	val_233
-241	val_241
-244	val_244
-247	val_247
+230	val_230
+230	val_230
+230	val_230
+230	val_230
+230	val_230
+238	val_238
+238	val_238
+24	val_24
+24	val_24
 255	val_255
 255	val_255
+257	val_257
 258	val_258
 26	val_26
 26	val_26
-263	val_263
-265	val_265
-265	val_265
 266	val_266
-272	val_272
-272	val_272
-273	val_273
-273	val_273
-273	val_273
 274	val_274
-281	val_281
-281	val_281
-291	val_291
+275	val_275
+278	val_278
+278	val_278
+282	val_282
+282	val_282
+284	val_284
+285	val_285
+289	val_289
 296	val_296
 30	val_30
-302	val_302
-309	val_309
-309	val_309
+307	val_307
+307	val_307
 316	val_316
 316	val_316
 316	val_316
 318	val_318
 318	val_318
 318	val_318
+321	val_321
+321	val_321
 325	val_325
 325	val_325
+331	val_331
+331	val_331
 332	val_332
 335	val_335
+338	val_338
 339	val_339
 342	val_342
 342	val_342
-345	val_345
-353	val_353
-353	val_353
-369	val_369
-369	val_369
-369	val_369
-373	val_373
-375	val_375
-377	val_377
-384	val_384
-384	val_384
-384	val_384
+360	val_360
+365	val_365
+367	val_367
+367	val_367
+374	val_374
+378	val_378
+379	val_379
 386	val_386
+389	val_389
+392	val_392
 394	val_394
-396	val_396
-396	val_396
-396	val_396
-399	val_399
-399	val_399
-401	val_401
-401	val_401
-401	val_401
-401	val_401
-401	val_401
+400	val_400
+407	val_407
 41	val_41
-413	val_413
-413	val_413
 414	val_414
 414	val_414
-431	val_431
-431	val_431
-431	val_431
-446	val_446
-448	val_448
-449	val_449
-459	val_459
-459	val_459
-462	val_462
-462	val_462
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-47	val_47
-482	val_482
-490	val_490
-493	val_493
-494	val_494
-497	val_497
-5	val_5
-5	val_5
-5	val_5
-54	val_54
-74	val_74
-77	val_77
-80	val_80
-84	val_84
-84	val_84
-85	val_85
-87	val_87
-9	val_9
-95	val_95
-95	val_95
-100	val_100
-100	val_100
-11	val_11
-113	val_113
-113	val_113
-119	val_119
-119	val_119
-119	val_119
-126	val_126
-128	val_128
-128	val_128
-128	val_128
-137	val_137
-137	val_137
-146	val_146
-146	val_146
-15	val_15
-15	val_15
-152	val_152
-152	val_152
-165	val_165
-165	val_165
-167	val_167
-167	val_167
-167	val_167
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-175	val_175
-175	val_175
-177	val_177
-179	val_179
-179	val_179
-18	val_18
-18	val_18
-194	val_194
-200	val_200
-200	val_200
-202	val_202
-221	val_221
-221	val_221
-222	val_222
-226	val_226
-242	val_242
-242	val_242
-252	val_252
-262	val_262
-27	val_27
-275	val_275
-280	val_280
-280	val_280
-282	val_282
-282	val_282
-283	val_283
-287	val_287
-288	val_288
-288	val_288
-289	val_289
-292	val_292
-311	val_311
-311	val_311
-311	val_311
-323	val_323
-34	val_34
-35	val_35
-35	val_35
-35	val_35
-365	val_365
-393	val_393
-409	val_409
-409	val_409
-409	val_409
-411	val_411
 417	val_417
 417	val_417
 417	val_417
-418	val_418
+421	val_421
 424	val_424
 424	val_424
-43	val_43
-432	val_432
-435	val_435
-443	val_443
-444	val_444
-453	val_453
-457	val_457
+429	val_429
+429	val_429
+437	val_437
+438	val_438
+438	val_438
+438	val_438
+44	val_44
+446	val_446
+448	val_448
 458	val_458
 458	val_458
+467	val_467
+468	val_468
+468	val_468
+468	val_468
+468	val_468
 469	val_469
 469	val_469
 469	val_469
 469	val_469
 469	val_469
-475	val_475
-477	val_477
-481	val_481
+480	val_480
+480	val_480
+480	val_480
 483	val_483
-64	val_64
+484	val_484
+487	val_487
+490	val_490
+492	val_492
+492	val_492
+498	val_498
+498	val_498
+498	val_498
+51	val_51
+51	val_51
+53	val_53
+69	val_69
 72	val_72
 72	val_72
-76	val_76
-76	val_76
-83	val_83
-83	val_83
-86	val_86
-98	val_98
-98	val_98
+82	val_82
+87	val_87
+96	val_96
 PREHOOK: query: explain select value from a group by value intersect all select key from b group by key
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select value from a group by value intersect all select key from b group by key


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/sysdb.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/sysdb.q.out b/ql/src/test/results/clientpositive/llap/sysdb.q.out
index 7d977d3..de20f2d 100644
--- a/ql/src/test/results/clientpositive/llap/sysdb.q.out
+++ b/ql/src/test/results/clientpositive/llap/sysdb.q.out
@@ -58,34 +58,10 @@ default	alltypesorc			hive_test_user	USER	DELETE	true	-1	hive_test_user
 default	alltypesorc			hive_test_user	USER	INSERT	true	-1	hive_test_user
 default	alltypesorc			hive_test_user	USER	SELECT	true	-1	hive_test_user
 default	alltypesorc			hive_test_user	USER	UPDATE	true	-1	hive_test_user
-default	alltypesparquet			hive_test_user	USER	DELETE	true	-1	hive_test_user
-default	alltypesparquet			hive_test_user	USER	INSERT	true	-1	hive_test_user
-default	alltypesparquet			hive_test_user	USER	SELECT	true	-1	hive_test_user
-default	alltypesparquet			hive_test_user	USER	UPDATE	true	-1	hive_test_user
-default	cbo_t1			hive_test_user	USER	DELETE	true	-1	hive_test_user
-default	cbo_t1			hive_test_user	USER	INSERT	true	-1	hive_test_user
-default	cbo_t1			hive_test_user	USER	SELECT	true	-1	hive_test_user
-default	cbo_t1			hive_test_user	USER	UPDATE	true	-1	hive_test_user
-default	cbo_t2			hive_test_user	USER	DELETE	true	-1	hive_test_user
-default	cbo_t2			hive_test_user	USER	INSERT	true	-1	hive_test_user
-default	cbo_t2			hive_test_user	USER	SELECT	true	-1	hive_test_user
-default	cbo_t2			hive_test_user	USER	UPDATE	true	-1	hive_test_user
-default	cbo_t3			hive_test_user	USER	DELETE	true	-1	hive_test_user
-default	cbo_t3			hive_test_user	USER	INSERT	true	-1	hive_test_user
-default	cbo_t3			hive_test_user	USER	SELECT	true	-1	hive_test_user
-default	cbo_t3			hive_test_user	USER	UPDATE	true	-1	hive_test_user
-default	lineitem			hive_test_user	USER	DELETE	true	-1	hive_test_user
-default	lineitem			hive_test_user	USER	INSERT	true	-1	hive_test_user
-default	lineitem			hive_test_user	USER	SELECT	true	-1	hive_test_user
-default	lineitem			hive_test_user	USER	UPDATE	true	-1	hive_test_user
 default	moretypes			hive_test_user	USER	DELETE	true	-1	hive_test_user
 default	moretypes			hive_test_user	USER	INSERT	true	-1	hive_test_user
 default	moretypes			hive_test_user	USER	SELECT	true	-1	hive_test_user
 default	moretypes			hive_test_user	USER	UPDATE	true	-1	hive_test_user
-default	part			hive_test_user	USER	DELETE	true	-1	hive_test_user
-default	part			hive_test_user	USER	INSERT	true	-1	hive_test_user
-default	part			hive_test_user	USER	SELECT	true	-1	hive_test_user
-default	part			hive_test_user	USER	UPDATE	true	-1	hive_test_user
 default	scr_txn			hive_test_user	USER	DELETE	true	-1	hive_test_user
 default	scr_txn			hive_test_user	USER	INSERT	true	-1	hive_test_user
 default	scr_txn			hive_test_user	USER	SELECT	true	-1	hive_test_user
@@ -94,46 +70,14 @@ default	src			hive_test_user	USER	DELETE	true	-1	hive_test_user
 default	src			hive_test_user	USER	INSERT	true	-1	hive_test_user
 default	src			hive_test_user	USER	SELECT	true	-1	hive_test_user
 default	src			hive_test_user	USER	UPDATE	true	-1	hive_test_user
-default	src1			hive_test_user	USER	DELETE	true	-1	hive_test_user
-default	src1			hive_test_user	USER	INSERT	true	-1	hive_test_user
-default	src1			hive_test_user	USER	SELECT	true	-1	hive_test_user
-default	src1			hive_test_user	USER	UPDATE	true	-1	hive_test_user
 default	src_buck			hive_test_user	USER	DELETE	true	-1	hive_test_user
 default	src_buck			hive_test_user	USER	INSERT	true	-1	hive_test_user
 default	src_buck			hive_test_user	USER	SELECT	true	-1	hive_test_user
 default	src_buck			hive_test_user	USER	UPDATE	true	-1	hive_test_user
-default	src_cbo			hive_test_user	USER	DELETE	true	-1	hive_test_user
-default	src_cbo			hive_test_user	USER	INSERT	true	-1	hive_test_user
-default	src_cbo			hive_test_user	USER	SELECT	true	-1	hive_test_user
-default	src_cbo			hive_test_user	USER	UPDATE	true	-1	hive_test_user
-default	src_json			hive_test_user	USER	DELETE	true	-1	hive_test_user
-default	src_json			hive_test_user	USER	INSERT	true	-1	hive_test_user
-default	src_json			hive_test_user	USER	SELECT	true	-1	hive_test_user
-default	src_json			hive_test_user	USER	UPDATE	true	-1	hive_test_user
-default	src_sequencefile			hive_test_user	USER	DELETE	true	-1	hive_test_user
-default	src_sequencefile			hive_test_user	USER	INSERT	true	-1	hive_test_user
-default	src_sequencefile			hive_test_user	USER	SELECT	true	-1	hive_test_user
-default	src_sequencefile			hive_test_user	USER	UPDATE	true	-1	hive_test_user
 default	src_skew			hive_test_user	USER	DELETE	true	-1	hive_test_user
 default	src_skew			hive_test_user	USER	INSERT	true	-1	hive_test_user
 default	src_skew			hive_test_user	USER	SELECT	true	-1	hive_test_user
 default	src_skew			hive_test_user	USER	UPDATE	true	-1	hive_test_user
-default	src_thrift			hive_test_user	USER	DELETE	true	-1	hive_test_user
-default	src_thrift			hive_test_user	USER	INSERT	true	-1	hive_test_user
-default	src_thrift			hive_test_user	USER	SELECT	true	-1	hive_test_user
-default	src_thrift			hive_test_user	USER	UPDATE	true	-1	hive_test_user
-default	srcbucket			hive_test_user	USER	DELETE	true	-1	hive_test_user
-default	srcbucket			hive_test_user	USER	INSERT	true	-1	hive_test_user
-default	srcbucket			hive_test_user	USER	SELECT	true	-1	hive_test_user
-default	srcbucket			hive_test_user	USER	UPDATE	true	-1	hive_test_user
-default	srcbucket2			hive_test_user	USER	DELETE	true	-1	hive_test_user
-default	srcbucket2			hive_test_user	USER	INSERT	true	-1	hive_test_user
-default	srcbucket2			hive_test_user	USER	SELECT	true	-1	hive_test_user
-default	srcbucket2			hive_test_user	USER	UPDATE	true	-1	hive_test_user
-default	srcpart			hive_test_user	USER	DELETE	true	-1	hive_test_user
-default	srcpart			hive_test_user	USER	INSERT	true	-1	hive_test_user
-default	srcpart			hive_test_user	USER	SELECT	true	-1	hive_test_user
-default	srcpart			hive_test_user	USER	UPDATE	true	-1	hive_test_user
 PREHOOK: query: DROP DATABASE IF EXISTS SYS CASCADE
 PREHOOK: type: DROPDATABASE
 POSTHOOK: query: DROP DATABASE IF EXISTS SYS CASCADE
@@ -3192,8 +3136,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: sys@bucketing_cols
 #### A masked pattern was here ####
 key	0
-key	0
-key	0
 value	0
 PREHOOK: query: select count(*) from cds
 PREHOOK: type: QUERY
@@ -3203,7 +3145,7 @@ POSTHOOK: query: select count(*) from cds
 POSTHOOK: type: QUERY
 POSTHOOK: Input: sys@cds
 #### A masked pattern was here ####
-71
+57
 PREHOOK: query: select column_name, type_name, integer_idx from columns_v2 order by column_name, integer_idx limit 5
 PREHOOK: type: QUERY
 PREHOOK: Input: sys@columns_v2
@@ -3215,8 +3157,8 @@ POSTHOOK: Input: sys@columns_v2
 a	decimal(10,2)	0
 action_expression	string	3
 add_time	int	1
-aint	int	0
 alloc_fraction	double	2
+avg_col_len	double	14
 PREHOOK: query: select param_key, param_value from database_params order by param_key, param_value limit 5
 PREHOOK: type: QUERY
 PREHOOK: Input: sys@database_params
@@ -3256,11 +3198,6 @@ POSTHOOK: query: select part_name from partitions order by part_name limit 5
 POSTHOOK: type: QUERY
 POSTHOOK: Input: sys@partitions
 #### A masked pattern was here ####
-ds=2008-04-08/hr=11
-ds=2008-04-08/hr=12
-ds=2008-04-09/hr=11
-ds=2008-04-09/hr=12
-dt=2014
 PREHOOK: query: select pkey_name, pkey_type from partition_keys order by pkey_name limit 5
 PREHOOK: type: QUERY
 PREHOOK: Input: sys@partition_keys
@@ -3269,10 +3206,6 @@ POSTHOOK: query: select pkey_name, pkey_type from partition_keys order by pkey_n
 POSTHOOK: type: QUERY
 POSTHOOK: Input: sys@partition_keys
 #### A masked pattern was here ####
-ds	string
-dt	string
-dt	string
-hr	string
 PREHOOK: query: select part_key_val, integer_idx from partition_key_vals order by part_key_val, integer_idx limit 5
 PREHOOK: type: QUERY
 PREHOOK: Input: sys@partition_key_vals
@@ -3281,11 +3214,6 @@ POSTHOOK: query: select part_key_val, integer_idx from partition_key_vals order
 POSTHOOK: type: QUERY
 POSTHOOK: Input: sys@partition_key_vals
 #### A masked pattern was here ####
-11	1
-11	1
-12	1
-12	1
-2008-04-08	0
 PREHOOK: query: select param_key, param_value from partition_params order by param_key, param_value limit 5
 PREHOOK: type: QUERY
 PREHOOK: Input: sys@partition_params
@@ -3294,11 +3222,6 @@ POSTHOOK: query: select param_key, param_value from partition_params order by pa
 POSTHOOK: type: QUERY
 POSTHOOK: Input: sys@partition_params
 #### A masked pattern was here ####
-COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"c_boolean":"true","c_float":"true","c_int":"true","key":"true","value":"true"}}
-COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"c_boolean":"true","c_float":"true","c_int":"true","key":"true","value":"true"}}
-COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
-COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
-COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
 PREHOOK: query: select grantor, principal_name from part_col_privs order by grantor, principal_name limit 5
 PREHOOK: type: QUERY
 PREHOOK: Input: sys@part_col_privs
@@ -3341,7 +3264,7 @@ POSTHOOK: query: select count(*) from sds
 POSTHOOK: type: QUERY
 POSTHOOK: Input: sys@sds
 #### A masked pattern was here ####
-77
+57
 PREHOOK: query: select param_key, param_value from sd_params order by param_key, param_value limit 5
 PREHOOK: type: QUERY
 PREHOOK: Input: sys@sd_params
@@ -3360,9 +3283,9 @@ POSTHOOK: Input: sys@sequence_table
 #### A masked pattern was here ####
 org.apache.hadoop.hive.metastore.model.MCatalog
 org.apache.hadoop.hive.metastore.model.MColumnDescriptor
+org.apache.hadoop.hive.metastore.model.MCreationMetadata
 org.apache.hadoop.hive.metastore.model.MDatabase
 org.apache.hadoop.hive.metastore.model.MFunction
-org.apache.hadoop.hive.metastore.model.MGlobalPrivilege
 PREHOOK: query: select name, slib from serdes order by name, slib limit 5
 PREHOOK: type: QUERY
 PREHOOK: Input: sys@serdes
@@ -3384,11 +3307,11 @@ POSTHOOK: query: select param_key, param_value from serde_params order by param_
 POSTHOOK: type: QUERY
 POSTHOOK: Input: sys@serde_params
 #### A masked pattern was here ####
-field.delim	,
-field.delim	,
-field.delim	,
-field.delim	,
-field.delim	,
+serialization.format	1
+serialization.format	1
+serialization.format	1
+serialization.format	1
+serialization.format	1
 PREHOOK: query: select skewed_col_name from skewed_col_names order by skewed_col_name limit 5
 PREHOOK: type: QUERY
 PREHOOK: Input: sys@skewed_col_names
@@ -3464,10 +3387,10 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: sys@tbls
 #### A masked pattern was here ####
 alltypesorc
-alltypesparquet
 bucketing_cols
-cbo_t1
-cbo_t2
+cds
+column_privileges
+columns
 PREHOOK: query: select column_name, grantor, principal_name from tbl_col_privs order by column_name, principal_name limit 5
 PREHOOK: type: QUERY
 PREHOOK: Input: sys@tbl_col_privs
@@ -3515,16 +3438,6 @@ POSTHOOK: query: select table_name, partition_name, column_name, num_nulls, num_
 POSTHOOK: type: QUERY
 POSTHOOK: Input: sys@part_col_stats
 #### A masked pattern was here ####
-cbo_t1	dt=2014	c_boolean	2	NULL
-cbo_t1	dt=2014	c_float	2	1
-cbo_t1	dt=2014	c_int	2	1
-cbo_t1	dt=2014	key	2	4
-cbo_t1	dt=2014	value	2	4
-cbo_t2	dt=2014	c_boolean	2	NULL
-cbo_t2	dt=2014	c_float	2	2
-cbo_t2	dt=2014	c_int	2	2
-cbo_t2	dt=2014	key	2	5
-cbo_t2	dt=2014	value	2	5
 PREHOOK: query: select schema_version from version order by schema_version limit 5
 PREHOOK: type: QUERY
 PREHOOK: Input: sys@version
@@ -3566,11 +3479,11 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: sys@table_params
 POSTHOOK: Input: sys@table_stats_view
 #### A masked pattern was here ####
-{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true"}}	0	0	0	0
-{"BASIC_STATS":"true","COLUMN_STATS":{"entity_name":"true","entity_type":"true","ordering":"true","pool_path":"true","rp_name":"true"}}	0	0	0	0
-{"BASIC_STATS":"true","COLUMN_STATS":{"integer_idx":"true","sd_id":"true","skewed_col_name":"true"}}	0	0	0	0
-#### A masked pattern was here ####
-{"BASIC_STATS":"true","COLUMN_STATS":{"db_id":"true","param_key":"true","param_value":"true"}}	0	0	0	0
+{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}	0	0	0	0
+{"BASIC_STATS":"true","COLUMN_STATS":{"pool_path":"true","rp_name":"true","trigger_name":"true"}}	0	0	0	0
+{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}	0	0	0	0
+{"BASIC_STATS":"true","COLUMN_STATS":{"a":"true","b":"true","c":"true","d":"true","e":"true","f":"true","g":"true"}}	0	0	0	0
+{"BASIC_STATS":"true","COLUMN_STATS":{"create_time":"true","last_access_time":"true","part_id":"true","part_name":"true","sd_id":"true","tbl_id":"true"}}	0	0	0	0
 PREHOOK: query: select COLUMN_STATS_ACCURATE, NUM_FILES, NUM_ROWS, RAW_DATA_SIZE, TOTAL_SIZE FROM PARTITION_STATS_VIEW where COLUMN_STATS_ACCURATE is not null order by NUM_FILES, NUM_ROWS, RAW_DATA_SIZE limit 5
 PREHOOK: type: QUERY
 PREHOOK: Input: sys@partition_params
@@ -3581,11 +3494,6 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: sys@partition_params
 POSTHOOK: Input: sys@partition_stats_view
 #### A masked pattern was here ####
-{"BASIC_STATS":"true","COLUMN_STATS":{"c_boolean":"true","c_float":"true","c_int":"true","key":"true","value":"true"}}	1	20	262	282
-{"BASIC_STATS":"true","COLUMN_STATS":{"c_boolean":"true","c_float":"true","c_int":"true","key":"true","value":"true"}}	1	20	262	282
-{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}	1	500	5312	5812
-{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}	1	500	5312	5812
-{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}	1	500	5312	5812
 PREHOOK: query: describe sys.tab_col_stats
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: sys@tab_col_stats
@@ -3708,25 +3616,11 @@ POSTHOOK: Input: sys@dbs
 POSTHOOK: Input: sys@tbls
 #### A masked pattern was here ####
 default	default	alltypesorc	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
-default	default	alltypesparquet	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
-default	default	cbo_t1	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
-default	default	cbo_t2	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
-default	default	cbo_t3	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
-default	default	lineitem	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
 default	default	moretypes	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
-default	default	part	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
 default	default	scr_txn	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
 default	default	src	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
-default	default	src1	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
 default	default	src_buck	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
-default	default	src_cbo	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
-default	default	src_json	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
-default	default	src_sequencefile	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
 default	default	src_skew	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
-default	default	src_thrift	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
-default	default	srcbucket	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
-default	default	srcbucket2	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
-default	default	srcpart	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
 default	information_schema	column_privileges	VIEW	NULL	NULL	NULL	NULL	NULL	NO	NO	NULL
 default	information_schema	columns	VIEW	NULL	NULL	NULL	NULL	NULL	NO	NO	NULL
 default	information_schema	schemata	VIEW	NULL	NULL	NULL	NULL	NULL	NO	NO	NULL
@@ -3796,12 +3690,12 @@ hive_test_user	hive_test_user	default	default	alltypesorc	DELETE	YES	NO
 hive_test_user	hive_test_user	default	default	alltypesorc	INSERT	YES	NO
 hive_test_user	hive_test_user	default	default	alltypesorc	SELECT	YES	NO
 hive_test_user	hive_test_user	default	default	alltypesorc	UPDATE	YES	NO
-hive_test_user	hive_test_user	default	default	alltypesparquet	DELETE	YES	NO
-hive_test_user	hive_test_user	default	default	alltypesparquet	INSERT	YES	NO
-hive_test_user	hive_test_user	default	default	alltypesparquet	SELECT	YES	NO
-hive_test_user	hive_test_user	default	default	alltypesparquet	UPDATE	YES	NO
-hive_test_user	hive_test_user	default	default	cbo_t1	DELETE	YES	NO
-hive_test_user	hive_test_user	default	default	cbo_t1	INSERT	YES	NO
+hive_test_user	hive_test_user	default	default	moretypes	DELETE	YES	NO
+hive_test_user	hive_test_user	default	default	moretypes	INSERT	YES	NO
+hive_test_user	hive_test_user	default	default	moretypes	SELECT	YES	NO
+hive_test_user	hive_test_user	default	default	moretypes	UPDATE	YES	NO
+hive_test_user	hive_test_user	default	default	scr_txn	DELETE	YES	NO
+hive_test_user	hive_test_user	default	default	scr_txn	INSERT	YES	NO
 PREHOOK: query: select * from COLUMNS where TABLE_NAME = 'alltypesorc' or TABLE_NAME = 'moretypes' order by TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION
 PREHOOK: type: QUERY
 PREHOOK: Input: information_schema@columns
@@ -3818,25 +3712,25 @@ POSTHOOK: Input: sys@dbs
 POSTHOOK: Input: sys@sds
 POSTHOOK: Input: sys@tbls
 #### A masked pattern was here ####
-default	default	alltypesorc	ctinyint	0	NULL	YES	tinyint	NULL	NULL	3	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	11	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	tinyint	3	10
-default	default	alltypesorc	csmallint	1	NULL	YES	smallint	NULL	NULL	5	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	11	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	smallint	5	10
-default	default	alltypesorc	cint	2	NULL	YES	int	NULL	NULL	10	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	11	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	int	10	10
-default	default	alltypesorc	cbigint	3	NULL	YES	bigint	NULL	NULL	19	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	11	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	bigint	19	10
-default	default	alltypesorc	cfloat	4	NULL	YES	float	NULL	NULL	23	2	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	11	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	float	23	2
-default	default	alltypesorc	cdouble	5	NULL	YES	double	NULL	NULL	53	2	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	11	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	double	53	2
-default	default	alltypesorc	cstring1	6	NULL	YES	string	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	11	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	string	NULL	NULL
-default	default	alltypesorc	cstring2	7	NULL	YES	string	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	11	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	string	NULL	NULL
-default	default	alltypesorc	ctimestamp1	8	NULL	YES	timestamp	NULL	NULL	NULL	NULL	NULL	9	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	11	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	timestamp	NULL	NULL
-default	default	alltypesorc	ctimestamp2	9	NULL	YES	timestamp	NULL	NULL	NULL	NULL	NULL	9	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	11	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	timestamp	NULL	NULL
-default	default	alltypesorc	cboolean1	10	NULL	YES	boolean	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	11	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	boolean	NULL	NULL
-default	default	alltypesorc	cboolean2	11	NULL	YES	boolean	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	11	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	boolean	NULL	NULL
-default	default	moretypes	a	0	NULL	YES	decimal(10,2)	NULL	NULL	10	10	2	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	28	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	decimal(10,2)	10	10
-default	default	moretypes	b	1	NULL	YES	tinyint	NULL	NULL	3	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	28	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	tinyint	3	10
-default	default	moretypes	c	2	NULL	YES	smallint	NULL	NULL	5	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	28	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	smallint	5	10
-default	default	moretypes	d	3	NULL	YES	int	NULL	NULL	10	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	28	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	int	10	10
-default	default	moretypes	e	4	NULL	YES	bigint	NULL	NULL	19	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	28	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	bigint	19	10
-default	default	moretypes	f	5	NULL	YES	varchar(10)	10	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	28	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	varchar(10)	NULL	NULL
-default	default	moretypes	g	6	NULL	YES	char(3)	3	3	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	28	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	char(3)	NULL	NULL
+default	default	alltypesorc	ctinyint	0	NULL	YES	tinyint	NULL	NULL	3	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	12	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	tinyint	3	10
+default	default	alltypesorc	csmallint	1	NULL	YES	smallint	NULL	NULL	5	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	12	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	smallint	5	10
+default	default	alltypesorc	cint	2	NULL	YES	int	NULL	NULL	10	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	12	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	int	10	10
+default	default	alltypesorc	cbigint	3	NULL	YES	bigint	NULL	NULL	19	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	12	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	bigint	19	10
+default	default	alltypesorc	cfloat	4	NULL	YES	float	NULL	NULL	23	2	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	12	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	float	23	2
+default	default	alltypesorc	cdouble	5	NULL	YES	double	NULL	NULL	53	2	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	12	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	double	53	2
+default	default	alltypesorc	cstring1	6	NULL	YES	string	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	12	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	string	NULL	NULL
+default	default	alltypesorc	cstring2	7	NULL	YES	string	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	12	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	string	NULL	NULL
+default	default	alltypesorc	ctimestamp1	8	NULL	YES	timestamp	NULL	NULL	NULL	NULL	NULL	9	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	12	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	timestamp	NULL	NULL
+default	default	alltypesorc	ctimestamp2	9	NULL	YES	timestamp	NULL	NULL	NULL	NULL	NULL	9	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	12	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	timestamp	NULL	NULL
+default	default	alltypesorc	cboolean1	10	NULL	YES	boolean	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	12	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	boolean	NULL	NULL
+default	default	alltypesorc	cboolean2	11	NULL	YES	boolean	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	12	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	boolean	NULL	NULL
+default	default	moretypes	a	0	NULL	YES	decimal(10,2)	NULL	NULL	10	10	2	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	16	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	decimal(10,2)	10	10
+default	default	moretypes	b	1	NULL	YES	tinyint	NULL	NULL	3	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	16	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	tinyint	3	10
+default	default	moretypes	c	2	NULL	YES	smallint	NULL	NULL	5	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	16	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	smallint	5	10
+default	default	moretypes	d	3	NULL	YES	int	NULL	NULL	10	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	16	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	int	10	10
+default	default	moretypes	e	4	NULL	YES	bigint	NULL	NULL	19	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	16	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	bigint	19	10
+default	default	moretypes	f	5	NULL	YES	varchar(10)	10	10	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	16	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	varchar(10)	NULL	NULL
+default	default	moretypes	g	6	NULL	YES	char(3)	3	3	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	16	NO	NO	NULL	NULL	NULL	NULL	NULL	NULL	NEVER	NULL	NO	NO	NULL	YES	char(3)	NULL	NULL
 PREHOOK: query: select * from COLUMN_PRIVILEGES order by GRANTOR, GRANTEE, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME limit 10
 PREHOOK: type: QUERY
 PREHOOK: Input: information_schema@column_privileges

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_3.q.out b/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_3.q.out
index 8da7723..2a03d37 100644
--- a/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_3.q.out
+++ b/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_3.q.out
@@ -126,7 +126,8 @@ STAGE PLANS:
     Tez
 #### A masked pattern was here ####
       Edges:
-        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE), Map 3 (BROADCAST_EDGE)
+        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
+        Reducer 3 <- Map 4 (CUSTOM_SIMPLE_EDGE), Reducer 2 (CUSTOM_SIMPLE_EDGE)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -148,7 +149,7 @@ STAGE PLANS:
                         value expressions: _col0 (type: tinyint), _col1 (type: smallint), _col2 (type: int), _col3 (type: bigint), _col4 (type: float), _col5 (type: double), _col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 (type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
             Execution mode: vectorized, llap
             LLAP IO: all inputs
-        Map 3 
+        Map 4 
             Map Operator Tree:
                 TableScan
                   alias: b
@@ -174,29 +175,39 @@ STAGE PLANS:
                 Limit
                   Number of rows: 1
                   Statistics: Num rows: 1 Data size: 310 Basic stats: COMPLETE Column stats: COMPLETE
-                  Map Join Operator
-                    condition map:
-                         Left Outer Join 0 to 1
-                    filter predicates:
-                      0 {(_col2 < 100)}
-                      1 
-                    keys:
-                      0 _col2 (type: int)
-                      1 UDFToInteger(_col0) (type: int)
-                    outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
-                    input vertices:
-                      1 Map 3
+                  Reduce Output Operator
+                    key expressions: _col2 (type: int)
+                    sort order: +
+                    Map-reduce partition columns: _col2 (type: int)
                     Statistics: Num rows: 1 Data size: 310 Basic stats: COMPLETE Column stats: COMPLETE
-                    Limit
-                      Number of rows: 1
-                      Statistics: Num rows: 1 Data size: 310 Basic stats: COMPLETE Column stats: COMPLETE
-                      File Output Operator
-                        compressed: false
-                        Statistics: Num rows: 1 Data size: 310 Basic stats: COMPLETE Column stats: COMPLETE
-                        table:
-                            input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                            output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                            serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    value expressions: _col0 (type: tinyint), _col1 (type: smallint), _col3 (type: bigint), _col4 (type: float), _col5 (type: double), _col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 (type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
+        Reducer 3 
+            Execution mode: llap
+            Reduce Operator Tree:
+              Map Join Operator
+                condition map:
+                     Left Outer Join 0 to 1
+                filter predicates:
+                  0 {(_col2 < 100)}
+                  1 
+                keys:
+                  0 KEY.reducesinkkey0 (type: int)
+                  1 KEY.reducesinkkey0 (type: int)
+                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
+                input vertices:
+                  1 Map 4
+                Statistics: Num rows: 1 Data size: 310 Basic stats: COMPLETE Column stats: COMPLETE
+                HybridGraceHashJoin: true
+                Limit
+                  Number of rows: 1
+                  Statistics: Num rows: 1 Data size: 310 Basic stats: COMPLETE Column stats: COMPLETE
+                  File Output Operator
+                    compressed: false
+                    Statistics: Num rows: 1 Data size: 310 Basic stats: COMPLETE Column stats: COMPLETE
+                    table:
+                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/tez_join_result_complex.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/tez_join_result_complex.q.out b/ql/src/test/results/clientpositive/llap/tez_join_result_complex.q.out
index eee2ab6..8b5f73f 100644
--- a/ql/src/test/results/clientpositive/llap/tez_join_result_complex.q.out
+++ b/ql/src/test/results/clientpositive/llap/tez_join_result_complex.q.out
@@ -198,6 +198,7 @@ STAGE PLANS:
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                   properties:
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns contact_event_id,ce_create_dt,ce_end_dt,contact_type,cnctevs_cd,contact_mode,cntvnst_stts_cd,total_transfers,ce_notes
                     columns.comments 
@@ -222,6 +223,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns contact_event_id,ce_create_dt,ce_end_dt,contact_type,cnctevs_cd,contact_mode,cntvnst_stts_cd,total_transfers,ce_notes
                       columns.comments 
@@ -308,6 +310,7 @@ STAGE PLANS:
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                   properties:
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns cnctevn_id,svcrqst_id,svcrqst_crt_dts,subject_seq_no,plan_component,cust_segment,cnctyp_cd,cnctmd_cd,cnctevs_cd,svcrtyp_cd,svrstyp_cd,cmpltyp_cd,catsrsn_cd,apealvl_cd,cnstnty_cd,svcrqst_asrqst_ind,svcrqst_rtnorig_in,svcrqst_vwasof_dt,sum_reason_cd,sum_reason,crsr_master_claim_index,svcrqct_cds,svcrqst_lupdt,crsr_lupdt,cntevsds_lupdt,ignore_me,notes
                     columns.comments 
@@ -332,6 +335,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns cnctevn_id,svcrqst_id,svcrqst_crt_dts,subject_seq_no,plan_component,cust_segment,cnctyp_cd,cnctmd_cd,cnctevs_cd,svcrtyp_cd,svrstyp_cd,cmpltyp_cd,catsrsn_cd,apealvl_cd,cnstnty_cd,svcrqst_asrqst_ind,svcrqst_rtnorig_in,svcrqst_vwasof_dt,sum_reason_cd,sum_reason,crsr_master_claim_index,svcrqct_cds,svcrqst_lupdt,crsr_lupdt,cntevsds_lupdt,ignore_me,notes
                       columns.comments 
@@ -1183,6 +1187,7 @@ STAGE PLANS:
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                   properties:
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns contact_event_id,ce_create_dt,ce_end_dt,contact_type,cnctevs_cd,contact_mode,cntvnst_stts_cd,total_transfers,ce_notes
                     columns.comments 
@@ -1207,6 +1212,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns contact_event_id,ce_create_dt,ce_end_dt,contact_type,cnctevs_cd,contact_mode,cntvnst_stts_cd,total_transfers,ce_notes
                       columns.comments 
@@ -1293,6 +1299,7 @@ STAGE PLANS:
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                   properties:
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns cnctevn_id,svcrqst_id,svcrqst_crt_dts,subject_seq_no,plan_component,cust_segment,cnctyp_cd,cnctmd_cd,cnctevs_cd,svcrtyp_cd,svrstyp_cd,cmpltyp_cd,catsrsn_cd,apealvl_cd,cnstnty_cd,svcrqst_asrqst_ind,svcrqst_rtnorig_in,svcrqst_vwasof_dt,sum_reason_cd,sum_reason,crsr_master_claim_index,svcrqct_cds,svcrqst_lupdt,crsr_lupdt,cntevsds_lupdt,ignore_me,notes
                     columns.comments 
@@ -1317,6 +1324,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns cnctevn_id,svcrqst_id,svcrqst_crt_dts,subject_seq_no,plan_component,cust_segment,cnctyp_cd,cnctmd_cd,cnctevs_cd,svcrtyp_cd,svrstyp_cd,cmpltyp_cd,catsrsn_cd,apealvl_cd,cnstnty_cd,svcrqst_asrqst_ind,svcrqst_rtnorig_in,svcrqst_vwasof_dt,sum_reason_cd,sum_reason,crsr_master_claim_index,svcrqct_cds,svcrqst_lupdt,crsr_lupdt,cntevsds_lupdt,ignore_me,notes
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/tez_smb_main.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/tez_smb_main.q.out b/ql/src/test/results/clientpositive/llap/tez_smb_main.q.out
index 1d69a7e..ee56382 100644
--- a/ql/src/test/results/clientpositive/llap/tez_smb_main.q.out
+++ b/ql/src/test/results/clientpositive/llap/tez_smb_main.q.out
@@ -839,7 +839,7 @@ POSTHOOK: Input: default@tab@ds=2008-04-08
 POSTHOOK: Input: default@tab_part
 POSTHOOK: Input: default@tab_part@ds=2008-04-08
 #### A masked pattern was here ####
-19
+9
 PREHOOK: query: explain select count(*) from tab a join tab_part b on a.value = b.value
 PREHOOK: type: QUERY
 POSTHOOK: query: explain select count(*) from tab a join tab_part b on a.value = b.value
@@ -1643,7 +1643,7 @@ POSTHOOK: Input: default@tab@ds=2008-04-08
 POSTHOOK: Input: default@tab_part
 POSTHOOK: Input: default@tab_part@ds=2008-04-08
 #### A masked pattern was here ####
-19
+9
 PREHOOK: query: explain
 select count(*) from (select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key
 UNION  ALL

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/tez_union2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/tez_union2.q.out b/ql/src/test/results/clientpositive/llap/tez_union2.q.out
index 937ff8c..9db0a09 100644
--- a/ql/src/test/results/clientpositive/llap/tez_union2.q.out
+++ b/ql/src/test/results/clientpositive/llap/tez_union2.q.out
@@ -204,621 +204,621 @@ group by key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
-0	val_0
-103	val_103
+0	0
+10	10
 104	104
+104	val_104
 105	105
 105	val_105
-113	113
-116	val_116
-118	118
-12	12
+113	val_113
+118	val_118
+119	119
+12	val_12
 120	val_120
-128	128
-129	val_129
-131	val_131
+129	129
+131	131
+133	val_133
 136	136
 136	val_136
-152	152
-153	153
+145	145
 155	val_155
 157	157
-157	val_157
+158	val_158
 160	val_160
-174	174
+162	162
+162	val_162
+164	164
+165	165
+168	val_168
+17	val_17
+170	val_170
+175	val_175
+177	177
+178	178
+179	179
+18	val_18
 180	val_180
-183	val_183
-190	val_190
-191	val_191
-192	192
-193	val_193
-20	20
-201	201
+186	val_186
+187	187
+189	189
+19	val_19
+190	190
+193	193
+197	val_197
+200	val_200
 202	202
-205	val_205
-207	val_207
-209	209
-213	213
-213	val_213
-216	216
-218	218
-219	219
-221	221
-223	val_223
+208	208
+216	val_216
+218	val_218
+222	val_222
+224	val_224
 228	228
+228	val_228
+230	230
 235	val_235
-238	val_238
+237	237
+237	val_237
 239	val_239
-24	24
-24	val_24
-248	248
-248	val_248
-260	val_260
-262	262
+242	242
+244	val_244
+247	val_247
+256	256
+256	val_256
+260	260
+263	val_263
 265	265
-266	266
-27	27
+273	val_273
 28	val_28
-282	282
+283	val_283
 286	val_286
-289	289
-296	296
-298	val_298
-305	val_305
+292	val_292
+305	305
 306	val_306
-307	val_307
+308	308
 308	val_308
-311	311
-315	val_315
-316	316
 317	317
-317	val_317
-321	321
-321	val_321
-322	322
-33	33
+327	val_327
 33	val_33
-331	val_331
-338	338
-339	339
-34	34
-341	341
-348	348
-356	val_356
-360	val_360
-364	364
+348	val_348
+35	35
+353	val_353
+362	val_362
 366	val_366
-367	val_367
-368	val_368
-37	val_37
-374	374
 377	377
-378	378
-378	val_378
-379	val_379
-382	val_382
-389	389
-389	val_389
+382	382
 392	392
-393	393
-395	val_395
-396	396
-397	397
-400	val_400
-402	val_402
-406	val_406
-407	val_407
-41	41
-414	414
-419	419
-42	val_42
+396	val_396
+397	val_397
+399	399
+401	401
+401	val_401
+403	403
+409	val_409
+411	val_411
+419	val_419
 421	421
-430	val_430
+427	val_427
+43	val_43
+431	431
+432	val_432
 436	val_436
-44	val_44
-448	448
+439	val_439
+443	val_443
+444	444
+446	446
 452	452
-452	val_452
 453	453
+453	val_453
+455	455
+457	457
 460	460
+460	val_460
 462	462
+462	val_462
 463	463
-466	val_466
 467	467
-467	val_467
+47	47
+47	val_47
+470	470
 472	val_472
-478	478
-480	val_480
-481	481
-484	val_484
-485	485
+477	477
+479	479
 485	val_485
-487	val_487
-492	492
+489	489
+491	491
 493	493
 494	494
 495	495
-495	val_495
 496	val_496
-498	val_498
-51	val_51
-57	val_57
-58	58
-58	val_58
-65	val_65
+498	498
+54	val_54
+57	57
+64	val_64
 66	66
-66	val_66
-69	val_69
+70	70
 70	val_70
-78	val_78
 8	val_8
-83	83
-92	92
-92	val_92
-96	96
-96	val_96
+83	val_83
+84	84
+84	val_84
+85	val_85
+90	90
+90	val_90
 97	97
-104	val_104
+0	val_0
+103	val_103
 11	11
-111	111
-111	val_111
-114	114
 114	val_114
-118	val_118
-119	119
-12	val_12
-131	131
-133	val_133
+118	118
+125	val_125
+133	133
 137	137
 138	val_138
-145	145
 146	146
-149	149
-150	150
+146	val_146
+15	15
+150	val_150
+152	152
+152	val_152
 153	val_153
+155	155
+156	156
 156	val_156
+157	val_157
 158	158
-162	162
-162	val_162
-164	164
+160	160
+163	163
+165	val_165
+167	167
 168	168
-168	val_168
-172	172
-174	val_174
+170	170
+172	val_172
 175	175
-176	val_176
-177	177
-178	val_178
+177	val_177
+179	val_179
 18	18
-181	val_181
-186	val_186
-187	187
+181	181
 187	val_187
 191	191
-192	val_192
-194	194
+195	val_195
+196	val_196
 197	197
-197	val_197
-199	val_199
-2	val_2
+199	199
 200	200
-201	val_201
-203	203
-203	val_203
-208	val_208
-214	val_214
-218	val_218
-219	val_219
+201	201
+217	val_217
+219	219
 223	223
 229	229
-230	val_230
-237	val_237
-239	239
-249	val_249
+233	233
+242	val_242
+248	val_248
+249	249
 252	252
-255	255
-256	256
-256	val_256
-257	val_257
-258	258
-26	26
-260	260
-273	273
-274	274
+252	val_252
+257	257
+265	val_265
+266	266
+27	27
+27	val_27
+272	272
+272	val_272
 277	277
-277	val_277
-278	val_278
-28	28
-284	val_284
-285	285
-285	val_285
-286	286
+280	val_280
+291	val_291
 298	298
-305	305
-308	308
+30	30
+305	val_305
 309	309
-310	val_310
+309	val_309
+311	val_311
+315	val_315
+316	316
+317	val_317
+318	318
+322	322
 322	val_322
-325	325
-327	val_327
-331	331
+332	332
+333	333
 333	val_333
 336	336
-336	val_336
-338	val_338
-341	val_341
-342	342
+34	val_34
 344	344
-344	val_344
-348	val_348
-351	val_351
-362	362
-362	val_362
+345	345
+345	val_345
+35	val_35
+356	val_356
 364	val_364
-366	366
-374	val_374
-379	379
-382	382
-384	384
-392	val_392
-397	val_397
-399	399
+367	367
+368	368
+368	val_368
+369	val_369
+37	val_37
+373	val_373
+377	val_377
+378	378
 4	val_4
-403	val_403
+402	val_402
 404	val_404
-406	406
-413	413
-419	val_419
-421	val_421
-424	424
-427	val_427
-429	429
-429	val_429
-43	43
-436	436
+41	41
+411	411
+413	val_413
+417	417
+419	419
+42	val_42
+427	427
+430	val_430
+431	val_431
+432	432
 437	437
-437	val_437
-438	438
-438	val_438
-439	val_439
-444	444
-446	446
+443	443
+444	val_444
+448	448
+449	449
+449	val_449
+452	val_452
+454	454
 454	val_454
-455	455
-455	val_455
+457	val_457
 459	459
-460	val_460
 463	val_463
-468	468
+466	466
+466	val_466
 470	val_470
-477	477
-478	val_478
-479	479
-479	val_479
-480	480
+472	472
+475	val_475
+481	val_481
 482	482
-483	483
+487	487
 489	val_489
 491	val_491
-492	val_492
+492	492
 496	496
-498	498
-53	val_53
-67	67
-67	val_67
-72	72
-74	74
-82	val_82
-85	85
+57	val_57
+65	val_65
+66	val_66
+69	69
+74	val_74
+76	76
+76	val_76
+77	77
+78	val_78
+8	8
+80	80
 9	9
-90	val_90
-95	95
-97	val_97
-10	10
-10	val_10
+9	val_9
+92	val_92
+95	val_95
+100	val_100
+103	103
+113	113
+114	114
 116	116
-120	120
-125	val_125
+119	val_119
+125	125
 126	126
-134	val_134
-143	val_143
+128	128
+128	val_128
+129	val_129
 145	val_145
-149	val_149
-15	15
-150	val_150
-155	155
-158	val_158
-163	val_163
-164	val_164
-166	val_166
-169	169
-17	val_17
-170	val_170
-172	val_172
+149	149
+153	153
+166	166
+167	val_167
+172	172
+174	174
+174	val_174
 176	176
-178	178
-189	189
-189	val_189
+178	val_178
+180	180
+181	val_181
+183	183
+186	186
 19	19
-19	val_19
-193	193
-195	val_195
-196	val_196
-199	199
-2	2
+192	192
+193	val_193
+194	194
+195	195
+196	196
+199	val_199
+20	20
 20	val_20
-205	205
-208	208
-209	val_209
-216	val_216
+201	val_201
+209	209
+213	213
+213	val_213
+214	val_214
+216	216
 217	217
-217	val_217
-222	222
-224	val_224
-226	226
-228	val_228
-229	val_229
-230	230
+218	218
+219	val_219
+221	val_221
+223	val_223
+224	224
+226	val_226
 233	val_233
-237	237
+238	238
+239	239
+24	24
 241	241
 241	val_241
-242	242
 244	244
-244	val_244
 247	247
-247	val_247
-255	val_255
-258	val_258
-26	val_26
-263	263
-263	val_263
-265	val_265
-266	val_266
-272	val_272
-273	val_273
-274	val_274
+248	248
+249	val_249
+26	26
+260	val_260
+262	262
+262	val_262
 275	275
-278	278
+277	val_277
+28	28
 280	280
-281	281
 281	val_281
-284	284
-291	val_291
-296	val_296
-30	30
-30	val_30
+282	282
+283	283
+287	val_287
+288	288
+288	val_288
+298	val_298
 302	val_302
-306	306
-309	val_309
+307	307
 310	310
-316	val_316
-318	318
-318	val_318
-325	val_325
-332	332
-332	val_332
-333	333
-335	val_335
-339	val_339
-342	val_342
-345	val_345
+310	val_310
+311	311
+315	315
+323	323
+323	val_323
+335	335
+336	val_336
+338	338
+34	34
+341	341
+341	val_341
+342	342
+344	val_344
+348	348
 351	351
-353	353
-353	val_353
-360	360
-368	368
-369	369
-369	val_369
-373	val_373
-375	375
+351	val_351
+356	356
+362	362
+364	364
+365	365
+374	374
 375	val_375
-377	val_377
+382	val_382
 384	val_384
 386	386
-386	val_386
-394	val_394
-395	395
-396	val_396
+389	389
+393	393
+393	val_393
+394	394
+395	val_395
 399	val_399
 4	4
-401	401
-401	val_401
-404	404
-407	407
+400	400
+403	val_403
+406	406
+406	val_406
 409	409
-41	val_41
-411	411
-413	val_413
-414	val_414
-417	417
-418	418
-431	val_431
-432	432
-439	439
-443	443
-446	val_446
-448	val_448
-449	val_449
+414	414
+418	val_418
+424	424
+435	val_435
+455	val_455
 458	458
 459	val_459
-462	val_462
-468	val_468
-47	47
-47	val_47
-470	470
-472	472
-475	475
+468	468
+469	469
+477	val_477
+478	478
+478	val_478
+479	val_479
+481	481
 482	val_482
-487	487
-490	val_490
+484	484
+490	490
 493	val_493
 494	val_494
+495	val_495
 497	val_497
 5	val_5
 51	51
 53	53
 54	54
-54	val_54
-57	57
+58	58
+58	val_58
 65	65
-70	70
-74	val_74
-77	val_77
-8	8
-80	val_80
-82	82
-84	84
-84	val_84
-85	val_85
-86	86
+67	val_67
+72	72
+74	74
+77	val_77
+80	val_80
+85	85
+86	val_86
 87	87
-87	val_87
-9	val_9
-90	90
-95	val_95
-0	0
+92	92
+97	val_97
+98	98
+98	val_98
+10	val_10
 100	100
-100	val_100
-103	103
 11	val_11
-113	val_113
-119	val_119
-125	125
+111	111
+111	val_111
+116	val_116
+12	12
+120	120
 126	val_126
-128	val_128
-129	129
-133	133
+131	val_131
 134	134
+134	val_134
 137	val_137
 138	138
 143	143
-146	val_146
+143	val_143
+149	val_149
 15	val_15
-152	val_152
-156	156
-160	160
-163	163
-165	165
-165	val_165
-166	166
-167	167
-167	val_167
+150	150
+163	val_163
+164	val_164
+166	val_166
+169	169
 169	val_169
 17	17
-170	170
-175	val_175
-177	val_177
-179	179
-179	val_179
-18	val_18
-180	180
-181	181
-183	183
-186	186
-190	190
+176	val_176
+183	val_183
+189	val_189
+190	val_190
+191	val_191
+192	val_192
 194	val_194
-195	195
-196	196
-200	val_200
+2	2
+2	val_2
 202	val_202
+203	203
+203	val_203
+205	205
+205	val_205
 207	207
+207	val_207
+208	val_208
+209	val_209
 214	214
-221	val_221
-222	val_222
-224	224
-226	val_226
-233	233
+221	221
+222	222
+226	226
+229	val_229
+230	val_230
 235	235
-238	238
-242	val_242
-249	249
-252	val_252
-257	257
-262	val_262
-27	val_27
-272	272
+238	val_238
+24	val_24
+255	255
+255	val_255
+257	val_257
+258	258
+258	val_258
+26	val_26
+263	263
+266	val_266
+273	273
+274	274
+274	val_274
 275	val_275
-280	val_280
+278	278
+278	val_278
+281	281
 282	val_282
-283	283
-283	val_283
+284	284
+284	val_284
+285	285
+285	val_285
+286	286
 287	287
-287	val_287
-288	288
-288	val_288
+289	289
 289	val_289
 291	291
 292	292
-292	val_292
+296	296
+296	val_296
+30	val_30
 302	302
-307	307
-311	val_311
-315	315
-323	323
-323	val_323
+306	306
+307	val_307
+316	val_316
+318	val_318
+321	321
+321	val_321
+325	325
+325	val_325
 327	327
-335	335
-34	val_34
-345	345
-35	35
-35	val_35
-356	356
-365	365
+33	33
+331	331
+331	val_331
+332	val_332
+335	val_335
+338	val_338
+339	339
+339	val_339
+342	val_342
+353	353
+360	360
+360	val_360
 365	val_365
-367	367
+366	366
+367	val_367
+369	369
 37	37
 373	373
-393	val_393
-394	394
-400	400
+374	val_374
+375	375
+378	val_378
+379	379
+379	val_379
+384	384
+386	val_386
+389	val_389
+392	val_392
+394	val_394
+395	395
+396	396
+397	397
+400	val_400
 402	402
-403	403
-409	val_409
-411	val_411
+404	404
+407	407
+407	val_407
+41	val_41
+413	413
+414	val_414
 417	val_417
-418	val_418
+418	418
 42	42
+421	val_421
 424	val_424
-427	427
-43	val_43
+429	429
+429	val_429
+43	43
 430	430
-431	431
-432	val_432
 435	435
-435	val_435
+436	436
+437	val_437
+438	438
+438	val_438
+439	439
 44	44
-443	val_443
-444	val_444
-449	449
-453	val_453
-454	454
-457	457
-457	val_457
+44	val_44
+446	val_446
+448	val_448
 458	val_458
-466	466
-469	469
+467	val_467
+468	val_468
 469	val_469
-475	val_475
-477	val_477
-481	val_481
+475	475
+480	480
+480	val_480
+483	483
 483	val_483
-484	484
-489	489
-490	490
-491	491
+484	val_484
+485	485
+487	val_487
+490	val_490
+492	val_492
 497	497
+498	val_498
 5	5
+51	val_51
+53	val_53
 64	64
-64	val_64
-69	69
+67	67
+69	val_69
 72	val_72
-76	76
-76	val_76
-77	77
 78	78
-80	80
-83	val_83
-86	val_86
-98	98
-98	val_98
+82	82
+82	val_82
+83	83
+86	86
+87	val_87
+95	95
+96	96
+96	val_96

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out b/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out
index 2fed113..55e1ccb 100644
--- a/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out
@@ -404,10 +404,10 @@ order by c1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc
 #### A masked pattern was here ####
--8915	1
+-13036	1
 -3799	1
 10782	1
--13036	1
+-8915	1
 NULL	6
 PREHOOK: query: explain
 select
@@ -824,8 +824,8 @@ order by c1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc
 #### A masked pattern was here ####
+-13036	1
 -8915	1
 -3799	1
 10782	1
--13036	1
 NULL	6

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/udaf_collect_set_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/udaf_collect_set_2.q.out b/ql/src/test/results/clientpositive/llap/udaf_collect_set_2.q.out
index 3b6e2bd..4d6a684 100644
--- a/ql/src/test/results/clientpositive/llap/udaf_collect_set_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/udaf_collect_set_2.q.out
@@ -103,8 +103,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@orders
 #### A masked pattern was here ####
 1	[{"name":"Chris","date":"2013-06-21","amount":21.45},{"name":"Chris","date":"2014-10-11","amount":29.36}]
-2	[{"name":"John","date":"2013-08-10","amount":126.57},{"name":"John","date":"2014-06-25","amount":3.65},{"name":"John","date":"2015-01-15","amount":27.45}]
 3	[{"name":"Martin","date":"2014-05-11","amount":30.5},{"name":"Martin","date":"2014-12-12","amount":210.03}]
+2	[{"name":"John","date":"2013-08-10","amount":126.57},{"name":"John","date":"2014-06-25","amount":3.65},{"name":"John","date":"2015-01-15","amount":27.45}]
 PREHOOK: query: SELECT c.id, sort_array(collect_list(named_struct("name", c.name, "date", o.d, "amount", o.amount)))
 FROM customers c
 INNER JOIN orders o
@@ -122,8 +122,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@orders
 #### A masked pattern was here ####
 1	[{"name":"Chris","date":"2013-06-21","amount":21.45},{"name":"Chris","date":"2013-06-21","amount":21.45},{"name":"Chris","date":"2014-10-11","amount":29.36}]
-2	[{"name":"John","date":"2013-08-10","amount":126.57},{"name":"John","date":"2014-06-25","amount":3.65},{"name":"John","date":"2015-01-15","amount":27.45}]
 3	[{"name":"Martin","date":"2014-05-11","amount":30.5},{"name":"Martin","date":"2014-12-12","amount":210.03}]
+2	[{"name":"John","date":"2013-08-10","amount":126.57},{"name":"John","date":"2014-06-25","amount":3.65},{"name":"John","date":"2015-01-15","amount":27.45}]
 PREHOOK: query: SELECT c.id, sort_array(collect_set(named_struct("name", c.name, "date", o.d, "amount", cast(o.amount as decimal(10,1)))))
 FROM customers c
 INNER JOIN orders o
@@ -141,8 +141,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@orders
 #### A masked pattern was here ####
 1	[{"name":"Chris","date":"2013-06-21","amount":21.5},{"name":"Chris","date":"2014-10-11","amount":29.4}]
-2	[{"name":"John","date":"2013-08-10","amount":126.6},{"name":"John","date":"2014-06-25","amount":3.7},{"name":"John","date":"2015-01-15","amount":27.5}]
 3	[{"name":"Martin","date":"2014-05-11","amount":30.5},{"name":"Martin","date":"2014-12-12","amount":210}]
+2	[{"name":"John","date":"2013-08-10","amount":126.6},{"name":"John","date":"2014-06-25","amount":3.7},{"name":"John","date":"2015-01-15","amount":27.5}]
 PREHOOK: query: SELECT c.id, sort_array(collect_list(named_struct("name", c.name, "date", o.d, "amount", cast(o.amount as decimal(10,1)))))
 FROM customers c
 INNER JOIN orders o
@@ -160,8 +160,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@orders
 #### A masked pattern was here ####
 1	[{"name":"Chris","date":"2013-06-21","amount":21.5},{"name":"Chris","date":"2013-06-21","amount":21.5},{"name":"Chris","date":"2014-10-11","amount":29.4}]
-2	[{"name":"John","date":"2013-08-10","amount":126.6},{"name":"John","date":"2014-06-25","amount":3.7},{"name":"John","date":"2015-01-15","amount":27.5}]
 3	[{"name":"Martin","date":"2014-05-11","amount":30.5},{"name":"Martin","date":"2014-12-12","amount":210}]
+2	[{"name":"John","date":"2013-08-10","amount":126.6},{"name":"John","date":"2014-06-25","amount":3.7},{"name":"John","date":"2015-01-15","amount":27.5}]
 PREHOOK: query: SELECT c.id, sort_array(collect_set(struct(c.name, o.d, o.amount)))
 FROM customers c
 INNER JOIN orders o
@@ -179,8 +179,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@orders
 #### A masked pattern was here ####
 1	[{"col1":"Chris","col2":"2013-06-21","col3":21.45},{"col1":"Chris","col2":"2014-10-11","col3":29.36}]
-2	[{"col1":"John","col2":"2013-08-10","col3":126.57},{"col1":"John","col2":"2014-06-25","col3":3.65},{"col1":"John","col2":"2015-01-15","col3":27.45}]
 3	[{"col1":"Martin","col2":"2014-05-11","col3":30.5},{"col1":"Martin","col2":"2014-12-12","col3":210.03}]
+2	[{"col1":"John","col2":"2013-08-10","col3":126.57},{"col1":"John","col2":"2014-06-25","col3":3.65},{"col1":"John","col2":"2015-01-15","col3":27.45}]
 PREHOOK: query: SELECT c.id, sort_array(collect_list(struct(c.name, o.d, o.amount)))
 FROM customers c
 INNER JOIN orders o
@@ -198,8 +198,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@orders
 #### A masked pattern was here ####
 1	[{"col1":"Chris","col2":"2013-06-21","col3":21.45},{"col1":"Chris","col2":"2013-06-21","col3":21.45},{"col1":"Chris","col2":"2014-10-11","col3":29.36}]
-2	[{"col1":"John","col2":"2013-08-10","col3":126.57},{"col1":"John","col2":"2014-06-25","col3":3.65},{"col1":"John","col2":"2015-01-15","col3":27.45}]
 3	[{"col1":"Martin","col2":"2014-05-11","col3":30.5},{"col1":"Martin","col2":"2014-12-12","col3":210.03}]
+2	[{"col1":"John","col2":"2013-08-10","col3":126.57},{"col1":"John","col2":"2014-06-25","col3":3.65},{"col1":"John","col2":"2015-01-15","col3":27.45}]
 PREHOOK: query: SELECT c.id, sort_array(collect_set(named_struct("name", c.name, "date", o.d, "sub", o.sub)))
 FROM customers c
 INNER JOIN nested_orders o
@@ -217,8 +217,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[{"name":"Chris","date":"2013-06-21","sub":{"\"juice\"":21.45,"\"bread\"":15.2}},{"name":"Chris","date":"2014-10-11","sub":{"\"rice\"":29.36,"\"grape\"":1200.5}}]
-2	[{"name":"John","date":"2013-08-10","sub":{"\"yogurt\"":126.57,"\"beef\"":210.57}},{"name":"John","date":"2014-06-25","sub":{"\"chocolate\"":3.65,"\"water\"":420.36}},{"name":"John","date":"2015-01-15","sub":{"\"milk\"":27.45}}]
 3	[{"name":"Martin","date":"2014-05-11","sub":{"\"apple\"":30.5,"\"orange\"":41.35}},{"name":"Martin","date":"2014-12-12","sub":{"\"icecream\"":210.03,"\"banana\"":100.56,"\"coffee":500.0}}]
+2	[{"name":"John","date":"2013-08-10","sub":{"\"yogurt\"":126.57,"\"beef\"":210.57}},{"name":"John","date":"2014-06-25","sub":{"\"chocolate\"":3.65,"\"water\"":420.36}},{"name":"John","date":"2015-01-15","sub":{"\"milk\"":27.45}}]
 PREHOOK: query: SELECT c.id, sort_array(collect_list(named_struct("name", c.name, "date", o.d, "sub", o.sub)))
 FROM customers c
 INNER JOIN nested_orders o
@@ -236,8 +236,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[{"name":"Chris","date":"2013-06-21","sub":{"\"juice\"":21.45,"\"bread\"":15.2}},{"name":"Chris","date":"2013-06-21","sub":{"\"juice\"":21.45,"\"bread\"":15.2}},{"name":"Chris","date":"2014-10-11","sub":{"\"rice\"":29.36,"\"grape\"":1200.5}}]
-2	[{"name":"John","date":"2013-08-10","sub":{"\"yogurt\"":126.57,"\"beef\"":210.57}},{"name":"John","date":"2014-06-25","sub":{"\"chocolate\"":3.65,"\"water\"":420.36}},{"name":"John","date":"2015-01-15","sub":{"\"milk\"":27.45}}]
 3	[{"name":"Martin","date":"2014-05-11","sub":{"\"apple\"":30.5,"\"orange\"":41.35}},{"name":"Martin","date":"2014-12-12","sub":{"\"icecream\"":210.03,"\"banana\"":100.56,"\"coffee":500.0}}]
+2	[{"name":"John","date":"2013-08-10","sub":{"\"yogurt\"":126.57,"\"beef\"":210.57}},{"name":"John","date":"2014-06-25","sub":{"\"chocolate\"":3.65,"\"water\"":420.36}},{"name":"John","date":"2015-01-15","sub":{"\"milk\"":27.45}}]
 PREHOOK: query: SELECT c.id, sort_array(collect_set(struct(c.name, o.d, o.sub)))
 FROM customers c
 INNER JOIN nested_orders o
@@ -255,8 +255,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[{"col1":"Chris","col2":"2013-06-21","col3":{"\"juice\"":21.45,"\"bread\"":15.2}},{"col1":"Chris","col2":"2014-10-11","col3":{"\"rice\"":29.36,"\"grape\"":1200.5}}]
-2	[{"col1":"John","col2":"2013-08-10","col3":{"\"yogurt\"":126.57,"\"beef\"":210.57}},{"col1":"John","col2":"2014-06-25","col3":{"\"chocolate\"":3.65,"\"water\"":420.36}},{"col1":"John","col2":"2015-01-15","col3":{"\"milk\"":27.45}}]
 3	[{"col1":"Martin","col2":"2014-05-11","col3":{"\"apple\"":30.5,"\"orange\"":41.35}},{"col1":"Martin","col2":"2014-12-12","col3":{"\"icecream\"":210.03,"\"banana\"":100.56,"\"coffee":500.0}}]
+2	[{"col1":"John","col2":"2013-08-10","col3":{"\"yogurt\"":126.57,"\"beef\"":210.57}},{"col1":"John","col2":"2014-06-25","col3":{"\"chocolate\"":3.65,"\"water\"":420.36}},{"col1":"John","col2":"2015-01-15","col3":{"\"milk\"":27.45}}]
 PREHOOK: query: SELECT c.id, sort_array(collect_list(struct(c.name, o.d, o.sub)))
 FROM customers c
 INNER JOIN nested_orders o
@@ -274,8 +274,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[{"col1":"Chris","col2":"2013-06-21","col3":{"\"juice\"":21.45,"\"bread\"":15.2}},{"col1":"Chris","col2":"2013-06-21","col3":{"\"juice\"":21.45,"\"bread\"":15.2}},{"col1":"Chris","col2":"2014-10-11","col3":{"\"rice\"":29.36,"\"grape\"":1200.5}}]
-2	[{"col1":"John","col2":"2013-08-10","col3":{"\"yogurt\"":126.57,"\"beef\"":210.57}},{"col1":"John","col2":"2014-06-25","col3":{"\"chocolate\"":3.65,"\"water\"":420.36}},{"col1":"John","col2":"2015-01-15","col3":{"\"milk\"":27.45}}]
 3	[{"col1":"Martin","col2":"2014-05-11","col3":{"\"apple\"":30.5,"\"orange\"":41.35}},{"col1":"Martin","col2":"2014-12-12","col3":{"\"icecream\"":210.03,"\"banana\"":100.56,"\"coffee":500.0}}]
+2	[{"col1":"John","col2":"2013-08-10","col3":{"\"yogurt\"":126.57,"\"beef\"":210.57}},{"col1":"John","col2":"2014-06-25","col3":{"\"chocolate\"":3.65,"\"water\"":420.36}},{"col1":"John","col2":"2015-01-15","col3":{"\"milk\"":27.45}}]
 PREHOOK: query: SELECT c.id, sort_array(collect_set(named_struct("name", c.name, "date", o.d, "sub", map_values(o.sub))))
 FROM customers c
 INNER JOIN nested_orders o
@@ -293,8 +293,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[{"name":"Chris","date":"2013-06-21","sub":[21.45,15.2]},{"name":"Chris","date":"2014-10-11","sub":[29.36,1200.5]}]
-2	[{"name":"John","date":"2013-08-10","sub":[126.57,210.57]},{"name":"John","date":"2014-06-25","sub":[3.65,420.36]},{"name":"John","date":"2015-01-15","sub":[27.45]}]
 3	[{"name":"Martin","date":"2014-05-11","sub":[30.5,41.35]},{"name":"Martin","date":"2014-12-12","sub":[210.03,100.56,500.0]}]
+2	[{"name":"John","date":"2013-08-10","sub":[126.57,210.57]},{"name":"John","date":"2014-06-25","sub":[3.65,420.36]},{"name":"John","date":"2015-01-15","sub":[27.45]}]
 PREHOOK: query: SELECT c.id, sort_array(collect_list(named_struct("name", c.name, "date", o.d, "sub", map_values(o.sub))))
 FROM customers c
 INNER JOIN nested_orders o
@@ -312,8 +312,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[{"name":"Chris","date":"2013-06-21","sub":[21.45,15.2]},{"name":"Chris","date":"2013-06-21","sub":[21.45,15.2]},{"name":"Chris","date":"2014-10-11","sub":[29.36,1200.5]}]
-2	[{"name":"John","date":"2013-08-10","sub":[126.57,210.57]},{"name":"John","date":"2014-06-25","sub":[3.65,420.36]},{"name":"John","date":"2015-01-15","sub":[27.45]}]
 3	[{"name":"Martin","date":"2014-05-11","sub":[30.5,41.35]},{"name":"Martin","date":"2014-12-12","sub":[210.03,100.56,500.0]}]
+2	[{"name":"John","date":"2013-08-10","sub":[126.57,210.57]},{"name":"John","date":"2014-06-25","sub":[3.65,420.36]},{"name":"John","date":"2015-01-15","sub":[27.45]}]
 PREHOOK: query: SELECT c.id, sort_array(collect_set(struct(c.name, o.d, map_values(o.sub))))
 FROM customers c
 INNER JOIN nested_orders o
@@ -331,8 +331,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[{"col1":"Chris","col2":"2013-06-21","col3":[21.45,15.2]},{"col1":"Chris","col2":"2014-10-11","col3":[29.36,1200.5]}]
-2	[{"col1":"John","col2":"2013-08-10","col3":[126.57,210.57]},{"col1":"John","col2":"2014-06-25","col3":[3.65,420.36]},{"col1":"John","col2":"2015-01-15","col3":[27.45]}]
 3	[{"col1":"Martin","col2":"2014-05-11","col3":[30.5,41.35]},{"col1":"Martin","col2":"2014-12-12","col3":[210.03,100.56,500.0]}]
+2	[{"col1":"John","col2":"2013-08-10","col3":[126.57,210.57]},{"col1":"John","col2":"2014-06-25","col3":[3.65,420.36]},{"col1":"John","col2":"2015-01-15","col3":[27.45]}]
 PREHOOK: query: SELECT c.id, sort_array(collect_list(struct(c.name, o.d, map_values(o.sub))))
 FROM customers c
 INNER JOIN nested_orders o
@@ -350,8 +350,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[{"col1":"Chris","col2":"2013-06-21","col3":[21.45,15.2]},{"col1":"Chris","col2":"2013-06-21","col3":[21.45,15.2]},{"col1":"Chris","col2":"2014-10-11","col3":[29.36,1200.5]}]
-2	[{"col1":"John","col2":"2013-08-10","col3":[126.57,210.57]},{"col1":"John","col2":"2014-06-25","col3":[3.65,420.36]},{"col1":"John","col2":"2015-01-15","col3":[27.45]}]
 3	[{"col1":"Martin","col2":"2014-05-11","col3":[30.5,41.35]},{"col1":"Martin","col2":"2014-12-12","col3":[210.03,100.56,500.0]}]
+2	[{"col1":"John","col2":"2013-08-10","col3":[126.57,210.57]},{"col1":"John","col2":"2014-06-25","col3":[3.65,420.36]},{"col1":"John","col2":"2015-01-15","col3":[27.45]}]
 PREHOOK: query: SELECT c.id, sort_array(collect_set(array(o.amount)))
 FROM customers c
 INNER JOIN orders o
@@ -369,8 +369,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@orders
 #### A masked pattern was here ####
 1	[[21.45],[29.36]]
-2	[[3.65],[27.45],[126.57]]
 3	[[30.5],[210.03]]
+2	[[3.65],[27.45],[126.57]]
 PREHOOK: query: SELECT c.id, sort_array(collect_list(array(o.amount)))
 FROM customers c
 INNER JOIN orders o
@@ -388,8 +388,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@orders
 #### A masked pattern was here ####
 1	[[21.45],[21.45],[29.36]]
-2	[[3.65],[27.45],[126.57]]
 3	[[30.5],[210.03]]
+2	[[3.65],[27.45],[126.57]]
 PREHOOK: query: SELECT c.id, sort_array(collect_set(array(cast(o.amount as decimal(10,1)))))
 FROM customers c
 INNER JOIN orders o
@@ -407,8 +407,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@orders
 #### A masked pattern was here ####
 1	[[21.5],[29.4]]
-2	[[3.7],[27.5],[126.6]]
 3	[[30.5],[210]]
+2	[[3.7],[27.5],[126.6]]
 PREHOOK: query: SELECT c.id, sort_array(collect_list(array(cast(o.amount as decimal(10,1)))))
 FROM customers c
 INNER JOIN orders o
@@ -426,8 +426,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@orders
 #### A masked pattern was here ####
 1	[[21.5],[21.5],[29.4]]
-2	[[3.7],[27.5],[126.6]]
 3	[[30.5],[210]]
+2	[[3.7],[27.5],[126.6]]
 PREHOOK: query: SELECT c.id, sort_array(collect_set(array(o.sub)))
 FROM customers c
 INNER JOIN nested_orders o
@@ -445,8 +445,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[[{"\"juice\"":21.45,"\"bread\"":15.2}],[{"\"rice\"":29.36,"\"grape\"":1200.5}]]
-2	[[{"\"milk\"":27.45}],[{"\"yogurt\"":126.57,"\"beef\"":210.57}],[{"\"chocolate\"":3.65,"\"water\"":420.36}]]
 3	[[{"\"apple\"":30.5,"\"orange\"":41.35}],[{"\"icecream\"":210.03,"\"banana\"":100.56,"\"coffee":500.0}]]
+2	[[{"\"milk\"":27.45}],[{"\"yogurt\"":126.57,"\"beef\"":210.57}],[{"\"chocolate\"":3.65,"\"water\"":420.36}]]
 PREHOOK: query: SELECT c.id, sort_array(collect_list(array(o.sub)))
 FROM customers c
 INNER JOIN nested_orders o
@@ -464,8 +464,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[[{"\"juice\"":21.45,"\"bread\"":15.2}],[{"\"juice\"":21.45,"\"bread\"":15.2}],[{"\"rice\"":29.36,"\"grape\"":1200.5}]]
-2	[[{"\"milk\"":27.45}],[{"\"yogurt\"":126.57,"\"beef\"":210.57}],[{"\"chocolate\"":3.65,"\"water\"":420.36}]]
 3	[[{"\"apple\"":30.5,"\"orange\"":41.35}],[{"\"icecream\"":210.03,"\"banana\"":100.56,"\"coffee":500.0}]]
+2	[[{"\"milk\"":27.45}],[{"\"yogurt\"":126.57,"\"beef\"":210.57}],[{"\"chocolate\"":3.65,"\"water\"":420.36}]]
 PREHOOK: query: SELECT c.id, sort_array(collect_set(array(map_values(o.sub))))
 FROM customers c
 INNER JOIN nested_orders o
@@ -483,8 +483,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[[[21.45,15.2]],[[29.36,1200.5]]]
-2	[[[3.65,420.36]],[[27.45]],[[126.57,210.57]]]
 3	[[[30.5,41.35]],[[210.03,100.56,500.0]]]
+2	[[[3.65,420.36]],[[27.45]],[[126.57,210.57]]]
 PREHOOK: query: SELECT c.id, sort_array(collect_list(array(map_values(o.sub))))
 FROM customers c
 INNER JOIN nested_orders o
@@ -502,8 +502,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[[[21.45,15.2]],[[21.45,15.2]],[[29.36,1200.5]]]
-2	[[[3.65,420.36]],[[27.45]],[[126.57,210.57]]]
 3	[[[30.5,41.35]],[[210.03,100.56,500.0]]]
+2	[[[3.65,420.36]],[[27.45]],[[126.57,210.57]]]
 PREHOOK: query: SELECT c.id, sort_array(collect_set(map("amount", o.amount)))
 FROM customers c
 INNER JOIN orders o
@@ -521,8 +521,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@orders
 #### A masked pattern was here ####
 1	[{"amount":21.45},{"amount":29.36}]
-2	[{"amount":3.65},{"amount":27.45},{"amount":126.57}]
 3	[{"amount":30.5},{"amount":210.03}]
+2	[{"amount":3.65},{"amount":27.45},{"amount":126.57}]
 PREHOOK: query: SELECT c.id, sort_array(collect_list(map("amount", o.amount)))
 FROM customers c
 INNER JOIN orders o
@@ -540,8 +540,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@orders
 #### A masked pattern was here ####
 1	[{"amount":21.45},{"amount":21.45},{"amount":29.36}]
-2	[{"amount":3.65},{"amount":27.45},{"amount":126.57}]
 3	[{"amount":30.5},{"amount":210.03}]
+2	[{"amount":3.65},{"amount":27.45},{"amount":126.57}]
 PREHOOK: query: SELECT c.id, sort_array(collect_set(map("amount", cast(o.amount as decimal(10,1)))))
 FROM customers c
 INNER JOIN orders o
@@ -559,8 +559,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@orders
 #### A masked pattern was here ####
 1	[{"amount":21.5},{"amount":29.4}]
-2	[{"amount":3.7},{"amount":27.5},{"amount":126.6}]
 3	[{"amount":30.5},{"amount":210}]
+2	[{"amount":3.7},{"amount":27.5},{"amount":126.6}]
 PREHOOK: query: SELECT c.id, sort_array(collect_list(map("amount", cast(o.amount as decimal(10,1)))))
 FROM customers c
 INNER JOIN orders o
@@ -578,8 +578,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@orders
 #### A masked pattern was here ####
 1	[{"amount":21.5},{"amount":21.5},{"amount":29.4}]
-2	[{"amount":3.7},{"amount":27.5},{"amount":126.6}]
 3	[{"amount":30.5},{"amount":210}]
+2	[{"amount":3.7},{"amount":27.5},{"amount":126.6}]
 PREHOOK: query: SELECT c.id, sort_array(collect_set(map("sub", o.sub)))
 FROM customers c
 INNER JOIN nested_orders o
@@ -597,8 +597,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[{"sub":{"\"juice\"":21.45,"\"bread\"":15.2}},{"sub":{"\"rice\"":29.36,"\"grape\"":1200.5}}]
-2	[{"sub":{"\"milk\"":27.45}},{"sub":{"\"yogurt\"":126.57,"\"beef\"":210.57}},{"sub":{"\"chocolate\"":3.65,"\"water\"":420.36}}]
 3	[{"sub":{"\"apple\"":30.5,"\"orange\"":41.35}},{"sub":{"\"icecream\"":210.03,"\"banana\"":100.56,"\"coffee":500.0}}]
+2	[{"sub":{"\"milk\"":27.45}},{"sub":{"\"yogurt\"":126.57,"\"beef\"":210.57}},{"sub":{"\"chocolate\"":3.65,"\"water\"":420.36}}]
 PREHOOK: query: SELECT c.id, sort_array(collect_list(map("sub", o.sub)))
 FROM customers c
 INNER JOIN nested_orders o
@@ -616,8 +616,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[{"sub":{"\"juice\"":21.45,"\"bread\"":15.2}},{"sub":{"\"juice\"":21.45,"\"bread\"":15.2}},{"sub":{"\"rice\"":29.36,"\"grape\"":1200.5}}]
-2	[{"sub":{"\"milk\"":27.45}},{"sub":{"\"yogurt\"":126.57,"\"beef\"":210.57}},{"sub":{"\"chocolate\"":3.65,"\"water\"":420.36}}]
 3	[{"sub":{"\"apple\"":30.5,"\"orange\"":41.35}},{"sub":{"\"icecream\"":210.03,"\"banana\"":100.56,"\"coffee":500.0}}]
+2	[{"sub":{"\"milk\"":27.45}},{"sub":{"\"yogurt\"":126.57,"\"beef\"":210.57}},{"sub":{"\"chocolate\"":3.65,"\"water\"":420.36}}]
 PREHOOK: query: SELECT c.id, sort_array(collect_set(map("sub", map_values(o.sub))))
 FROM customers c
 INNER JOIN nested_orders o
@@ -635,8 +635,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[{"sub":[21.45,15.2]},{"sub":[29.36,1200.5]}]
-2	[{"sub":[3.65,420.36]},{"sub":[27.45]},{"sub":[126.57,210.57]}]
 3	[{"sub":[30.5,41.35]},{"sub":[210.03,100.56,500.0]}]
+2	[{"sub":[3.65,420.36]},{"sub":[27.45]},{"sub":[126.57,210.57]}]
 PREHOOK: query: SELECT c.id, sort_array(collect_list(map("sub", map_values(o.sub))))
 FROM customers c
 INNER JOIN nested_orders o
@@ -654,8 +654,8 @@ POSTHOOK: Input: default@customers
 POSTHOOK: Input: default@nested_orders
 #### A masked pattern was here ####
 1	[{"sub":[21.45,15.2]},{"sub":[21.45,15.2]},{"sub":[29.36,1200.5]}]
-2	[{"sub":[3.65,420.36]},{"sub":[27.45]},{"sub":[126.57,210.57]}]
 3	[{"sub":[30.5,41.35]},{"sub":[210.03,100.56,500.0]}]
+2	[{"sub":[3.65,420.36]},{"sub":[27.45]},{"sub":[126.57,210.57]}]
 PREHOOK: query: DROP TABLE customer
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE customer


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/sample7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/sample7.q.out b/ql/src/test/results/clientpositive/sample7.q.out
index f24f297..07b6f0e 100644
--- a/ql/src/test/results/clientpositive/sample7.q.out
+++ b/ql/src/test/results/clientpositive/sample7.q.out
@@ -55,6 +55,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 
@@ -102,6 +103,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -124,6 +126,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -193,6 +196,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 
@@ -236,6 +240,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 
@@ -266,6 +271,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 
@@ -287,6 +293,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 
@@ -323,6 +330,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 
@@ -353,6 +361,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 
@@ -374,6 +383,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 
@@ -424,107 +434,48 @@ order by key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@dest1
 #### A masked pattern was here ####
-104	val_104
-104	val_104
-104	val_105
-104	val_105
-104	val_105
+110	val_111
 116	val_116
 116	val_117
-120	val_120
-120	val_120
-120	val_121
-128	val_128
-128	val_128
-128	val_128
-128	val_129
-128	val_129
-132	val_133
-132	val_133
-136	val_136
-136	val_137
-140	val_141
-144	val_145
-152	val_152
-152	val_152
-152	val_153
-152	val_153
-152	val_153
+126	val_126
+126	val_127
+126	val_127
+134	val_134
+134	val_134
+134	val_135
 156	val_156
 156	val_157
 156	val_157
-160	val_160
-160	val_161
-164	val_164
-164	val_164
-164	val_165
-164	val_165
-168	val_168
-168	val_169
-172	val_172
-172	val_172
-172	val_173
-176	val_176
-176	val_176
-180	val_180
+158	val_158
+178	val_178
+178	val_179
+178	val_179
 184	val_185
-192	val_192
-192	val_193
-196	val_196
-196	val_197
-196	val_197
-196	val_197
-200	val_200
-200	val_200
-204	val_205
+206	val_207
+206	val_207
+206	val_207
 208	val_208
 208	val_208
 208	val_208
-212	val_213
-216	val_216
-216	val_216
-216	val_217
-224	val_224
-224	val_224
-224	val_225
-228	val_228
-228	val_229
-240	val_241
 244	val_244
 244	val_245
 244	val_245
 244	val_245
-248	val_248
-248	val_249
 252	val_252
 252	val_253
+254	val_255
 256	val_256
 256	val_256
 256	val_257
-260	val_260
-260	val_261
-260	val_261
-264	val_265
-264	val_265
-268	val_269
+266	val_266
 272	val_272
 272	val_272
 272	val_273
-276	val_277
-280	val_280
-280	val_280
-284	val_284
-284	val_285
-284	val_285
-288	val_288
-288	val_288
+286	val_286
+286	val_287
 292	val_292
 292	val_293
 292	val_293
-296	val_296
-296	val_297
-300	val_301
-300	val_301
 304	val_305
 308	val_308
 308	val_309
@@ -532,13 +483,15 @@ POSTHOOK: Input: default@dest1
 316	val_316
 316	val_316
 316	val_316
-324	val_325
-328	val_329
-328	val_329
-332	val_332
+326	val_327
+334	val_335
 336	val_336
 336	val_337
-340	val_341
+338	val_338
+338	val_339
+342	val_342
+342	val_342
+342	val_343
 344	val_344
 344	val_344
 344	val_345
@@ -550,29 +503,23 @@ POSTHOOK: Input: default@dest1
 348	val_349
 352	val_353
 352	val_353
-356	val_356
-356	val_357
-356	val_357
 360	val_360
 360	val_361
+362	val_362
 364	val_364
 364	val_365
-368	val_368
-376	val_377
-384	val_384
-384	val_384
-384	val_384
-384	val_385
-384	val_385
-384	val_385
-388	val_389
+378	val_378
+378	val_379
 392	val_392
 392	val_393
 392	val_393
 396	val_396
 396	val_396
 396	val_396
-400	val_400
+402	val_402
+402	val_403
+402	val_403
+402	val_403
 404	val_404
 404	val_404
 404	val_405
@@ -580,45 +527,24 @@ POSTHOOK: Input: default@dest1
 404	val_405
 408	val_409
 408	val_409
-412	val_413
-412	val_413
-416	val_417
-424	val_424
-424	val_424
-424	val_425
-428	val_429
-432	val_432
-432	val_433
-436	val_436
-436	val_437
+410	val_411
+426	val_427
 440	val_441
 440	val_441
-444	val_444
-448	val_448
-448	val_449
 452	val_452
-460	val_460
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-468	val_469
-468	val_469
-468	val_469
+458	val_458
+458	val_458
+466	val_466
+466	val_466
+466	val_466
 472	val_472
 476	val_477
 476	val_477
-480	val_480
-480	val_480
-480	val_480
-480	val_481
-480	val_481
+478	val_478
+478	val_478
+478	val_479
+478	val_479
+482	val_482
+482	val_483
 484	val_484
 484	val_485
-488	val_489
-492	val_492
-492	val_492
-492	val_493
-492	val_493
-496	val_496
-496	val_497

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/sample8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/sample8.q.out b/ql/src/test/results/clientpositive/sample8.q.out
index 365b7cf..3280cb5 100644
--- a/ql/src/test/results/clientpositive/sample8.q.out
+++ b/ql/src/test/results/clientpositive/sample8.q.out
@@ -86,6 +86,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'
@@ -134,6 +135,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'
@@ -182,6 +184,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'
@@ -230,6 +233,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'
@@ -319,358 +323,334 @@ 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 ####
-105	val_105
-105	val_105
-105	val_105
-105	val_105
-114	val_114
-114	val_114
-114	val_114
-114	val_114
-150	val_150
-150	val_150
-150	val_150
-150	val_150
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-169	val_169
-178	val_178
-178	val_178
-178	val_178
-178	val_178
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
-187	val_187
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
 196	val_196
 196	val_196
 196	val_196
 196	val_196
-2	val_2
-2	val_2
-2	val_2
-2	val_2
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-213	val_213
-222	val_222
-222	val_222
-222	val_222
-222	val_222
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-277	val_277
-286	val_286
-286	val_286
-286	val_286
-286	val_286
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-321	val_321
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
-367	val_367
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+219	val_219
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+238	val_238
+258	val_258
+258	val_258
+258	val_258
+258	val_258
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+280	val_280
+285	val_285
+285	val_285
+285	val_285
+285	val_285
+291	val_291
+291	val_291
+291	val_291
+291	val_291
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+298	val_298
+306	val_306
+306	val_306
+306	val_306
+306	val_306
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+37	val_37
+374	val_374
+374	val_374
+374	val_374
+374	val_374
+377	val_377
+377	val_377
+377	val_377
+377	val_377
 394	val_394
 394	val_394
 394	val_394
 394	val_394
-402	val_402
-402	val_402
-402	val_402
-402	val_402
-411	val_411
-411	val_411
-411	val_411
-411	val_411
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-439	val_439
-448	val_448
-448	val_448
-448	val_448
-448	val_448
-457	val_457
-457	val_457
-457	val_457
-457	val_457
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-466	val_466
-475	val_475
-475	val_475
-475	val_475
-475	val_475
-484	val_484
-484	val_484
-484	val_484
-484	val_484
-493	val_493
-493	val_493
-493	val_493
-493	val_493
-77	val_77
-77	val_77
-77	val_77
-77	val_77
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+406	val_406
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+414	val_414
+444	val_444
+444	val_444
+444	val_444
+444	val_444
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+458	val_458
+485	val_485
+485	val_485
+485	val_485
+485	val_485
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+492	val_492
+66	val_66
+66	val_66
+66	val_66
+66	val_66
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+67	val_67
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+72	val_72
+8	val_8
+8	val_8
+8	val_8
+8	val_8
 86	val_86
 86	val_86
 86	val_86
 86	val_86
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
-95	val_95
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
+97	val_97
 PREHOOK: query: EXPLAIN
 SELECT * FROM src TABLESAMPLE(100 ROWS) a JOIN src1 TABLESAMPLE(10 ROWS) b ON a.key=b.key
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/sample9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/sample9.q.out b/ql/src/test/results/clientpositive/sample9.q.out
index e90149a..0de49a6 100644
--- a/ql/src/test/results/clientpositive/sample9.q.out
+++ b/ql/src/test/results/clientpositive/sample9.q.out
@@ -62,6 +62,7 @@ STAGE PLANS:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
               bucket_count 2
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -84,6 +85,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -122,88 +124,36 @@ order by key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcbucket
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
-0	val_1
-0	val_1
 2	val_2
 2	val_3
-4	val_4
-4	val_5
 6	val_7
 6	val_7
-8	val_8
-8	val_9
 10	val_10
 10	val_11
-12	val_12
-12	val_12
-12	val_13
-16	val_17
-16	val_17
-18	val_18
-18	val_18
 20	val_20
 20	val_21
 20	val_21
-22	val_23
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
 30	val_30
 30	val_31
-32	val_33
-34	val_34
 40	val_41
 40	val_41
-42	val_42
-42	val_42
-42	val_43
-42	val_43
-42	val_43
-44	val_44
 46	val_47
 48	val_49
 48	val_49
-50	val_51
-52	val_53
-52	val_53
-52	val_53
-52	val_53
 54	val_54
-56	val_57
 58	val_58
 58	val_58
 58	val_59
 58	val_59
 60	val_61
-62	val_63
-62	val_63
 64	val_64
-66	val_66
 68	val_69
 70	val_70
 70	val_70
 70	val_70
 70	val_71
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-76	val_77
-76	val_77
-76	val_77
-78	val_78
-78	val_79
 80	val_80
 80	val_81
-82	val_82
-82	val_83
-82	val_83
 84	val_84
 84	val_84
 86	val_86
@@ -211,116 +161,41 @@ POSTHOOK: Input: default@srcbucket
 90	val_90
 90	val_90
 90	val_90
-92	val_92
-94	val_95
 96	val_96
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-100	val_101
-100	val_101
-102	val_103
-104	val_104
-104	val_104
-104	val_105
-104	val_105
-104	val_105
 106	val_107
 110	val_111
-114	val_114
-114	val_115
-114	val_115
-114	val_115
 116	val_116
 116	val_117
-118	val_118
-118	val_118
-118	val_119
-118	val_119
-118	val_119
-120	val_120
-120	val_120
-120	val_121
-122	val_123
-122	val_123
-122	val_123
 126	val_126
 126	val_127
 126	val_127
-128	val_128
-128	val_128
-128	val_128
-128	val_129
-128	val_129
 132	val_133
 132	val_133
 134	val_134
 134	val_134
 134	val_135
-136	val_136
-136	val_137
-138	val_138
-138	val_138
-138	val_138
-138	val_138
-138	val_139
-138	val_139
 140	val_141
-144	val_145
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
-152	val_153
-152	val_153
-152	val_153
 156	val_156
 156	val_157
 156	val_157
 158	val_158
-160	val_160
-160	val_161
 162	val_162
 162	val_163
 164	val_164
 164	val_164
 164	val_165
 164	val_165
-166	val_166
-168	val_168
-168	val_169
-170	val_170
-170	val_171
-172	val_172
-172	val_172
-172	val_173
-174	val_174
-174	val_174
-174	val_175
-174	val_175
-176	val_176
-176	val_176
 178	val_178
 178	val_179
 178	val_179
-180	val_180
 182	val_183
 184	val_185
-186	val_186
 190	val_190
-192	val_192
-192	val_193
-194	val_194
-196	val_196
-196	val_197
-196	val_197
-196	val_197
-200	val_200
-200	val_200
 202	val_202
-204	val_205
 206	val_207
 206	val_207
 206	val_207
@@ -332,37 +207,19 @@ POSTHOOK: Input: default@srcbucket
 216	val_216
 216	val_216
 216	val_217
-218	val_218
-222	val_222
-222	val_223
-224	val_224
-224	val_224
-224	val_225
 226	val_226
 226	val_227
 226	val_227
 226	val_227
 226	val_227
-228	val_228
-228	val_229
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
 238	val_238
 238	val_238
 238	val_239
 240	val_241
-242	val_242
-242	val_242
-242	val_243
 244	val_244
 244	val_245
 244	val_245
 244	val_245
-246	val_247
-246	val_247
 248	val_248
 248	val_249
 252	val_252
@@ -371,53 +228,23 @@ POSTHOOK: Input: default@srcbucket
 256	val_256
 256	val_256
 256	val_257
-258	val_258
-258	val_259
 260	val_260
 260	val_261
 260	val_261
-262	val_262
-262	val_263
-262	val_263
-264	val_265
-264	val_265
 266	val_266
-268	val_269
 272	val_272
 272	val_272
 272	val_273
-274	val_274
-274	val_275
 276	val_277
-278	val_278
-278	val_278
-278	val_279
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 284	val_285
 284	val_285
 286	val_286
 286	val_287
-288	val_288
-288	val_288
 292	val_292
 292	val_293
 292	val_293
-296	val_296
-296	val_297
-298	val_298
-298	val_298
-298	val_298
-300	val_301
-300	val_301
-302	val_302
-302	val_303
 304	val_305
-306	val_306
-306	val_307
 308	val_308
 308	val_309
 308	val_309
@@ -425,29 +252,17 @@ POSTHOOK: Input: default@srcbucket
 310	val_311
 310	val_311
 310	val_311
-314	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-318	val_319
-322	val_322
-322	val_322
-322	val_323
 324	val_325
 326	val_327
-328	val_329
-328	val_329
-330	val_331
 332	val_332
 334	val_335
 336	val_336
 336	val_337
 338	val_338
 338	val_339
-340	val_341
 342	val_342
 342	val_342
 342	val_343
@@ -462,26 +277,14 @@ POSTHOOK: Input: default@srcbucket
 348	val_349
 352	val_353
 352	val_353
-356	val_356
-356	val_357
-356	val_357
-358	val_359
 360	val_360
 360	val_361
 362	val_362
 364	val_364
 364	val_365
-366	val_366
 368	val_368
-374	val_374
-374	val_375
-376	val_377
 378	val_378
 378	val_379
-382	val_382
-382	val_382
-382	val_383
-382	val_383
 384	val_384
 384	val_384
 384	val_384
@@ -492,9 +295,6 @@ POSTHOOK: Input: default@srcbucket
 386	val_387
 386	val_387
 388	val_389
-390	val_391
-390	val_391
-390	val_391
 392	val_392
 392	val_393
 392	val_393
@@ -502,8 +302,6 @@ POSTHOOK: Input: default@srcbucket
 396	val_396
 396	val_396
 396	val_396
-398	val_399
-400	val_400
 402	val_402
 402	val_403
 402	val_403
@@ -513,24 +311,12 @@ POSTHOOK: Input: default@srcbucket
 404	val_405
 404	val_405
 404	val_405
-406	val_406
-406	val_406
-406	val_406
-406	val_406
-406	val_407
 408	val_409
 408	val_409
 410	val_411
-412	val_413
-412	val_413
 414	val_414
 414	val_414
 414	val_415
-416	val_417
-418	val_418
-424	val_424
-424	val_424
-424	val_425
 426	val_427
 428	val_429
 430	val_430
@@ -539,24 +325,12 @@ POSTHOOK: Input: default@srcbucket
 430	val_431
 432	val_432
 432	val_433
-436	val_436
-436	val_437
-438	val_438
-438	val_438
-438	val_438
-438	val_439
-438	val_439
 440	val_441
 440	val_441
-442	val_443
 444	val_444
 446	val_446
 446	val_447
 446	val_447
-448	val_448
-448	val_449
-450	val_451
-450	val_451
 452	val_452
 454	val_454
 454	val_454
@@ -565,22 +339,9 @@ POSTHOOK: Input: default@srcbucket
 454	val_455
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
-462	val_463
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-468	val_469
-468	val_469
-468	val_469
-470	val_470
-470	val_471
 472	val_472
 474	val_475
 474	val_475
@@ -599,19 +360,9 @@ POSTHOOK: Input: default@srcbucket
 482	val_483
 484	val_484
 484	val_485
-486	val_487
 488	val_489
 490	val_490
 490	val_491
-492	val_492
-492	val_492
-492	val_493
-492	val_493
-494	val_494
-494	val_495
-494	val_495
-496	val_496
-496	val_497
 498	val_498
 498	val_498
 498	val_498

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/sample_islocalmode_hook_use_metadata.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/sample_islocalmode_hook_use_metadata.q.out b/ql/src/test/results/clientpositive/sample_islocalmode_hook_use_metadata.q.out
index 5423c17..81b112d 100644
--- a/ql/src/test/results/clientpositive/sample_islocalmode_hook_use_metadata.q.out
+++ b/ql/src/test/results/clientpositive/sample_islocalmode_hook_use_metadata.q.out
@@ -81,6 +81,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1500                
 	rawDataSize         	18124               

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/serde_user_properties.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/serde_user_properties.q.out b/ql/src/test/results/clientpositive/serde_user_properties.q.out
index 6e81845..6a65f7c 100644
--- a/ql/src/test/results/clientpositive/serde_user_properties.q.out
+++ b/ql/src/test/results/clientpositive/serde_user_properties.q.out
@@ -100,6 +100,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'
@@ -121,6 +122,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'
@@ -229,6 +231,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'
@@ -251,6 +254,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'
@@ -360,6 +364,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'
@@ -382,6 +387,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/show_create_table_alter.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/show_create_table_alter.q.out b/ql/src/test/results/clientpositive/show_create_table_alter.q.out
index 6023f47..74be374 100644
--- a/ql/src/test/results/clientpositive/show_create_table_alter.q.out
+++ b/ql/src/test/results/clientpositive/show_create_table_alter.q.out
@@ -31,6 +31,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: ALTER TABLE tmp_showcrt1 SET TBLPROPERTIES ('comment'='temporary table', 'EXTERNAL'='FALSE')
 PREHOOK: type: ALTERTABLE_PROPERTIES
@@ -65,6 +66,7 @@ LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
   'EXTERNAL'='FALSE', 
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: ALTER TABLE tmp_showcrt1 SET TBLPROPERTIES ('comment'='changed comment', 'EXTERNAL'='TRUE')
 PREHOOK: type: ALTERTABLE_PROPERTIES
@@ -98,6 +100,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: ALTER TABLE tmp_showcrt1 SET TBLPROPERTIES ('SORTBUCKETCOLSPREFIX'='FALSE')
 PREHOOK: type: ALTERTABLE_PROPERTIES
@@ -131,6 +134,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: ALTER TABLE tmp_showcrt1 SET TBLPROPERTIES ('storage_handler'='org.apache.hadoop.hive.ql.metadata.DefaultStorageHandler')
 PREHOOK: type: ALTERTABLE_PROPERTIES
@@ -164,6 +168,7 @@ WITH SERDEPROPERTIES (
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: DROP TABLE tmp_showcrt1
 PREHOOK: type: DROPTABLE

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/show_create_table_db_table.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/show_create_table_db_table.q.out b/ql/src/test/results/clientpositive/show_create_table_db_table.q.out
index f31da65..33410c8 100644
--- a/ql/src/test/results/clientpositive/show_create_table_db_table.q.out
+++ b/ql/src/test/results/clientpositive/show_create_table_db_table.q.out
@@ -58,6 +58,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: SHOW CREATE TABLE tmp_feng.tmp_showcrt2
 PREHOOK: type: SHOW_CREATETABLE
@@ -79,6 +80,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: SHOW CREATE TABLE tmp_feng.tmp_showcrt3
 PREHOOK: type: SHOW_CREATETABLE
@@ -101,6 +103,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: DROP TABLE tmp_feng.tmp_showcrt1
 PREHOOK: type: DROPTABLE

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/show_create_table_delimited.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/show_create_table_delimited.q.out b/ql/src/test/results/clientpositive/show_create_table_delimited.q.out
index 9fb35c5..ad58bf6 100644
--- a/ql/src/test/results/clientpositive/show_create_table_delimited.q.out
+++ b/ql/src/test/results/clientpositive/show_create_table_delimited.q.out
@@ -39,6 +39,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: DROP TABLE tmp_showcrt1
 PREHOOK: type: DROPTABLE

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/show_create_table_partitioned.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/show_create_table_partitioned.q.out b/ql/src/test/results/clientpositive/show_create_table_partitioned.q.out
index 3e850aa..bb2c6c7 100644
--- a/ql/src/test/results/clientpositive/show_create_table_partitioned.q.out
+++ b/ql/src/test/results/clientpositive/show_create_table_partitioned.q.out
@@ -31,6 +31,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: DROP TABLE tmp_showcrt1
 PREHOOK: type: DROPTABLE

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/show_create_table_serde.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/show_create_table_serde.q.out b/ql/src/test/results/clientpositive/show_create_table_serde.q.out
index d98bf00..aa93fa1 100644
--- a/ql/src/test/results/clientpositive/show_create_table_serde.q.out
+++ b/ql/src/test/results/clientpositive/show_create_table_serde.q.out
@@ -36,6 +36,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: DROP TABLE tmp_showcrt1
 PREHOOK: type: DROPTABLE
@@ -81,6 +82,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: DROP TABLE tmp_showcrt1
 PREHOOK: type: DROPTABLE
@@ -128,6 +130,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: DROP TABLE tmp_showcrt1
 PREHOOK: type: DROPTABLE
@@ -170,6 +173,7 @@ WITH SERDEPROPERTIES (
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: DROP TABLE tmp_showcrt1
 PREHOOK: type: DROPTABLE

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/show_create_table_temp_table.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/show_create_table_temp_table.q.out b/ql/src/test/results/clientpositive/show_create_table_temp_table.q.out
index d98225a..bf25602 100644
--- a/ql/src/test/results/clientpositive/show_create_table_temp_table.q.out
+++ b/ql/src/test/results/clientpositive/show_create_table_temp_table.q.out
@@ -30,7 +30,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
-)
+  'bucketing_version'='2')
 PREHOOK: query: drop table tmp1
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: drop table tmp1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/show_functions.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/show_functions.q.out b/ql/src/test/results/clientpositive/show_functions.q.out
index 4df555b..02b956b 100644
--- a/ql/src/test/results/clientpositive/show_functions.q.out
+++ b/ql/src/test/results/clientpositive/show_functions.q.out
@@ -164,6 +164,7 @@ minute
 mod
 month
 months_between
+murmur_hash
 named_struct
 negative
 next_day
@@ -422,6 +423,7 @@ minute
 mod
 month
 months_between
+murmur_hash
 xpath
 xpath_boolean
 xpath_double

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/show_tblproperties.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/show_tblproperties.q.out b/ql/src/test/results/clientpositive/show_tblproperties.q.out
index 1ef1b9b..e4bda1d 100644
--- a/ql/src/test/results/clientpositive/show_tblproperties.q.out
+++ b/ql/src/test/results/clientpositive/show_tblproperties.q.out
@@ -38,6 +38,7 @@ POSTHOOK: query: show tblproperties tmpfoo
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"a":"true"}}
 bar	bar value
+bucketing_version	2
 #### A masked pattern was here ####
 numFiles	0
 numRows	0
@@ -56,6 +57,7 @@ POSTHOOK: query: show tblproperties default.tmpfoo
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"a":"true"}}
 bar	bar value
+bucketing_version	2
 #### A masked pattern was here ####
 numFiles	0
 numRows	0
@@ -110,6 +112,7 @@ POSTHOOK: query: show tblproperties default.tmpfoo
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"a":"true"}}
 bar	bar value
+bucketing_version	2
 #### A masked pattern was here ####
 numFiles	0
 numRows	0
@@ -128,6 +131,7 @@ POSTHOOK: query: show tblproperties tmpfoo
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"b":"true"}}
 bar	bar value1
+bucketing_version	2
 #### A masked pattern was here ####
 numFiles	0
 numRows	0
@@ -152,6 +156,7 @@ POSTHOOK: query: show tblproperties db1.tmpfoo
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"b":"true"}}
 bar	bar value1
+bucketing_version	2
 #### A masked pattern was here ####
 numFiles	0
 numRows	0

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/smb_mapjoin_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/smb_mapjoin_1.q.out b/ql/src/test/results/clientpositive/smb_mapjoin_1.q.out
index 1182e56..8e43c88 100644
--- a/ql/src/test/results/clientpositive/smb_mapjoin_1.q.out
+++ b/ql/src/test/results/clientpositive/smb_mapjoin_1.q.out
@@ -64,6 +64,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	SORTBUCKETCOLSPREFIX	TRUE                
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/smb_mapjoin_11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/smb_mapjoin_11.q.out b/ql/src/test/results/clientpositive/smb_mapjoin_11.q.out
index 297d5ef..afbe1ab 100644
--- a/ql/src/test/results/clientpositive/smb_mapjoin_11.q.out
+++ b/ql/src/test/results/clientpositive/smb_mapjoin_11.q.out
@@ -121,6 +121,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -156,6 +157,7 @@ STAGE PLANS:
                 properties:
                   bucket_count 16
                   bucket_field_name key
+                  bucketing_version 2
                   column.name.delimiter ,
                   columns key,value
                   columns.comments 
@@ -213,6 +215,7 @@ STAGE PLANS:
               properties:
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -1961,6 +1964,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -2070,6 +2074,7 @@ STAGE PLANS:
               properties:
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -2104,47 +2109,38 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table1
 POSTHOOK: Input: default@test_table1@ds=1
 #### A masked pattern was here ####
-17	val_17	1
-33	val_33	1
-65	val_65	1
-97	val_97	1
-97	val_97	1
-113	val_113	1
-113	val_113	1
-129	val_129	1
-129	val_129	1
-145	val_145	1
-177	val_177	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-209	val_209	1
-209	val_209	1
-241	val_241	1
-257	val_257	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-289	val_289	1
-305	val_305	1
+8	val_8	1
+26	val_26	1
+26	val_26	1
+82	val_82	1
+103	val_103	1
+103	val_103	1
+118	val_118	1
+118	val_118	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+176	val_176	1
+176	val_176	1
+194	val_194	1
+275	val_275	1
+280	val_280	1
+280	val_280	1
+282	val_282	1
+282	val_282	1
+309	val_309	1
+309	val_309	1
 321	val_321	1
 321	val_321	1
-353	val_353	1
-353	val_353	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-449	val_449	1
-481	val_481	1
-497	val_497	1
+400	val_400	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+439	val_439	1
+439	val_439	1
+455	val_455	1
+462	val_462	1
+462	val_462	1
 PREHOOK: query: SELECT * FROM test_table3 TABLESAMPLE(BUCKET 2 OUT OF 16)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -2155,103 +2151,70 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-497	val_497	1
-481	val_481	1
-449	val_449	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-353	val_353	1
-353	val_353	1
-353	val_353	1
-353	val_353	1
+462	val_462	1
+462	val_462	1
+462	val_462	1
+462	val_462	1
+455	val_455	1
+439	val_439	1
+439	val_439	1
+439	val_439	1
+439	val_439	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+400	val_400	1
 321	val_321	1
 321	val_321	1
 321	val_321	1
 321	val_321	1
-305	val_305	1
-289	val_289	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-257	val_257	1
-241	val_241	1
-209	val_209	1
-209	val_209	1
-209	val_209	1
-209	val_209	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-177	val_177	1
-145	val_145	1
-129	val_129	1
-129	val_129	1
-129	val_129	1
-129	val_129	1
-113	val_113	1
-113	val_113	1
-113	val_113	1
-113	val_113	1
-97	val_97	1
-97	val_97	1
-97	val_97	1
-97	val_97	1
-65	val_65	1
-33	val_33	1
-17	val_17	1
+309	val_309	1
+309	val_309	1
+309	val_309	1
+309	val_309	1
+282	val_282	1
+282	val_282	1
+282	val_282	1
+282	val_282	1
+280	val_280	1
+280	val_280	1
+280	val_280	1
+280	val_280	1
+275	val_275	1
+194	val_194	1
+176	val_176	1
+176	val_176	1
+176	val_176	1
+176	val_176	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+118	val_118	1
+118	val_118	1
+118	val_118	1
+118	val_118	1
+103	val_103	1
+103	val_103	1
+103	val_103	1
+103	val_103	1
+82	val_82	1
+26	val_26	1
+26	val_26	1
+26	val_26	1
+26	val_26	1
+8	val_8	1
 PREHOOK: query: SELECT COUNT(*) FROM test_table3 TABLESAMPLE(BUCKET 2 OUT OF 16) a JOIN test_table1 TABLESAMPLE(BUCKET 2 OUT OF 16) b ON a.key = b.key AND a.ds = '1' AND b.ds='1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table1
@@ -2266,4 +2229,4 @@ POSTHOOK: Input: default@test_table1@ds=1
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-293
+140

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/smb_mapjoin_12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/smb_mapjoin_12.q.out b/ql/src/test/results/clientpositive/smb_mapjoin_12.q.out
index 863c220..1672d1a 100644
--- a/ql/src/test/results/clientpositive/smb_mapjoin_12.q.out
+++ b/ql/src/test/results/clientpositive/smb_mapjoin_12.q.out
@@ -101,6 +101,7 @@ STAGE PLANS:
                           SORTBUCKETCOLSPREFIX TRUE
                           bucket_count 16
                           bucket_field_name key
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value
                           columns.comments 
@@ -156,6 +157,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -188,6 +190,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -247,7 +250,7 @@ POSTHOOK: Input: default@test_table1@ds=1
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-879
+420
 PREHOOK: query: explain extended
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '2') 
 SELECT /*+mapjoin(b)*/ a.key, concat(a.value, b.value) FROM test_table3 a JOIN test_table1 b ON a.key = b.key AND a.ds = '1' AND b.ds='1'
@@ -332,6 +335,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -368,6 +372,7 @@ STAGE PLANS:
                   SORTBUCKETCOLSPREFIX TRUE
                   bucket_count 16
                   bucket_field_name key
+                  bucketing_version 2
                   column.name.delimiter ,
                   columns key,value
                   columns.comments 
@@ -426,6 +431,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -552,4 +558,4 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=2
 #### A masked pattern was here ####
-879
+420

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/smb_mapjoin_13.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/smb_mapjoin_13.q.out b/ql/src/test/results/clientpositive/smb_mapjoin_13.q.out
index 58b148a..1204572 100644
--- a/ql/src/test/results/clientpositive/smb_mapjoin_13.q.out
+++ b/ql/src/test/results/clientpositive/smb_mapjoin_13.q.out
@@ -116,6 +116,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 16
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -139,6 +140,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -297,6 +299,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 16
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -320,6 +323,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/smb_mapjoin_20.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/smb_mapjoin_20.q.out b/ql/src/test/results/clientpositive/smb_mapjoin_20.q.out
index 121e989..7897131 100644
--- a/ql/src/test/results/clientpositive/smb_mapjoin_20.q.out
+++ b/ql/src/test/results/clientpositive/smb_mapjoin_20.q.out
@@ -366,7 +366,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-247
+243
 PREHOOK: query: select count(*) from test_table3 tablesample (bucket 2 out of 2) s where ds = '1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -377,7 +377,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-253
+257
 PREHOOK: query: select * from test_table3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -388,104 +388,93 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-val_0	0	val_0	1
-val_0	0	val_0	1
-val_0	0	val_0	1
 val_2	2	val_2	1
-val_4	4	val_4	1
-val_8	8	val_8	1
 val_10	10	val_10	1
-val_12	12	val_12	1
-val_12	12	val_12	1
-val_18	18	val_18	1
-val_18	18	val_18	1
+val_17	17	val_17	1
+val_19	19	val_19	1
 val_20	20	val_20	1
-val_24	24	val_24	1
-val_24	24	val_24	1
-val_26	26	val_26	1
-val_26	26	val_26	1
-val_28	28	val_28	1
+val_27	27	val_27	1
 val_30	30	val_30	1
-val_34	34	val_34	1
-val_42	42	val_42	1
-val_42	42	val_42	1
-val_44	44	val_44	1
+val_41	41	val_41	1
+val_43	43	val_43	1
+val_51	51	val_51	1
+val_51	51	val_51	1
 val_54	54	val_54	1
+val_57	57	val_57	1
 val_58	58	val_58	1
 val_58	58	val_58	1
 val_64	64	val_64	1
-val_66	66	val_66	1
+val_65	65	val_65	1
+val_67	67	val_67	1
+val_67	67	val_67	1
+val_69	69	val_69	1
 val_70	70	val_70	1
 val_70	70	val_70	1
 val_70	70	val_70	1
-val_72	72	val_72	1
-val_72	72	val_72	1
-val_74	74	val_74	1
-val_76	76	val_76	1
-val_76	76	val_76	1
-val_78	78	val_78	1
+val_77	77	val_77	1
 val_80	80	val_80	1
-val_82	82	val_82	1
+val_83	83	val_83	1
+val_83	83	val_83	1
 val_84	84	val_84	1
 val_84	84	val_84	1
+val_85	85	val_85	1
 val_86	86	val_86	1
 val_90	90	val_90	1
 val_90	90	val_90	1
 val_90	90	val_90	1
-val_92	92	val_92	1
 val_96	96	val_96	1
+val_97	97	val_97	1
+val_97	97	val_97	1
 val_98	98	val_98	1
 val_98	98	val_98	1
-val_100	100	val_100	1
-val_100	100	val_100	1
-val_104	104	val_104	1
-val_104	104	val_104	1
-val_114	114	val_114	1
+val_105	105	val_105	1
+val_113	113	val_113	1
+val_113	113	val_113	1
 val_116	116	val_116	1
-val_118	118	val_118	1
-val_118	118	val_118	1
-val_120	120	val_120	1
-val_120	120	val_120	1
+val_119	119	val_119	1
+val_119	119	val_119	1
+val_119	119	val_119	1
 val_126	126	val_126	1
-val_128	128	val_128	1
-val_128	128	val_128	1
-val_128	128	val_128	1
+val_133	133	val_133	1
 val_134	134	val_134	1
 val_134	134	val_134	1
-val_136	136	val_136	1
-val_138	138	val_138	1
-val_138	138	val_138	1
-val_138	138	val_138	1
-val_138	138	val_138	1
+val_137	137	val_137	1
+val_137	137	val_137	1
 val_146	146	val_146	1
 val_146	146	val_146	1
-val_150	150	val_150	1
-val_152	152	val_152	1
-val_152	152	val_152	1
+val_149	149	val_149	1
+val_149	149	val_149	1
+val_153	153	val_153	1
 val_156	156	val_156	1
+val_157	157	val_157	1
 val_158	158	val_158	1
-val_160	160	val_160	1
 val_162	162	val_162	1
+val_163	163	val_163	1
 val_164	164	val_164	1
 val_164	164	val_164	1
-val_166	166	val_166	1
-val_168	168	val_168	1
-val_170	170	val_170	1
-val_172	172	val_172	1
-val_172	172	val_172	1
-val_174	174	val_174	1
-val_174	174	val_174	1
-val_176	176	val_176	1
-val_176	176	val_176	1
+val_165	165	val_165	1
+val_165	165	val_165	1
+val_169	169	val_169	1
+val_169	169	val_169	1
+val_169	169	val_169	1
+val_169	169	val_169	1
+val_177	177	val_177	1
 val_178	178	val_178	1
-val_180	180	val_180	1
-val_186	186	val_186	1
+val_181	181	val_181	1
+val_187	187	val_187	1
+val_187	187	val_187	1
+val_187	187	val_187	1
 val_190	190	val_190	1
-val_192	192	val_192	1
-val_194	194	val_194	1
-val_196	196	val_196	1
-val_200	200	val_200	1
-val_200	200	val_200	1
+val_191	191	val_191	1
+val_191	191	val_191	1
+val_195	195	val_195	1
+val_195	195	val_195	1
+val_197	197	val_197	1
+val_197	197	val_197	1
+val_199	199	val_199	1
+val_199	199	val_199	1
+val_199	199	val_199	1
+val_201	201	val_201	1
 val_202	202	val_202	1
 val_208	208	val_208	1
 val_208	208	val_208	1
@@ -493,63 +482,60 @@ val_208	208	val_208	1
 val_214	214	val_214	1
 val_216	216	val_216	1
 val_216	216	val_216	1
-val_218	218	val_218	1
-val_222	222	val_222	1
-val_224	224	val_224	1
-val_224	224	val_224	1
+val_221	221	val_221	1
+val_221	221	val_221	1
 val_226	226	val_226	1
-val_228	228	val_228	1
-val_230	230	val_230	1
-val_230	230	val_230	1
-val_230	230	val_230	1
-val_230	230	val_230	1
-val_230	230	val_230	1
+val_229	229	val_229	1
+val_229	229	val_229	1
+val_233	233	val_233	1
+val_233	233	val_233	1
+val_237	237	val_237	1
+val_237	237	val_237	1
 val_238	238	val_238	1
 val_238	238	val_238	1
-val_242	242	val_242	1
-val_242	242	val_242	1
+val_239	239	val_239	1
+val_239	239	val_239	1
 val_244	244	val_244	1
 val_248	248	val_248	1
+val_249	249	val_249	1
 val_252	252	val_252	1
+val_255	255	val_255	1
+val_255	255	val_255	1
 val_256	256	val_256	1
 val_256	256	val_256	1
-val_258	258	val_258	1
 val_260	260	val_260	1
-val_262	262	val_262	1
 val_266	266	val_266	1
 val_272	272	val_272	1
 val_272	272	val_272	1
-val_274	274	val_274	1
-val_278	278	val_278	1
-val_278	278	val_278	1
-val_280	280	val_280	1
-val_280	280	val_280	1
-val_282	282	val_282	1
-val_282	282	val_282	1
 val_284	284	val_284	1
 val_286	286	val_286	1
-val_288	288	val_288	1
-val_288	288	val_288	1
+val_287	287	val_287	1
+val_289	289	val_289	1
+val_291	291	val_291	1
 val_292	292	val_292	1
-val_296	296	val_296	1
-val_298	298	val_298	1
-val_298	298	val_298	1
-val_298	298	val_298	1
-val_302	302	val_302	1
-val_306	306	val_306	1
+val_307	307	val_307	1
+val_307	307	val_307	1
 val_308	308	val_308	1
 val_310	310	val_310	1
+val_311	311	val_311	1
+val_311	311	val_311	1
+val_311	311	val_311	1
+val_315	315	val_315	1
 val_316	316	val_316	1
 val_316	316	val_316	1
 val_316	316	val_316	1
-val_318	318	val_318	1
-val_318	318	val_318	1
-val_318	318	val_318	1
-val_322	322	val_322	1
-val_322	322	val_322	1
+val_317	317	val_317	1
+val_317	317	val_317	1
+val_325	325	val_325	1
+val_325	325	val_325	1
+val_327	327	val_327	1
+val_327	327	val_327	1
+val_327	327	val_327	1
 val_332	332	val_332	1
 val_336	336	val_336	1
 val_338	338	val_338	1
+val_339	339	val_339	1
+val_341	341	val_341	1
 val_342	342	val_342	1
 val_342	342	val_342	1
 val_344	344	val_344	1
@@ -559,176 +545,197 @@ val_348	348	val_348	1
 val_348	348	val_348	1
 val_348	348	val_348	1
 val_348	348	val_348	1
-val_356	356	val_356	1
+val_351	351	val_351	1
+val_353	353	val_353	1
+val_353	353	val_353	1
 val_360	360	val_360	1
 val_362	362	val_362	1
 val_364	364	val_364	1
-val_366	366	val_366	1
+val_365	365	val_365	1
 val_368	368	val_368	1
-val_374	374	val_374	1
+val_369	369	val_369	1
+val_369	369	val_369	1
+val_369	369	val_369	1
+val_377	377	val_377	1
 val_378	378	val_378	1
-val_382	382	val_382	1
-val_382	382	val_382	1
 val_384	384	val_384	1
 val_384	384	val_384	1
 val_384	384	val_384	1
 val_386	386	val_386	1
 val_392	392	val_392	1
+val_393	393	val_393	1
 val_394	394	val_394	1
 val_396	396	val_396	1
 val_396	396	val_396	1
 val_396	396	val_396	1
-val_400	400	val_400	1
+val_397	397	val_397	1
+val_397	397	val_397	1
+val_399	399	val_399	1
+val_399	399	val_399	1
 val_402	402	val_402	1
 val_404	404	val_404	1
 val_404	404	val_404	1
-val_406	406	val_406	1
-val_406	406	val_406	1
-val_406	406	val_406	1
-val_406	406	val_406	1
+val_407	407	val_407	1
+val_409	409	val_409	1
+val_409	409	val_409	1
+val_409	409	val_409	1
+val_411	411	val_411	1
 val_414	414	val_414	1
 val_414	414	val_414	1
-val_418	418	val_418	1
-val_424	424	val_424	1
-val_424	424	val_424	1
+val_417	417	val_417	1
+val_417	417	val_417	1
+val_417	417	val_417	1
+val_419	419	val_419	1
+val_421	421	val_421	1
+val_427	427	val_427	1
 val_430	430	val_430	1
 val_430	430	val_430	1
 val_430	430	val_430	1
 val_432	432	val_432	1
-val_436	436	val_436	1
-val_438	438	val_438	1
-val_438	438	val_438	1
-val_438	438	val_438	1
+val_435	435	val_435	1
+val_437	437	val_437	1
+val_443	443	val_443	1
 val_444	444	val_444	1
 val_446	446	val_446	1
-val_448	448	val_448	1
+val_449	449	val_449	1
 val_452	452	val_452	1
+val_453	453	val_453	1
 val_454	454	val_454	1
 val_454	454	val_454	1
 val_454	454	val_454	1
 val_458	458	val_458	1
 val_458	458	val_458	1
-val_460	460	val_460	1
-val_462	462	val_462	1
-val_462	462	val_462	1
+val_459	459	val_459	1
+val_459	459	val_459	1
+val_463	463	val_463	1
+val_463	463	val_463	1
 val_466	466	val_466	1
 val_466	466	val_466	1
 val_466	466	val_466	1
-val_468	468	val_468	1
-val_468	468	val_468	1
-val_468	468	val_468	1
-val_468	468	val_468	1
-val_470	470	val_470	1
+val_467	467	val_467	1
 val_472	472	val_472	1
 val_478	478	val_478	1
 val_478	478	val_478	1
+val_479	479	val_479	1
 val_480	480	val_480	1
 val_480	480	val_480	1
 val_480	480	val_480	1
 val_482	482	val_482	1
+val_483	483	val_483	1
 val_484	484	val_484	1
+val_485	485	val_485	1
 val_490	490	val_490	1
-val_492	492	val_492	1
-val_492	492	val_492	1
-val_494	494	val_494	1
-val_496	496	val_496	1
+val_491	491	val_491	1
+val_495	495	val_495	1
+val_497	497	val_497	1
 val_498	498	val_498	1
 val_498	498	val_498	1
 val_498	498	val_498	1
+val_0	0	val_0	1
+val_0	0	val_0	1
+val_0	0	val_0	1
+val_4	4	val_4	1
 val_5	5	val_5	1
-val_5	5	val_5	1
-val_5	5	val_5	1
+val_5	5	val_5	1
+val_5	5	val_5	1
+val_8	8	val_8	1
 val_9	9	val_9	1
 val_11	11	val_11	1
+val_12	12	val_12	1
+val_12	12	val_12	1
 val_15	15	val_15	1
 val_15	15	val_15	1
-val_17	17	val_17	1
-val_19	19	val_19	1
-val_27	27	val_27	1
+val_18	18	val_18	1
+val_18	18	val_18	1
+val_24	24	val_24	1
+val_24	24	val_24	1
+val_26	26	val_26	1
+val_26	26	val_26	1
+val_28	28	val_28	1
 val_33	33	val_33	1
+val_34	34	val_34	1
 val_35	35	val_35	1
 val_35	35	val_35	1
 val_35	35	val_35	1
 val_37	37	val_37	1
 val_37	37	val_37	1
-val_41	41	val_41	1
-val_43	43	val_43	1
+val_42	42	val_42	1
+val_42	42	val_42	1
+val_44	44	val_44	1
 val_47	47	val_47	1
-val_51	51	val_51	1
-val_51	51	val_51	1
 val_53	53	val_53	1
-val_57	57	val_57	1
-val_65	65	val_65	1
-val_67	67	val_67	1
-val_67	67	val_67	1
-val_69	69	val_69	1
-val_77	77	val_77	1
-val_83	83	val_83	1
-val_83	83	val_83	1
-val_85	85	val_85	1
+val_66	66	val_66	1
+val_72	72	val_72	1
+val_72	72	val_72	1
+val_74	74	val_74	1
+val_76	76	val_76	1
+val_76	76	val_76	1
+val_78	78	val_78	1
+val_82	82	val_82	1
 val_87	87	val_87	1
+val_92	92	val_92	1
 val_95	95	val_95	1
 val_95	95	val_95	1
-val_97	97	val_97	1
-val_97	97	val_97	1
+val_100	100	val_100	1
+val_100	100	val_100	1
 val_103	103	val_103	1
 val_103	103	val_103	1
-val_105	105	val_105	1
+val_104	104	val_104	1
+val_104	104	val_104	1
 val_111	111	val_111	1
-val_113	113	val_113	1
-val_113	113	val_113	1
-val_119	119	val_119	1
-val_119	119	val_119	1
-val_119	119	val_119	1
+val_114	114	val_114	1
+val_118	118	val_118	1
+val_118	118	val_118	1
+val_120	120	val_120	1
+val_120	120	val_120	1
 val_125	125	val_125	1
 val_125	125	val_125	1
+val_128	128	val_128	1
+val_128	128	val_128	1
+val_128	128	val_128	1
 val_129	129	val_129	1
 val_129	129	val_129	1
 val_131	131	val_131	1
-val_133	133	val_133	1
-val_137	137	val_137	1
-val_137	137	val_137	1
+val_136	136	val_136	1
+val_138	138	val_138	1
+val_138	138	val_138	1
+val_138	138	val_138	1
+val_138	138	val_138	1
 val_143	143	val_143	1
 val_145	145	val_145	1
-val_149	149	val_149	1
-val_149	149	val_149	1
-val_153	153	val_153	1
+val_150	150	val_150	1
+val_152	152	val_152	1
+val_152	152	val_152	1
 val_155	155	val_155	1
-val_157	157	val_157	1
-val_163	163	val_163	1
-val_165	165	val_165	1
-val_165	165	val_165	1
+val_160	160	val_160	1
+val_166	166	val_166	1
 val_167	167	val_167	1
 val_167	167	val_167	1
 val_167	167	val_167	1
-val_169	169	val_169	1
-val_169	169	val_169	1
-val_169	169	val_169	1
-val_169	169	val_169	1
+val_168	168	val_168	1
+val_170	170	val_170	1
+val_172	172	val_172	1
+val_172	172	val_172	1
+val_174	174	val_174	1
+val_174	174	val_174	1
 val_175	175	val_175	1
 val_175	175	val_175	1
-val_177	177	val_177	1
+val_176	176	val_176	1
+val_176	176	val_176	1
 val_179	179	val_179	1
 val_179	179	val_179	1
-val_181	181	val_181	1
+val_180	180	val_180	1
 val_183	183	val_183	1
-val_187	187	val_187	1
-val_187	187	val_187	1
-val_187	187	val_187	1
+val_186	186	val_186	1
 val_189	189	val_189	1
-val_191	191	val_191	1
-val_191	191	val_191	1
+val_192	192	val_192	1
 val_193	193	val_193	1
 val_193	193	val_193	1
 val_193	193	val_193	1
-val_195	195	val_195	1
-val_195	195	val_195	1
-val_197	197	val_197	1
-val_197	197	val_197	1
-val_199	199	val_199	1
-val_199	199	val_199	1
-val_199	199	val_199	1
-val_201	201	val_201	1
+val_194	194	val_194	1
+val_196	196	val_196	1
+val_200	200	val_200	1
+val_200	200	val_200	1
 val_203	203	val_203	1
 val_203	203	val_203	1
 val_205	205	val_205	1
@@ -741,93 +748,89 @@ val_213	213	val_213	1
 val_213	213	val_213	1
 val_217	217	val_217	1
 val_217	217	val_217	1
+val_218	218	val_218	1
 val_219	219	val_219	1
 val_219	219	val_219	1
-val_221	221	val_221	1
-val_221	221	val_221	1
+val_222	222	val_222	1
 val_223	223	val_223	1
 val_223	223	val_223	1
-val_229	229	val_229	1
-val_229	229	val_229	1
-val_233	233	val_233	1
-val_233	233	val_233	1
+val_224	224	val_224	1
+val_224	224	val_224	1
+val_228	228	val_228	1
+val_230	230	val_230	1
+val_230	230	val_230	1
+val_230	230	val_230	1
+val_230	230	val_230	1
+val_230	230	val_230	1
 val_235	235	val_235	1
-val_237	237	val_237	1
-val_237	237	val_237	1
-val_239	239	val_239	1
-val_239	239	val_239	1
 val_241	241	val_241	1
+val_242	242	val_242	1
+val_242	242	val_242	1
 val_247	247	val_247	1
-val_249	249	val_249	1
-val_255	255	val_255	1
-val_255	255	val_255	1
 val_257	257	val_257	1
+val_258	258	val_258	1
+val_262	262	val_262	1
 val_263	263	val_263	1
 val_265	265	val_265	1
 val_265	265	val_265	1
 val_273	273	val_273	1
 val_273	273	val_273	1
 val_273	273	val_273	1
+val_274	274	val_274	1
 val_275	275	val_275	1
 val_277	277	val_277	1
 val_277	277	val_277	1
 val_277	277	val_277	1
 val_277	277	val_277	1
+val_278	278	val_278	1
+val_278	278	val_278	1
+val_280	280	val_280	1
+val_280	280	val_280	1
 val_281	281	val_281	1
 val_281	281	val_281	1
+val_282	282	val_282	1
+val_282	282	val_282	1
 val_283	283	val_283	1
 val_285	285	val_285	1
-val_287	287	val_287	1
-val_289	289	val_289	1
-val_291	291	val_291	1
+val_288	288	val_288	1
+val_288	288	val_288	1
+val_296	296	val_296	1
+val_298	298	val_298	1
+val_298	298	val_298	1
+val_298	298	val_298	1
+val_302	302	val_302	1
 val_305	305	val_305	1
-val_307	307	val_307	1
-val_307	307	val_307	1
+val_306	306	val_306	1
 val_309	309	val_309	1
 val_309	309	val_309	1
-val_311	311	val_311	1
-val_311	311	val_311	1
-val_311	311	val_311	1
-val_315	315	val_315	1
-val_317	317	val_317	1
-val_317	317	val_317	1
+val_318	318	val_318	1
+val_318	318	val_318	1
+val_318	318	val_318	1
 val_321	321	val_321	1
 val_321	321	val_321	1
+val_322	322	val_322	1
+val_322	322	val_322	1
 val_323	323	val_323	1
-val_325	325	val_325	1
-val_325	325	val_325	1
-val_327	327	val_327	1
-val_327	327	val_327	1
-val_327	327	val_327	1
 val_331	331	val_331	1
 val_331	331	val_331	1
 val_333	333	val_333	1
 val_333	333	val_333	1
 val_335	335	val_335	1
-val_339	339	val_339	1
-val_341	341	val_341	1
 val_345	345	val_345	1
-val_351	351	val_351	1
-val_353	353	val_353	1
-val_353	353	val_353	1
-val_365	365	val_365	1
+val_356	356	val_356	1
+val_366	366	val_366	1
 val_367	367	val_367	1
 val_367	367	val_367	1
-val_369	369	val_369	1
-val_369	369	val_369	1
-val_369	369	val_369	1
 val_373	373	val_373	1
+val_374	374	val_374	1
 val_375	375	val_375	1
-val_377	377	val_377	1
 val_379	379	val_379	1
+val_382	382	val_382	1
+val_382	382	val_382	1
 val_389	389	val_389	1
-val_393	393	val_393	1
 val_395	395	val_395	1
 val_395	395	val_395	1
-val_397	397	val_397	1
-val_397	397	val_397	1
-val_399	399	val_399	1
-val_399	399	val_399	1
+val_400	400	val_400	1
 val_401	401	val_401	1
 val_401	401	val_401	1
 val_401	401	val_401	1
@@ -836,58 +839,55 @@ val_401	401	val_401	1
 val_403	403	val_403	1
 val_403	403	val_403	1
 val_403	403	val_403	1
-val_407	407	val_407	1
-val_409	409	val_409	1
-val_409	409	val_409	1
-val_409	409	val_409	1
-val_411	411	val_411	1
+val_406	406	val_406	1
+val_406	406	val_406	1
+val_406	406	val_406	1
+val_406	406	val_406	1
 val_413	413	val_413	1
 val_413	413	val_413	1
-val_417	417	val_417	1
-val_417	417	val_417	1
-val_417	417	val_417	1
-val_419	419	val_419	1
-val_421	421	val_421	1
-val_427	427	val_427	1
+val_418	418	val_418	1
+val_424	424	val_424	1
+val_424	424	val_424	1
 val_429	429	val_429	1
 val_429	429	val_429	1
 val_431	431	val_431	1
 val_431	431	val_431	1
 val_431	431	val_431	1
-val_435	435	val_435	1
-val_437	437	val_437	1
+val_436	436	val_436	1
+val_438	438	val_438	1
+val_438	438	val_438	1
+val_438	438	val_438	1
 val_439	439	val_439	1
 val_439	439	val_439	1
-val_443	443	val_443	1
-val_449	449	val_449	1
-val_453	453	val_453	1
+val_448	448	val_448	1
 val_455	455	val_455	1
 val_457	457	val_457	1
-val_459	459	val_459	1
-val_459	459	val_459	1
-val_463	463	val_463	1
-val_463	463	val_463	1
-val_467	467	val_467	1
+val_460	460	val_460	1
+val_462	462	val_462	1
+val_462	462	val_462	1
+val_468	468	val_468	1
+val_468	468	val_468	1
+val_468	468	val_468	1
+val_468	468	val_468	1
 val_469	469	val_469	1
 val_469	469	val_469	1
 val_469	469	val_469	1
 val_469	469	val_469	1
 val_469	469	val_469	1
+val_470	470	val_470	1
 val_475	475	val_475	1
 val_477	477	val_477	1
-val_479	479	val_479	1
 val_481	481	val_481	1
-val_483	483	val_483	1
-val_485	485	val_485	1
 val_487	487	val_487	1
 val_489	489	val_489	1
 val_489	489	val_489	1
 val_489	489	val_489	1
 val_489	489	val_489	1
-val_491	491	val_491	1
+val_492	492	val_492	1
+val_492	492	val_492	1
 val_493	493	val_493	1
-val_495	495	val_495	1
-val_497	497	val_497	1
+val_494	494	val_494	1
+val_496	496	val_496	1
 PREHOOK: query: INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '1')
 SELECT a.value, a.key, a.value FROM test_table1 a WHERE a.ds = '1'
 PREHOOK: type: QUERY
@@ -913,104 +913,93 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-val_0	0	val_0	1
-val_0	0	val_0	1
-val_0	0	val_0	1
 val_2	2	val_2	1
-val_4	4	val_4	1
-val_8	8	val_8	1
 val_10	10	val_10	1
-val_12	12	val_12	1
-val_12	12	val_12	1
-val_18	18	val_18	1
-val_18	18	val_18	1
+val_17	17	val_17	1
+val_19	19	val_19	1
 val_20	20	val_20	1
-val_24	24	val_24	1
-val_24	24	val_24	1
-val_26	26	val_26	1
-val_26	26	val_26	1
-val_28	28	val_28	1
+val_27	27	val_27	1
 val_30	30	val_30	1
-val_34	34	val_34	1
-val_42	42	val_42	1
-val_42	42	val_42	1
-val_44	44	val_44	1
+val_41	41	val_41	1
+val_43	43	val_43	1
+val_51	51	val_51	1
+val_51	51	val_51	1
 val_54	54	val_54	1
+val_57	57	val_57	1
 val_58	58	val_58	1
 val_58	58	val_58	1
 val_64	64	val_64	1
-val_66	66	val_66	1
+val_65	65	val_65	1
+val_67	67	val_67	1
+val_67	67	val_67	1
+val_69	69	val_69	1
 val_70	70	val_70	1
 val_70	70	val_70	1
 val_70	70	val_70	1
-val_72	72	val_72	1
-val_72	72	val_72	1
-val_74	74	val_74	1
-val_76	76	val_76	1
-val_76	76	val_76	1
-val_78	78	val_78	1
+val_77	77	val_77	1
 val_80	80	val_80	1
-val_82	82	val_82	1
+val_83	83	val_83	1
+val_83	83	val_83	1
 val_84	84	val_84	1
 val_84	84	val_84	1
+val_85	85	val_85	1
 val_86	86	val_86	1
 val_90	90	val_90	1
 val_90	90	val_90	1
 val_90	90	val_90	1
-val_92	92	val_92	1
 val_96	96	val_96	1
+val_97	97	val_97	1
+val_97	97	val_97	1
 val_98	98	val_98	1
 val_98	98	val_98	1
-val_100	100	val_100	1
-val_100	100	val_100	1
-val_104	104	val_104	1
-val_104	104	val_104	1
-val_114	114	val_114	1
+val_105	105	val_105	1
+val_113	113	val_113	1
+val_113	113	val_113	1
 val_116	116	val_116	1
-val_118	118	val_118	1
-val_118	118	val_118	1
-val_120	120	val_120	1
-val_120	120	val_120	1
+val_119	119	val_119	1
+val_119	119	val_119	1
+val_119	119	val_119	1
 val_126	126	val_126	1
-val_128	128	val_128	1
-val_128	128	val_128	1
-val_128	128	val_128	1
+val_133	133	val_133	1
 val_134	134	val_134	1
 val_134	134	val_134	1
-val_136	136	val_136	1
-val_138	138	val_138	1
-val_138	138	val_138	1
-val_138	138	val_138	1
-val_138	138	val_138	1
+val_137	137	val_137	1
+val_137	137	val_137	1
 val_146	146	val_146	1
 val_146	146	val_146	1
-val_150	150	val_150	1
-val_152	152	val_152	1
-val_152	152	val_152	1
+val_149	149	val_149	1
+val_149	149	val_149	1
+val_153	153	val_153	1
 val_156	156	val_156	1
+val_157	157	val_157	1
 val_158	158	val_158	1
-val_160	160	val_160	1
 val_162	162	val_162	1
+val_163	163	val_163	1
 val_164	164	val_164	1
 val_164	164	val_164	1
-val_166	166	val_166	1
-val_168	168	val_168	1
-val_170	170	val_170	1
-val_172	172	val_172	1
-val_172	172	val_172	1
-val_174	174	val_174	1
-val_174	174	val_174	1
-val_176	176	val_176	1
-val_176	176	val_176	1
+val_165	165	val_165	1
+val_165	165	val_165	1
+val_169	169	val_169	1
+val_169	169	val_169	1
+val_169	169	val_169	1
+val_169	169	val_169	1
+val_177	177	val_177	1
 val_178	178	val_178	1
-val_180	180	val_180	1
-val_186	186	val_186	1
+val_181	181	val_181	1
+val_187	187	val_187	1
+val_187	187	val_187	1
+val_187	187	val_187	1
 val_190	190	val_190	1
-val_192	192	val_192	1
-val_194	194	val_194	1
-val_196	196	val_196	1
-val_200	200	val_200	1
-val_200	200	val_200	1
+val_191	191	val_191	1
+val_191	191	val_191	1
+val_195	195	val_195	1
+val_195	195	val_195	1
+val_197	197	val_197	1
+val_197	197	val_197	1
+val_199	199	val_199	1
+val_199	199	val_199	1
+val_199	199	val_199	1
+val_201	201	val_201	1
 val_202	202	val_202	1
 val_208	208	val_208	1
 val_208	208	val_208	1
@@ -1018,63 +1007,60 @@ val_208	208	val_208	1
 val_214	214	val_214	1
 val_216	216	val_216	1
 val_216	216	val_216	1
-val_218	218	val_218	1
-val_222	222	val_222	1
-val_224	224	val_224	1
-val_224	224	val_224	1
+val_221	221	val_221	1
+val_221	221	val_221	1
 val_226	226	val_226	1
-val_228	228	val_228	1
-val_230	230	val_230	1
-val_230	230	val_230	1
-val_230	230	val_230	1
-val_230	230	val_230	1
-val_230	230	val_230	1
+val_229	229	val_229	1
+val_229	229	val_229	1
+val_233	233	val_233	1
+val_233	233	val_233	1
+val_237	237	val_237	1
+val_237	237	val_237	1
 val_238	238	val_238	1
 val_238	238	val_238	1
-val_242	242	val_242	1
-val_242	242	val_242	1
+val_239	239	val_239	1
+val_239	239	val_239	1
 val_244	244	val_244	1
 val_248	248	val_248	1
+val_249	249	val_249	1
 val_252	252	val_252	1
+val_255	255	val_255	1
+val_255	255	val_255	1
 val_256	256	val_256	1
 val_256	256	val_256	1
-val_258	258	val_258	1
 val_260	260	val_260	1
-val_262	262	val_262	1
 val_266	266	val_266	1
 val_272	272	val_272	1
 val_272	272	val_272	1
-val_274	274	val_274	1
-val_278	278	val_278	1
-val_278	278	val_278	1
-val_280	280	val_280	1
-val_280	280	val_280	1
-val_282	282	val_282	1
-val_282	282	val_282	1
 val_284	284	val_284	1
 val_286	286	val_286	1
-val_288	288	val_288	1
-val_288	288	val_288	1
+val_287	287	val_287	1
+val_289	289	val_289	1
+val_291	291	val_291	1
 val_292	292	val_292	1
-val_296	296	val_296	1
-val_298	298	val_298	1
-val_298	298	val_298	1
-val_298	298	val_298	1
-val_302	302	val_302	1
-val_306	306	val_306	1
+val_307	307	val_307	1
+val_307	307	val_307	1
 val_308	308	val_308	1
 val_310	310	val_310	1
+val_311	311	val_311	1
+val_311	311	val_311	1
+val_311	311	val_311	1
+val_315	315	val_315	1
 val_316	316	val_316	1
 val_316	316	val_316	1
 val_316	316	val_316	1
-val_318	318	val_318	1
-val_318	318	val_318	1
-val_318	318	val_318	1
-val_322	322	val_322	1
-val_322	322	val_322	1
+val_317	317	val_317	1
+val_317	317	val_317	1
+val_325	325	val_325	1
+val_325	325	val_325	1
+val_327	327	val_327	1
+val_327	327	val_327	1
+val_327	327	val_327	1
 val_332	332	val_332	1
 val_336	336	val_336	1
 val_338	338	val_338	1
+val_339	339	val_339	1
+val_341	341	val_341	1
 val_342	342	val_342	1
 val_342	342	val_342	1
 val_344	344	val_344	1
@@ -1084,176 +1070,197 @@ val_348	348	val_348	1
 val_348	348	val_348	1
 val_348	348	val_348	1
 val_348	348	val_348	1
-val_356	356	val_356	1
+val_351	351	val_351	1
+val_353	353	val_353	1
+val_353	353	val_353	1
 val_360	360	val_360	1
 val_362	362	val_362	1
 val_364	364	val_364	1
-val_366	366	val_366	1
+val_365	365	val_365	1
 val_368	368	val_368	1
-val_374	374	val_374	1
+val_369	369	val_369	1
+val_369	369	val_369	1
+val_369	369	val_369	1
+val_377	377	val_377	1
 val_378	378	val_378	1
-val_382	382	val_382	1
-val_382	382	val_382	1
 val_384	384	val_384	1
 val_384	384	val_384	1
 val_384	384	val_384	1
 val_386	386	val_386	1
 val_392	392	val_392	1
+val_393	393	val_393	1
 val_394	394	val_394	1
 val_396	396	val_396	1
 val_396	396	val_396	1
 val_396	396	val_396	1
-val_400	400	val_400	1
+val_397	397	val_397	1
+val_397	397	val_397	1
+val_399	399	val_399	1
+val_399	399	val_399	1
 val_402	402	val_402	1
 val_404	404	val_404	1
 val_404	404	val_404	1
-val_406	406	val_406	1
-val_406	406	val_406	1
-val_406	406	val_406	1
-val_406	406	val_406	1
+val_407	407	val_407	1
+val_409	409	val_409	1
+val_409	409	val_409	1
+val_409	409	val_409	1
+val_411	411	val_411	1
 val_414	414	val_414	1
 val_414	414	val_414	1
-val_418	418	val_418	1
-val_424	424	val_424	1
-val_424	424	val_424	1
+val_417	417	val_417	1
+val_417	417	val_417	1
+val_417	417	val_417	1
+val_419	419	val_419	1
+val_421	421	val_421	1
+val_427	427	val_427	1
 val_430	430	val_430	1
 val_430	430	val_430	1
 val_430	430	val_430	1
 val_432	432	val_432	1
-val_436	436	val_436	1
-val_438	438	val_438	1
-val_438	438	val_438	1
-val_438	438	val_438	1
+val_435	435	val_435	1
+val_437	437	val_437	1
+val_443	443	val_443	1
 val_444	444	val_444	1
 val_446	446	val_446	1
-val_448	448	val_448	1
+val_449	449	val_449	1
 val_452	452	val_452	1
+val_453	453	val_453	1
 val_454	454	val_454	1
 val_454	454	val_454	1
 val_454	454	val_454	1
 val_458	458	val_458	1
 val_458	458	val_458	1
-val_460	460	val_460	1
-val_462	462	val_462	1
-val_462	462	val_462	1
+val_459	459	val_459	1
+val_459	459	val_459	1
+val_463	463	val_463	1
+val_463	463	val_463	1
 val_466	466	val_466	1
 val_466	466	val_466	1
 val_466	466	val_466	1
-val_468	468	val_468	1
-val_468	468	val_468	1
-val_468	468	val_468	1
-val_468	468	val_468	1
-val_470	470	val_470	1
+val_467	467	val_467	1
 val_472	472	val_472	1
 val_478	478	val_478	1
 val_478	478	val_478	1
+val_479	479	val_479	1
 val_480	480	val_480	1
 val_480	480	val_480	1
 val_480	480	val_480	1
 val_482	482	val_482	1
+val_483	483	val_483	1
 val_484	484	val_484	1
+val_485	485	val_485	1
 val_490	490	val_490	1
-val_492	492	val_492	1
-val_492	492	val_492	1
-val_494	494	val_494	1
-val_496	496	val_496	1
+val_491	491	val_491	1
+val_495	495	val_495	1
+val_497	497	val_497	1
 val_498	498	val_498	1
 val_498	498	val_498	1
 val_498	498	val_498	1
+val_0	0	val_0	1
+val_0	0	val_0	1
+val_0	0	val_0	1
+val_4	4	val_4	1
 val_5	5	val_5	1
 val_5	5	val_5	1
 val_5	5	val_5	1
+val_8	8	val_8	1
 val_9	9	val_9	1
 val_11	11	val_11	1
+val_12	12	val_12	1
+val_12	12	val_12	1
 val_15	15	val_15	1
 val_15	15	val_15	1
-val_17	17	val_17	1
-val_19	19	val_19	1
-val_27	27	val_27	1
+val_18	18	val_18	1
+val_18	18	val_18	1
+val_24	24	val_24	1
+val_24	24	val_24	1
+val_26	26	val_26	1
+val_26	26	val_26	1
+val_28	28	val_28	1
 val_33	33	val_33	1
+val_34	34	val_34	1
 val_35	35	val_35	1
 val_35	35	val_35	1
 val_35	35	val_35	1
 val_37	37	val_37	1
 val_37	37	val_37	1
-val_41	41	val_41	1
-val_43	43	val_43	1
+val_42	42	val_42	1
+val_42	42	val_42	1
+val_44	44	val_44	1
 val_47	47	val_47	1
-val_51	51	val_51	1
-val_51	51	val_51	1
 val_53	53	val_53	1
-val_57	57	val_57	1
-val_65	65	val_65	1
-val_67	67	val_67	1
-val_67	67	val_67	1
-val_69	69	val_69	1
-val_77	77	val_77	1
-val_83	83	val_83	1
-val_83	83	val_83	1
-val_85	85	val_85	1
+val_66	66	val_66	1
+val_72	72	val_72	1
+val_72	72	val_72	1
+val_74	74	val_74	1
+val_76	76	val_76	1
+val_76	76	val_76	1
+val_78	78	val_78	1
+val_82	82	val_82	1
 val_87	87	val_87	1
+val_92	92	val_92	1
 val_95	95	val_95	1
 val_95	95	val_95	1
-val_97	97	val_97	1
-val_97	97	val_97	1
+val_100	100	val_100	1
+val_100	100	val_100	1
 val_103	103	val_103	1
 val_103	103	val_103	1
-val_105	105	val_105	1
+val_104	104	val_104	1
+val_104	104	val_104	1
 val_111	111	val_111	1
-val_113	113	val_113	1
-val_113	113	val_113	1
-val_119	119	val_119	1
-val_119	119	val_119	1
-val_119	119	val_119	1
+val_114	114	val_114	1
+val_118	118	val_118	1
+val_118	118	val_118	1
+val_120	120	val_120	1
+val_120	120	val_120	1
 val_125	125	val_125	1
 val_125	125	val_125	1
+val_128	128	val_128	1
+val_128	128	val_128	1
+val_128	128	val_128	1
 val_129	129	val_129	1
 val_129	129	val_129	1
 val_131	131	val_131	1
-val_133	133	val_133	1
-val_137	137	val_137	1
-val_137	137	val_137	1
+val_136	136	val_136	1
+val_138	138	val_138	1
+val_138	138	val_138	1
+val_138	138	val_138	1
+val_138	138	val_138	1
 val_143	143	val_143	1
 val_145	145	val_145	1
-val_149	149	val_149	1
-val_149	149	val_149	1
-val_153	153	val_153	1
+val_150	150	val_150	1
+val_152	152	val_152	1
+val_152	152	val_152	1
 val_155	155	val_155	1
-val_157	157	val_157	1
-val_163	163	val_163	1
-val_165	165	val_165	1
-val_165	165	val_165	1
+val_160	160	val_160	1
+val_166	166	val_166	1
 val_167	167	val_167	1
 val_167	167	val_167	1
 val_167	167	val_167	1
-val_169	169	val_169	1
-val_169	169	val_169	1
-val_169	169	val_169	1
-val_169	169	val_169	1
+val_168	168	val_168	1
+val_170	170	val_170	1
+val_172	172	val_172	1
+val_172	172	val_172	1
+val_174	174	val_174	1
+val_174	174	val_174	1
 val_175	175	val_175	1
 val_175	175	val_175	1
-val_177	177	val_177	1
+val_176	176	val_176	1
+val_176	176	val_176	1
 val_179	179	val_179	1
 val_179	179	val_179	1
-val_181	181	val_181	1
+val_180	180	val_180	1
 val_183	183	val_183	1
-val_187	187	val_187	1
-val_187	187	val_187	1
-val_187	187	val_187	1
+val_186	186	val_186	1
 val_189	189	val_189	1
-val_191	191	val_191	1
-val_191	191	val_191	1
+val_192	192	val_192	1
 val_193	193	val_193	1
 val_193	193	val_193	1
 val_193	193	val_193	1
-val_195	195	val_195	1
-val_195	195	val_195	1
-val_197	197	val_197	1
-val_197	197	val_197	1
-val_199	199	val_199	1
-val_199	199	val_199	1
-val_199	199	val_199	1
-val_201	201	val_201	1
+val_194	194	val_194	1
+val_196	196	val_196	1
+val_200	200	val_200	1
+val_200	200	val_200	1
 val_203	203	val_203	1
 val_203	203	val_203	1
 val_205	205	val_205	1
@@ -1266,93 +1273,89 @@ val_213	213	val_213	1
 val_213	213	val_213	1
 val_217	217	val_217	1
 val_217	217	val_217	1
+val_218	218	val_218	1
 val_219	219	val_219	1
 val_219	219	val_219	1
-val_221	221	val_221	1
-val_221	221	val_221	1
+val_222	222	val_222	1
 val_223	223	val_223	1
 val_223	223	val_223	1
-val_229	229	val_229	1
-val_229	229	val_229	1
-val_233	233	val_233	1
-val_233	233	val_233	1
+val_224	224	val_224	1
+val_224	224	val_224	1
+val_228	228	val_228	1
+val_230	230	val_230	1
+val_230	230	val_230	1
+val_230	230	val_230	1
+val_230	230	val_230	1
+val_230	230	val_230	1
 val_235	235	val_235	1
-val_237	237	val_237	1
-val_237	237	val_237	1
-val_239	239	val_239	1
-val_239	239	val_239	1
 val_241	241	val_241	1
+val_242	242	val_242	1
+val_242	242	val_242	1
 val_247	247	val_247	1
-val_249	249	val_249	1
-val_255	255	val_255	1
-val_255	255	val_255	1
 val_257	257	val_257	1
+val_258	258	val_258	1
+val_262	262	val_262	1
 val_263	263	val_263	1
 val_265	265	val_265	1
 val_265	265	val_265	1
 val_273	273	val_273	1
 val_273	273	val_273	1
 val_273	273	val_273	1
+val_274	274	val_274	1
 val_275	275	val_275	1
 val_277	277	val_277	1
 val_277	277	val_277	1
 val_277	277	val_277	1
 val_277	277	val_277	1
+val_278	278	val_278	1
+val_278	278	val_278	1
+val_280	280	val_280	1
+val_280	280	val_280	1
 val_281	281	val_281	1
 val_281	281	val_281	1
+val_282	282	val_282	1
+val_282	282	val_282	1
 val_283	283	val_283	1
 val_285	285	val_285	1
-val_287	287	val_287	1
-val_289	289	val_289	1
-val_291	291	val_291	1
+val_288	288	val_288	1
+val_288	288	val_288	1
+val_296	296	val_296	1
+val_298	298	val_298	1
+val_298	298	val_298	1
+val_298	298	val_298	1
+val_302	302	val_302	1
 val_305	305	val_305	1
-val_307	307	val_307	1
-val_307	307	val_307	1
+val_306	306	val_306	1
 val_309	309	val_309	1
 val_309	309	val_309	1
-val_311	311	val_311	1
-val_311	311	val_311	1
-val_311	311	val_311	1
-val_315	315	val_315	1
-val_317	317	val_317	1
-val_317	317	val_317	1
+val_318	318	val_318	1
+val_318	318	val_318	1
+val_318	318	val_318	1
 val_321	321	val_321	1
 val_321	321	val_321	1
+val_322	322	val_322	1
+val_322	322	val_322	1
 val_323	323	val_323	1
-val_325	325	val_325	1
-val_325	325	val_325	1
-val_327	327	val_327	1
-val_327	327	val_327	1
-val_327	327	val_327	1
 val_331	331	val_331	1
 val_331	331	val_331	1
 val_333	333	val_333	1
 val_333	333	val_333	1
 val_335	335	val_335	1
-val_339	339	val_339	1
-val_341	341	val_341	1
 val_345	345	val_345	1
-val_351	351	val_351	1
-val_353	353	val_353	1
-val_353	353	val_353	1
-val_365	365	val_365	1
+val_356	356	val_356	1
+val_366	366	val_366	1
 val_367	367	val_367	1
 val_367	367	val_367	1
-val_369	369	val_369	1
-val_369	369	val_369	1
-val_369	369	val_369	1
 val_373	373	val_373	1
+val_374	374	val_374	1
 val_375	375	val_375	1
-val_377	377	val_377	1
 val_379	379	val_379	1
+val_382	382	val_382	1
+val_382	382	val_382	1
 val_389	389	val_389	1
-val_393	393	val_393	1
 val_395	395	val_395	1
 val_395	395	val_395	1
-val_397	397	val_397	1
-val_397	397	val_397	1
-val_399	399	val_399	1
-val_399	399	val_399	1
+val_400	400	val_400	1
 val_401	401	val_401	1
 val_401	401	val_401	1
 val_401	401	val_401	1
@@ -1361,58 +1364,55 @@ val_401	401	val_401	1
 val_403	403	val_403	1
 val_403	403	val_403	1
 val_403	403	val_403	1
-val_407	407	val_407	1
-val_409	409	val_409	1
-val_409	409	val_409	1
-val_409	409	val_409	1
-val_411	411	val_411	1
+val_406	406	val_406	1
+val_406	406	val_406	1
+val_406	406	val_406	1
+val_406	406	val_406	1
 val_413	413	val_413	1
 val_413	413	val_413	1
-val_417	417	val_417	1
-val_417	417	val_417	1
-val_417	417	val_417	1
-val_419	419	val_419	1
-val_421	421	val_421	1
-val_427	427	val_427	1
+val_418	418	val_418	1
+val_424	424	val_424	1
+val_424	424	val_424	1
 val_429	429	val_429	1
 val_429	429	val_429	1
 val_431	431	val_431	1
 val_431	431	val_431	1
 val_431	431	val_431	1
-val_435	435	val_435	1
-val_437	437	val_437	1
+val_436	436	val_436	1
+val_438	438	val_438	1
+val_438	438	val_438	1
+val_438	438	val_438	1
 val_439	439	val_439	1
 val_439	439	val_439	1
-val_443	443	val_443	1
-val_449	449	val_449	1
-val_453	453	val_453	1
+val_448	448	val_448	1
 val_455	455	val_455	1
 val_457	457	val_457	1
-val_459	459	val_459	1
-val_459	459	val_459	1
-val_463	463	val_463	1
-val_463	463	val_463	1
-val_467	467	val_467	1
+val_460	460	val_460	1
+val_462	462	val_462	1
+val_462	462	val_462	1
+val_468	468	val_468	1
+val_468	468	val_468	1
+val_468	468	val_468	1
+val_468	468	val_468	1
 val_469	469	val_469	1
 val_469	469	val_469	1
 val_469	469	val_469	1
 val_469	469	val_469	1
 val_469	469	val_469	1
+val_470	470	val_470	1
 val_475	475	val_475	1
 val_477	477	val_477	1
-val_479	479	val_479	1
 val_481	481	val_481	1
-val_483	483	val_483	1
-val_485	485	val_485	1
 val_487	487	val_487	1
 val_489	489	val_489	1
 val_489	489	val_489	1
 val_489	489	val_489	1
 val_489	489	val_489	1
-val_491	491	val_491	1
+val_492	492	val_492	1
+val_492	492	val_492	1
 val_493	493	val_493	1
-val_495	495	val_495	1
-val_497	497	val_497	1
+val_494	494	val_494	1
+val_496	496	val_496	1
 PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE test_table2 PARTITION (ds = '2')
 SELECT a.key+a.key, a.value, a.value FROM test_table1 a WHERE a.ds = '1'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/smb_mapjoin_22.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/smb_mapjoin_22.q.out b/ql/src/test/results/clientpositive/smb_mapjoin_22.q.out
index a374386..57edfa5 100644
--- a/ql/src/test/results/clientpositive/smb_mapjoin_22.q.out
+++ b/ql/src/test/results/clientpositive/smb_mapjoin_22.q.out
@@ -109,7 +109,7 @@ POSTHOOK: query: select count(*) from test_table1 tablesample (bucket 2 out of 2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table1
 #### A masked pattern was here ####
-253
+257
 PREHOOK: query: select count(*) from test_table2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table2
@@ -127,7 +127,7 @@ POSTHOOK: query: select count(*) from test_table2 tablesample (bucket 2 out of 2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 #### A masked pattern was here ####
-253
+257
 PREHOOK: query: drop table test_table1
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@test_table1
@@ -255,7 +255,7 @@ POSTHOOK: query: select count(*) from test_table1 tablesample (bucket 2 out of 2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table1
 #### A masked pattern was here ####
-253
+257
 PREHOOK: query: select count(*) from test_table2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table2
@@ -273,4 +273,4 @@ POSTHOOK: query: select count(*) from test_table2 tablesample (bucket 2 out of 2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table2
 #### A masked pattern was here ####
-253
+257


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_5.q.out b/ql/src/test/results/clientpositive/spark/union_remove_5.q.out
index 92273f8..95b4de3 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_5.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_5.q.out
@@ -234,6 +234,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
 	totalSize           	68                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_7.q.out b/ql/src/test/results/clientpositive/spark/union_remove_7.q.out
index b0f1818..ed4559b 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_7.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_7.q.out
@@ -158,8 +158,9 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
-	totalSize           	332                 
+	totalSize           	336                 
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_8.q.out b/ql/src/test/results/clientpositive/spark/union_remove_8.q.out
index 63dd553..5d51136 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_8.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_8.q.out
@@ -184,8 +184,9 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
-	totalSize           	348                 
+	totalSize           	350                 
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/union_remove_9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/union_remove_9.q.out b/ql/src/test/results/clientpositive/spark/union_remove_9.q.out
index 4dc614f..2d8c21d 100644
--- a/ql/src/test/results/clientpositive/spark/union_remove_9.q.out
+++ b/ql/src/test/results/clientpositive/spark/union_remove_9.q.out
@@ -242,8 +242,9 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	4                   
-	totalSize           	348                 
+	totalSize           	350                 
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/vectorization_0.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/vectorization_0.q.out b/ql/src/test/results/clientpositive/spark/vectorization_0.q.out
index c3201bf..8b73ef2 100644
--- a/ql/src/test/results/clientpositive/spark/vectorization_0.q.out
+++ b/ql/src/test/results/clientpositive/spark/vectorization_0.q.out
@@ -1817,6 +1817,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 
@@ -1838,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 
@@ -30637,6 +30639,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 
@@ -30658,6 +30661,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 
@@ -30750,6 +30754,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 
@@ -30771,6 +30776,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 
@@ -30864,6 +30870,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 
@@ -30885,6 +30892,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 
@@ -30968,6 +30976,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 
@@ -30989,6 +30998,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/ac6b2a3f/ql/src/test/results/clientpositive/stats0.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/stats0.q.out b/ql/src/test/results/clientpositive/stats0.q.out
index dc77bef..47c71a7 100644
--- a/ql/src/test/results/clientpositive/stats0.q.out
+++ b/ql/src/test/results/clientpositive/stats0.q.out
@@ -44,6 +44,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 
@@ -90,6 +91,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'
@@ -111,6 +113,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'
@@ -171,6 +174,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 
@@ -1449,6 +1453,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 
@@ -1495,6 +1500,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'
@@ -1516,6 +1522,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'
@@ -1585,6 +1592,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 
@@ -1628,6 +1636,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 
@@ -1658,6 +1667,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 
@@ -1679,6 +1689,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 
@@ -1715,6 +1726,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 
@@ -1745,6 +1757,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 
@@ -1766,6 +1779,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 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/stats1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/stats1.q.out b/ql/src/test/results/clientpositive/stats1.q.out
index a5a3792..05e0ceb 100644
--- a/ql/src/test/results/clientpositive/stats1.q.out
+++ b/ql/src/test/results/clientpositive/stats1.q.out
@@ -223,6 +223,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	26                  
 	rawDataSize         	199                 
@@ -264,6 +265,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	3                   
 	numRows             	26                  
 	rawDataSize         	199                 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/stats10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/stats10.q.out b/ql/src/test/results/clientpositive/stats10.q.out
index ddf77e0..24c2cf7 100644
--- a/ql/src/test/results/clientpositive/stats10.q.out
+++ b/ql/src/test/results/clientpositive/stats10.q.out
@@ -163,104 +163,93 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucket3_1
 POSTHOOK: Input: default@bucket3_1@ds=1
 #### A masked pattern was here ####
-0	val_0	1
-0	val_0	1
-0	val_0	1
 2	val_2	1
-4	val_4	1
-8	val_8	1
 10	val_10	1
-12	val_12	1
-12	val_12	1
-18	val_18	1
-18	val_18	1
+17	val_17	1
+19	val_19	1
 20	val_20	1
-24	val_24	1
-24	val_24	1
-26	val_26	1
-26	val_26	1
-28	val_28	1
+27	val_27	1
 30	val_30	1
-34	val_34	1
-42	val_42	1
-42	val_42	1
-44	val_44	1
+41	val_41	1
+43	val_43	1
+51	val_51	1
+51	val_51	1
 54	val_54	1
+57	val_57	1
 58	val_58	1
 58	val_58	1
 64	val_64	1
-66	val_66	1
+65	val_65	1
+67	val_67	1
+67	val_67	1
+69	val_69	1
 70	val_70	1
 70	val_70	1
 70	val_70	1
-72	val_72	1
-72	val_72	1
-74	val_74	1
-76	val_76	1
-76	val_76	1
-78	val_78	1
+77	val_77	1
 80	val_80	1
-82	val_82	1
+83	val_83	1
+83	val_83	1
 84	val_84	1
 84	val_84	1
+85	val_85	1
 86	val_86	1
 90	val_90	1
 90	val_90	1
 90	val_90	1
-92	val_92	1
 96	val_96	1
+97	val_97	1
+97	val_97	1
 98	val_98	1
 98	val_98	1
-100	val_100	1
-100	val_100	1
-104	val_104	1
-104	val_104	1
-114	val_114	1
+105	val_105	1
+113	val_113	1
+113	val_113	1
 116	val_116	1
-118	val_118	1
-118	val_118	1
-120	val_120	1
-120	val_120	1
+119	val_119	1
+119	val_119	1
+119	val_119	1
 126	val_126	1
-128	val_128	1
-128	val_128	1
-128	val_128	1
+133	val_133	1
 134	val_134	1
 134	val_134	1
-136	val_136	1
-138	val_138	1
-138	val_138	1
-138	val_138	1
-138	val_138	1
+137	val_137	1
+137	val_137	1
 146	val_146	1
 146	val_146	1
-150	val_150	1
-152	val_152	1
-152	val_152	1
+149	val_149	1
+149	val_149	1
+153	val_153	1
 156	val_156	1
+157	val_157	1
 158	val_158	1
-160	val_160	1
 162	val_162	1
+163	val_163	1
 164	val_164	1
 164	val_164	1
-166	val_166	1
-168	val_168	1
-170	val_170	1
-172	val_172	1
-172	val_172	1
-174	val_174	1
-174	val_174	1
-176	val_176	1
-176	val_176	1
+165	val_165	1
+165	val_165	1
+169	val_169	1
+169	val_169	1
+169	val_169	1
+169	val_169	1
+177	val_177	1
 178	val_178	1
-180	val_180	1
-186	val_186	1
+181	val_181	1
+187	val_187	1
+187	val_187	1
+187	val_187	1
 190	val_190	1
-192	val_192	1
-194	val_194	1
-196	val_196	1
-200	val_200	1
-200	val_200	1
+191	val_191	1
+191	val_191	1
+195	val_195	1
+195	val_195	1
+197	val_197	1
+197	val_197	1
+199	val_199	1
+199	val_199	1
+199	val_199	1
+201	val_201	1
 202	val_202	1
 208	val_208	1
 208	val_208	1
@@ -268,63 +257,60 @@ POSTHOOK: Input: default@bucket3_1@ds=1
 214	val_214	1
 216	val_216	1
 216	val_216	1
-218	val_218	1
-222	val_222	1
-224	val_224	1
-224	val_224	1
+221	val_221	1
+221	val_221	1
 226	val_226	1
-228	val_228	1
-230	val_230	1
-230	val_230	1
-230	val_230	1
-230	val_230	1
-230	val_230	1
+229	val_229	1
+229	val_229	1
+233	val_233	1
+233	val_233	1
+237	val_237	1
+237	val_237	1
 238	val_238	1
 238	val_238	1
-242	val_242	1
-242	val_242	1
+239	val_239	1
+239	val_239	1
 244	val_244	1
 248	val_248	1
+249	val_249	1
 252	val_252	1
+255	val_255	1
+255	val_255	1
 256	val_256	1
 256	val_256	1
-258	val_258	1
 260	val_260	1
-262	val_262	1
 266	val_266	1
 272	val_272	1
 272	val_272	1
-274	val_274	1
-278	val_278	1
-278	val_278	1
-280	val_280	1
-280	val_280	1
-282	val_282	1
-282	val_282	1
 284	val_284	1
 286	val_286	1
-288	val_288	1
-288	val_288	1
+287	val_287	1
+289	val_289	1
+291	val_291	1
 292	val_292	1
-296	val_296	1
-298	val_298	1
-298	val_298	1
-298	val_298	1
-302	val_302	1
-306	val_306	1
+307	val_307	1
+307	val_307	1
 308	val_308	1
 310	val_310	1
+311	val_311	1
+311	val_311	1
+311	val_311	1
+315	val_315	1
 316	val_316	1
 316	val_316	1
 316	val_316	1
-318	val_318	1
-318	val_318	1
-318	val_318	1
-322	val_322	1
-322	val_322	1
+317	val_317	1
+317	val_317	1
+325	val_325	1
+325	val_325	1
+327	val_327	1
+327	val_327	1
+327	val_327	1
 332	val_332	1
 336	val_336	1
 338	val_338	1
+339	val_339	1
+341	val_341	1
 342	val_342	1
 342	val_342	1
 344	val_344	1
@@ -334,79 +320,89 @@ POSTHOOK: Input: default@bucket3_1@ds=1
 348	val_348	1
 348	val_348	1
 348	val_348	1
-356	val_356	1
+351	val_351	1
+353	val_353	1
+353	val_353	1
 360	val_360	1
 362	val_362	1
 364	val_364	1
-366	val_366	1
+365	val_365	1
 368	val_368	1
-374	val_374	1
+369	val_369	1
+369	val_369	1
+369	val_369	1
+377	val_377	1
 378	val_378	1
-382	val_382	1
-382	val_382	1
 384	val_384	1
 384	val_384	1
 384	val_384	1
 386	val_386	1
 392	val_392	1
+393	val_393	1
 394	val_394	1
 396	val_396	1
 396	val_396	1
 396	val_396	1
-400	val_400	1
+397	val_397	1
+397	val_397	1
+399	val_399	1
+399	val_399	1
 402	val_402	1
 404	val_404	1
 404	val_404	1
-406	val_406	1
-406	val_406	1
-406	val_406	1
-406	val_406	1
+407	val_407	1
+409	val_409	1
+409	val_409	1
+409	val_409	1
+411	val_411	1
 414	val_414	1
 414	val_414	1
-418	val_418	1
-424	val_424	1
-424	val_424	1
+417	val_417	1
+417	val_417	1
+417	val_417	1
+419	val_419	1
+421	val_421	1
+427	val_427	1
 430	val_430	1
 430	val_430	1
 430	val_430	1
 432	val_432	1
-436	val_436	1
-438	val_438	1
-438	val_438	1
-438	val_438	1
+435	val_435	1
+437	val_437	1
+443	val_443	1
 444	val_444	1
 446	val_446	1
-448	val_448	1
+449	val_449	1
 452	val_452	1
+453	val_453	1
 454	val_454	1
 454	val_454	1
 454	val_454	1
 458	val_458	1
 458	val_458	1
-460	val_460	1
-462	val_462	1
-462	val_462	1
+459	val_459	1
+459	val_459	1
+463	val_463	1
+463	val_463	1
 466	val_466	1
 466	val_466	1
 466	val_466	1
-468	val_468	1
-468	val_468	1
-468	val_468	1
-468	val_468	1
-470	val_470	1
+467	val_467	1
 472	val_472	1
 478	val_478	1
 478	val_478	1
+479	val_479	1
 480	val_480	1
 480	val_480	1
 480	val_480	1
 482	val_482	1
+483	val_483	1
 484	val_484	1
+485	val_485	1
 490	val_490	1
-492	val_492	1
-492	val_492	1
-494	val_494	1
-496	val_496	1
+491	val_491	1
+495	val_495	1
+497	val_497	1
 498	val_498	1
 498	val_498	1
 498	val_498	1
@@ -542,6 +538,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	4                   
 	numPartitions       	2                   
 	numRows             	1000                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/stats16.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/stats16.q.out b/ql/src/test/results/clientpositive/stats16.q.out
index 659d581..ba56284 100644
--- a/ql/src/test/results/clientpositive/stats16.q.out
+++ b/ql/src/test/results/clientpositive/stats16.q.out
@@ -27,6 +27,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -75,6 +76,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	5312                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/stats3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/stats3.q.out b/ql/src/test/results/clientpositive/stats3.q.out
index 212ddcc..2c2801d 100644
--- a/ql/src/test/results/clientpositive/stats3.q.out
+++ b/ql/src/test/results/clientpositive/stats3.q.out
@@ -36,6 +36,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"col1":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns col1
                 columns.comments 
@@ -81,6 +82,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -219,6 +221,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numPartitions       	1                   
 	numRows             	6                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/stats5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/stats5.q.out b/ql/src/test/results/clientpositive/stats5.q.out
index 8d4f9c4..c375c11 100644
--- a/ql/src/test/results/clientpositive/stats5.q.out
+++ b/ql/src/test/results/clientpositive/stats5.q.out
@@ -56,6 +56,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	5312                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/stats_empty_partition2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/stats_empty_partition2.q.out b/ql/src/test/results/clientpositive/stats_empty_partition2.q.out
index 6d56f83..04bf3a1 100644
--- a/ql/src/test/results/clientpositive/stats_empty_partition2.q.out
+++ b/ql/src/test/results/clientpositive/stats_empty_partition2.q.out
@@ -155,6 +155,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numPartitions       	2                   
 	numRows             	1                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/stats_invalidation.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/stats_invalidation.q.out b/ql/src/test/results/clientpositive/stats_invalidation.q.out
index 8200582..7843852 100644
--- a/ql/src/test/results/clientpositive/stats_invalidation.q.out
+++ b/ql/src/test/results/clientpositive/stats_invalidation.q.out
@@ -46,6 +46,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	5312                
@@ -89,6 +90,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	500                 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/stats_list_bucket.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/stats_list_bucket.q.out b/ql/src/test/results/clientpositive/stats_list_bucket.q.out
index 369c5b8..566af31 100644
--- a/ql/src/test/results/clientpositive/stats_list_bucket.q.out
+++ b/ql/src/test/results/clientpositive/stats_list_bucket.q.out
@@ -131,6 +131,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            	4                   
 	numRows             	500                 
 	rawDataSize         	4812                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/stats_noscan_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/stats_noscan_2.q.out b/ql/src/test/results/clientpositive/stats_noscan_2.q.out
index 053eed3..9dda57e 100644
--- a/ql/src/test/results/clientpositive/stats_noscan_2.q.out
+++ b/ql/src/test/results/clientpositive/stats_noscan_2.q.out
@@ -48,6 +48,7 @@ Table Type:         	EXTERNAL_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	numFiles            	1                   
 	totalSize           	11                  
 #### A masked pattern was here ####
@@ -88,6 +89,7 @@ Table Type:         	EXTERNAL_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	6                   
 	rawDataSize         	6                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/statsfs.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/statsfs.q.out b/ql/src/test/results/clientpositive/statsfs.q.out
index 07d5b1c..aa9786b 100644
--- a/ql/src/test/results/clientpositive/statsfs.q.out
+++ b/ql/src/test/results/clientpositive/statsfs.q.out
@@ -274,6 +274,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	5312                
@@ -334,6 +335,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	500                 
 	rawDataSize         	5312                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/temp_table_display_colstats_tbllvl.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/temp_table_display_colstats_tbllvl.q.out b/ql/src/test/results/clientpositive/temp_table_display_colstats_tbllvl.q.out
index a4a320c..598bf8e 100644
--- a/ql/src/test/results/clientpositive/temp_table_display_colstats_tbllvl.q.out
+++ b/ql/src/test/results/clientpositive/temp_table_display_colstats_tbllvl.q.out
@@ -60,6 +60,7 @@ Table Type:         	EXTERNAL_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"adrevenue\":\"true\",\"avgtimeonsite\":\"true\",\"ccode\":\"true\",\"desturl\":\"true\",\"lcode\":\"true\",\"skeyword\":\"true\",\"sourceip\":\"true\",\"useragent\":\"true\",\"visitdate\":\"true\"}}
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -109,6 +110,7 @@ Retention:          	0
 Table Type:         	EXTERNAL_TABLE      	 
 Table Parameters:	 	 
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -248,6 +250,7 @@ STAGE PLANS:
             properties:
               EXTERNAL TRUE
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns sourceip,desturl,visitdate,adrevenue,useragent,ccode,lcode,skeyword,avgtimeonsite
               columns.comments 
@@ -269,6 +272,7 @@ STAGE PLANS:
               properties:
                 EXTERNAL TRUE
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns sourceip,desturl,visitdate,adrevenue,useragent,ccode,lcode,skeyword,avgtimeonsite
                 columns.comments 
@@ -364,6 +368,7 @@ Table Type:         	EXTERNAL_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"adRevenue\":\"true\",\"avgTimeOnSite\":\"true\",\"sourceIP\":\"true\"}}
 	EXTERNAL            	TRUE                
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	55                  
 	rawDataSize         	7005                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/tez/acid_vectorization_original_tez.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/tez/acid_vectorization_original_tez.q.out b/ql/src/test/results/clientpositive/tez/acid_vectorization_original_tez.q.out
index e865a3e..db6339e 100644
--- a/ql/src/test/results/clientpositive/tez/acid_vectorization_original_tez.q.out
+++ b/ql/src/test/results/clientpositive/tez/acid_vectorization_original_tez.q.out
@@ -370,10 +370,10 @@ POSTHOOK: Lineage: over10k_orc_bucketed.si SIMPLE [(over10k)over10k.FieldSchema(
 POSTHOOK: Lineage: over10k_orc_bucketed.t SIMPLE [(over10k)over10k.FieldSchema(name:t, type:tinyint, comment:null), ]
 POSTHOOK: Lineage: over10k_orc_bucketed.ts SIMPLE [(over10k)over10k.FieldSchema(name:ts, type:timestamp, comment:null), ]
 Found 4 items
--rw-rw-rw-   3 ### USER ### ### GROUP ###       7838 ### HDFS DATE ### hdfs://### HDFS PATH ###
--rw-rw-rw-   3 ### USER ### ### GROUP ###       7786 ### HDFS DATE ### hdfs://### HDFS PATH ###
--rw-rw-rw-   3 ### USER ### ### GROUP ###       7419 ### HDFS DATE ### hdfs://### HDFS PATH ###
--rw-rw-rw-   3 ### USER ### ### GROUP ###       8035 ### HDFS DATE ### hdfs://### HDFS PATH ###
+-rw-rw-rw-   3 ### USER ### ### GROUP ###       8942 ### HDFS DATE ### hdfs://### HDFS PATH ###
+-rw-rw-rw-   3 ### USER ### ### GROUP ###       7710 ### HDFS DATE ### hdfs://### HDFS PATH ###
+-rw-rw-rw-   3 ### USER ### ### GROUP ###       7297 ### HDFS DATE ### hdfs://### HDFS PATH ###
+-rw-rw-rw-   3 ### USER ### ### GROUP ###       7204 ### HDFS DATE ### hdfs://### HDFS PATH ###
 PREHOOK: query: insert into over10k_orc_bucketed select * from over10k
 PREHOOK: type: QUERY
 PREHOOK: Input: default@over10k
@@ -394,14 +394,14 @@ POSTHOOK: Lineage: over10k_orc_bucketed.si SIMPLE [(over10k)over10k.FieldSchema(
 POSTHOOK: Lineage: over10k_orc_bucketed.t SIMPLE [(over10k)over10k.FieldSchema(name:t, type:tinyint, comment:null), ]
 POSTHOOK: Lineage: over10k_orc_bucketed.ts SIMPLE [(over10k)over10k.FieldSchema(name:ts, type:timestamp, comment:null), ]
 Found 8 items
--rw-rw-rw-   3 ### USER ### ### GROUP ###       7838 ### HDFS DATE ### hdfs://### HDFS PATH ###
--rw-rw-rw-   3 ### USER ### ### GROUP ###       7838 ### HDFS DATE ### hdfs://### HDFS PATH ###
--rw-rw-rw-   3 ### USER ### ### GROUP ###       7786 ### HDFS DATE ### hdfs://### HDFS PATH ###
--rw-rw-rw-   3 ### USER ### ### GROUP ###       7786 ### HDFS DATE ### hdfs://### HDFS PATH ###
--rw-rw-rw-   3 ### USER ### ### GROUP ###       7419 ### HDFS DATE ### hdfs://### HDFS PATH ###
--rw-rw-rw-   3 ### USER ### ### GROUP ###       7419 ### HDFS DATE ### hdfs://### HDFS PATH ###
--rw-rw-rw-   3 ### USER ### ### GROUP ###       8035 ### HDFS DATE ### hdfs://### HDFS PATH ###
--rw-rw-rw-   3 ### USER ### ### GROUP ###       8035 ### HDFS DATE ### hdfs://### HDFS PATH ###
+-rw-rw-rw-   3 ### USER ### ### GROUP ###       8942 ### HDFS DATE ### hdfs://### HDFS PATH ###
+-rw-rw-rw-   3 ### USER ### ### GROUP ###       8942 ### HDFS DATE ### hdfs://### HDFS PATH ###
+-rw-rw-rw-   3 ### USER ### ### GROUP ###       7710 ### HDFS DATE ### hdfs://### HDFS PATH ###
+-rw-rw-rw-   3 ### USER ### ### GROUP ###       7710 ### HDFS DATE ### hdfs://### HDFS PATH ###
+-rw-rw-rw-   3 ### USER ### ### GROUP ###       7297 ### HDFS DATE ### hdfs://### HDFS PATH ###
+-rw-rw-rw-   3 ### USER ### ### GROUP ###       7297 ### HDFS DATE ### hdfs://### HDFS PATH ###
+-rw-rw-rw-   3 ### USER ### ### GROUP ###       7204 ### HDFS DATE ### hdfs://### HDFS PATH ###
+-rw-rw-rw-   3 ### USER ### ### GROUP ###       7204 ### HDFS DATE ### hdfs://### HDFS PATH ###
 PREHOOK: query: select distinct 7 as seven, INPUT__FILE__NAME from over10k_orc_bucketed
 PREHOOK: type: QUERY
 PREHOOK: Input: default@over10k_orc_bucketed
@@ -559,12 +559,12 @@ POSTHOOK: query: select ROW__ID, t, si, i from over10k_orc_bucketed where b = 42
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@over10k_orc_bucketed
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-{"writeid":0,"bucketid":536870912,"rowid":36}	-3	344	65733
-{"writeid":0,"bucketid":536870912,"rowid":300}	-3	344	65733
-{"writeid":0,"bucketid":536936448,"rowid":82}	5	501	65585
-{"writeid":0,"bucketid":536936448,"rowid":344}	5	501	65585
-{"writeid":0,"bucketid":537067520,"rowid":211}	35	463	65646
-{"writeid":0,"bucketid":537067520,"rowid":488}	35	463	65646
+{"writeid":0,"bucketid":536870912,"rowid":104}	5	501	65585
+{"writeid":0,"bucketid":536870912,"rowid":420}	5	501	65585
+{"writeid":0,"bucketid":536936448,"rowid":37}	-3	344	65733
+{"writeid":0,"bucketid":536936448,"rowid":295}	-3	344	65733
+{"writeid":0,"bucketid":537067520,"rowid":173}	35	463	65646
+{"writeid":0,"bucketid":537067520,"rowid":406}	35	463	65646
 PREHOOK: query: explain update over10k_orc_bucketed set i = 0 where b = 4294967363 and t < 100
 PREHOOK: type: QUERY
 POSTHOOK: query: explain update over10k_orc_bucketed set i = 0 where b = 4294967363 and t < 100
@@ -654,10 +654,10 @@ POSTHOOK: query: select ROW__ID, t, si, i from over10k_orc_bucketed where b = 42
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@over10k_orc_bucketed
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-{"writeid":### Masked writeid ###,"bucketid":536870912,"rowid":0}	-3	344	0
-{"writeid":### Masked writeid ###,"bucketid":536870912,"rowid":1}	-3	344	0
-{"writeid":### Masked writeid ###,"bucketid":536936448,"rowid":0}	5	501	0
-{"writeid":### Masked writeid ###,"bucketid":536936448,"rowid":1}	5	501	0
+{"writeid":### Masked writeid ###,"bucketid":536870912,"rowid":0}	5	501	0
+{"writeid":### Masked writeid ###,"bucketid":536870912,"rowid":1}	5	501	0
+{"writeid":### Masked writeid ###,"bucketid":536936448,"rowid":0}	-3	344	0
+{"writeid":### Masked writeid ###,"bucketid":536936448,"rowid":1}	-3	344	0
 {"writeid":### Masked writeid ###,"bucketid":537067520,"rowid":0}	35	463	0
 {"writeid":### Masked writeid ###,"bucketid":537067520,"rowid":1}	35	463	0
 PREHOOK: query: explain select ROW__ID, count(*) from over10k_orc_bucketed group by ROW__ID having count(*) > 1
@@ -680,22 +680,22 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: over10k_orc_bucketed
-                  Statistics: Num rows: 1227 Data size: 701970 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1229 Data size: 703430 Basic stats: COMPLETE Column stats: COMPLETE
                   Select Operator
                     expressions: ROW__ID (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                     outputColumnNames: ROW__ID
-                    Statistics: Num rows: 1227 Data size: 701970 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 1229 Data size: 703430 Basic stats: COMPLETE Column stats: COMPLETE
                     Group By Operator
                       aggregations: count()
                       keys: ROW__ID (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                       mode: hash
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 613 Data size: 51492 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 614 Data size: 51576 Basic stats: COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
-                        Statistics: Num rows: 613 Data size: 51492 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 614 Data size: 51576 Basic stats: COMPLETE Column stats: COMPLETE
                         value expressions: _col1 (type: bigint)
         Reducer 2 
             Reduce Operator Tree:
@@ -704,7 +704,7 @@ STAGE PLANS:
                 keys: KEY._col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 613 Data size: 51492 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 614 Data size: 51576 Basic stats: COMPLETE Column stats: COMPLETE
                 Filter Operator
                   predicate: (_col1 > 1L) (type: boolean)
                   Statistics: Num rows: 204 Data size: 17136 Basic stats: COMPLETE Column stats: COMPLETE
@@ -742,10 +742,10 @@ POSTHOOK: query: select ROW__ID, t, si, i from over10k_orc_bucketed where b = 42
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@over10k_orc_bucketed
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-{"writeid":### Masked writeid ###,"bucketid":536870912,"rowid":0}	-3	344	0
-{"writeid":### Masked writeid ###,"bucketid":536870912,"rowid":1}	-3	344	0
-{"writeid":### Masked writeid ###,"bucketid":536936448,"rowid":0}	5	501	0
-{"writeid":### Masked writeid ###,"bucketid":536936448,"rowid":1}	5	501	0
+{"writeid":### Masked writeid ###,"bucketid":536870912,"rowid":0}	5	501	0
+{"writeid":### Masked writeid ###,"bucketid":536870912,"rowid":1}	5	501	0
+{"writeid":### Masked writeid ###,"bucketid":536936448,"rowid":0}	-3	344	0
+{"writeid":### Masked writeid ###,"bucketid":536936448,"rowid":1}	-3	344	0
 {"writeid":### Masked writeid ###,"bucketid":537067520,"rowid":0}	35	463	0
 {"writeid":### Masked writeid ###,"bucketid":537067520,"rowid":1}	35	463	0
 PREHOOK: query: select ROW__ID, count(*) from over10k_orc_bucketed group by ROW__ID having count(*) > 1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out b/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out
index fd2e95d..3b7e2a3 100644
--- a/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out
+++ b/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out
@@ -572,7 +572,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alltypesorc
 POSTHOOK: Output: hdfs://### HDFS PATH ###
 -13036	1
--8915	1
 -3799	1
 10782	1
+-8915	1
 NULL	6

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/tez/explainanalyze_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/tez/explainanalyze_5.q.out b/ql/src/test/results/clientpositive/tez/explainanalyze_5.q.out
index 8d67fe4..e493211 100644
--- a/ql/src/test/results/clientpositive/tez/explainanalyze_5.q.out
+++ b/ql/src/test/results/clientpositive/tez/explainanalyze_5.q.out
@@ -295,16 +295,16 @@ Stage-3
               Reducer 2
               File Output Operator [FS_8]
                 table:{"name:":"default.acid_uami"}
-                Select Operator [SEL_4] (rows=10/2 width=321)
+                Select Operator [SEL_4] (rows=10/2 width=316)
                   Output:["_col0","_col1","_col2","_col3"]
                 <-Map 1 [SIMPLE_EDGE]
                   SHUFFLE [RS_3]
                     PartitionCols:UDFToInteger(_col0)
-                    Select Operator [SEL_2] (rows=10/2 width=321)
+                    Select Operator [SEL_2] (rows=10/2 width=316)
                       Output:["_col0","_col1","_col3"]
-                      Filter Operator [FIL_9] (rows=10/2 width=321)
+                      Filter Operator [FIL_9] (rows=10/2 width=316)
                         predicate:((de = 109.23) or (de = 119.23))
-                        TableScan [TS_0] (rows=49/4 width=321)
+                        TableScan [TS_0] (rows=83/4 width=316)
                           default@acid_uami,acid_uami, ACID table,Tbl:COMPLETE,Col:NONE,Output:["i","de","vc"]
 
 PREHOOK: query: select * from acid_uami order by de

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/transform_ppr1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/transform_ppr1.q.out b/ql/src/test/results/clientpositive/transform_ppr1.q.out
index b0c2393..6344239 100644
--- a/ql/src/test/results/clientpositive/transform_ppr1.q.out
+++ b/ql/src/test/results/clientpositive/transform_ppr1.q.out
@@ -94,6 +94,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'
@@ -142,6 +143,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'
@@ -190,6 +192,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'
@@ -238,6 +241,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/ac6b2a3f/ql/src/test/results/clientpositive/transform_ppr2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/transform_ppr2.q.out b/ql/src/test/results/clientpositive/transform_ppr2.q.out
index 42b3638..9555e5a 100644
--- a/ql/src/test/results/clientpositive/transform_ppr2.q.out
+++ b/ql/src/test/results/clientpositive/transform_ppr2.q.out
@@ -96,6 +96,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'
@@ -144,6 +145,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/ac6b2a3f/ql/src/test/results/clientpositive/truncate_column.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/truncate_column.q.out b/ql/src/test/results/clientpositive/truncate_column.q.out
index 8c00c57..cc58072 100644
--- a/ql/src/test/results/clientpositive/truncate_column.q.out
+++ b/ql/src/test/results/clientpositive/truncate_column.q.out
@@ -36,6 +36,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	94                  
@@ -95,6 +96,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	94                  
@@ -164,6 +166,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	94                  
@@ -223,6 +226,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	94                  
@@ -293,6 +297,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	10                  
@@ -353,6 +358,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	10                  
@@ -413,6 +419,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	10                  

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/truncate_column_list_bucket.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/truncate_column_list_bucket.q.out b/ql/src/test/results/clientpositive/truncate_column_list_bucket.q.out
index 61502c6..c9807b3 100644
--- a/ql/src/test/results/clientpositive/truncate_column_list_bucket.q.out
+++ b/ql/src/test/results/clientpositive/truncate_column_list_bucket.q.out
@@ -90,6 +90,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -172,6 +173,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               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/ac6b2a3f/ql/src/test/results/clientpositive/udf_explode.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/udf_explode.q.out b/ql/src/test/results/clientpositive/udf_explode.q.out
index 488d460..5ef38fe 100644
--- a/ql/src/test/results/clientpositive/udf_explode.q.out
+++ b/ql/src/test/results/clientpositive/udf_explode.q.out
@@ -86,6 +86,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'
@@ -107,6 +108,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'
@@ -272,6 +274,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'
@@ -293,6 +296,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/udtf_explode.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/udtf_explode.q.out b/ql/src/test/results/clientpositive/udtf_explode.q.out
index 4d771a7..3b5fa40 100644
--- a/ql/src/test/results/clientpositive/udtf_explode.q.out
+++ b/ql/src/test/results/clientpositive/udtf_explode.q.out
@@ -91,6 +91,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'
@@ -112,6 +113,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'
@@ -357,6 +359,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'
@@ -378,6 +381,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/unicode_comments.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/unicode_comments.q.out b/ql/src/test/results/clientpositive/unicode_comments.q.out
index ae8c3e5..7e7768b 100644
--- a/ql/src/test/results/clientpositive/unicode_comments.q.out
+++ b/ql/src/test/results/clientpositive/unicode_comments.q.out
@@ -62,6 +62,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: describe formatted unicode_comments_tbl1
 PREHOOK: type: DESCTABLE
@@ -84,6 +85,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	comment             	表格                  
 	numFiles            	0                   
 	numPartitions       	0                   
@@ -124,6 +126,7 @@ Database:           	unicode_comments_db
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	comment             	视图                  
 #### A masked pattern was here ####
 	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/unicode_notation.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/unicode_notation.q.out b/ql/src/test/results/clientpositive/unicode_notation.q.out
index 9ac938e..a4eaaff 100644
--- a/ql/src/test/results/clientpositive/unicode_notation.q.out
+++ b/ql/src/test/results/clientpositive/unicode_notation.q.out
@@ -23,6 +23,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -73,6 +74,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -123,6 +125,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union22.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union22.q.out b/ql/src/test/results/clientpositive/union22.q.out
index b80cfad..dc53735 100644
--- a/ql/src/test/results/clientpositive/union22.q.out
+++ b/ql/src/test/results/clientpositive/union22.q.out
@@ -121,6 +121,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns k0,k1,k2,k3,k4,k5
                       columns.comments 
@@ -250,6 +251,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns k1,k2,k3,k4
                 columns.comments 
@@ -297,6 +299,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns k0,k1,k2,k3,k4,k5
                 columns.comments 
@@ -345,6 +348,7 @@ STAGE PLANS:
                         output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                         properties:
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns k1,k2,k3,k4
                           columns.comments 
@@ -398,6 +402,7 @@ STAGE PLANS:
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                     properties:
                       bucket_count -1
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns k1,k2,k3,k4
                       columns.comments 
@@ -491,6 +496,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns k0,k1,k2,k3,k4,k5
                 columns.comments 
@@ -556,6 +562,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns k1,k2,k3,k4
                 columns.comments 
@@ -661,6 +668,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns k1,k2,k3,k4
                 columns.comments 
@@ -708,6 +716,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns k0,k1,k2,k3,k4,k5
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union24.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union24.q.out b/ql/src/test/results/clientpositive/union24.q.out
index 1939323..8920506 100644
--- a/ql/src/test/results/clientpositive/union24.q.out
+++ b/ql/src/test/results/clientpositive/union24.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,count
               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,count
                 columns.comments 
@@ -349,6 +351,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,count
               columns.comments 
@@ -370,6 +373,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,count
                 columns.comments 
@@ -395,6 +399,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,count
               columns.comments 
@@ -416,6 +421,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,count
                 columns.comments 
@@ -441,6 +447,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,count
               columns.comments 
@@ -462,6 +469,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,count
                 columns.comments 
@@ -624,6 +632,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,count
               columns.comments 
@@ -645,6 +654,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,count
                 columns.comments 
@@ -670,6 +680,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,count
               columns.comments 
@@ -691,6 +702,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,count
                 columns.comments 
@@ -878,6 +890,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,count
               columns.comments 
@@ -899,6 +912,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,count
                 columns.comments 
@@ -924,6 +938,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,count
               columns.comments 
@@ -945,6 +960,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,count
                 columns.comments 
@@ -1096,6 +1112,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,count
               columns.comments 
@@ -1117,6 +1134,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,count
                 columns.comments 
@@ -1142,6 +1160,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,count
               columns.comments 
@@ -1163,6 +1182,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,count
                 columns.comments 
@@ -1421,6 +1441,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,count
               columns.comments 
@@ -1442,6 +1463,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,count
                 columns.comments 
@@ -1467,6 +1489,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns key,count
               columns.comments 
@@ -1488,6 +1511,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,count
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_pos_alias.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_pos_alias.q.out b/ql/src/test/results/clientpositive/union_pos_alias.q.out
index d350c4d..665236e 100644
--- a/ql/src/test/results/clientpositive/union_pos_alias.q.out
+++ b/ql/src/test/results/clientpositive/union_pos_alias.q.out
@@ -339,6 +339,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_ppr.q.out b/ql/src/test/results/clientpositive/union_ppr.q.out
index 8633c12..1be1e81 100644
--- a/ql/src/test/results/clientpositive/union_ppr.q.out
+++ b/ql/src/test/results/clientpositive/union_ppr.q.out
@@ -110,6 +110,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'
@@ -158,6 +159,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/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_1.q.out b/ql/src/test/results/clientpositive/union_remove_1.q.out
index bfafd28..6eae9dd 100644
--- a/ql/src/test/results/clientpositive/union_remove_1.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_1.q.out
@@ -173,6 +173,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	40                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_10.q.out b/ql/src/test/results/clientpositive/union_remove_10.q.out
index a82f18b..70ff8f2 100644
--- a/ql/src/test/results/clientpositive/union_remove_10.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_10.q.out
@@ -225,6 +225,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	3                   
 	totalSize           	271                 
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_11.q.out b/ql/src/test/results/clientpositive/union_remove_11.q.out
index 39de6a2..4fc7659 100644
--- a/ql/src/test/results/clientpositive/union_remove_11.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_11.q.out
@@ -211,6 +211,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
 	totalSize           	115                 
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_12.q.out b/ql/src/test/results/clientpositive/union_remove_12.q.out
index d7532ed..35bff6a 100644
--- a/ql/src/test/results/clientpositive/union_remove_12.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_12.q.out
@@ -214,6 +214,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	194                 
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_13.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_13.q.out b/ql/src/test/results/clientpositive/union_remove_13.q.out
index b75b492..cfc89f9 100644
--- a/ql/src/test/results/clientpositive/union_remove_13.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_13.q.out
@@ -233,6 +233,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	192                 
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_14.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_14.q.out b/ql/src/test/results/clientpositive/union_remove_14.q.out
index d7532ed..35bff6a 100644
--- a/ql/src/test/results/clientpositive/union_remove_14.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_14.q.out
@@ -214,6 +214,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	194                 
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_15.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_15.q.out b/ql/src/test/results/clientpositive/union_remove_15.q.out
index a218eb9..f693223 100644
--- a/ql/src/test/results/clientpositive/union_remove_15.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_15.q.out
@@ -190,6 +190,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_16.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_16.q.out b/ql/src/test/results/clientpositive/union_remove_16.q.out
index b09d7df..f3f26f1 100644
--- a/ql/src/test/results/clientpositive/union_remove_16.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_16.q.out
@@ -224,6 +224,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_17.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_17.q.out b/ql/src/test/results/clientpositive/union_remove_17.q.out
index 4e50b23..460d085 100644
--- a/ql/src/test/results/clientpositive/union_remove_17.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_17.q.out
@@ -149,6 +149,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_18.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_18.q.out b/ql/src/test/results/clientpositive/union_remove_18.q.out
index 4549cae..1149d4c 100644
--- a/ql/src/test/results/clientpositive/union_remove_18.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_18.q.out
@@ -202,6 +202,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	12                  
 	numPartitions       	6                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_19.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_19.q.out b/ql/src/test/results/clientpositive/union_remove_19.q.out
index 21184e4..1d26782 100644
--- a/ql/src/test/results/clientpositive/union_remove_19.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_19.q.out
@@ -173,6 +173,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	40                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_2.q.out b/ql/src/test/results/clientpositive/union_remove_2.q.out
index 5d8df25..66d8fe6 100644
--- a/ql/src/test/results/clientpositive/union_remove_2.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_2.q.out
@@ -183,6 +183,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	3                   
 	totalSize           	68                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_20.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_20.q.out b/ql/src/test/results/clientpositive/union_remove_20.q.out
index 73ccc22..8b89407 100644
--- a/ql/src/test/results/clientpositive/union_remove_20.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_20.q.out
@@ -181,6 +181,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	40                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_21.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_21.q.out b/ql/src/test/results/clientpositive/union_remove_21.q.out
index c263bbd..5f36d8f 100644
--- a/ql/src/test/results/clientpositive/union_remove_21.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_21.q.out
@@ -165,6 +165,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	20                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_22.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_22.q.out b/ql/src/test/results/clientpositive/union_remove_22.q.out
index a2a7c2f..e9ed8e0 100644
--- a/ql/src/test/results/clientpositive/union_remove_22.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_22.q.out
@@ -183,6 +183,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	60                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_23.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_23.q.out b/ql/src/test/results/clientpositive/union_remove_23.q.out
index ba07891..29e7969 100644
--- a/ql/src/test/results/clientpositive/union_remove_23.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_23.q.out
@@ -221,6 +221,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	40                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_24.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_24.q.out b/ql/src/test/results/clientpositive/union_remove_24.q.out
index 243b54a..e59171c 100644
--- a/ql/src/test/results/clientpositive/union_remove_24.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_24.q.out
@@ -181,6 +181,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	60                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_3.q.out b/ql/src/test/results/clientpositive/union_remove_3.q.out
index b3630a7..28fb92b 100644
--- a/ql/src/test/results/clientpositive/union_remove_3.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_3.q.out
@@ -169,6 +169,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	1                   
 	totalSize           	72                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_4.q.out b/ql/src/test/results/clientpositive/union_remove_4.q.out
index 6d2426c..93b4f51 100644
--- a/ql/src/test/results/clientpositive/union_remove_4.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_4.q.out
@@ -217,6 +217,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	40                  
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/union_remove_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_remove_5.q.out b/ql/src/test/results/clientpositive/union_remove_5.q.out
index e1f702a..5ed9988 100644
--- a/ql/src/test/results/clientpositive/union_remove_5.q.out
+++ b/ql/src/test/results/clientpositive/union_remove_5.q.out
@@ -227,6 +227,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	3                   
 	totalSize           	68                  
 #### A masked pattern was here ####


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientnegative/alter_file_format.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/alter_file_format.q.out b/ql/src/test/results/clientnegative/alter_file_format.q.out
index 96259e5..3033cbe 100644
--- a/ql/src/test/results/clientnegative/alter_file_format.q.out
+++ b/ql/src/test/results/clientnegative/alter_file_format.q.out
@@ -24,6 +24,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientnegative/alter_view_as_select_with_partition.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/alter_view_as_select_with_partition.q.out b/ql/src/test/results/clientnegative/alter_view_as_select_with_partition.q.out
index 8e240ea..90c3d02 100644
--- a/ql/src/test/results/clientnegative/alter_view_as_select_with_partition.q.out
+++ b/ql/src/test/results/clientnegative/alter_view_as_select_with_partition.q.out
@@ -51,6 +51,7 @@ Retention:          	0
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	2                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientnegative/unset_table_property.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/unset_table_property.q.out b/ql/src/test/results/clientnegative/unset_table_property.q.out
index 2dd047a..eb308eb 100644
--- a/ql/src/test/results/clientnegative/unset_table_property.q.out
+++ b/ql/src/test/results/clientnegative/unset_table_property.q.out
@@ -20,6 +20,7 @@ POSTHOOK: query: SHOW TBLPROPERTIES testTable
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true","COLUMN_STATS":{"col1":"true","col2":"true"}}
 a	1
+bucketing_version	2
 c	3
 #### A masked pattern was here ####
 numFiles	0

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientnegative/unset_view_property.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/unset_view_property.q.out b/ql/src/test/results/clientnegative/unset_view_property.q.out
index ae7f4f6..b5038d9 100644
--- a/ql/src/test/results/clientnegative/unset_view_property.q.out
+++ b/ql/src/test/results/clientnegative/unset_view_property.q.out
@@ -21,6 +21,7 @@ PREHOOK: query: SHOW TBLPROPERTIES testView
 PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: SHOW TBLPROPERTIES testView
 POSTHOOK: type: SHOW_TBLPROPERTIES
+bucketing_version	2
 #### A masked pattern was here ####
 propA	100
 propB	200

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/acid_mapjoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/acid_mapjoin.q.out b/ql/src/test/results/clientpositive/acid_mapjoin.q.out
index 5569a03..76a781e 100644
--- a/ql/src/test/results/clientpositive/acid_mapjoin.q.out
+++ b/ql/src/test/results/clientpositive/acid_mapjoin.q.out
@@ -73,21 +73,21 @@ STAGE PLANS:
   Stage: Stage-5
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $hdt$_1:acid2 
+        $hdt$_0:acid1 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $hdt$_1:acid2 
+        $hdt$_0:acid1 
           TableScan
-            alias: acid2
-            Statistics: Num rows: 210 Data size: 840 Basic stats: COMPLETE Column stats: NONE
+            alias: acid1
+            Statistics: Num rows: 316 Data size: 1265 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 210 Data size: 840 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 316 Data size: 1265 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int)
                 outputColumnNames: _col0
-                Statistics: Num rows: 210 Data size: 840 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 316 Data size: 1265 Basic stats: COMPLETE Column stats: NONE
                 HashTable Sink Operator
                   keys:
                     0 _col0 (type: int)
@@ -97,15 +97,15 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: acid1
-            Statistics: Num rows: 316 Data size: 1265 Basic stats: COMPLETE Column stats: NONE
+            alias: acid2
+            Statistics: Num rows: 210 Data size: 840 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 316 Data size: 1265 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 210 Data size: 840 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int)
                 outputColumnNames: _col0
-                Statistics: Num rows: 316 Data size: 1265 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 210 Data size: 840 Basic stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
                        Inner Join 0 to 1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/acid_nullscan.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/acid_nullscan.q.out b/ql/src/test/results/clientpositive/acid_nullscan.q.out
index 5b2227f..9024719 100644
--- a/ql/src/test/results/clientpositive/acid_nullscan.q.out
+++ b/ql/src/test/results/clientpositive/acid_nullscan.q.out
@@ -71,6 +71,7 @@ STAGE PLANS:
             properties:
               bucket_count 2
               bucket_field_name a
+              bucketing_version 2
               column.name.delimiter ,
               columns a,b
               columns.comments 
@@ -92,6 +93,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name a
+                bucketing_version 2
                 column.name.delimiter ,
                 columns a,b
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/acid_table_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/acid_table_stats.q.out b/ql/src/test/results/clientpositive/acid_table_stats.q.out
index 1fc71db..42c2a79 100644
--- a/ql/src/test/results/clientpositive/acid_table_stats.q.out
+++ b/ql/src/test/results/clientpositive/acid_table_stats.q.out
@@ -32,6 +32,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -603,6 +604,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/ac6b2a3f/ql/src/test/results/clientpositive/alterColumnStats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alterColumnStats.q.out b/ql/src/test/results/clientpositive/alterColumnStats.q.out
index 5b38828..0be7ca4 100644
--- a/ql/src/test/results/clientpositive/alterColumnStats.q.out
+++ b/ql/src/test/results/clientpositive/alterColumnStats.q.out
@@ -29,6 +29,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c1\":\"true\",\"c2\":\"true\",\"insert_num\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -75,6 +76,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c1\":\"true\",\"c2\":\"true\",\"insert_num\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1                   
 	rawDataSize         	8                   
@@ -118,6 +120,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"insert_num\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	1                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/alterColumnStatsPart.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alterColumnStatsPart.q.out b/ql/src/test/results/clientpositive/alterColumnStatsPart.q.out
index 620c1ef..ab25373 100644
--- a/ql/src/test/results/clientpositive/alterColumnStatsPart.q.out
+++ b/ql/src/test/results/clientpositive/alterColumnStatsPart.q.out
@@ -32,6 +32,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/ac6b2a3f/ql/src/test/results/clientpositive/alter_file_format.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_file_format.q.out b/ql/src/test/results/clientpositive/alter_file_format.q.out
index d134bc1..e1a75a0 100644
--- a/ql/src/test/results/clientpositive/alter_file_format.q.out
+++ b/ql/src/test/results/clientpositive/alter_file_format.q.out
@@ -24,6 +24,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -66,6 +67,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -109,6 +111,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -152,6 +155,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -195,6 +199,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -238,6 +243,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -281,6 +287,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/alter_numbuckets_partitioned_table2_h23.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_numbuckets_partitioned_table2_h23.q.out b/ql/src/test/results/clientpositive/alter_numbuckets_partitioned_table2_h23.q.out
index 2d6aca5..58d803f 100644
--- a/ql/src/test/results/clientpositive/alter_numbuckets_partitioned_table2_h23.q.out
+++ b/ql/src/test/results/clientpositive/alter_numbuckets_partitioned_table2_h23.q.out
@@ -28,6 +28,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -122,6 +123,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numPartitions       	1                   
@@ -217,6 +219,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	8                   
 	numPartitions       	1                   
@@ -312,6 +315,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	8                   
 	numPartitions       	1                   
@@ -407,6 +411,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	8                   
 	numPartitions       	1                   
@@ -502,6 +507,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	4                   
 	numPartitions       	1                   
@@ -597,6 +603,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	4                   
 	numPartitions       	1                   
@@ -692,6 +699,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	4                   
 	numPartitions       	1                   
@@ -787,6 +795,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	4                   
 	numPartitions       	1                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/alter_numbuckets_partitioned_table_h23.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_numbuckets_partitioned_table_h23.q.out b/ql/src/test/results/clientpositive/alter_numbuckets_partitioned_table_h23.q.out
index 60d3eba..c0861e5 100644
--- a/ql/src/test/results/clientpositive/alter_numbuckets_partitioned_table_h23.q.out
+++ b/ql/src/test/results/clientpositive/alter_numbuckets_partitioned_table_h23.q.out
@@ -36,6 +36,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numPartitions       	0                   
@@ -178,6 +179,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	12                  
 	numPartitions       	1                   
@@ -225,6 +227,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	12                  
 	numPartitions       	1                   
@@ -310,6 +313,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	12                  
 	numPartitions       	1                   
@@ -396,6 +400,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	12                  
 	numPartitions       	1                   
@@ -444,6 +449,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	12                  
 	numPartitions       	1                   
@@ -492,6 +498,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	12                  
 	numPartitions       	1                   
@@ -540,6 +547,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	12                  
 	numPartitions       	1                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/alter_partition_clusterby_sortby.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_partition_clusterby_sortby.q.out b/ql/src/test/results/clientpositive/alter_partition_clusterby_sortby.q.out
index 758dd23..96f6c2a 100644
--- a/ql/src/test/results/clientpositive/alter_partition_clusterby_sortby.q.out
+++ b/ql/src/test/results/clientpositive/alter_partition_clusterby_sortby.q.out
@@ -177,6 +177,7 @@ Table Type:         	MANAGED_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
 	SORTBUCKETCOLSPREFIX	TRUE                
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	1                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/alter_partition_coltype.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_partition_coltype.q.out b/ql/src/test/results/clientpositive/alter_partition_coltype.q.out
index 361b196..186c303 100644
--- a/ql/src/test/results/clientpositive/alter_partition_coltype.q.out
+++ b/ql/src/test/results/clientpositive/alter_partition_coltype.q.out
@@ -255,6 +255,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 
@@ -301,6 +302,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 
@@ -489,6 +491,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns intcol
                 columns.comments 
@@ -558,6 +561,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns intcol
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/alter_skewed_table.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_skewed_table.q.out b/ql/src/test/results/clientpositive/alter_skewed_table.q.out
index ce4b509..e6a53a9 100644
--- a/ql/src/test/results/clientpositive/alter_skewed_table.q.out
+++ b/ql/src/test/results/clientpositive/alter_skewed_table.q.out
@@ -24,6 +24,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -66,6 +67,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -125,6 +127,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -167,6 +170,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   
@@ -220,6 +224,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -264,6 +269,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/alter_table_add_partition.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_table_add_partition.q.out b/ql/src/test/results/clientpositive/alter_table_add_partition.q.out
index a6275cb..949588f 100644
--- a/ql/src/test/results/clientpositive/alter_table_add_partition.q.out
+++ b/ql/src/test/results/clientpositive/alter_table_add_partition.q.out
@@ -27,6 +27,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -72,6 +73,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	1                   
 	numRows             	0                   
@@ -155,6 +157,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numPartitions       	1                   
 	numRows             	1                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/alter_table_column_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_table_column_stats.q.out b/ql/src/test/results/clientpositive/alter_table_column_stats.q.out
index a8ef59c..e7d37f1 100644
--- a/ql/src/test/results/clientpositive/alter_table_column_stats.q.out
+++ b/ql/src/test/results/clientpositive/alter_table_column_stats.q.out
@@ -102,6 +102,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col1\":\"true\",\"col2\":\"true\",\"col3\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	154                 
@@ -203,6 +204,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col1\":\"true\",\"col2\":\"true\",\"col3\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	10                  
@@ -304,6 +306,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col1\":\"true\",\"col2\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	10                  
@@ -405,6 +408,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col2\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	10                  
@@ -507,6 +511,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col2\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	10                  
@@ -622,6 +627,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	30                  
@@ -855,6 +861,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numPartitions       	2                   
@@ -1090,6 +1097,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numPartitions       	2                   
@@ -1327,6 +1335,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numPartitions       	2                   
@@ -1544,6 +1553,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numPartitions       	2                   
@@ -1738,6 +1748,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numPartitions       	2                   
@@ -1972,6 +1983,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col1\":\"true\",\"col2\":\"true\",\"col3\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	10                  
 	rawDataSize         	154                 
@@ -2073,6 +2085,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col1\":\"true\",\"col2\":\"true\",\"col3\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	10                  
@@ -2174,6 +2187,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col1\":\"true\",\"col2\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	10                  
@@ -2275,6 +2289,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col2\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	10                  
@@ -2377,6 +2392,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col2\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	10                  
@@ -2492,6 +2508,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	30                  
@@ -2725,6 +2742,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numPartitions       	2                   
@@ -2960,6 +2978,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numPartitions       	2                   
@@ -3197,6 +3216,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numPartitions       	2                   
@@ -3414,6 +3434,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numPartitions       	2                   
@@ -3608,6 +3629,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numPartitions       	2                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/alter_table_not_sorted.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_table_not_sorted.q.out b/ql/src/test/results/clientpositive/alter_table_not_sorted.q.out
index dbd4b7f..7e04d44 100644
--- a/ql/src/test/results/clientpositive/alter_table_not_sorted.q.out
+++ b/ql/src/test/results/clientpositive/alter_table_not_sorted.q.out
@@ -25,6 +25,7 @@ Table Type:         	MANAGED_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
 	SORTBUCKETCOLSPREFIX	TRUE                
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -68,6 +69,7 @@ Table Type:         	MANAGED_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
 	SORTBUCKETCOLSPREFIX	TRUE                
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	0                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/alter_table_serde2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_table_serde2.q.out b/ql/src/test/results/clientpositive/alter_table_serde2.q.out
index 81b1f5b..fc82acf 100644
--- a/ql/src/test/results/clientpositive/alter_table_serde2.q.out
+++ b/ql/src/test/results/clientpositive/alter_table_serde2.q.out
@@ -28,6 +28,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -122,6 +123,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numPartitions       	1                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/alter_view_as_select.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_view_as_select.q.out b/ql/src/test/results/clientpositive/alter_view_as_select.q.out
index 494c9b6..425b527 100644
--- a/ql/src/test/results/clientpositive/alter_view_as_select.q.out
+++ b/ql/src/test/results/clientpositive/alter_view_as_select.q.out
@@ -36,6 +36,7 @@ Database:           	tv
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -76,6 +77,7 @@ Database:           	tv
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -125,6 +127,7 @@ Database:           	tv
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/alter_view_col_type.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_view_col_type.q.out b/ql/src/test/results/clientpositive/alter_view_col_type.q.out
index 539ea7f..c829400 100644
--- a/ql/src/test/results/clientpositive/alter_view_col_type.q.out
+++ b/ql/src/test/results/clientpositive/alter_view_col_type.q.out
@@ -89,6 +89,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -145,6 +146,7 @@ Database:           	default
 Retention:          	0                   	 
 Table Type:         	VIRTUAL_VIEW        	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/analyze_table_null_partition.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/analyze_table_null_partition.q.out b/ql/src/test/results/clientpositive/analyze_table_null_partition.q.out
index e7151b6..6be0ac9 100644
--- a/ql/src/test/results/clientpositive/analyze_table_null_partition.q.out
+++ b/ql/src/test/results/clientpositive/analyze_table_null_partition.q.out
@@ -125,6 +125,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns name
                 columns.comments 
@@ -170,6 +171,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns name
                 columns.comments 
@@ -215,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 name
                 columns.comments 
@@ -260,6 +263,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns name
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/analyze_tbl_date.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/analyze_tbl_date.q.out b/ql/src/test/results/clientpositive/analyze_tbl_date.q.out
index 6a84fe3..6cd878d 100644
--- a/ql/src/test/results/clientpositive/analyze_tbl_date.q.out
+++ b/ql/src/test/results/clientpositive/analyze_tbl_date.q.out
@@ -42,6 +42,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"d\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	3                   
 	rawDataSize         	6                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/archive_excludeHadoop20.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/archive_excludeHadoop20.q.out b/ql/src/test/results/clientpositive/archive_excludeHadoop20.q.out
index 52d17b4..65b0cdc 100644
--- a/ql/src/test/results/clientpositive/archive_excludeHadoop20.q.out
+++ b/ql/src/test/results/clientpositive/archive_excludeHadoop20.q.out
@@ -196,11 +196,11 @@ CLUSTERED BY (key) INTO 10 BUCKETS
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@harbucket
-PREHOOK: query: INSERT OVERWRITE TABLE harbucket PARTITION(ds='1') SELECT CAST(key AS INT) AS a FROM tstsrc WHERE key < 50
+PREHOOK: query: INSERT OVERWRITE TABLE harbucket PARTITION(ds='1') SELECT CAST(key AS INT) AS a FROM tstsrc WHERE key > 50
 PREHOOK: type: QUERY
 PREHOOK: Input: default@tstsrc
 PREHOOK: Output: default@harbucket@ds=1
-POSTHOOK: query: INSERT OVERWRITE TABLE harbucket PARTITION(ds='1') SELECT CAST(key AS INT) AS a FROM tstsrc WHERE key < 50
+POSTHOOK: query: INSERT OVERWRITE TABLE harbucket PARTITION(ds='1') SELECT CAST(key AS INT) AS a FROM tstsrc WHERE key > 50
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@tstsrc
 POSTHOOK: Output: default@harbucket@ds=1
@@ -215,12 +215,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@harbucket
 POSTHOOK: Input: default@harbucket@ds=1
 #### A masked pattern was here ####
-0
-0
-0
-10
-20
-30
+260
 PREHOOK: query: ALTER TABLE tstsrcpart ARCHIVE PARTITION (ds='2008-04-08', hr='12')
 PREHOOK: type: ALTERTABLE_ARCHIVE
 PREHOOK: Input: default@tstsrcpart
@@ -239,12 +234,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@harbucket
 POSTHOOK: Input: default@harbucket@ds=1
 #### A masked pattern was here ####
-0
-0
-0
-10
-20
-30
+260
 PREHOOK: query: ALTER TABLE tstsrcpart UNARCHIVE PARTITION (ds='2008-04-08', hr='12')
 PREHOOK: type: ALTERTABLE_UNARCHIVE
 PREHOOK: Input: default@tstsrcpart
@@ -263,12 +253,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@harbucket
 POSTHOOK: Input: default@harbucket@ds=1
 #### A masked pattern was here ####
-0
-0
-0
-10
-20
-30
+260
 PREHOOK: query: CREATE TABLE old_name(key INT)
 PARTITIONED by (ds STRING)
 PREHOOK: type: CREATETABLE
@@ -279,11 +264,11 @@ PARTITIONED by (ds STRING)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@old_name
-PREHOOK: query: INSERT OVERWRITE TABLE old_name PARTITION(ds='1') SELECT CAST(key AS INT) AS a FROM tstsrc WHERE key < 50
+PREHOOK: query: INSERT OVERWRITE TABLE old_name PARTITION(ds='1') SELECT CAST(key AS INT) AS a FROM tstsrc WHERE key > 50
 PREHOOK: type: QUERY
 PREHOOK: Input: default@tstsrc
 PREHOOK: Output: default@old_name@ds=1
-POSTHOOK: query: INSERT OVERWRITE TABLE old_name PARTITION(ds='1') SELECT CAST(key AS INT) AS a FROM tstsrc WHERE key < 50
+POSTHOOK: query: INSERT OVERWRITE TABLE old_name PARTITION(ds='1') SELECT CAST(key AS INT) AS a FROM tstsrc WHERE key > 50
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@tstsrc
 POSTHOOK: Output: default@old_name@ds=1
@@ -308,7 +293,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@old_name
 POSTHOOK: Input: default@old_name@ds=1
 #### A masked pattern was here ####
-48656137
+20158186837
 PREHOOK: query: ALTER TABLE old_name RENAME TO new_name
 PREHOOK: type: ALTERTABLE_RENAME
 PREHOOK: Input: default@old_name
@@ -330,7 +315,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@new_name
 POSTHOOK: Input: default@new_name@ds=1
 #### A masked pattern was here ####
-48656137
+20158186837
 PREHOOK: query: drop table tstsrc
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@tstsrc

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/autoColumnStats_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/autoColumnStats_1.q.out b/ql/src/test/results/clientpositive/autoColumnStats_1.q.out
index 0a36451..d1ff2de 100644
--- a/ql/src/test/results/clientpositive/autoColumnStats_1.q.out
+++ b/ql/src/test/results/clientpositive/autoColumnStats_1.q.out
@@ -397,6 +397,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numPartitions       	0                   
 	numRows             	0                   
@@ -1013,6 +1014,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/ac6b2a3f/ql/src/test/results/clientpositive/autoColumnStats_10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/autoColumnStats_10.q.out b/ql/src/test/results/clientpositive/autoColumnStats_10.q.out
index 9ae59e6..6634966 100644
--- a/ql/src/test/results/clientpositive/autoColumnStats_10.q.out
+++ b/ql/src/test/results/clientpositive/autoColumnStats_10.q.out
@@ -29,6 +29,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c1\":\"true\",\"c2\":\"true\",\"insert_num\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -75,6 +76,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c1\":\"true\",\"c2\":\"true\",\"insert_num\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1                   
 	rawDataSize         	8                   
@@ -118,6 +120,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"insert_num\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	1                   
@@ -203,6 +206,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"insert_num\":\"true\"}}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numRows             	2                   
@@ -293,6 +297,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"c1\":\"true\",\"c2\":\"true\",\"insert_num\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -339,6 +344,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1                   
 	rawDataSize         	8                   
@@ -382,6 +388,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	1                   
 	numRows             	1                   
@@ -467,6 +474,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	2                   
 	numRows             	2                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/autoColumnStats_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/autoColumnStats_2.q.out b/ql/src/test/results/clientpositive/autoColumnStats_2.q.out
index a4aebdf..060039b 100644
--- a/ql/src/test/results/clientpositive/autoColumnStats_2.q.out
+++ b/ql/src/test/results/clientpositive/autoColumnStats_2.q.out
@@ -1137,6 +1137,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/ac6b2a3f/ql/src/test/results/clientpositive/autoColumnStats_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/autoColumnStats_3.q.out b/ql/src/test/results/clientpositive/autoColumnStats_3.q.out
index b3d8d3e..cae5ebf 100644
--- a/ql/src/test/results/clientpositive/autoColumnStats_3.q.out
+++ b/ql/src/test/results/clientpositive/autoColumnStats_3.q.out
@@ -135,6 +135,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/ac6b2a3f/ql/src/test/results/clientpositive/autoColumnStats_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/autoColumnStats_4.q.out b/ql/src/test/results/clientpositive/autoColumnStats_4.q.out
index 67add22..3fa59c7 100644
--- a/ql/src/test/results/clientpositive/autoColumnStats_4.q.out
+++ b/ql/src/test/results/clientpositive/autoColumnStats_4.q.out
@@ -24,6 +24,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	0                   
 	numRows             	0                   
 	rawDataSize         	0                   
@@ -197,6 +198,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	bucketing_version   	2                   
 	numFiles            	2                   
 	totalSize           	1856                
 	transactional       	true                
@@ -239,6 +241,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{}                  
+	bucketing_version   	2                   
 	numFiles            	4                   
 	totalSize           	3000                
 	transactional       	true                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/autoColumnStats_5a.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/autoColumnStats_5a.q.out b/ql/src/test/results/clientpositive/autoColumnStats_5a.q.out
index 44f4c71..c9b7019 100644
--- a/ql/src/test/results/clientpositive/autoColumnStats_5a.q.out
+++ b/ql/src/test/results/clientpositive/autoColumnStats_5a.q.out
@@ -56,6 +56,7 @@ STAGE PLANS:
                         output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                         properties:
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns a,b
                           columns.comments 
@@ -101,6 +102,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns 
               columns.comments 
@@ -116,6 +118,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns 
                 columns.comments 
@@ -186,6 +189,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns a,b
                 columns.comments 
@@ -225,6 +229,7 @@ STAGE PLANS:
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                   properties:
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns a,b
                     columns.comments 
@@ -252,6 +257,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns a,b
               columns.comments 
@@ -269,6 +275,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns a,b
                 columns.comments 
@@ -301,6 +308,7 @@ STAGE PLANS:
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                   properties:
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns a,b
                     columns.comments 
@@ -328,6 +336,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns a,b
               columns.comments 
@@ -345,6 +354,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns a,b
                 columns.comments 
@@ -467,6 +477,7 @@ STAGE PLANS:
                         output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                         properties:
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns a,b
                           columns.comments 
@@ -512,6 +523,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns 
               columns.comments 
@@ -527,6 +539,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns 
                 columns.comments 
@@ -597,6 +610,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns a,b
                 columns.comments 
@@ -636,6 +650,7 @@ STAGE PLANS:
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                   properties:
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns a,b
                     columns.comments 
@@ -663,6 +678,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns a,b
               columns.comments 
@@ -680,6 +696,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns a,b
                 columns.comments 
@@ -712,6 +729,7 @@ STAGE PLANS:
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                   properties:
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns a,b
                     columns.comments 
@@ -739,6 +757,7 @@ STAGE PLANS:
             output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
             properties:
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns a,b
               columns.comments 
@@ -756,6 +775,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns a,b
                 columns.comments 
@@ -949,6 +969,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	1                   
 	numRows             	4                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/autoColumnStats_8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/autoColumnStats_8.q.out b/ql/src/test/results/clientpositive/autoColumnStats_8.q.out
index 95cbbc5..8bdba66 100644
--- a/ql/src/test/results/clientpositive/autoColumnStats_8.q.out
+++ b/ql/src/test/results/clientpositive/autoColumnStats_8.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/ac6b2a3f/ql/src/test/results/clientpositive/autoColumnStats_9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/autoColumnStats_9.q.out b/ql/src/test/results/clientpositive/autoColumnStats_9.q.out
index 012b290..a2554f1 100644
--- a/ql/src/test/results/clientpositive/autoColumnStats_9.q.out
+++ b/ql/src/test/results/clientpositive/autoColumnStats_9.q.out
@@ -225,6 +225,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
+	bucketing_version   	2                   
 	numFiles            	137                 
 	numRows             	855                 
 	rawDataSize         	9143                

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/auto_join_reordering_values.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_join_reordering_values.q.out b/ql/src/test/results/clientpositive/auto_join_reordering_values.q.out
index 97954bf..e66e402 100644
--- a/ql/src/test/results/clientpositive/auto_join_reordering_values.q.out
+++ b/ql/src/test/results/clientpositive/auto_join_reordering_values.q.out
@@ -143,6 +143,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cityid":"true","date":"true","dealid":"true","time":"true","userid":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns dealid,date,time,cityid,userid
               columns.comments 
@@ -164,6 +165,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cityid":"true","date":"true","dealid":"true","time":"true","userid":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns dealid,date,time,cityid,userid
                 columns.comments 
@@ -279,6 +281,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cityid":"true","date":"true","dealid":"true","time":"true","userid":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns dealid,date,time,cityid,userid
               columns.comments 
@@ -300,6 +303,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cityid":"true","date":"true","dealid":"true","time":"true","userid":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns dealid,date,time,cityid,userid
                 columns.comments 
@@ -416,6 +420,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cityid":"true","date":"true","dealid":"true","time":"true","userid":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns dealid,date,time,cityid,userid
               columns.comments 
@@ -437,6 +442,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"cityid":"true","date":"true","dealid":"true","time":"true","userid":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns dealid,date,time,cityid,userid
                 columns.comments 
@@ -553,6 +559,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"userid":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns userid
               columns.comments 
@@ -574,6 +581,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"userid":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns userid
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/avro_schema_evolution_native.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/avro_schema_evolution_native.q.out b/ql/src/test/results/clientpositive/avro_schema_evolution_native.q.out
index 13e4dea..200f9b8 100644
--- a/ql/src/test/results/clientpositive/avro_schema_evolution_native.q.out
+++ b/ql/src/test/results/clientpositive/avro_schema_evolution_native.q.out
@@ -102,6 +102,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	7                   
 	numPartitions       	7                   
 	numRows             	8                   
@@ -212,6 +213,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 #### A masked pattern was here ####
 	numFiles            	7                   
 	numPartitions       	7                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/basicstat_partval.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/basicstat_partval.q.out b/ql/src/test/results/clientpositive/basicstat_partval.q.out
index ac75365..bb318ed 100644
--- a/ql/src/test/results/clientpositive/basicstat_partval.q.out
+++ b/ql/src/test/results/clientpositive/basicstat_partval.q.out
@@ -45,6 +45,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numPartitions       	2                   
 	numRows             	3                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/beeline/escape_comments.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/beeline/escape_comments.q.out b/ql/src/test/results/clientpositive/beeline/escape_comments.q.out
index 43b9399..7890561 100644
--- a/ql/src/test/results/clientpositive/beeline/escape_comments.q.out
+++ b/ql/src/test/results/clientpositive/beeline/escape_comments.q.out
@@ -70,6 +70,7 @@ OUTPUTFORMAT
 LOCATION
 #### A masked pattern was here ####
 TBLPROPERTIES (
+  'bucketing_version'='2', 
 #### A masked pattern was here ####
 PREHOOK: query: describe formatted escape_comments_tbl1
 PREHOOK: type: DESCTABLE
@@ -93,6 +94,7 @@ Retention:          	0                   	NULL
 Table Type:         	MANAGED_TABLE       	NULL
 Table Parameters:	NULL	NULL
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	comment             	a\nb                
 	numFiles            	0                   
 	numPartitions       	0                   
@@ -146,6 +148,7 @@ LastAccessTime:     	UNKNOWN             	NULL
 Retention:          	0                   	NULL
 Table Type:         	VIRTUAL_VIEW        	NULL
 Table Parameters:	NULL	NULL
+	bucketing_version   	2                   
 	comment             	a\nb                
 #### A masked pattern was here ####
 	NULL	NULL

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/beeline/materialized_view_create_rewrite.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/beeline/materialized_view_create_rewrite.q.out b/ql/src/test/results/clientpositive/beeline/materialized_view_create_rewrite.q.out
index 17343e7..ce03b7f 100644
--- a/ql/src/test/results/clientpositive/beeline/materialized_view_create_rewrite.q.out
+++ b/ql/src/test/results/clientpositive/beeline/materialized_view_create_rewrite.q.out
@@ -65,6 +65,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: show tblproperties cmv_mat_view
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true"}
+bucketing_version	2
 numFiles	1
 numRows	2
 rawDataSize	408
@@ -97,6 +98,7 @@ PREHOOK: type: SHOW_TBLPROPERTIES
 POSTHOOK: query: show tblproperties cmv_mat_view2
 POSTHOOK: type: SHOW_TBLPROPERTIES
 COLUMN_STATS_ACCURATE	{"BASIC_STATS":"true"}
+bucketing_version	2
 numFiles	1
 numRows	2
 rawDataSize	232

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/beeline/smb_mapjoin_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/beeline/smb_mapjoin_1.q.out b/ql/src/test/results/clientpositive/beeline/smb_mapjoin_1.q.out
index e455524..5ee45ce 100644
--- a/ql/src/test/results/clientpositive/beeline/smb_mapjoin_1.q.out
+++ b/ql/src/test/results/clientpositive/beeline/smb_mapjoin_1.q.out
@@ -55,6 +55,7 @@ POSTHOOK: Input: default@smb_bucket_1
 	NULL	NULL
 	NULL	NULL
 	SORTBUCKETCOLSPREFIX	TRUE                
+	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	0                   
 	rawDataSize         	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/beeline/smb_mapjoin_11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/beeline/smb_mapjoin_11.q.out b/ql/src/test/results/clientpositive/beeline/smb_mapjoin_11.q.out
index 5a15a90..251be5b 100644
--- a/ql/src/test/results/clientpositive/beeline/smb_mapjoin_11.q.out
+++ b/ql/src/test/results/clientpositive/beeline/smb_mapjoin_11.q.out
@@ -121,6 +121,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -156,6 +157,7 @@ STAGE PLANS:
                 properties:
                   bucket_count 16
                   bucket_field_name key
+                  bucketing_version 2
                   column.name.delimiter ,
                   columns key,value
                   columns.comments 
@@ -213,6 +215,7 @@ STAGE PLANS:
               properties:
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -1961,6 +1964,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -2070,6 +2074,7 @@ STAGE PLANS:
               properties:
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -2104,47 +2109,38 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table1
 POSTHOOK: Input: default@test_table1@ds=1
 #### A masked pattern was here ####
-17	val_17	1
-33	val_33	1
-65	val_65	1
-97	val_97	1
-97	val_97	1
-113	val_113	1
-113	val_113	1
-129	val_129	1
-129	val_129	1
-145	val_145	1
-177	val_177	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-209	val_209	1
-209	val_209	1
-241	val_241	1
-257	val_257	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-289	val_289	1
-305	val_305	1
+8	val_8	1
+26	val_26	1
+26	val_26	1
+82	val_82	1
+103	val_103	1
+103	val_103	1
+118	val_118	1
+118	val_118	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+176	val_176	1
+176	val_176	1
+194	val_194	1
+275	val_275	1
+280	val_280	1
+280	val_280	1
+282	val_282	1
+282	val_282	1
+309	val_309	1
+309	val_309	1
 321	val_321	1
 321	val_321	1
-353	val_353	1
-353	val_353	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-449	val_449	1
-481	val_481	1
-497	val_497	1
+400	val_400	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+439	val_439	1
+439	val_439	1
+455	val_455	1
+462	val_462	1
+462	val_462	1
 PREHOOK: query: SELECT * FROM test_table3 TABLESAMPLE(BUCKET 2 OUT OF 16)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table3
@@ -2155,103 +2151,70 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-497	val_497	1
-481	val_481	1
-449	val_449	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-417	val_417	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-401	val_401	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-369	val_369	1
-353	val_353	1
-353	val_353	1
-353	val_353	1
-353	val_353	1
+462	val_462	1
+462	val_462	1
+462	val_462	1
+462	val_462	1
+455	val_455	1
+439	val_439	1
+439	val_439	1
+439	val_439	1
+439	val_439	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+438	val_438	1
+400	val_400	1
 321	val_321	1
 321	val_321	1
 321	val_321	1
 321	val_321	1
-305	val_305	1
-289	val_289	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-273	val_273	1
-257	val_257	1
-241	val_241	1
-209	val_209	1
-209	val_209	1
-209	val_209	1
-209	val_209	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-193	val_193	1
-177	val_177	1
-145	val_145	1
-129	val_129	1
-129	val_129	1
-129	val_129	1
-129	val_129	1
-113	val_113	1
-113	val_113	1
-113	val_113	1
-113	val_113	1
-97	val_97	1
-97	val_97	1
-97	val_97	1
-97	val_97	1
-65	val_65	1
-33	val_33	1
-17	val_17	1
+309	val_309	1
+309	val_309	1
+309	val_309	1
+309	val_309	1
+282	val_282	1
+282	val_282	1
+282	val_282	1
+282	val_282	1
+280	val_280	1
+280	val_280	1
+280	val_280	1
+280	val_280	1
+275	val_275	1
+194	val_194	1
+176	val_176	1
+176	val_176	1
+176	val_176	1
+176	val_176	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+128	val_128	1
+118	val_118	1
+118	val_118	1
+118	val_118	1
+118	val_118	1
+103	val_103	1
+103	val_103	1
+103	val_103	1
+103	val_103	1
+82	val_82	1
+26	val_26	1
+26	val_26	1
+26	val_26	1
+26	val_26	1
+8	val_8	1
 PREHOOK: query: SELECT COUNT(*) FROM test_table3 TABLESAMPLE(BUCKET 2 OUT OF 16) a JOIN test_table1 TABLESAMPLE(BUCKET 2 OUT OF 16) b ON a.key = b.key AND a.ds = '1' AND b.ds='1'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@test_table1
@@ -2266,4 +2229,4 @@ POSTHOOK: Input: default@test_table1@ds=1
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-293
+140

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/beeline/smb_mapjoin_12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/beeline/smb_mapjoin_12.q.out b/ql/src/test/results/clientpositive/beeline/smb_mapjoin_12.q.out
index b7ac613..75cebf1 100644
--- a/ql/src/test/results/clientpositive/beeline/smb_mapjoin_12.q.out
+++ b/ql/src/test/results/clientpositive/beeline/smb_mapjoin_12.q.out
@@ -101,6 +101,7 @@ STAGE PLANS:
                           SORTBUCKETCOLSPREFIX TRUE
                           bucket_count 16
                           bucket_field_name key
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value
                           columns.comments 
@@ -156,6 +157,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -188,6 +190,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -247,7 +250,7 @@ POSTHOOK: Input: default@test_table1@ds=1
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=1
 #### A masked pattern was here ####
-879
+420
 PREHOOK: query: explain extended
 INSERT OVERWRITE TABLE test_table3 PARTITION (ds = '2') 
 SELECT /*+mapjoin(b)*/ a.key, concat(a.value, b.value) FROM test_table3 a JOIN test_table1 b ON a.key = b.key AND a.ds = '1' AND b.ds='1'
@@ -332,6 +335,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -368,6 +372,7 @@ STAGE PLANS:
                   SORTBUCKETCOLSPREFIX TRUE
                   bucket_count 16
                   bucket_field_name key
+                  bucketing_version 2
                   column.name.delimiter ,
                   columns key,value
                   columns.comments 
@@ -426,6 +431,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -552,4 +558,4 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@test_table3
 POSTHOOK: Input: default@test_table3@ds=2
 #### A masked pattern was here ####
-879
+420

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/beeline/smb_mapjoin_13.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/beeline/smb_mapjoin_13.q.out b/ql/src/test/results/clientpositive/beeline/smb_mapjoin_13.q.out
index 58b148a..1204572 100644
--- a/ql/src/test/results/clientpositive/beeline/smb_mapjoin_13.q.out
+++ b/ql/src/test/results/clientpositive/beeline/smb_mapjoin_13.q.out
@@ -116,6 +116,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 16
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -139,6 +140,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -297,6 +299,7 @@ STAGE PLANS:
               SORTBUCKETCOLSPREFIX TRUE
               bucket_count 16
               bucket_field_name key
+              bucketing_version 2
               column.name.delimiter ,
               columns key,value
               columns.comments 
@@ -320,6 +323,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 16
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/binary_output_format.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/binary_output_format.q.out b/ql/src/test/results/clientpositive/binary_output_format.q.out
index 2f72ae9..5c5867b 100644
--- a/ql/src/test/results/clientpositive/binary_output_format.q.out
+++ b/ql/src/test/results/clientpositive/binary_output_format.q.out
@@ -97,6 +97,7 @@ STAGE PLANS:
                       properties:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"mydata":"true"}}
                         bucket_count -1
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns mydata
                         columns.comments 
@@ -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'
@@ -165,6 +167,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'
@@ -234,6 +237,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"mydata":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns mydata
                 columns.comments 
@@ -278,6 +282,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"mydata":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns mydata
                     columns.comments 
@@ -309,6 +314,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"mydata":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns mydata
               columns.comments 
@@ -331,6 +337,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"mydata":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns mydata
                 columns.comments 
@@ -368,6 +375,7 @@ STAGE PLANS:
                   properties:
                     COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"mydata":"true"}}
                     bucket_count -1
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns mydata
                     columns.comments 
@@ -399,6 +407,7 @@ STAGE PLANS:
             properties:
               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"mydata":"true"}}
               bucket_count -1
+              bucketing_version 2
               column.name.delimiter ,
               columns mydata
               columns.comments 
@@ -421,6 +430,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"mydata":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns mydata
                 columns.comments 


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/list_bucket_dml_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/list_bucket_dml_2.q.out b/ql/src/test/results/clientpositive/spark/list_bucket_dml_2.q.out
index 30dc8b5..0ee050f 100644
--- a/ql/src/test/results/clientpositive/spark/list_bucket_dml_2.q.out
+++ b/ql/src/test/results/clientpositive/spark/list_bucket_dml_2.q.out
@@ -55,6 +55,7 @@ STAGE PLANS:
                           output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
                           properties:
                             bucket_count -1
+                            bucketing_version 2
                             column.name.delimiter ,
                             columns key,value
                             columns.comments 
@@ -109,6 +110,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'
@@ -157,6 +159,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'
@@ -189,6 +192,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -338,6 +342,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.RCFileOutputFormat
               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/ac6b2a3f/ql/src/test/results/clientpositive/spark/load_dyn_part8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/load_dyn_part8.q.out b/ql/src/test/results/clientpositive/spark/load_dyn_part8.q.out
index 10d12a6..71996fe 100644
--- a/ql/src/test/results/clientpositive/spark/load_dyn_part8.q.out
+++ b/ql/src/test/results/clientpositive/spark/load_dyn_part8.q.out
@@ -173,6 +173,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'
@@ -221,6 +222,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'
@@ -269,6 +271,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'
@@ -317,6 +320,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/ac6b2a3f/ql/src/test/results/clientpositive/spark/louter_join_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/louter_join_ppr.q.out b/ql/src/test/results/clientpositive/spark/louter_join_ppr.q.out
index 972a7a8..7fbd873 100644
--- a/ql/src/test/results/clientpositive/spark/louter_join_ppr.q.out
+++ b/ql/src/test/results/clientpositive/spark/louter_join_ppr.q.out
@@ -62,6 +62,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'
@@ -83,6 +84,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'
@@ -162,6 +164,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'
@@ -210,6 +213,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'
@@ -395,6 +399,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'
@@ -443,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'
@@ -496,6 +502,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'
@@ -517,6 +524,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'
@@ -682,6 +690,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'
@@ -703,6 +712,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'
@@ -782,6 +792,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'
@@ -830,6 +841,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'
@@ -1015,6 +1027,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'
@@ -1063,6 +1076,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'
@@ -1116,6 +1130,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'
@@ -1137,6 +1152,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/mapjoin_mapjoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/mapjoin_mapjoin.q.out b/ql/src/test/results/clientpositive/spark/mapjoin_mapjoin.q.out
index f20ac17..ec632a6 100644
--- a/ql/src/test/results/clientpositive/spark/mapjoin_mapjoin.q.out
+++ b/ql/src/test/results/clientpositive/spark/mapjoin_mapjoin.q.out
@@ -45,6 +45,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'
@@ -66,6 +67,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'
@@ -118,6 +120,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'
@@ -139,6 +142,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'
@@ -260,6 +264,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'
@@ -308,6 +313,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'
@@ -356,6 +362,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'
@@ -404,6 +411,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/ac6b2a3f/ql/src/test/results/clientpositive/spark/mapreduce1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/mapreduce1.q.out b/ql/src/test/results/clientpositive/spark/mapreduce1.q.out
index 5d922d5..7c05053 100644
--- a/ql/src/test/results/clientpositive/spark/mapreduce1.q.out
+++ b/ql/src/test/results/clientpositive/spark/mapreduce1.q.out
@@ -116,25 +116,15 @@ POSTHOOK: query: SELECT dest1.* FROM dest1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@dest1
 #### A masked pattern was here ####
-0	0	0	val_0
-0	0	0	val_0
-0	0	0	val_0
-2	0	2	val_2
-4	0	4	val_4
 5	0	5	val_5
 5	0	5	val_5
 5	0	5	val_5
 8	0	8	val_8
 9	0	9	val_9
-10	1	0	val_10
 11	1	1	val_11
-12	1	2	val_12
-12	1	2	val_12
 15	1	5	val_15
 15	1	5	val_15
 17	1	7	val_17
-18	1	8	val_18
-18	1	8	val_18
 19	1	9	val_19
 100	10	0	val_100
 100	10	0	val_100
@@ -142,44 +132,17 @@ POSTHOOK: Input: default@dest1
 103	10	3	val_103
 104	10	4	val_104
 104	10	4	val_104
-105	10	5	val_105
-111	11	1	val_111
-113	11	3	val_113
-113	11	3	val_113
 114	11	4	val_114
 116	11	6	val_116
 118	11	8	val_118
 118	11	8	val_118
-119	11	9	val_119
-119	11	9	val_119
-119	11	9	val_119
 120	12	0	val_120
 120	12	0	val_120
-125	12	5	val_125
-125	12	5	val_125
-126	12	6	val_126
-128	12	8	val_128
-128	12	8	val_128
-128	12	8	val_128
-129	12	9	val_129
-129	12	9	val_129
 131	13	1	val_131
 133	13	3	val_133
-134	13	4	val_134
-134	13	4	val_134
-136	13	6	val_136
 137	13	7	val_137
 137	13	7	val_137
-138	13	8	val_138
-138	13	8	val_138
-138	13	8	val_138
-138	13	8	val_138
-143	14	3	val_143
 145	14	5	val_145
-146	14	6	val_146
-146	14	6	val_146
-149	14	9	val_149
-149	14	9	val_149
 150	15	0	val_150
 152	15	2	val_152
 152	15	2	val_152
@@ -187,94 +150,42 @@ POSTHOOK: Input: default@dest1
 155	15	5	val_155
 156	15	6	val_156
 157	15	7	val_157
-158	15	8	val_158
 160	16	0	val_160
 162	16	2	val_162
-163	16	3	val_163
-164	16	4	val_164
-164	16	4	val_164
-165	16	5	val_165
-165	16	5	val_165
-166	16	6	val_166
-167	16	7	val_167
-167	16	7	val_167
-167	16	7	val_167
 168	16	8	val_168
 169	16	9	val_169
 169	16	9	val_169
 169	16	9	val_169
 169	16	9	val_169
 170	17	0	val_170
-172	17	2	val_172
-172	17	2	val_172
-174	17	4	val_174
-174	17	4	val_174
 175	17	5	val_175
 175	17	5	val_175
 176	17	6	val_176
 176	17	6	val_176
-177	17	7	val_177
 178	17	8	val_178
-179	17	9	val_179
-179	17	9	val_179
 180	18	0	val_180
-181	18	1	val_181
 183	18	3	val_183
 186	18	6	val_186
-187	18	7	val_187
-187	18	7	val_187
-187	18	7	val_187
-189	18	9	val_189
 190	19	0	val_190
-191	19	1	val_191
-191	19	1	val_191
 192	19	2	val_192
-193	19	3	val_193
-193	19	3	val_193
-193	19	3	val_193
 194	19	4	val_194
-195	19	5	val_195
-195	19	5	val_195
 196	19	6	val_196
-197	19	7	val_197
-197	19	7	val_197
 199	19	9	val_199
 199	19	9	val_199
 199	19	9	val_199
 20	2	0	val_20
-24	2	4	val_24
-24	2	4	val_24
-26	2	6	val_26
-26	2	6	val_26
 27	2	7	val_27
 28	2	8	val_28
-200	20	0	val_200
-200	20	0	val_200
-201	20	1	val_201
 202	20	2	val_202
 203	20	3	val_203
 203	20	3	val_203
-205	20	5	val_205
-205	20	5	val_205
 207	20	7	val_207
 207	20	7	val_207
-208	20	8	val_208
-208	20	8	val_208
-208	20	8	val_208
-209	20	9	val_209
-209	20	9	val_209
 213	21	3	val_213
 213	21	3	val_213
 214	21	4	val_214
-216	21	6	val_216
-216	21	6	val_216
-217	21	7	val_217
-217	21	7	val_217
-218	21	8	val_218
 219	21	9	val_219
 219	21	9	val_219
-221	22	1	val_221
-221	22	1	val_221
 222	22	2	val_222
 223	22	3	val_223
 223	22	3	val_223
@@ -282,99 +193,49 @@ POSTHOOK: Input: default@dest1
 224	22	4	val_224
 226	22	6	val_226
 228	22	8	val_228
-229	22	9	val_229
-229	22	9	val_229
-230	23	0	val_230
-230	23	0	val_230
-230	23	0	val_230
-230	23	0	val_230
-230	23	0	val_230
 233	23	3	val_233
 233	23	3	val_233
-235	23	5	val_235
-237	23	7	val_237
-237	23	7	val_237
-238	23	8	val_238
-238	23	8	val_238
 239	23	9	val_239
 239	23	9	val_239
 241	24	1	val_241
-242	24	2	val_242
-242	24	2	val_242
 244	24	4	val_244
 247	24	7	val_247
-248	24	8	val_248
-249	24	9	val_249
 252	25	2	val_252
 255	25	5	val_255
 255	25	5	val_255
 256	25	6	val_256
 256	25	6	val_256
 257	25	7	val_257
-258	25	8	val_258
 260	26	0	val_260
-262	26	2	val_262
-263	26	3	val_263
-265	26	5	val_265
-265	26	5	val_265
 266	26	6	val_266
 272	27	2	val_272
 272	27	2	val_272
-273	27	3	val_273
-273	27	3	val_273
-273	27	3	val_273
 274	27	4	val_274
 275	27	5	val_275
-277	27	7	val_277
-277	27	7	val_277
-277	27	7	val_277
-277	27	7	val_277
 278	27	8	val_278
 278	27	8	val_278
 280	28	0	val_280
 280	28	0	val_280
-281	28	1	val_281
-281	28	1	val_281
-282	28	2	val_282
-282	28	2	val_282
-283	28	3	val_283
 284	28	4	val_284
 285	28	5	val_285
 286	28	6	val_286
-287	28	7	val_287
 288	28	8	val_288
 288	28	8	val_288
 289	28	9	val_289
-291	29	1	val_291
-292	29	2	val_292
 296	29	6	val_296
-298	29	8	val_298
-298	29	8	val_298
-298	29	8	val_298
-30	3	0	val_30
 33	3	3	val_33
 34	3	4	val_34
 35	3	5	val_35
 35	3	5	val_35
 35	3	5	val_35
-37	3	7	val_37
-37	3	7	val_37
 302	30	2	val_302
 305	30	5	val_305
 306	30	6	val_306
 307	30	7	val_307
 307	30	7	val_307
-308	30	8	val_308
-309	30	9	val_309
-309	30	9	val_309
-310	31	0	val_310
 311	31	1	val_311
 311	31	1	val_311
 311	31	1	val_311
-315	31	5	val_315
-316	31	6	val_316
-316	31	6	val_316
-316	31	6	val_316
 317	31	7	val_317
 317	31	7	val_317
 318	31	8	val_318
@@ -385,62 +246,36 @@ POSTHOOK: Input: default@dest1
 322	32	2	val_322
 322	32	2	val_322
 323	32	3	val_323
-325	32	5	val_325
-325	32	5	val_325
 327	32	7	val_327
 327	32	7	val_327
 327	32	7	val_327
 331	33	1	val_331
 331	33	1	val_331
-332	33	2	val_332
-333	33	3	val_333
-333	33	3	val_333
-335	33	5	val_335
 336	33	6	val_336
 338	33	8	val_338
-339	33	9	val_339
-341	34	1	val_341
-342	34	2	val_342
-342	34	2	val_342
-344	34	4	val_344
-344	34	4	val_344
-345	34	5	val_345
 348	34	8	val_348
 348	34	8	val_348
 348	34	8	val_348
 348	34	8	val_348
 348	34	8	val_348
 351	35	1	val_351
-353	35	3	val_353
-353	35	3	val_353
-356	35	6	val_356
 360	36	0	val_360
-362	36	2	val_362
-364	36	4	val_364
 365	36	5	val_365
 366	36	6	val_366
-367	36	7	val_367
-367	36	7	val_367
-368	36	8	val_368
 369	36	9	val_369
 369	36	9	val_369
 369	36	9	val_369
-373	37	3	val_373
 374	37	4	val_374
 375	37	5	val_375
 377	37	7	val_377
-378	37	8	val_378
 379	37	9	val_379
 382	38	2	val_382
 382	38	2	val_382
 384	38	4	val_384
 384	38	4	val_384
 384	38	4	val_384
-386	38	6	val_386
 389	38	9	val_389
-392	39	2	val_392
 393	39	3	val_393
-394	39	4	val_394
 395	39	5	val_395
 395	39	5	val_395
 396	39	6	val_396
@@ -453,7 +288,6 @@ POSTHOOK: Input: default@dest1
 41	4	1	val_41
 42	4	2	val_42
 42	4	2	val_42
-43	4	3	val_43
 44	4	4	val_44
 47	4	7	val_47
 400	40	0	val_400
@@ -462,10 +296,6 @@ POSTHOOK: Input: default@dest1
 401	40	1	val_401
 401	40	1	val_401
 401	40	1	val_401
-402	40	2	val_402
-403	40	3	val_403
-403	40	3	val_403
-403	40	3	val_403
 404	40	4	val_404
 404	40	4	val_404
 406	40	6	val_406
@@ -476,58 +306,262 @@ POSTHOOK: Input: default@dest1
 409	40	9	val_409
 409	40	9	val_409
 409	40	9	val_409
-411	41	1	val_411
-413	41	3	val_413
-413	41	3	val_413
 414	41	4	val_414
 414	41	4	val_414
 417	41	7	val_417
 417	41	7	val_417
 417	41	7	val_417
 418	41	8	val_418
-419	41	9	val_419
 421	42	1	val_421
-424	42	4	val_424
-424	42	4	val_424
 427	42	7	val_427
-429	42	9	val_429
-429	42	9	val_429
 430	43	0	val_430
 430	43	0	val_430
 430	43	0	val_430
 431	43	1	val_431
 431	43	1	val_431
 431	43	1	val_431
-432	43	2	val_432
 435	43	5	val_435
-436	43	6	val_436
-437	43	7	val_437
 438	43	8	val_438
 438	43	8	val_438
 438	43	8	val_438
 439	43	9	val_439
 439	43	9	val_439
 443	44	3	val_443
-444	44	4	val_444
-446	44	6	val_446
 448	44	8	val_448
-449	44	9	val_449
-452	45	2	val_452
-453	45	3	val_453
 454	45	4	val_454
 454	45	4	val_454
 454	45	4	val_454
 455	45	5	val_455
-457	45	7	val_457
-458	45	8	val_458
-458	45	8	val_458
 459	45	9	val_459
 459	45	9	val_459
-460	46	0	val_460
 462	46	2	val_462
 462	46	2	val_462
 463	46	3	val_463
 463	46	3	val_463
+470	47	0	val_470
+472	47	2	val_472
+478	47	8	val_478
+478	47	8	val_478
+480	48	0	val_480
+480	48	0	val_480
+480	48	0	val_480
+481	48	1	val_481
+485	48	5	val_485
+489	48	9	val_489
+489	48	9	val_489
+489	48	9	val_489
+489	48	9	val_489
+490	49	0	val_490
+491	49	1	val_491
+494	49	4	val_494
+53	5	3	val_53
+57	5	7	val_57
+66	6	6	val_66
+69	6	9	val_69
+72	7	2	val_72
+72	7	2	val_72
+74	7	4	val_74
+76	7	6	val_76
+76	7	6	val_76
+77	7	7	val_77
+78	7	8	val_78
+80	8	0	val_80
+84	8	4	val_84
+84	8	4	val_84
+86	8	6	val_86
+90	9	0	val_90
+90	9	0	val_90
+90	9	0	val_90
+0	0	0	val_0
+0	0	0	val_0
+0	0	0	val_0
+2	0	2	val_2
+4	0	4	val_4
+10	1	0	val_10
+12	1	2	val_12
+12	1	2	val_12
+18	1	8	val_18
+18	1	8	val_18
+105	10	5	val_105
+111	11	1	val_111
+113	11	3	val_113
+113	11	3	val_113
+119	11	9	val_119
+119	11	9	val_119
+119	11	9	val_119
+125	12	5	val_125
+125	12	5	val_125
+126	12	6	val_126
+128	12	8	val_128
+128	12	8	val_128
+128	12	8	val_128
+129	12	9	val_129
+129	12	9	val_129
+134	13	4	val_134
+134	13	4	val_134
+136	13	6	val_136
+138	13	8	val_138
+138	13	8	val_138
+138	13	8	val_138
+138	13	8	val_138
+143	14	3	val_143
+146	14	6	val_146
+146	14	6	val_146
+149	14	9	val_149
+149	14	9	val_149
+158	15	8	val_158
+163	16	3	val_163
+164	16	4	val_164
+164	16	4	val_164
+165	16	5	val_165
+165	16	5	val_165
+166	16	6	val_166
+167	16	7	val_167
+167	16	7	val_167
+167	16	7	val_167
+172	17	2	val_172
+172	17	2	val_172
+174	17	4	val_174
+174	17	4	val_174
+177	17	7	val_177
+179	17	9	val_179
+179	17	9	val_179
+181	18	1	val_181
+187	18	7	val_187
+187	18	7	val_187
+187	18	7	val_187
+189	18	9	val_189
+191	19	1	val_191
+191	19	1	val_191
+193	19	3	val_193
+193	19	3	val_193
+193	19	3	val_193
+195	19	5	val_195
+195	19	5	val_195
+197	19	7	val_197
+197	19	7	val_197
+24	2	4	val_24
+24	2	4	val_24
+26	2	6	val_26
+26	2	6	val_26
+200	20	0	val_200
+200	20	0	val_200
+201	20	1	val_201
+205	20	5	val_205
+205	20	5	val_205
+208	20	8	val_208
+208	20	8	val_208
+208	20	8	val_208
+209	20	9	val_209
+209	20	9	val_209
+216	21	6	val_216
+216	21	6	val_216
+217	21	7	val_217
+217	21	7	val_217
+218	21	8	val_218
+221	22	1	val_221
+221	22	1	val_221
+229	22	9	val_229
+229	22	9	val_229
+230	23	0	val_230
+230	23	0	val_230
+230	23	0	val_230
+230	23	0	val_230
+230	23	0	val_230
+235	23	5	val_235
+237	23	7	val_237
+237	23	7	val_237
+238	23	8	val_238
+238	23	8	val_238
+242	24	2	val_242
+242	24	2	val_242
+248	24	8	val_248
+249	24	9	val_249
+258	25	8	val_258
+262	26	2	val_262
+263	26	3	val_263
+265	26	5	val_265
+265	26	5	val_265
+273	27	3	val_273
+273	27	3	val_273
+273	27	3	val_273
+277	27	7	val_277
+277	27	7	val_277
+277	27	7	val_277
+277	27	7	val_277
+281	28	1	val_281
+281	28	1	val_281
+282	28	2	val_282
+282	28	2	val_282
+283	28	3	val_283
+287	28	7	val_287
+291	29	1	val_291
+292	29	2	val_292
+298	29	8	val_298
+298	29	8	val_298
+298	29	8	val_298
+30	3	0	val_30
+37	3	7	val_37
+37	3	7	val_37
+308	30	8	val_308
+309	30	9	val_309
+309	30	9	val_309
+310	31	0	val_310
+315	31	5	val_315
+316	31	6	val_316
+316	31	6	val_316
+316	31	6	val_316
+325	32	5	val_325
+325	32	5	val_325
+332	33	2	val_332
+333	33	3	val_333
+333	33	3	val_333
+335	33	5	val_335
+339	33	9	val_339
+341	34	1	val_341
+342	34	2	val_342
+342	34	2	val_342
+344	34	4	val_344
+344	34	4	val_344
+345	34	5	val_345
+353	35	3	val_353
+353	35	3	val_353
+356	35	6	val_356
+362	36	2	val_362
+364	36	4	val_364
+367	36	7	val_367
+367	36	7	val_367
+368	36	8	val_368
+373	37	3	val_373
+378	37	8	val_378
+386	38	6	val_386
+392	39	2	val_392
+394	39	4	val_394
+43	4	3	val_43
+402	40	2	val_402
+403	40	3	val_403
+403	40	3	val_403
+403	40	3	val_403
+411	41	1	val_411
+413	41	3	val_413
+413	41	3	val_413
+419	41	9	val_419
+424	42	4	val_424
+424	42	4	val_424
+429	42	9	val_429
+429	42	9	val_429
+432	43	2	val_432
+436	43	6	val_436
+437	43	7	val_437
+444	44	4	val_444
+446	44	6	val_446
+449	44	9	val_449
+452	45	2	val_452
+453	45	3	val_453
+457	45	7	val_457
+458	45	8	val_458
+458	45	8	val_458
+460	46	0	val_460
 466	46	6	val_466
 466	46	6	val_466
 466	46	6	val_466
@@ -541,32 +575,16 @@ POSTHOOK: Input: default@dest1
 469	46	9	val_469
 469	46	9	val_469
 469	46	9	val_469
-470	47	0	val_470
-472	47	2	val_472
 475	47	5	val_475
 477	47	7	val_477
-478	47	8	val_478
-478	47	8	val_478
 479	47	9	val_479
-480	48	0	val_480
-480	48	0	val_480
-480	48	0	val_480
-481	48	1	val_481
 482	48	2	val_482
 483	48	3	val_483
 484	48	4	val_484
-485	48	5	val_485
 487	48	7	val_487
-489	48	9	val_489
-489	48	9	val_489
-489	48	9	val_489
-489	48	9	val_489
-490	49	0	val_490
-491	49	1	val_491
 492	49	2	val_492
 492	49	2	val_492
 493	49	3	val_493
-494	49	4	val_494
 495	49	5	val_495
 496	49	6	val_496
 497	49	7	val_497
@@ -575,39 +593,21 @@ POSTHOOK: Input: default@dest1
 498	49	8	val_498
 51	5	1	val_51
 51	5	1	val_51
-53	5	3	val_53
 54	5	4	val_54
-57	5	7	val_57
 58	5	8	val_58
 58	5	8	val_58
 64	6	4	val_64
 65	6	5	val_65
-66	6	6	val_66
 67	6	7	val_67
 67	6	7	val_67
-69	6	9	val_69
 70	7	0	val_70
 70	7	0	val_70
 70	7	0	val_70
-72	7	2	val_72
-72	7	2	val_72
-74	7	4	val_74
-76	7	6	val_76
-76	7	6	val_76
-77	7	7	val_77
-78	7	8	val_78
-80	8	0	val_80
 82	8	2	val_82
 83	8	3	val_83
 83	8	3	val_83
-84	8	4	val_84
-84	8	4	val_84
 85	8	5	val_85
-86	8	6	val_86
 87	8	7	val_87
-90	9	0	val_90
-90	9	0	val_90
-90	9	0	val_90
 92	9	2	val_92
 95	9	5	val_95
 95	9	5	val_95

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/optimize_nullscan.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/optimize_nullscan.q.out b/ql/src/test/results/clientpositive/spark/optimize_nullscan.q.out
index 5cdd1c1..f5f856b 100644
--- a/ql/src/test/results/clientpositive/spark/optimize_nullscan.q.out
+++ b/ql/src/test/results/clientpositive/spark/optimize_nullscan.q.out
@@ -176,6 +176,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'
@@ -197,6 +198,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'
@@ -275,6 +277,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'
@@ -322,6 +325,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'
@@ -369,6 +373,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'
@@ -416,6 +421,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'
@@ -564,6 +570,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'
@@ -585,6 +592,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'
@@ -663,6 +671,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'
@@ -711,6 +720,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'
@@ -759,6 +769,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'
@@ -807,6 +818,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'
@@ -967,6 +979,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'
@@ -988,6 +1001,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'
@@ -1066,6 +1080,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'
@@ -1113,6 +1128,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'
@@ -1160,6 +1176,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'
@@ -1207,6 +1224,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'
@@ -1369,6 +1387,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'
@@ -1390,6 +1409,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'
@@ -1438,6 +1458,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'
@@ -1459,6 +1480,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'
@@ -1591,6 +1613,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'
@@ -1612,6 +1635,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'
@@ -1661,6 +1685,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'
@@ -1682,6 +1707,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'
@@ -1803,6 +1829,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'
@@ -1824,6 +1851,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/outer_join_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/outer_join_ppr.q.out b/ql/src/test/results/clientpositive/spark/outer_join_ppr.q.out
index c87a311..e949a31 100644
--- a/ql/src/test/results/clientpositive/spark/outer_join_ppr.q.out
+++ b/ql/src/test/results/clientpositive/spark/outer_join_ppr.q.out
@@ -62,6 +62,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'
@@ -83,6 +84,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'
@@ -162,6 +164,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'
@@ -210,6 +213,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'
@@ -370,6 +374,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'
@@ -391,6 +396,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'
@@ -470,6 +476,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'
@@ -518,6 +525,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/ac6b2a3f/ql/src/test/results/clientpositive/spark/parallel_orderby.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/parallel_orderby.q.out b/ql/src/test/results/clientpositive/spark/parallel_orderby.q.out
index eecf43d..f70b17f 100644
--- a/ql/src/test/results/clientpositive/spark/parallel_orderby.q.out
+++ b/ql/src/test/results/clientpositive/spark/parallel_orderby.q.out
@@ -120,6 +120,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	4                   
 	numRows             	48                  
 	rawDataSize         	512                 
@@ -230,6 +231,7 @@ Retention:          	0
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
+	bucketing_version   	2                   
 	numFiles            	4                   
 	numRows             	48                  
 	rawDataSize         	512                 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/parquet_vectorization_0.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/parquet_vectorization_0.q.out b/ql/src/test/results/clientpositive/spark/parquet_vectorization_0.q.out
index 7d23ba8..2aaf23d 100644
--- a/ql/src/test/results/clientpositive/spark/parquet_vectorization_0.q.out
+++ b/ql/src/test/results/clientpositive/spark/parquet_vectorization_0.q.out
@@ -1817,6 +1817,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 
@@ -1838,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 
@@ -30637,6 +30639,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 
@@ -30658,6 +30661,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 
@@ -30750,6 +30754,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 
@@ -30771,6 +30776,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 
@@ -30864,6 +30870,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 
@@ -30885,6 +30892,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 
@@ -30968,6 +30976,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 
@@ -30989,6 +30998,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/ac6b2a3f/ql/src/test/results/clientpositive/spark/pcr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/pcr.q.out b/ql/src/test/results/clientpositive/spark/pcr.q.out
index 74d5ab6..0520b2b 100644
--- a/ql/src/test/results/clientpositive/spark/pcr.q.out
+++ b/ql/src/test/results/clientpositive/spark/pcr.q.out
@@ -121,6 +121,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 
@@ -168,6 +169,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 
@@ -318,6 +320,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 
@@ -365,6 +368,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 
@@ -412,6 +416,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 
@@ -600,6 +605,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 
@@ -647,6 +653,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 
@@ -799,6 +806,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 
@@ -846,6 +854,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 
@@ -1000,6 +1009,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 
@@ -1047,6 +1057,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 
@@ -1094,6 +1105,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 
@@ -1259,6 +1271,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 
@@ -1306,6 +1319,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 
@@ -1353,6 +1367,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 
@@ -1525,6 +1540,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 
@@ -1572,6 +1588,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 
@@ -1707,6 +1724,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 
@@ -1754,6 +1772,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 
@@ -1929,6 +1948,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 
@@ -1976,6 +1996,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 
@@ -2023,6 +2044,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 
@@ -2225,6 +2247,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 
@@ -2272,6 +2295,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 
@@ -2415,6 +2439,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 
@@ -2491,6 +2516,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 
@@ -2691,6 +2717,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 
@@ -2767,6 +2794,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 
@@ -2976,6 +3004,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 
@@ -3023,6 +3052,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 
@@ -3070,6 +3100,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 
@@ -3117,6 +3148,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 
@@ -3304,6 +3336,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 
@@ -3351,6 +3384,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 
@@ -3398,6 +3432,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 
@@ -3570,6 +3605,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 
@@ -3606,6 +3642,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 
@@ -3661,6 +3698,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 
@@ -3690,6 +3728,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 
@@ -3723,6 +3762,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 
@@ -3814,6 +3854,7 @@ STAGE PLANS:
                             properties:
                               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                               bucket_count -1
+                              bucketing_version 2
                               column.name.delimiter ,
                               columns key,value
                               columns.comments 
@@ -3854,6 +3895,7 @@ STAGE PLANS:
                             properties:
                               COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                               bucket_count -1
+                              bucketing_version 2
                               column.name.delimiter ,
                               columns key,value
                               columns.comments 
@@ -3909,6 +3951,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 
@@ -3938,6 +3981,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -3971,6 +4015,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -4085,6 +4130,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'
@@ -4224,6 +4270,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'
@@ -4272,6 +4319,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'
@@ -4415,6 +4463,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'
@@ -4463,6 +4512,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/ac6b2a3f/ql/src/test/results/clientpositive/spark/ppd_join_filter.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/ppd_join_filter.q.out b/ql/src/test/results/clientpositive/spark/ppd_join_filter.q.out
index 45c044a..e8eccd9 100644
--- a/ql/src/test/results/clientpositive/spark/ppd_join_filter.q.out
+++ b/ql/src/test/results/clientpositive/spark/ppd_join_filter.q.out
@@ -70,6 +70,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'
@@ -91,6 +92,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'
@@ -147,6 +149,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'
@@ -168,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'
@@ -364,6 +368,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'
@@ -385,6 +390,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'
@@ -441,6 +447,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'
@@ -462,6 +469,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'
@@ -658,6 +666,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'
@@ -679,6 +688,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'
@@ -735,6 +745,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'
@@ -756,6 +767,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'
@@ -952,6 +964,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'
@@ -973,6 +986,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'
@@ -1029,6 +1043,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'
@@ -1050,6 +1065,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'

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/quotedid_smb.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/quotedid_smb.q.out b/ql/src/test/results/clientpositive/spark/quotedid_smb.q.out
index c8b2e46..3cda08a 100644
--- a/ql/src/test/results/clientpositive/spark/quotedid_smb.q.out
+++ b/ql/src/test/results/clientpositive/spark/quotedid_smb.q.out
@@ -116,17 +116,17 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 0	val_0	0	val_0
 0	val_0	0	val_0
 0	val_0	0	val_0
-103	val_103	103	val_103
-103	val_103	103	val_103
-103	val_103	103	val_103
-103	val_103	103	val_103
+104	val_104	104	val_104
+104	val_104	104	val_104
+104	val_104	104	val_104
+104	val_104	104	val_104
 105	val_105	105	val_105
 10	val_10	10	val_10
 100	val_100	100	val_100
 100	val_100	100	val_100
 100	val_100	100	val_100
 100	val_100	100	val_100
-104	val_104	104	val_104
-104	val_104	104	val_104
-104	val_104	104	val_104
-104	val_104	104	val_104
+103	val_103	103	val_103
+103	val_103	103	val_103
+103	val_103	103	val_103
+103	val_103	103	val_103

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/reduce_deduplicate.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/reduce_deduplicate.q.out b/ql/src/test/results/clientpositive/spark/reduce_deduplicate.q.out
index 29ae8af..1069e96 100644
--- a/ql/src/test/results/clientpositive/spark/reduce_deduplicate.q.out
+++ b/ql/src/test/results/clientpositive/spark/reduce_deduplicate.q.out
@@ -57,6 +57,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'
@@ -79,6 +80,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'
@@ -121,6 +123,7 @@ STAGE PLANS:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                         bucket_count 2
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -154,6 +157,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -336,6 +340,7 @@ STAGE PLANS:
                         output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                         properties:
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns aid,bid,t,ctime,etime,l,et
                           columns.comments 
@@ -367,6 +372,7 @@ STAGE PLANS:
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               properties:
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns aid,bid,t,ctime,etime,l,et
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/router_join_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/router_join_ppr.q.out b/ql/src/test/results/clientpositive/spark/router_join_ppr.q.out
index cb1524e..6291f46 100644
--- a/ql/src/test/results/clientpositive/spark/router_join_ppr.q.out
+++ b/ql/src/test/results/clientpositive/spark/router_join_ppr.q.out
@@ -62,6 +62,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'
@@ -83,6 +84,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'
@@ -162,6 +164,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'
@@ -210,6 +213,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'
@@ -395,6 +399,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'
@@ -443,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'
@@ -496,6 +502,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'
@@ -517,6 +524,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'
@@ -682,6 +690,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'
@@ -703,6 +712,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'
@@ -782,6 +792,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'
@@ -830,6 +841,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'
@@ -1015,6 +1027,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'
@@ -1063,6 +1076,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'
@@ -1116,6 +1130,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'
@@ -1137,6 +1152,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'


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_2.q.out b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_2.q.out
index 885fd18..8fa1b35 100644
--- a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_2.q.out
@@ -147,6 +147,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -234,6 +235,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -282,6 +284,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -421,6 +424,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -508,6 +512,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -556,6 +561,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_3.q.out b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_3.q.out
index ff98ee5..bd7f60a 100644
--- a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_3.q.out
+++ b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_3.q.out
@@ -147,6 +147,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -195,6 +196,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -283,6 +285,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -421,6 +424,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -469,6 +473,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -557,6 +562,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -695,6 +701,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -743,6 +750,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -831,6 +839,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_4.q.out b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_4.q.out
index a5aab31..6d6e60c 100644
--- a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_4.q.out
+++ b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_4.q.out
@@ -163,6 +163,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -211,6 +212,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -299,6 +301,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -437,6 +440,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -485,6 +489,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -573,6 +578,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -711,6 +717,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -759,6 +766,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -847,6 +855,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_5.q.out b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_5.q.out
index e940a99..a869408 100644
--- a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_5.q.out
+++ b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_5.q.out
@@ -103,6 +103,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 4
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -125,6 +126,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -189,6 +191,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -211,6 +214,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -320,6 +324,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 4
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -342,6 +347,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -406,6 +412,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -428,6 +435,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -537,6 +545,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 4
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -559,6 +568,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -623,6 +633,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -645,6 +656,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_7.q.out b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_7.q.out
index 3e53b88..71b146e 100644
--- a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_7.q.out
+++ b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_7.q.out
@@ -180,6 +180,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -228,6 +229,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -316,6 +318,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -364,6 +367,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -505,6 +509,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -553,6 +558,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -641,6 +647,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -689,6 +696,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -830,6 +838,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -878,6 +887,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -966,6 +976,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1014,6 +1025,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_8.q.out b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_8.q.out
index f0ae0bf..0f39c9e 100644
--- a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_8.q.out
+++ b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_8.q.out
@@ -180,6 +180,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -228,6 +229,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -316,6 +318,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -364,6 +367,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -505,6 +509,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -553,6 +558,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -641,6 +647,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -689,6 +696,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -830,6 +838,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -878,6 +887,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -966,6 +976,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1014,6 +1025,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucket2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucket2.q.out b/ql/src/test/results/clientpositive/llap/bucket2.q.out
index fae2978..f0cbd92 100644
--- a/ql/src/test/results/clientpositive/llap/bucket2.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucket2.q.out
@@ -59,6 +59,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'
@@ -80,6 +81,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'
@@ -121,6 +123,7 @@ STAGE PLANS:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                         bucket_count 2
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -191,6 +194,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -261,66 +265,59 @@ POSTHOOK: query: select * from bucket2_1 tablesample (bucket 1 out of 2) s
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucket2_1
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
 10	val_10
-100	val_100
-100	val_100
-104	val_104
-104	val_104
-114	val_114
+105	val_105
+113	val_113
+113	val_113
 116	val_116
-118	val_118
-118	val_118
-12	val_12
-12	val_12
-120	val_120
-120	val_120
+119	val_119
+119	val_119
+119	val_119
 126	val_126
-128	val_128
-128	val_128
-128	val_128
+133	val_133
 134	val_134
 134	val_134
-136	val_136
-138	val_138
-138	val_138
-138	val_138
-138	val_138
+137	val_137
+137	val_137
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
+149	val_149
+149	val_149
+153	val_153
 156	val_156
+157	val_157
 158	val_158
-160	val_160
 162	val_162
+163	val_163
 164	val_164
 164	val_164
-166	val_166
-168	val_168
-170	val_170
-172	val_172
-172	val_172
-174	val_174
-174	val_174
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+17	val_17
+177	val_177
 178	val_178
-18	val_18
-18	val_18
-180	val_180
-186	val_186
+181	val_181
+187	val_187
+187	val_187
+187	val_187
+19	val_19
 190	val_190
-192	val_192
-194	val_194
-196	val_196
+191	val_191
+191	val_191
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+199	val_199
+199	val_199
+199	val_199
 2	val_2
 20	val_20
-200	val_200
-200	val_200
+201	val_201
 202	val_202
 208	val_208
 208	val_208
@@ -328,70 +325,62 @@ POSTHOOK: Input: default@bucket2_1
 214	val_214
 216	val_216
 216	val_216
-218	val_218
-222	val_222
-224	val_224
-224	val_224
+221	val_221
+221	val_221
 226	val_226
-228	val_228
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
-24	val_24
-24	val_24
-242	val_242
-242	val_242
+239	val_239
+239	val_239
 244	val_244
 248	val_248
+249	val_249
 252	val_252
+255	val_255
+255	val_255
 256	val_256
 256	val_256
-258	val_258
-26	val_26
-26	val_26
 260	val_260
-262	val_262
 266	val_266
+27	val_27
 272	val_272
 272	val_272
-274	val_274
-278	val_278
-278	val_278
-28	val_28
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 286	val_286
-288	val_288
-288	val_288
+287	val_287
+289	val_289
+291	val_291
 292	val_292
-296	val_296
-298	val_298
-298	val_298
-298	val_298
 30	val_30
-302	val_302
-306	val_306
+307	val_307
+307	val_307
 308	val_308
 310	val_310
+311	val_311
+311	val_311
+311	val_311
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-322	val_322
-322	val_322
+317	val_317
+317	val_317
+325	val_325
+325	val_325
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 336	val_336
 338	val_338
-34	val_34
+339	val_339
+341	val_341
 342	val_342
 342	val_342
 344	val_344
@@ -401,110 +390,121 @@ POSTHOOK: Input: default@bucket2_1
 348	val_348
 348	val_348
 348	val_348
-356	val_356
+351	val_351
+353	val_353
+353	val_353
 360	val_360
 362	val_362
 364	val_364
-366	val_366
+365	val_365
 368	val_368
-374	val_374
+369	val_369
+369	val_369
+369	val_369
+377	val_377
 378	val_378
-382	val_382
-382	val_382
 384	val_384
 384	val_384
 384	val_384
 386	val_386
 392	val_392
+393	val_393
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-4	val_4
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
 402	val_402
 404	val_404
 404	val_404
-406	val_406
-406	val_406
-406	val_406
-406	val_406
+407	val_407
+409	val_409
+409	val_409
+409	val_409
+41	val_41
+411	val_411
 414	val_414
 414	val_414
-418	val_418
-42	val_42
-42	val_42
-424	val_424
-424	val_424
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+427	val_427
+43	val_43
 430	val_430
 430	val_430
 430	val_430
 432	val_432
-436	val_436
-438	val_438
-438	val_438
-438	val_438
-44	val_44
+435	val_435
+437	val_437
+443	val_443
 444	val_444
 446	val_446
-448	val_448
+449	val_449
 452	val_452
+453	val_453
 454	val_454
 454	val_454
 454	val_454
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
+459	val_459
+459	val_459
+463	val_463
+463	val_463
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-470	val_470
+467	val_467
 472	val_472
 478	val_478
 478	val_478
+479	val_479
 480	val_480
 480	val_480
 480	val_480
 482	val_482
+483	val_483
 484	val_484
+485	val_485
 490	val_490
-492	val_492
-492	val_492
-494	val_494
-496	val_496
+491	val_491
+495	val_495
+497	val_497
 498	val_498
 498	val_498
 498	val_498
+51	val_51
+51	val_51
 54	val_54
+57	val_57
 58	val_58
 58	val_58
 64	val_64
-66	val_66
+65	val_65
+67	val_67
+67	val_67
+69	val_69
 70	val_70
 70	val_70
 70	val_70
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-78	val_78
-8	val_8
+77	val_77
 80	val_80
-82	val_82
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
 86	val_86
 90	val_90
 90	val_90
 90	val_90
-92	val_92
 96	val_96
+97	val_97
+97	val_97
 98	val_98
 98	val_98

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucket3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucket3.q.out b/ql/src/test/results/clientpositive/llap/bucket3.q.out
index f280f5c..1228177 100644
--- a/ql/src/test/results/clientpositive/llap/bucket3.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucket3.q.out
@@ -60,6 +60,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'
@@ -81,6 +82,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'
@@ -122,6 +124,7 @@ STAGE PLANS:
                       properties:
                         bucket_count 2
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -211,6 +214,7 @@ STAGE PLANS:
               properties:
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -293,66 +297,59 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucket3_1
 POSTHOOK: Input: default@bucket3_1@ds=1
 #### A masked pattern was here ####
-0	val_0	1
-0	val_0	1
-0	val_0	1
 10	val_10	1
-100	val_100	1
-100	val_100	1
-104	val_104	1
-104	val_104	1
-114	val_114	1
+105	val_105	1
+113	val_113	1
+113	val_113	1
 116	val_116	1
-118	val_118	1
-118	val_118	1
-12	val_12	1
-12	val_12	1
-120	val_120	1
-120	val_120	1
+119	val_119	1
+119	val_119	1
+119	val_119	1
 126	val_126	1
-128	val_128	1
-128	val_128	1
-128	val_128	1
+133	val_133	1
 134	val_134	1
 134	val_134	1
-136	val_136	1
-138	val_138	1
-138	val_138	1
-138	val_138	1
-138	val_138	1
+137	val_137	1
+137	val_137	1
 146	val_146	1
 146	val_146	1
-150	val_150	1
-152	val_152	1
-152	val_152	1
+149	val_149	1
+149	val_149	1
+153	val_153	1
 156	val_156	1
+157	val_157	1
 158	val_158	1
-160	val_160	1
 162	val_162	1
+163	val_163	1
 164	val_164	1
 164	val_164	1
-166	val_166	1
-168	val_168	1
-170	val_170	1
-172	val_172	1
-172	val_172	1
-174	val_174	1
-174	val_174	1
-176	val_176	1
-176	val_176	1
+165	val_165	1
+165	val_165	1
+169	val_169	1
+169	val_169	1
+169	val_169	1
+169	val_169	1
+17	val_17	1
+177	val_177	1
 178	val_178	1
-18	val_18	1
-18	val_18	1
-180	val_180	1
-186	val_186	1
+181	val_181	1
+187	val_187	1
+187	val_187	1
+187	val_187	1
+19	val_19	1
 190	val_190	1
-192	val_192	1
-194	val_194	1
-196	val_196	1
+191	val_191	1
+191	val_191	1
+195	val_195	1
+195	val_195	1
+197	val_197	1
+197	val_197	1
+199	val_199	1
+199	val_199	1
+199	val_199	1
 2	val_2	1
 20	val_20	1
-200	val_200	1
-200	val_200	1
+201	val_201	1
 202	val_202	1
 208	val_208	1
 208	val_208	1
@@ -360,70 +357,62 @@ POSTHOOK: Input: default@bucket3_1@ds=1
 214	val_214	1
 216	val_216	1
 216	val_216	1
-218	val_218	1
-222	val_222	1
-224	val_224	1
-224	val_224	1
+221	val_221	1
+221	val_221	1
 226	val_226	1
-228	val_228	1
-230	val_230	1
-230	val_230	1
-230	val_230	1
-230	val_230	1
-230	val_230	1
+229	val_229	1
+229	val_229	1
+233	val_233	1
+233	val_233	1
+237	val_237	1
+237	val_237	1
 238	val_238	1
 238	val_238	1
-24	val_24	1
-24	val_24	1
-242	val_242	1
-242	val_242	1
+239	val_239	1
+239	val_239	1
 244	val_244	1
 248	val_248	1
+249	val_249	1
 252	val_252	1
+255	val_255	1
+255	val_255	1
 256	val_256	1
 256	val_256	1
-258	val_258	1
-26	val_26	1
-26	val_26	1
 260	val_260	1
-262	val_262	1
 266	val_266	1
+27	val_27	1
 272	val_272	1
 272	val_272	1
-274	val_274	1
-278	val_278	1
-278	val_278	1
-28	val_28	1
-280	val_280	1
-280	val_280	1
-282	val_282	1
-282	val_282	1
 284	val_284	1
 286	val_286	1
-288	val_288	1
-288	val_288	1
+287	val_287	1
+289	val_289	1
+291	val_291	1
 292	val_292	1
-296	val_296	1
-298	val_298	1
-298	val_298	1
-298	val_298	1
 30	val_30	1
-302	val_302	1
-306	val_306	1
+307	val_307	1
+307	val_307	1
 308	val_308	1
 310	val_310	1
+311	val_311	1
+311	val_311	1
+311	val_311	1
+315	val_315	1
 316	val_316	1
 316	val_316	1
 316	val_316	1
-318	val_318	1
-318	val_318	1
-318	val_318	1
-322	val_322	1
-322	val_322	1
+317	val_317	1
+317	val_317	1
+325	val_325	1
+325	val_325	1
+327	val_327	1
+327	val_327	1
+327	val_327	1
 332	val_332	1
 336	val_336	1
 338	val_338	1
-34	val_34	1
+339	val_339	1
+341	val_341	1
 342	val_342	1
 342	val_342	1
 344	val_344	1
@@ -433,110 +422,121 @@ POSTHOOK: Input: default@bucket3_1@ds=1
 348	val_348	1
 348	val_348	1
 348	val_348	1
-356	val_356	1
+351	val_351	1
+353	val_353	1
+353	val_353	1
 360	val_360	1
 362	val_362	1
 364	val_364	1
-366	val_366	1
+365	val_365	1
 368	val_368	1
-374	val_374	1
+369	val_369	1
+369	val_369	1
+369	val_369	1
+377	val_377	1
 378	val_378	1
-382	val_382	1
-382	val_382	1
 384	val_384	1
 384	val_384	1
 384	val_384	1
 386	val_386	1
 392	val_392	1
+393	val_393	1
 394	val_394	1
 396	val_396	1
 396	val_396	1
 396	val_396	1
-4	val_4	1
-400	val_400	1
+397	val_397	1
+397	val_397	1
+399	val_399	1
+399	val_399	1
 402	val_402	1
 404	val_404	1
 404	val_404	1
-406	val_406	1
-406	val_406	1
-406	val_406	1
-406	val_406	1
+407	val_407	1
+409	val_409	1
+409	val_409	1
+409	val_409	1
+41	val_41	1
+411	val_411	1
 414	val_414	1
 414	val_414	1
-418	val_418	1
-42	val_42	1
-42	val_42	1
-424	val_424	1
-424	val_424	1
+417	val_417	1
+417	val_417	1
+417	val_417	1
+419	val_419	1
+421	val_421	1
+427	val_427	1
+43	val_43	1
 430	val_430	1
 430	val_430	1
 430	val_430	1
 432	val_432	1
-436	val_436	1
-438	val_438	1
-438	val_438	1
-438	val_438	1
-44	val_44	1
+435	val_435	1
+437	val_437	1
+443	val_443	1
 444	val_444	1
 446	val_446	1
-448	val_448	1
+449	val_449	1
 452	val_452	1
+453	val_453	1
 454	val_454	1
 454	val_454	1
 454	val_454	1
 458	val_458	1
 458	val_458	1
-460	val_460	1
-462	val_462	1
-462	val_462	1
+459	val_459	1
+459	val_459	1
+463	val_463	1
+463	val_463	1
 466	val_466	1
 466	val_466	1
 466	val_466	1
-468	val_468	1
-468	val_468	1
-468	val_468	1
-468	val_468	1
-470	val_470	1
+467	val_467	1
 472	val_472	1
 478	val_478	1
 478	val_478	1
+479	val_479	1
 480	val_480	1
 480	val_480	1
 480	val_480	1
 482	val_482	1
+483	val_483	1
 484	val_484	1
+485	val_485	1
 490	val_490	1
-492	val_492	1
-492	val_492	1
-494	val_494	1
-496	val_496	1
+491	val_491	1
+495	val_495	1
+497	val_497	1
 498	val_498	1
 498	val_498	1
 498	val_498	1
+51	val_51	1
+51	val_51	1
 54	val_54	1
+57	val_57	1
 58	val_58	1
 58	val_58	1
 64	val_64	1
-66	val_66	1
+65	val_65	1
+67	val_67	1
+67	val_67	1
+69	val_69	1
 70	val_70	1
 70	val_70	1
 70	val_70	1
-72	val_72	1
-72	val_72	1
-74	val_74	1
-76	val_76	1
-76	val_76	1
-78	val_78	1
-8	val_8	1
+77	val_77	1
 80	val_80	1
-82	val_82	1
+83	val_83	1
+83	val_83	1
 84	val_84	1
 84	val_84	1
+85	val_85	1
 86	val_86	1
 90	val_90	1
 90	val_90	1
 90	val_90	1
-92	val_92	1
 96	val_96	1
+97	val_97	1
+97	val_97	1
 98	val_98	1
 98	val_98	1

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucket4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucket4.q.out b/ql/src/test/results/clientpositive/llap/bucket4.q.out
index ca36cfb..5deab2d 100644
--- a/ql/src/test/results/clientpositive/llap/bucket4.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucket4.q.out
@@ -60,6 +60,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'
@@ -81,6 +82,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'
@@ -123,6 +125,7 @@ STAGE PLANS:
                         SORTBUCKETCOLSPREFIX TRUE
                         bucket_count 2
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -194,6 +197,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -264,104 +268,93 @@ POSTHOOK: query: select * from bucket4_1 tablesample (bucket 1 out of 2) s
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucket4_1
 #### A masked pattern was here ####
-0	val_0
-0	val_0
-0	val_0
 2	val_2
-4	val_4
-8	val_8
 10	val_10
-12	val_12
-12	val_12
-18	val_18
-18	val_18
+17	val_17
+19	val_19
 20	val_20
-24	val_24
-24	val_24
-26	val_26
-26	val_26
-28	val_28
+27	val_27
 30	val_30
-34	val_34
-42	val_42
-42	val_42
-44	val_44
+41	val_41
+43	val_43
+51	val_51
+51	val_51
 54	val_54
+57	val_57
 58	val_58
 58	val_58
 64	val_64
-66	val_66
+65	val_65
+67	val_67
+67	val_67
+69	val_69
 70	val_70
 70	val_70
 70	val_70
-72	val_72
-72	val_72
-74	val_74
-76	val_76
-76	val_76
-78	val_78
+77	val_77
 80	val_80
-82	val_82
+83	val_83
+83	val_83
 84	val_84
 84	val_84
+85	val_85
 86	val_86
 90	val_90
 90	val_90
 90	val_90
-92	val_92
 96	val_96
+97	val_97
+97	val_97
 98	val_98
 98	val_98
-100	val_100
-100	val_100
-104	val_104
-104	val_104
-114	val_114
+105	val_105
+113	val_113
+113	val_113
 116	val_116
-118	val_118
-118	val_118
-120	val_120
-120	val_120
+119	val_119
+119	val_119
+119	val_119
 126	val_126
-128	val_128
-128	val_128
-128	val_128
+133	val_133
 134	val_134
 134	val_134
-136	val_136
-138	val_138
-138	val_138
-138	val_138
-138	val_138
+137	val_137
+137	val_137
 146	val_146
 146	val_146
-150	val_150
-152	val_152
-152	val_152
+149	val_149
+149	val_149
+153	val_153
 156	val_156
+157	val_157
 158	val_158
-160	val_160
 162	val_162
+163	val_163
 164	val_164
 164	val_164
-166	val_166
-168	val_168
-170	val_170
-172	val_172
-172	val_172
-174	val_174
-174	val_174
-176	val_176
-176	val_176
+165	val_165
+165	val_165
+169	val_169
+169	val_169
+169	val_169
+169	val_169
+177	val_177
 178	val_178
-180	val_180
-186	val_186
+181	val_181
+187	val_187
+187	val_187
+187	val_187
 190	val_190
-192	val_192
-194	val_194
-196	val_196
-200	val_200
-200	val_200
+191	val_191
+191	val_191
+195	val_195
+195	val_195
+197	val_197
+197	val_197
+199	val_199
+199	val_199
+199	val_199
+201	val_201
 202	val_202
 208	val_208
 208	val_208
@@ -369,63 +362,60 @@ POSTHOOK: Input: default@bucket4_1
 214	val_214
 216	val_216
 216	val_216
-218	val_218
-222	val_222
-224	val_224
-224	val_224
+221	val_221
+221	val_221
 226	val_226
-228	val_228
-230	val_230
-230	val_230
-230	val_230
-230	val_230
-230	val_230
+229	val_229
+229	val_229
+233	val_233
+233	val_233
+237	val_237
+237	val_237
 238	val_238
 238	val_238
-242	val_242
-242	val_242
+239	val_239
+239	val_239
 244	val_244
 248	val_248
+249	val_249
 252	val_252
+255	val_255
+255	val_255
 256	val_256
 256	val_256
-258	val_258
 260	val_260
-262	val_262
 266	val_266
 272	val_272
 272	val_272
-274	val_274
-278	val_278
-278	val_278
-280	val_280
-280	val_280
-282	val_282
-282	val_282
 284	val_284
 286	val_286
-288	val_288
-288	val_288
+287	val_287
+289	val_289
+291	val_291
 292	val_292
-296	val_296
-298	val_298
-298	val_298
-298	val_298
-302	val_302
-306	val_306
+307	val_307
+307	val_307
 308	val_308
 310	val_310
+311	val_311
+311	val_311
+311	val_311
+315	val_315
 316	val_316
 316	val_316
 316	val_316
-318	val_318
-318	val_318
-318	val_318
-322	val_322
-322	val_322
+317	val_317
+317	val_317
+325	val_325
+325	val_325
+327	val_327
+327	val_327
+327	val_327
 332	val_332
 336	val_336
 338	val_338
+339	val_339
+341	val_341
 342	val_342
 342	val_342
 344	val_344
@@ -435,79 +425,89 @@ POSTHOOK: Input: default@bucket4_1
 348	val_348
 348	val_348
 348	val_348
-356	val_356
+351	val_351
+353	val_353
+353	val_353
 360	val_360
 362	val_362
 364	val_364
-366	val_366
+365	val_365
 368	val_368
-374	val_374
+369	val_369
+369	val_369
+369	val_369
+377	val_377
 378	val_378
-382	val_382
-382	val_382
 384	val_384
 384	val_384
 384	val_384
 386	val_386
 392	val_392
+393	val_393
 394	val_394
 396	val_396
 396	val_396
 396	val_396
-400	val_400
+397	val_397
+397	val_397
+399	val_399
+399	val_399
 402	val_402
 404	val_404
 404	val_404
-406	val_406
-406	val_406
-406	val_406
-406	val_406
+407	val_407
+409	val_409
+409	val_409
+409	val_409
+411	val_411
 414	val_414
 414	val_414
-418	val_418
-424	val_424
-424	val_424
+417	val_417
+417	val_417
+417	val_417
+419	val_419
+421	val_421
+427	val_427
 430	val_430
 430	val_430
 430	val_430
 432	val_432
-436	val_436
-438	val_438
-438	val_438
-438	val_438
+435	val_435
+437	val_437
+443	val_443
 444	val_444
 446	val_446
-448	val_448
+449	val_449
 452	val_452
+453	val_453
 454	val_454
 454	val_454
 454	val_454
 458	val_458
 458	val_458
-460	val_460
-462	val_462
-462	val_462
+459	val_459
+459	val_459
+463	val_463
+463	val_463
 466	val_466
 466	val_466
 466	val_466
-468	val_468
-468	val_468
-468	val_468
-468	val_468
-470	val_470
+467	val_467
 472	val_472
 478	val_478
 478	val_478
+479	val_479
 480	val_480
 480	val_480
 480	val_480
 482	val_482
+483	val_483
 484	val_484
+485	val_485
 490	val_490
-492	val_492
-492	val_492
-494	val_494
-496	val_496
+491	val_491
+495	val_495
+497	val_497
 498	val_498
 498	val_498
 498	val_498

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucket5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucket5.q.out b/ql/src/test/results/clientpositive/llap/bucket5.q.out
index 1aab619..ee444f2 100644
--- a/ql/src/test/results/clientpositive/llap/bucket5.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucket5.q.out
@@ -93,6 +93,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'
@@ -115,6 +116,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'
@@ -158,6 +160,7 @@ STAGE PLANS:
                         SORTBUCKETCOLSPREFIX TRUE
                         bucket_count 2
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -246,6 +249,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 
@@ -330,6 +334,7 @@ STAGE PLANS:
                 SORTBUCKETCOLSPREFIX TRUE
                 bucket_count 2
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -369,6 +374,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 
@@ -426,6 +432,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 
@@ -457,6 +464,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 
@@ -479,6 +487,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 
@@ -519,6 +528,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 
@@ -550,6 +560,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 
@@ -572,6 +583,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 
@@ -637,6 +649,7 @@ Table Type:         	MANAGED_TABLE
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}
 	SORTBUCKETCOLSPREFIX	TRUE                
+	bucketing_version   	2                   
 	numFiles            	2                   
 	numRows             	500                 
 	rawDataSize         	5312                
@@ -661,16 +674,16 @@ POSTHOOK: query: SELECT * FROM bucketed_table TABLESAMPLE (BUCKET 1 OUT OF 2) s
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucketed_table
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-0	val_0
-0	val_0
-0	val_0
 2	val_2
-4	val_4
-8	val_8
 10	val_10
-12	val_12
-12	val_12
-18	val_18
+17	val_17
+19	val_19
+20	val_20
+27	val_27
+30	val_30
+41	val_41
+43	val_43
+51	val_51
 PREHOOK: query: SELECT * FROM bucketed_table TABLESAMPLE (BUCKET 2 OUT OF 2) s LIMIT 10
 PREHOOK: type: QUERY
 PREHOOK: Input: default@bucketed_table
@@ -679,16 +692,16 @@ POSTHOOK: query: SELECT * FROM bucketed_table TABLESAMPLE (BUCKET 2 OUT OF 2) s
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucketed_table
 POSTHOOK: Output: hdfs://### HDFS PATH ###
+0	val_0
+0	val_0
+0	val_0
+4	val_4
 5	val_5
 5	val_5
 5	val_5
+8	val_8
 9	val_9
 11	val_11
-15	val_15
-15	val_15
-17	val_17
-19	val_19
-27	val_27
 PREHOOK: query: SELECT COUNT(DISTINCT INPUT__FILE__NAME) FROM bucketed_table
 PREHOOK: type: QUERY
 PREHOOK: Input: default@bucketed_table

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucket6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucket6.q.out b/ql/src/test/results/clientpositive/llap/bucket6.q.out
index 66e6e1f..d0c1500 100644
--- a/ql/src/test/results/clientpositive/llap/bucket6.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucket6.q.out
@@ -135,42 +135,18 @@ POSTHOOK: query: select * from src_bucket limit 100
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src_bucket
 POSTHOOK: Output: hdfs://### HDFS PATH ###
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-0	val_0
-103	val_103
-103	val_103
-103	val_103
-103	val_103
-103	val_103
-103	val_103
-103	val_103
-103	val_103
-105	val_105
-105	val_105
-105	val_105
-105	val_105
-11	val_11
-11	val_11
-11	val_11
-11	val_11
-114	val_114
-114	val_114
-114	val_114
-114	val_114
-116	val_116
-116	val_116
-116	val_116
-116	val_116
+10	val_10
+10	val_10
+10	val_10
+10	val_10
+104	val_104
+104	val_104
+104	val_104
+104	val_104
+104	val_104
+104	val_104
+104	val_104
+104	val_104
 118	val_118
 118	val_118
 118	val_118
@@ -179,34 +155,50 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 118	val_118
 118	val_118
 118	val_118
-125	val_125
-125	val_125
-125	val_125
-125	val_125
-125	val_125
-125	val_125
-125	val_125
-125	val_125
-129	val_129
-129	val_129
-129	val_129
-129	val_129
-129	val_129
-129	val_129
-129	val_129
-129	val_129
-134	val_134
-134	val_134
-134	val_134
-134	val_134
-134	val_134
-134	val_134
-134	val_134
-134	val_134
-136	val_136
-136	val_136
-136	val_136
-136	val_136
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+119	val_119
+120	val_120
+120	val_120
+120	val_120
+120	val_120
+120	val_120
+120	val_120
+120	val_120
+120	val_120
+126	val_126
+126	val_126
+126	val_126
+126	val_126
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+128	val_128
+131	val_131
+131	val_131
+131	val_131
+131	val_131
+133	val_133
+133	val_133
+133	val_133
+133	val_133
 138	val_138
 138	val_138
 138	val_138
@@ -223,10 +215,6 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 138	val_138
 138	val_138
 138	val_138
-143	val_143
-143	val_143
-143	val_143
-143	val_143
 145	val_145
 145	val_145
 145	val_145
@@ -235,3 +223,15 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 149	val_149
 149	val_149
 149	val_149
+149	val_149
+149	val_149
+149	val_149
+149	val_149
+15	val_15
+15	val_15
+15	val_15
+15	val_15
+15	val_15
+15	val_15
+15	val_15
+15	val_15

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucket_groupby.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucket_groupby.q.out b/ql/src/test/results/clientpositive/llap/bucket_groupby.q.out
index 26024b0..3a7d744 100644
--- a/ql/src/test/results/clientpositive/llap/bucket_groupby.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucket_groupby.q.out
@@ -347,8 +347,8 @@ POSTHOOK: Input: default@clustergroupby
 POSTHOOK: Input: default@clustergroupby@ds=101
 #### A masked pattern was here ####
 1	10
-2	74
 3	416
+2	74
 PREHOOK: query: explain
 select abs(length(key)), count(1) from clustergroupby  where ds='101'  group by abs(length(key)) limit 10
 PREHOOK: type: QUERY
@@ -428,8 +428,8 @@ POSTHOOK: Input: default@clustergroupby
 POSTHOOK: Input: default@clustergroupby@ds=101
 #### A masked pattern was here ####
 1	10
-2	74
 3	416
+2	74
 PREHOOK: query: explain
 select key, count(1) from clustergroupby  where ds='101'  group by key,'a' order by key,'a' limit 10
 PREHOOK: type: QUERY
@@ -712,312 +712,312 @@ POSTHOOK: Input: default@clustergroupby@ds=101
 #### A masked pattern was here ####
 10	2
 100	4
+103	4
 104	4
-111	2
-114	2
-116	2
+105	2
+11	2
 126	2
 128	6
-131	2
+129	4
+133	2
 134	4
+136	2
+143	2
+149	4
 152	4
-155	2
+153	2
+157	2
+162	2
+166	2
 169	8
-17	2
 170	2
-172	4
-178	2
-179	4
-189	2
-19	2
-192	2
-194	2
-195	4
-199	6
-20	2
-207	4
+174	4
+176	4
+193	6
+196	2
+201	2
+205	4
+209	4
 213	4
 218	2
+221	4
 223	4
-229	4
 233	4
-235	2
+239	4
 24	4
-256	4
-257	2
+241	2
+242	4
+247	2
+248	2
 26	4
-265	4
-266	2
-27	2
-278	4
-280	4
-284	2
-291	2
-30	2
+263	2
+272	4
+275	2
+285	2
+296	2
+298	6
 302	2
-305	2
-316	6
-321	4
+307	4
+310	2
 323	2
-33	2
+325	4
 333	4
+335	2
 338	2
-344	4
-353	4
-356	2
-364	2
-368	2
-369	6
-37	4
+360	2
+362	2
+367	4
+375	2
 377	2
-378	2
-386	2
+384	6
 392	2
-397	4
-404	4
-407	2
-411	2
-418	2
+399	4
+401	10
+402	2
+403	6
+413	4
+417	6
 419	2
-424	4
-430	6
-432	2
-436	2
-437	2
-448	2
-454	6
-457	2
-468	8
-477	2
+42	4
+427	2
+438	6
+44	2
+458	4
+459	4
+466	6
+469	10
+472	2
+475	2
+478	4
 479	2
-490	2
-492	4
-493	2
+483	2
+489	8
 495	2
 496	2
-497	2
+5	6
 57	2
-67	4
-8	2
-80	2
-85	2
+58	4
+64	2
+66	2
+69	2
+72	4
+76	4
+77	2
 9	2
-92	2
-97	4
-105	2
-11	2
+90	6
+0	6
 113	4
-136	2
+114	2
+116	2
+118	4
 137	4
 138	8
-143	2
-150	2
+145	2
+146	4
+155	2
 158	2
-160	2
-162	2
+164	4
 165	4
-166	2
-174	4
-177	2
-18	4
-180	2
+178	2
+181	2
+183	2
 186	2
-196	2
-197	4
-217	4
-219	4
-226	2
+189	2
+190	2
+191	4
+194	2
+195	4
+199	6
+2	2
+207	4
+208	6
+214	2
+216	4
+222	2
+224	4
+229	4
 230	10
 238	4
-242	4
-248	2
-252	2
+244	2
+258	2
 260	2
-263	2
-274	2
-277	8
-296	2
-307	4
-308	2
-325	4
-327	6
+262	2
+266	2
+27	2
+273	6
+28	2
+284	2
+288	4
+30	2
+315	2
+321	4
+33	2
 342	4
-348	10
 35	6
-351	2
-367	4
+364	2
+365	2
+366	2
+368	2
+386	2
 389	2
-393	2
 394	2
+396	6
+397	4
 4	2
-403	6
-409	6
+41	2
 414	4
 421	2
-427	2
-429	4
-435	2
-438	6
-439	4
+444	2
+446	2
+448	2
+452	2
+454	6
 455	2
-458	4
 460	2
-462	4
-475	2
-478	4
-480	6
-484	2
-487	2
-53	2
-58	4
-66	2
-69	2
-77	2
+463	4
+482	2
+492	4
+493	2
+65	2
 78	2
-83	4
-90	6
-95	4
-103	4
+80	2
+97	4
+111	2
+12	4
 120	4
-129	4
-133	2
-145	2
-146	4
-149	4
-15	4
-157	2
-181	2
-187	6
-191	4
-2	2
-200	4
-201	2
-202	2
+131	2
+150	2
+156	2
+160	2
+163	2
+167	6
+168	2
+17	2
+175	4
+180	2
+20	2
 203	4
-208	6
-214	2
-216	4
-222	2
-224	4
-228	2
+226	2
 237	4
-239	4
-241	2
-244	2
 255	4
-258	2
-262	2
-273	6
-275	2
-28	2
+256	4
+274	2
+277	8
+281	4
 282	4
-285	2
 286	2
 287	2
-288	4
+289	2
 292	2
-298	6
-310	2
-311	6
+308	2
+309	4
+318	6
+327	6
 332	2
-335	2
-336	2
 339	2
-360	2
-362	2
-373	2
-384	6
-395	4
-396	6
-402	2
-417	6
-42	4
+34	2
+341	2
+348	10
+356	2
+37	4
+374	2
+379	2
+382	4
+409	6
+429	4
 43	2
-444	2
-449	2
-453	2
-459	4
-47	2
+430	6
+431	6
+432	2
+435	2
+437	2
+439	4
+443	2
+457	2
+462	4
+467	2
+470	2
 481	2
-482	2
-483	2
-485	2
-489	8
+487	2
 494	2
-65	2
-72	4
+51	4
+70	6
 74	2
-76	4
 82	2
-86	2
-87	2
-96	2
-0	6
-118	4
+83	4
+84	4
 119	6
-12	4
 125	4
-153	2
-156	2
-163	2
-164	4
-167	6
-168	2
-175	4
-176	4
-183	2
-190	2
-193	6
-205	4
-209	4
-221	4
-247	2
+15	4
+172	4
+177	2
+179	4
+18	4
+187	6
+19	2
+192	2
+197	4
+200	4
+202	2
+217	4
+219	4
+228	2
+235	2
 249	2
-272	4
-281	4
+252	2
+257	2
+265	4
+278	4
+280	4
 283	2
-289	2
+291	2
+305	2
 306	2
-309	4
-315	2
+311	6
+316	6
 317	4
-318	6
 322	4
 331	4
-34	2
-341	2
+336	2
+344	4
 345	2
-365	2
-366	2
-374	2
-375	2
-379	2
-382	4
-399	4
+351	2
+353	4
+369	6
+373	2
+378	2
+393	2
+395	4
 400	2
-401	10
+404	4
 406	8
-41	2
-413	4
-431	6
-44	2
-443	2
-446	2
-452	2
-463	4
-466	6
-467	2
-469	10
-470	2
-472	2
+407	2
+411	2
+418	2
+424	4
+436	2
+449	2
+453	2
+468	8
+47	2
+477	2
+480	6
+484	2
+485	2
+490	2
 491	2
+497	2
 498	6
-5	6
-51	4
+53	2
 54	2
-64	2
-70	6
-84	4
+67	4
+8	2
+85	2
+86	2
+87	2
+92	2
+95	4
+96	2
 98	4
 PREHOOK: query: explain
 select key, count(1) from clustergroupby  group by key, 3

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucket_many.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucket_many.q.out b/ql/src/test/results/clientpositive/llap/bucket_many.q.out
index 4e74e6d..00b61f2 100644
--- a/ql/src/test/results/clientpositive/llap/bucket_many.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucket_many.q.out
@@ -60,6 +60,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'
@@ -81,6 +82,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'
@@ -122,6 +124,7 @@ STAGE PLANS:
                         COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                         bucket_count 256
                         bucket_field_name key
+                        bucketing_version 2
                         column.name.delimiter ,
                         columns key,value
                         columns.comments 
@@ -204,6 +207,7 @@ STAGE PLANS:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
                 bucket_count 256
                 bucket_field_name key
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value
                 columns.comments 
@@ -244,10 +248,10 @@ POSTHOOK: Output: default@bucket_many
 POSTHOOK: Lineage: bucket_many.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: bucket_many.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: explain
-select * from bucket_many tablesample (bucket 1 out of 256) s
+select * from bucket_many tablesample (bucket 2 out of 256) s
 PREHOOK: type: QUERY
 POSTHOOK: query: explain
-select * from bucket_many tablesample (bucket 1 out of 256) s
+select * from bucket_many tablesample (bucket 2 out of 256) s
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
@@ -260,22 +264,25 @@ STAGE PLANS:
         TableScan
           alias: s
           Filter Operator
-            predicate: (((hash(key) & 2147483647) % 256) = 0) (type: boolean)
+            predicate: (((hash(key) & 2147483647) % 256) = 1) (type: boolean)
             Select Operator
               expressions: key (type: int), value (type: string)
               outputColumnNames: _col0, _col1
               ListSink
 
-PREHOOK: query: select * from bucket_many tablesample (bucket 1 out of 256) s
+PREHOOK: query: select * from bucket_many tablesample (bucket 2 out of 256) s
 PREHOOK: type: QUERY
 PREHOOK: Input: default@bucket_many
 #### A masked pattern was here ####
-POSTHOOK: query: select * from bucket_many tablesample (bucket 1 out of 256) s
+POSTHOOK: query: select * from bucket_many tablesample (bucket 2 out of 256) s
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@bucket_many
 #### A masked pattern was here ####
-256	val_256
-256	val_256
-0	val_0
-0	val_0
-0	val_0
+462	val_462
+462	val_462
+309	val_309
+282	val_282
+282	val_282
+176	val_176
+176	val_176
+309	val_309

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucket_map_join_tez1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucket_map_join_tez1.q.out b/ql/src/test/results/clientpositive/llap/bucket_map_join_tez1.q.out
index 83f6e51..3338ec2 100644
--- a/ql/src/test/results/clientpositive/llap/bucket_map_join_tez1.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucket_map_join_tez1.q.out
@@ -4292,8 +4292,8 @@ STAGE PLANS:
     Tez
 #### A masked pattern was here ####
       Edges:
+        Map 1 <- Map 3 (BROADCAST_EDGE)
         Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE)
-        Reducer 3 <- Map 1 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -4308,28 +4308,25 @@ STAGE PLANS:
                       expressions: key (type: int), value (type: string)
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: int)
-                        sort order: +
-                        Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
-                        value expressions: _col1 (type: string)
-                  Filter Operator
-                    predicate: value is not null (type: boolean)
-                    Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
-                    Select Operator
-                      expressions: key (type: int), value (type: string)
-                      outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
-                      Reduce Output Operator
-                        key expressions: _col1 (type: string)
-                        sort order: +
-                        Map-reduce partition columns: _col1 (type: string)
-                        Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
-                        value expressions: _col0 (type: int)
+                      Map Join Operator
+                        condition map:
+                             Inner Join 0 to 1
+                        keys:
+                          0 _col0 (type: int)
+                          1 _col0 (type: int)
+                        outputColumnNames: _col0, _col1
+                        input vertices:
+                          1 Map 3
+                        Statistics: Num rows: 809 Data size: 76855 Basic stats: COMPLETE Column stats: COMPLETE
+                        Reduce Output Operator
+                          key expressions: _col1 (type: string)
+                          sort order: +
+                          Map-reduce partition columns: _col1 (type: string)
+                          Statistics: Num rows: 809 Data size: 76855 Basic stats: COMPLETE Column stats: COMPLETE
+                          value expressions: _col0 (type: int)
             Execution mode: vectorized, llap
             LLAP IO: no inputs
-        Map 4 
+        Map 3 
             Map Operator Tree:
                 TableScan
                   alias: c
@@ -4348,6 +4345,26 @@ STAGE PLANS:
                         Statistics: Num rows: 500 Data size: 2000 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
+        Map 4 
+            Map Operator Tree:
+                TableScan
+                  alias: b
+                  Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
+                  Filter Operator
+                    predicate: value is not null (type: boolean)
+                    Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
+                    Select Operator
+                      expressions: key (type: int), value (type: string)
+                      outputColumnNames: _col0, _col1
+                      Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
+                      Reduce Output Operator
+                        key expressions: _col1 (type: string)
+                        sort order: +
+                        Map-reduce partition columns: _col1 (type: string)
+                        Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
+                        value expressions: _col0 (type: int)
+            Execution mode: vectorized, llap
+            LLAP IO: no inputs
         Reducer 2 
             Execution mode: llap
             Reduce Operator Tree:
@@ -4355,23 +4372,6 @@ STAGE PLANS:
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-                outputColumnNames: _col0, _col1
-                Statistics: Num rows: 809 Data size: 76855 Basic stats: COMPLETE Column stats: COMPLETE
-                Reduce Output Operator
-                  key expressions: _col1 (type: string)
-                  sort order: +
-                  Map-reduce partition columns: _col1 (type: string)
-                  Statistics: Num rows: 809 Data size: 76855 Basic stats: COMPLETE Column stats: COMPLETE
-                  value expressions: _col0 (type: int)
-        Reducer 3 
-            Execution mode: llap
-            Reduce Operator Tree:
-              Merge Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
                   0 _col1 (type: string)
                   1 _col1 (type: string)
                 outputColumnNames: _col0, _col3
@@ -4407,8 +4407,7 @@ STAGE PLANS:
     Tez
 #### A masked pattern was here ####
       Edges:
-        Map 1 <- Map 3 (CUSTOM_EDGE)
-        Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE)
+        Map 1 <- Map 2 (CUSTOM_EDGE), Map 3 (CUSTOM_EDGE)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -4431,17 +4430,32 @@ STAGE PLANS:
                           1 _col0 (type: int)
                         outputColumnNames: _col0, _col1
                         input vertices:
-                          1 Map 3
+                          1 Map 2
                         Statistics: Num rows: 809 Data size: 76855 Basic stats: COMPLETE Column stats: COMPLETE
-                        Reduce Output Operator
-                          key expressions: _col1 (type: string)
-                          sort order: +
-                          Map-reduce partition columns: _col1 (type: string)
-                          Statistics: Num rows: 809 Data size: 76855 Basic stats: COMPLETE Column stats: COMPLETE
-                          value expressions: _col0 (type: int)
+                        Map Join Operator
+                          condition map:
+                               Inner Join 0 to 1
+                          keys:
+                            0 _col1 (type: string)
+                            1 _col1 (type: string)
+                          outputColumnNames: _col0, _col3
+                          input vertices:
+                            1 Map 3
+                          Statistics: Num rows: 1309 Data size: 10472 Basic stats: COMPLETE Column stats: COMPLETE
+                          Select Operator
+                            expressions: _col0 (type: int), _col3 (type: int)
+                            outputColumnNames: _col0, _col1
+                            Statistics: Num rows: 1309 Data size: 10472 Basic stats: COMPLETE Column stats: COMPLETE
+                            File Output Operator
+                              compressed: false
+                              Statistics: Num rows: 1309 Data size: 10472 Basic stats: COMPLETE Column stats: COMPLETE
+                              table:
+                                  input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                                  output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
             Execution mode: vectorized, llap
             LLAP IO: no inputs
-        Map 3 
+        Map 2 
             Map Operator Tree:
                 TableScan
                   alias: c
@@ -4460,7 +4474,7 @@ STAGE PLANS:
                         Statistics: Num rows: 500 Data size: 2000 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
-        Map 4 
+        Map 3 
             Map Operator Tree:
                 TableScan
                   alias: b
@@ -4480,28 +4494,6 @@ STAGE PLANS:
                         value expressions: _col0 (type: int)
             Execution mode: vectorized, llap
             LLAP IO: no inputs
-        Reducer 2 
-            Execution mode: llap
-            Reduce Operator Tree:
-              Merge Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col1 (type: string)
-                  1 _col1 (type: string)
-                outputColumnNames: _col0, _col3
-                Statistics: Num rows: 1309 Data size: 10472 Basic stats: COMPLETE Column stats: COMPLETE
-                Select Operator
-                  expressions: _col0 (type: int), _col3 (type: int)
-                  outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 1309 Data size: 10472 Basic stats: COMPLETE Column stats: COMPLETE
-                  File Output Operator
-                    compressed: false
-                    Statistics: Num rows: 1309 Data size: 10472 Basic stats: COMPLETE Column stats: COMPLETE
-                    table:
-                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/llap/bucket_num_reducers.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/bucket_num_reducers.q.out b/ql/src/test/results/clientpositive/llap/bucket_num_reducers.q.out
new file mode 100644
index 0000000..f217142
--- /dev/null
+++ b/ql/src/test/results/clientpositive/llap/bucket_num_reducers.q.out
@@ -0,0 +1,202 @@
+PREHOOK: query: CREATE TABLE bucket_nr(key int, value string) CLUSTERED BY (key) INTO 50 BUCKETS
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@bucket_nr
+POSTHOOK: query: CREATE TABLE bucket_nr(key int, value string) CLUSTERED BY (key) INTO 50 BUCKETS
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@bucket_nr
+PREHOOK: query: explain extended insert overwrite table bucket_nr
+  select * from src
+PREHOOK: type: QUERY
+POSTHOOK: query: explain extended insert overwrite table bucket_nr
+  select * from src
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-2 depends on stages: Stage-1
+  Stage-0 depends on stages: Stage-2
+  Stage-3 depends on stages: Stage-0
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: src
+                  Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                  GatherStats: false
+                  Select Operator
+                    expressions: key (type: string), value (type: string)
+                    outputColumnNames: _col0, _col1
+                    Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                    Reduce Output Operator
+                      null sort order: 
+                      sort order: 
+                      Map-reduce partition columns: UDFToInteger(_col0) (type: int)
+                      Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                      tag: -1
+                      value expressions: _col0 (type: string), _col1 (type: string)
+                      auto parallelism: false
+            Execution mode: llap
+            LLAP IO: no inputs
+            Path -> Alias:
+#### A masked pattern was here ####
+            Path -> Partition:
+#### A masked pattern was here ####
+                Partition
+                  base file name: src
+                  input format: org.apache.hadoop.mapred.TextInputFormat
+                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                  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'
+                    columns.types string:string
+#### A masked pattern was here ####
+                    name default.src
+                    numFiles 1
+                    numRows 500
+                    rawDataSize 5312
+                    serialization.ddl struct src { string key, string value}
+                    serialization.format 1
+                    serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    totalSize 5812
+#### A masked pattern was here ####
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                
+                    input format: org.apache.hadoop.mapred.TextInputFormat
+                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                    properties:
+                      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'
+                      columns.types string:string
+#### A masked pattern was here ####
+                      name default.src
+                      numFiles 1
+                      numRows 500
+                      rawDataSize 5312
+                      serialization.ddl struct src { string key, string value}
+                      serialization.format 1
+                      serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                      totalSize 5812
+#### A masked pattern was here ####
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    name: default.src
+                  name: default.src
+            Truncated Path -> Alias:
+              /src [src]
+        Reducer 2 
+            Execution mode: llap
+            Needs Tagging: false
+            Reduce Operator Tree:
+              Select Operator
+                expressions: UDFToInteger(VALUE._col0) (type: int), VALUE._col1 (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
+                File Output Operator
+                  compressed: false
+                  GlobalTableId: 1
+#### A masked pattern was here ####
+                  NumFilesPerFileSink: 5
+                  Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
+#### A masked pattern was here ####
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      properties:
+                        COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
+                        bucket_count 50
+                        bucket_field_name key
+                        bucketing_version 2
+                        column.name.delimiter ,
+                        columns key,value
+                        columns.comments 
+                        columns.types int:string
+#### A masked pattern was here ####
+                        name default.bucket_nr
+                        numFiles 0
+                        numRows 0
+                        rawDataSize 0
+                        serialization.ddl struct bucket_nr { i32 key, string value}
+                        serialization.format 1
+                        serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        totalSize 0
+#### A masked pattern was here ####
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                      name: default.bucket_nr
+                  TotalFiles: 50
+                  GatherStats: true
+                  MultiFileSpray: true
+
+  Stage: Stage-2
+    Dependency Collection
+
+  Stage: Stage-0
+    Move Operator
+      tables:
+          replace: true
+#### A masked pattern was here ####
+          table:
+              input format: org.apache.hadoop.mapred.TextInputFormat
+              output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+              properties:
+                COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}
+                bucket_count 50
+                bucket_field_name key
+                bucketing_version 2
+                column.name.delimiter ,
+                columns key,value
+                columns.comments 
+                columns.types int:string
+#### A masked pattern was here ####
+                name default.bucket_nr
+                numFiles 0
+                numRows 0
+                rawDataSize 0
+                serialization.ddl struct bucket_nr { i32 key, string value}
+                serialization.format 1
+                serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                totalSize 0
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              name: default.bucket_nr
+
+  Stage: Stage-3
+    Stats Work
+      Basic Stats Work:
+#### A masked pattern was here ####
+
+PREHOOK: query: insert overwrite table bucket_nr
+select * from src
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@bucket_nr
+POSTHOOK: query: insert overwrite table bucket_nr
+select * from src
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@bucket_nr
+POSTHOOK: Lineage: bucket_nr.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: bucket_nr.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+PREHOOK: query: drop table bucket_nr
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@bucket_nr
+PREHOOK: Output: default@bucket_nr
+POSTHOOK: query: drop table bucket_nr
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@bucket_nr
+POSTHOOK: Output: default@bucket_nr


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

Posted by dj...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucket_map_join_spark4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucket_map_join_spark4.q.out b/ql/src/test/results/clientpositive/spark/bucket_map_join_spark4.q.out
index 68889d3..6ac9dd4 100644
--- a/ql/src/test/results/clientpositive/spark/bucket_map_join_spark4.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucket_map_join_spark4.q.out
@@ -110,6 +110,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -133,6 +134,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -186,6 +188,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -209,6 +212,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -310,6 +314,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -333,6 +338,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -483,6 +489,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -506,6 +513,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -559,6 +567,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -582,6 +591,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -683,6 +693,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -706,6 +717,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucket_map_join_tez1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucket_map_join_tez1.q.out b/ql/src/test/results/clientpositive/spark/bucket_map_join_tez1.q.out
index 158d1c3..987a98c 100644
--- a/ql/src/test/results/clientpositive/spark/bucket_map_join_tez1.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucket_map_join_tez1.q.out
@@ -4323,110 +4323,104 @@ PREHOOK: type: QUERY
 POSTHOOK: query: explain select a.key, b.key from tab_part a join tab_part c on a.key = c.key join tab_part b on a.value = b.value
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
+  Stage-2 is a root stage
+  Stage-1 depends on stages: Stage-2
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
-  Stage: Stage-1
+  Stage: Stage-2
     Spark
-      Edges:
-        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 2), Map 4 (PARTITION-LEVEL SORT, 2)
-        Reducer 3 <- Map 5 (PARTITION-LEVEL SORT, 2), Reducer 2 (PARTITION-LEVEL SORT, 2)
 #### A masked pattern was here ####
       Vertices:
-        Map 1 
+        Map 2 
             Map Operator Tree:
                 TableScan
-                  alias: a
+                  alias: c
                   Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and value is not null) (type: boolean)
+                    predicate: key is not null (type: boolean)
                     Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: key (type: int), value (type: string)
-                      outputColumnNames: _col0, _col1
+                      expressions: key (type: int)
+                      outputColumnNames: _col0
                       Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: int)
-                        sort order: +
-                        Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: string)
+                      Spark HashTable Sink Operator
+                        keys:
+                          0 _col0 (type: int)
+                          1 _col0 (type: int)
             Execution mode: vectorized
-        Map 4 
+            Local Work:
+              Map Reduce Local Work
+        Map 3 
             Map Operator Tree:
                 TableScan
-                  alias: c
+                  alias: b
                   Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: key is not null (type: boolean)
+                    predicate: value is not null (type: boolean)
                     Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: key (type: int)
-                      outputColumnNames: _col0
+                      expressions: key (type: int), value (type: string)
+                      outputColumnNames: _col0, _col1
                       Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: int)
-                        sort order: +
-                        Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                      Spark HashTable Sink Operator
+                        keys:
+                          0 _col1 (type: string)
+                          1 _col1 (type: string)
             Execution mode: vectorized
-        Map 5 
+            Local Work:
+              Map Reduce Local Work
+
+  Stage: Stage-1
+    Spark
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
             Map Operator Tree:
                 TableScan
-                  alias: b
+                  alias: a
                   Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: value is not null (type: boolean)
+                    predicate: (key is not null and value is not null) (type: boolean)
                     Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: int), value (type: string)
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-                      Reduce Output Operator
-                        key expressions: _col1 (type: string)
-                        sort order: +
-                        Map-reduce partition columns: _col1 (type: string)
-                        Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col0 (type: int)
+                      Map Join Operator
+                        condition map:
+                             Inner Join 0 to 1
+                        keys:
+                          0 _col0 (type: int)
+                          1 _col0 (type: int)
+                        outputColumnNames: _col0, _col1
+                        input vertices:
+                          1 Map 2
+                        Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
+                        Map Join Operator
+                          condition map:
+                               Inner Join 0 to 1
+                          keys:
+                            0 _col1 (type: string)
+                            1 _col1 (type: string)
+                          outputColumnNames: _col0, _col3
+                          input vertices:
+                            1 Map 3
+                          Statistics: Num rows: 605 Data size: 6427 Basic stats: COMPLETE Column stats: NONE
+                          Select Operator
+                            expressions: _col0 (type: int), _col3 (type: int)
+                            outputColumnNames: _col0, _col1
+                            Statistics: Num rows: 605 Data size: 6427 Basic stats: COMPLETE Column stats: NONE
+                            File Output Operator
+                              compressed: false
+                              Statistics: Num rows: 605 Data size: 6427 Basic stats: COMPLETE Column stats: NONE
+                              table:
+                                  input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                                  output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
             Execution mode: vectorized
-        Reducer 2 
-            Reduce Operator Tree:
-              Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-                outputColumnNames: _col0, _col1
-                Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col1 (type: string)
-                  sort order: +
-                  Map-reduce partition columns: _col1 (type: string)
-                  Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col0 (type: int)
-        Reducer 3 
-            Reduce Operator Tree:
-              Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col1 (type: string)
-                  1 _col1 (type: string)
-                outputColumnNames: _col0, _col3
-                Statistics: Num rows: 605 Data size: 6427 Basic stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: int), _col3 (type: int)
-                  outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 605 Data size: 6427 Basic stats: COMPLETE Column stats: NONE
-                  File Output Operator
-                    compressed: false
-                    Statistics: Num rows: 605 Data size: 6427 Basic stats: COMPLETE Column stats: NONE
-                    table:
-                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+            Local Work:
+              Map Reduce Local Work
 
   Stage: Stage-0
     Fetch Operator
@@ -4439,110 +4433,104 @@ PREHOOK: type: QUERY
 POSTHOOK: query: explain select a.key, b.key from tab_part a join tab_part c on a.key = c.key join tab_part b on a.value = b.value
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
+  Stage-2 is a root stage
+  Stage-1 depends on stages: Stage-2
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
-  Stage: Stage-1
+  Stage: Stage-2
     Spark
-      Edges:
-        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 2), Map 4 (PARTITION-LEVEL SORT, 2)
-        Reducer 3 <- Map 5 (PARTITION-LEVEL SORT, 2), Reducer 2 (PARTITION-LEVEL SORT, 2)
 #### A masked pattern was here ####
       Vertices:
-        Map 1 
+        Map 2 
             Map Operator Tree:
                 TableScan
-                  alias: a
+                  alias: c
                   Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and value is not null) (type: boolean)
+                    predicate: key is not null (type: boolean)
                     Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: key (type: int), value (type: string)
-                      outputColumnNames: _col0, _col1
+                      expressions: key (type: int)
+                      outputColumnNames: _col0
                       Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: int)
-                        sort order: +
-                        Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: string)
+                      Spark HashTable Sink Operator
+                        keys:
+                          0 _col0 (type: int)
+                          1 _col0 (type: int)
             Execution mode: vectorized
-        Map 4 
+            Local Work:
+              Map Reduce Local Work
+        Map 3 
             Map Operator Tree:
                 TableScan
-                  alias: c
+                  alias: b
                   Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: key is not null (type: boolean)
+                    predicate: value is not null (type: boolean)
                     Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: key (type: int)
-                      outputColumnNames: _col0
+                      expressions: key (type: int), value (type: string)
+                      outputColumnNames: _col0, _col1
                       Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: int)
-                        sort order: +
-                        Map-reduce partition columns: _col0 (type: int)
-                        Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                      Spark HashTable Sink Operator
+                        keys:
+                          0 _col1 (type: string)
+                          1 _col1 (type: string)
             Execution mode: vectorized
-        Map 5 
+            Local Work:
+              Map Reduce Local Work
+
+  Stage: Stage-1
+    Spark
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
             Map Operator Tree:
                 TableScan
-                  alias: b
+                  alias: a
                   Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: value is not null (type: boolean)
+                    predicate: (key is not null and value is not null) (type: boolean)
                     Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: int), value (type: string)
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-                      Reduce Output Operator
-                        key expressions: _col1 (type: string)
-                        sort order: +
-                        Map-reduce partition columns: _col1 (type: string)
-                        Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col0 (type: int)
+                      Map Join Operator
+                        condition map:
+                             Inner Join 0 to 1
+                        keys:
+                          0 _col0 (type: int)
+                          1 _col0 (type: int)
+                        outputColumnNames: _col0, _col1
+                        input vertices:
+                          1 Map 2
+                        Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
+                        Map Join Operator
+                          condition map:
+                               Inner Join 0 to 1
+                          keys:
+                            0 _col1 (type: string)
+                            1 _col1 (type: string)
+                          outputColumnNames: _col0, _col3
+                          input vertices:
+                            1 Map 3
+                          Statistics: Num rows: 605 Data size: 6427 Basic stats: COMPLETE Column stats: NONE
+                          Select Operator
+                            expressions: _col0 (type: int), _col3 (type: int)
+                            outputColumnNames: _col0, _col1
+                            Statistics: Num rows: 605 Data size: 6427 Basic stats: COMPLETE Column stats: NONE
+                            File Output Operator
+                              compressed: false
+                              Statistics: Num rows: 605 Data size: 6427 Basic stats: COMPLETE Column stats: NONE
+                              table:
+                                  input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                                  output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
             Execution mode: vectorized
-        Reducer 2 
-            Reduce Operator Tree:
-              Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-                outputColumnNames: _col0, _col1
-                Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col1 (type: string)
-                  sort order: +
-                  Map-reduce partition columns: _col1 (type: string)
-                  Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col0 (type: int)
-        Reducer 3 
-            Reduce Operator Tree:
-              Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col1 (type: string)
-                  1 _col1 (type: string)
-                outputColumnNames: _col0, _col3
-                Statistics: Num rows: 605 Data size: 6427 Basic stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: int), _col3 (type: int)
-                  outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 605 Data size: 6427 Basic stats: COMPLETE Column stats: NONE
-                  File Output Operator
-                    compressed: false
-                    Statistics: Num rows: 605 Data size: 6427 Basic stats: COMPLETE Column stats: NONE
-                    table:
-                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+            Local Work:
+              Map Reduce Local Work
 
   Stage: Stage-0
     Fetch Operator
@@ -4559,14 +4547,13 @@ select a.key, a.value, b.value
 from tab a join tab_part b on a.key = b.key and a.ds = b.ds
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
+  Stage-2 is a root stage
+  Stage-1 depends on stages: Stage-2
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
-  Stage: Stage-1
+  Stage: Stage-2
     Spark
-      Edges:
-        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 2), Map 3 (PARTITION-LEVEL SORT, 2)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -4581,14 +4568,19 @@ STAGE PLANS:
                       expressions: key (type: int), value (type: string), ds (type: string)
                       outputColumnNames: _col0, _col1, _col2
                       Statistics: Num rows: 242 Data size: 2566 Basic stats: COMPLETE Column stats: NONE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: int), _col2 (type: string)
-                        sort order: ++
-                        Map-reduce partition columns: _col0 (type: int), _col2 (type: string)
-                        Statistics: Num rows: 242 Data size: 2566 Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: string)
+                      Spark HashTable Sink Operator
+                        keys:
+                          0 _col0 (type: int), _col2 (type: string)
+                          1 _col0 (type: int), _col2 (type: string)
             Execution mode: vectorized
-        Map 3 
+            Local Work:
+              Map Reduce Local Work
+
+  Stage: Stage-1
+    Spark
+#### A masked pattern was here ####
+      Vertices:
+        Map 2 
             Map Operator Tree:
                 TableScan
                   alias: b
@@ -4600,34 +4592,30 @@ STAGE PLANS:
                       expressions: key (type: int), value (type: string), ds (type: string)
                       outputColumnNames: _col0, _col1, _col2
                       Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: int), _col2 (type: string)
-                        sort order: ++
-                        Map-reduce partition columns: _col0 (type: int), _col2 (type: string)
-                        Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: string)
+                      Map Join Operator
+                        condition map:
+                             Inner Join 0 to 1
+                        keys:
+                          0 _col0 (type: int), _col2 (type: string)
+                          1 _col0 (type: int), _col2 (type: string)
+                        outputColumnNames: _col0, _col1, _col4
+                        input vertices:
+                          0 Map 1
+                        Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
+                        Select Operator
+                          expressions: _col0 (type: int), _col1 (type: string), _col4 (type: string)
+                          outputColumnNames: _col0, _col1, _col2
+                          Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
+                          File Output Operator
+                            compressed: false
+                            Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
+                            table:
+                                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
             Execution mode: vectorized
-        Reducer 2 
-            Reduce Operator Tree:
-              Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col0 (type: int), _col2 (type: string)
-                  1 _col0 (type: int), _col2 (type: string)
-                outputColumnNames: _col0, _col1, _col4
-                Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: int), _col1 (type: string), _col4 (type: string)
-                  outputColumnNames: _col0, _col1, _col2
-                  Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
-                  File Output Operator
-                    compressed: false
-                    Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
-                    table:
-                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+            Local Work:
+              Map Reduce Local Work
 
   Stage: Stage-0
     Fetch Operator
@@ -4644,14 +4632,13 @@ select a.key, a.value, b.value
 from tab a join tab_part b on a.key = b.key and a.ds = b.ds
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
+  Stage-2 is a root stage
+  Stage-1 depends on stages: Stage-2
   Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
-  Stage: Stage-1
+  Stage: Stage-2
     Spark
-      Edges:
-        Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 2), Map 3 (PARTITION-LEVEL SORT, 2)
 #### A masked pattern was here ####
       Vertices:
         Map 1 
@@ -4666,14 +4653,19 @@ STAGE PLANS:
                       expressions: key (type: int), value (type: string), ds (type: string)
                       outputColumnNames: _col0, _col1, _col2
                       Statistics: Num rows: 242 Data size: 2566 Basic stats: COMPLETE Column stats: NONE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: int), _col2 (type: string)
-                        sort order: ++
-                        Map-reduce partition columns: _col0 (type: int), _col2 (type: string)
-                        Statistics: Num rows: 242 Data size: 2566 Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: string)
+                      Spark HashTable Sink Operator
+                        keys:
+                          0 _col0 (type: int), _col2 (type: string)
+                          1 _col0 (type: int), _col2 (type: string)
             Execution mode: vectorized
-        Map 3 
+            Local Work:
+              Map Reduce Local Work
+
+  Stage: Stage-1
+    Spark
+#### A masked pattern was here ####
+      Vertices:
+        Map 2 
             Map Operator Tree:
                 TableScan
                   alias: b
@@ -4685,34 +4677,30 @@ STAGE PLANS:
                       expressions: key (type: int), value (type: string), ds (type: string)
                       outputColumnNames: _col0, _col1, _col2
                       Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-                      Reduce Output Operator
-                        key expressions: _col0 (type: int), _col2 (type: string)
-                        sort order: ++
-                        Map-reduce partition columns: _col0 (type: int), _col2 (type: string)
-                        Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col1 (type: string)
+                      Map Join Operator
+                        condition map:
+                             Inner Join 0 to 1
+                        keys:
+                          0 _col0 (type: int), _col2 (type: string)
+                          1 _col0 (type: int), _col2 (type: string)
+                        outputColumnNames: _col0, _col1, _col4
+                        input vertices:
+                          0 Map 1
+                        Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
+                        Select Operator
+                          expressions: _col0 (type: int), _col1 (type: string), _col4 (type: string)
+                          outputColumnNames: _col0, _col1, _col2
+                          Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
+                          File Output Operator
+                            compressed: false
+                            Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
+                            table:
+                                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
             Execution mode: vectorized
-        Reducer 2 
-            Reduce Operator Tree:
-              Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col0 (type: int), _col2 (type: string)
-                  1 _col0 (type: int), _col2 (type: string)
-                outputColumnNames: _col0, _col1, _col4
-                Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: int), _col1 (type: string), _col4 (type: string)
-                  outputColumnNames: _col0, _col1, _col2
-                  Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
-                  File Output Operator
-                    compressed: false
-                    Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE
-                    table:
-                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+            Local Work:
+              Map Reduce Local Work
 
   Stage: Stage-0
     Fetch Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin1.q.out b/ql/src/test/results/clientpositive/spark/bucketmapjoin1.q.out
index 15abce3..3a062ca 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin1.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin1.q.out
@@ -420,6 +420,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -441,6 +442,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -519,6 +521,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -564,6 +567,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -595,6 +599,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -776,6 +781,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -797,6 +803,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -875,6 +882,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -920,6 +928,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -951,6 +960,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin10.q.out b/ql/src/test/results/clientpositive/spark/bucketmapjoin10.q.out
index 5189afd..a1f78ce 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin10.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin10.q.out
@@ -199,6 +199,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -247,6 +248,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -342,6 +344,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -390,6 +393,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin11.q.out b/ql/src/test/results/clientpositive/spark/bucketmapjoin11.q.out
index 0a65dc7..93ccb0f 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin11.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin11.q.out
@@ -212,6 +212,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -260,6 +261,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -361,6 +363,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -409,6 +412,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -565,6 +569,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -613,6 +618,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -714,6 +720,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -762,6 +769,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin12.q.out b/ql/src/test/results/clientpositive/spark/bucketmapjoin12.q.out
index 90ef33d..8a0377d 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin12.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin12.q.out
@@ -172,6 +172,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 
@@ -272,6 +273,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -417,6 +419,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -511,6 +514,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin13.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin13.q.out b/ql/src/test/results/clientpositive/spark/bucketmapjoin13.q.out
index 9e44d1a..4d887f5 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin13.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin13.q.out
@@ -136,6 +136,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -231,6 +232,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -280,6 +282,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -435,6 +438,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -536,6 +540,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -696,6 +701,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -797,6 +803,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -957,6 +964,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1058,6 +1066,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name value
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin2.q.out b/ql/src/test/results/clientpositive/spark/bucketmapjoin2.q.out
index ddef6fb..a4fa2e2 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin2.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin2.q.out
@@ -171,6 +171,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -247,6 +248,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -292,6 +294,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -323,6 +326,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -533,6 +537,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -609,6 +614,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -654,6 +660,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -685,6 +692,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -912,6 +920,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -988,6 +997,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1036,6 +1046,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1082,6 +1093,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -1113,6 +1125,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin3.q.out b/ql/src/test/results/clientpositive/spark/bucketmapjoin3.q.out
index 95cc9e1..3920bfb 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin3.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin3.q.out
@@ -195,6 +195,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -271,6 +272,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -316,6 +318,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -347,6 +350,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -557,6 +561,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -633,6 +638,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -678,6 +684,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -709,6 +716,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin4.q.out b/ql/src/test/results/clientpositive/spark/bucketmapjoin4.q.out
index 7f68921..26221a9 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin4.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin4.q.out
@@ -170,6 +170,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -191,6 +192,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -244,6 +246,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -265,6 +268,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -312,6 +316,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -343,6 +348,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -516,6 +522,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -537,6 +544,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -590,6 +598,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -611,6 +620,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -658,6 +668,7 @@ STAGE PLANS:
                         properties:
                           COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                           bucket_count -1
+                          bucketing_version 2
                           column.name.delimiter ,
                           columns key,value1,value2
                           columns.comments 
@@ -689,6 +700,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin5.q.out b/ql/src/test/results/clientpositive/spark/bucketmapjoin5.q.out
index da24d87..de6aba9 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin5.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin5.q.out
@@ -218,6 +218,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -239,6 +240,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -302,6 +304,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,value1,value2
                                 columns.comments 
@@ -364,6 +367,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -412,6 +416,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 4
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -442,6 +447,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 
@@ -625,6 +631,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -646,6 +653,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -709,6 +717,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,value1,value2
                                 columns.comments 
@@ -771,6 +780,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -819,6 +829,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -849,6 +860,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true"}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin7.q.out b/ql/src/test/results/clientpositive/spark/bucketmapjoin7.q.out
index d7967d1..041d28b 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin7.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin7.q.out
@@ -135,6 +135,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -241,6 +242,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin7.q.out_spark
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin7.q.out_spark b/ql/src/test/results/clientpositive/spark/bucketmapjoin7.q.out_spark
index f67dec5..e6d868d 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin7.q.out_spark
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin7.q.out_spark
@@ -133,6 +133,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -236,6 +237,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin8.q.out b/ql/src/test/results/clientpositive/spark/bucketmapjoin8.q.out
index 76ce9d3..cdf1a0d 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin8.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin8.q.out
@@ -138,6 +138,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -238,6 +239,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -397,6 +399,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name value
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -497,6 +500,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin9.q.out b/ql/src/test/results/clientpositive/spark/bucketmapjoin9.q.out
index 1bfe4d2..e7e424e 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin9.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin9.q.out
@@ -141,6 +141,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -235,6 +236,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -422,6 +424,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -516,6 +519,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin_negative.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin_negative.q.out b/ql/src/test/results/clientpositive/spark/bucketmapjoin_negative.q.out
index de2b978..ebe0763 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin_negative.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin_negative.q.out
@@ -140,6 +140,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -200,6 +201,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,value1,value2
                                 columns.comments 
@@ -233,6 +235,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -254,6 +257,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -285,6 +289,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin_negative2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin_negative2.q.out b/ql/src/test/results/clientpositive/spark/bucketmapjoin_negative2.q.out
index d3ec973..d60c8d6 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin_negative2.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin_negative2.q.out
@@ -154,6 +154,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -202,6 +203,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -264,6 +266,7 @@ STAGE PLANS:
                               properties:
                                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                                 bucket_count -1
+                                bucketing_version 2
                                 column.name.delimiter ,
                                 columns key,value1,value2
                                 columns.comments 
@@ -302,6 +305,7 @@ STAGE PLANS:
                   properties:
                     bucket_count 2
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -323,6 +327,7 @@ STAGE PLANS:
                     properties:
                       bucket_count 2
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -354,6 +359,7 @@ STAGE PLANS:
               properties:
                 COLUMN_STATS_ACCURATE {"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value1":"true","value2":"true"}}
                 bucket_count -1
+                bucketing_version 2
                 column.name.delimiter ,
                 columns key,value1,value2
                 columns.comments 

http://git-wip-us.apache.org/repos/asf/hive/blob/ac6b2a3f/ql/src/test/results/clientpositive/spark/bucketmapjoin_negative3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/bucketmapjoin_negative3.q.out b/ql/src/test/results/clientpositive/spark/bucketmapjoin_negative3.q.out
index 03642b0..0dbf8a3 100644
--- a/ql/src/test/results/clientpositive/spark/bucketmapjoin_negative3.q.out
+++ b/ql/src/test/results/clientpositive/spark/bucketmapjoin_negative3.q.out
@@ -191,6 +191,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -213,6 +214,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -305,6 +307,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -327,6 +330,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -402,6 +406,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name value
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -424,6 +429,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name value
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -516,6 +522,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name value
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -538,6 +545,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name value
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -608,6 +616,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -630,6 +639,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -716,6 +726,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -738,6 +749,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -808,6 +820,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name value
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -830,6 +843,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name value
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -916,6 +930,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -938,6 +953,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1008,6 +1024,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1030,6 +1047,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1116,6 +1134,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1138,6 +1157,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1208,6 +1228,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name value
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1230,6 +1251,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name value
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1316,6 +1338,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1338,6 +1361,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1408,6 +1432,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1430,6 +1455,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1516,6 +1542,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name value
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1538,6 +1565,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name value
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1608,6 +1636,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name value
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1630,6 +1659,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name value
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1716,6 +1746,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name value
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1738,6 +1769,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name value
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1808,6 +1840,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name value
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1830,6 +1863,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name value
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments 
@@ -1916,6 +1950,7 @@ STAGE PLANS:
                     SORTBUCKETCOLSPREFIX TRUE
                     bucket_count 3
                     bucket_field_name key
+                    bucketing_version 2
                     column.name.delimiter ,
                     columns key,value
                     columns.comments 
@@ -1938,6 +1973,7 @@ STAGE PLANS:
                       SORTBUCKETCOLSPREFIX TRUE
                       bucket_count 3
                       bucket_field_name key
+                      bucketing_version 2
                       column.name.delimiter ,
                       columns key,value
                       columns.comments