hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcama...@apache.org
Subject [01/10] hive git commit: HIVE-17286: Avoid expensive String serialization/deserialization for bitvectors (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)
Date Thu, 17 Aug 2017 22:42:25 GMT
Repository: hive
Updated Branches:
  refs/heads/master f756bf9c5 -> 9a36aa909


http://git-wip-us.apache.org/repos/asf/hive/blob/9a36aa90/ql/src/test/results/clientpositive/tez/explainuser_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/tez/explainuser_3.q.out b/ql/src/test/results/clientpositive/tez/explainuser_3.q.out
index f70d711..9483de1 100644
--- a/ql/src/test/results/clientpositive/tez/explainuser_3.q.out
+++ b/ql/src/test/results/clientpositive/tez/explainuser_3.q.out
@@ -209,11 +209,11 @@ Stage-3
         Stage-0
           Reducer 2
           File Output Operator [FS_6]
-            Group By Operator [GBY_4] (rows=1 width=960)
+            Group By Operator [GBY_4] (rows=1 width=880)
               Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0)","compute_stats(VALUE._col1)"]
             <-Map 1 [CUSTOM_SIMPLE_EDGE]
               PARTITION_ONLY_SHUFFLE [RS_3]
-                Group By Operator [GBY_2] (rows=1 width=960)
+                Group By Operator [GBY_2] (rows=1 width=880)
                   Output:["_col0","_col1"],aggregations:["compute_stats(key, 'hll')","compute_stats(value, 'hll')"]
                   Select Operator [SEL_1] (rows=500 width=178)
                     Output:["key","value"]

http://git-wip-us.apache.org/repos/asf/hive/blob/9a36aa90/ql/src/test/results/clientpositive/tunable_ndv.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/tunable_ndv.q.out b/ql/src/test/results/clientpositive/tunable_ndv.q.out
index e08f452..a7839ab 100644
--- a/ql/src/test/results/clientpositive/tunable_ndv.q.out
+++ b/ql/src/test/results/clientpositive/tunable_ndv.q.out
@@ -75,8 +75,7 @@ POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@loc_orc_1d
 # col_name            	data_type           	min                 	max                 	num_nulls           	distinct_count      	avg_col_len         	max_col_len         	num_trues           	num_falses          	comment             	bitVector           
 	 	 	 	 	 	 	 	 	 	 	 
-locid               	int                 	1                   	2                   	0                   	2                   	                    	                    	                    	                    	SExM4AICxfO+SPyNofED	 
-	from deserializer   	 	 	 	 	 	 	 	 	 	 
+locid               	int                 	1                   	2                   	0                   	2                   	                    	                    	                    	                    	HL                  	from deserializer   
 PREHOOK: query: describe formatted loc_orc_1d partition(year=2001) locid
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@loc_orc_1d
@@ -85,8 +84,7 @@ POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@loc_orc_1d
 # col_name            	data_type           	min                 	max                 	num_nulls           	distinct_count      	avg_col_len         	max_col_len         	num_trues           	num_falses          	comment             	bitVector           
 	 	 	 	 	 	 	 	 	 	 	 
-locid               	int                 	1                   	4                   	0                   	4                   	                    	                    	                    	                    	SExM4AQExfO+SLy7rGKA4vdMwPD8wQI=	 
-	from deserializer   	 	 	 	 	 	 	 	 	 	 
+locid               	int                 	1                   	4                   	0                   	4                   	                    	                    	                    	                    	HL                  	from deserializer   
 PREHOOK: query: describe formatted loc_orc_1d locid
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@loc_orc_1d
@@ -95,8 +93,7 @@ POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@loc_orc_1d
 # col_name            	data_type           	min                 	max                 	num_nulls           	distinct_count      	avg_col_len         	max_col_len         	num_trues           	num_falses          	comment             	bitVector           
 	 	 	 	 	 	 	 	 	 	 	 
-locid               	int                 	1                   	4                   	0                   	4                   	                    	                    	                    	                    	SExM4AICxfO+SPyNofED	 
-	from deserializer   	 	 	 	 	 	 	 	 	 	 
+locid               	int                 	1                   	4                   	0                   	4                   	                    	                    	                    	                    	HL                  	from deserializer   
 COLUMN_STATS_ACCURATE	{\"COLUMN_STATS\":{\"locid\":\"true\"}}	 	 	 	 	 	 	 	 	 	 
 PREHOOK: query: describe formatted loc_orc_1d locid
 PREHOOK: type: DESCTABLE
@@ -106,8 +103,7 @@ POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@loc_orc_1d
 # col_name            	data_type           	min                 	max                 	num_nulls           	distinct_count      	avg_col_len         	max_col_len         	num_trues           	num_falses          	comment             	bitVector           
 	 	 	 	 	 	 	 	 	 	 	 
-locid               	int                 	1                   	4                   	0                   	4                   	                    	                    	                    	                    	SExM4AICxfO+SPyNofED	 
-	from deserializer   	 	 	 	 	 	 	 	 	 	 
+locid               	int                 	1                   	4                   	0                   	4                   	                    	                    	                    	                    	HL                  	from deserializer   
 COLUMN_STATS_ACCURATE	{\"COLUMN_STATS\":{\"locid\":\"true\"}}	 	 	 	 	 	 	 	 	 	 
 PREHOOK: query: describe formatted loc_orc_1d locid
 PREHOOK: type: DESCTABLE
@@ -117,8 +113,7 @@ POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@loc_orc_1d
 # col_name            	data_type           	min                 	max                 	num_nulls           	distinct_count      	avg_col_len         	max_col_len         	num_trues           	num_falses          	comment             	bitVector           
 	 	 	 	 	 	 	 	 	 	 	 
-locid               	int                 	1                   	4                   	0                   	4                   	                    	                    	                    	                    	SExM4AICxfO+SPyNofED	 
-	from deserializer   	 	 	 	 	 	 	 	 	 	 
+locid               	int                 	1                   	4                   	0                   	4                   	                    	                    	                    	                    	HL                  	from deserializer   
 COLUMN_STATS_ACCURATE	{\"COLUMN_STATS\":{\"locid\":\"true\"}}	 	 	 	 	 	 	 	 	 	 
 PREHOOK: query: create table if not exists loc_orc_2d (
   state string,
@@ -201,8 +196,7 @@ POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@loc_orc_2d
 # col_name            	data_type           	min                 	max                 	num_nulls           	distinct_count      	avg_col_len         	max_col_len         	num_trues           	num_falses          	comment             	bitVector           
 	 	 	 	 	 	 	 	 	 	 	 
-locid               	int                 	1                   	4                   	0                   	4                   	                    	                    	                    	                    	SExM4AEBwYHguQQ=	 
-  	from deserializer   	 	 	 	 	 	 	 	 	 	 
+locid               	int                 	1                   	4                   	0                   	4                   	                    	                    	                    	                    	HL                  	from deserializer   
 COLUMN_STATS_ACCURATE	{\"COLUMN_STATS\":{\"locid\":\"true\"}}	 	 	 	 	 	 	 	 	 	 
 PREHOOK: query: describe formatted loc_orc_2d locid
 PREHOOK: type: DESCTABLE
@@ -212,8 +206,7 @@ POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@loc_orc_2d
 # col_name            	data_type           	min                 	max                 	num_nulls           	distinct_count      	avg_col_len         	max_col_len         	num_trues           	num_falses          	comment             	bitVector           
 	 	 	 	 	 	 	 	 	 	 	 
-locid               	int                 	1                   	4                   	0                   	4                   	                    	                    	                    	                    	SExM4AEBwYHguQQ=	 
-  	from deserializer   	 	 	 	 	 	 	 	 	 	 
+locid               	int                 	1                   	4                   	0                   	4                   	                    	                    	                    	                    	HL                  	from deserializer   
 COLUMN_STATS_ACCURATE	{\"COLUMN_STATS\":{\"locid\":\"true\"}}	 	 	 	 	 	 	 	 	 	 
 PREHOOK: query: describe formatted loc_orc_2d locid
 PREHOOK: type: DESCTABLE
@@ -223,6 +216,5 @@ POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@loc_orc_2d
 # col_name            	data_type           	min                 	max                 	num_nulls           	distinct_count      	avg_col_len         	max_col_len         	num_trues           	num_falses          	comment             	bitVector           
 	 	 	 	 	 	 	 	 	 	 	 
-locid               	int                 	1                   	4                   	0                   	4                   	                    	                    	                    	                    	SExM4AEBwYHguQQ=	 
-  	from deserializer   	 	 	 	 	 	 	 	 	 	 
+locid               	int                 	1                   	4                   	0                   	4                   	                    	                    	                    	                    	HL                  	from deserializer   
 COLUMN_STATS_ACCURATE	{\"COLUMN_STATS\":{\"locid\":\"true\"}}	 	 	 	 	 	 	 	 	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/9a36aa90/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
index d178f10..a4f72b6 100644
--- a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
+++ b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
@@ -6532,7 +6532,7 @@ uint32_t BooleanColumnStatsData::read(::apache::thrift::protocol::TProtocol* ipr
         break;
       case 4:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->bitVectors);
+          xfer += iprot->readBinary(this->bitVectors);
           this->__isset.bitVectors = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -6575,7 +6575,7 @@ uint32_t BooleanColumnStatsData::write(::apache::thrift::protocol::TProtocol* op
 
   if (this->__isset.bitVectors) {
     xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 4);
-    xfer += oprot->writeString(this->bitVectors);
+    xfer += oprot->writeBinary(this->bitVectors);
     xfer += oprot->writeFieldEnd();
   }
   xfer += oprot->writeFieldStop();
@@ -6702,7 +6702,7 @@ uint32_t DoubleColumnStatsData::read(::apache::thrift::protocol::TProtocol* ipro
         break;
       case 5:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->bitVectors);
+          xfer += iprot->readBinary(this->bitVectors);
           this->__isset.bitVectors = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -6749,7 +6749,7 @@ uint32_t DoubleColumnStatsData::write(::apache::thrift::protocol::TProtocol* opr
 
   if (this->__isset.bitVectors) {
     xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5);
-    xfer += oprot->writeString(this->bitVectors);
+    xfer += oprot->writeBinary(this->bitVectors);
     xfer += oprot->writeFieldEnd();
   }
   xfer += oprot->writeFieldStop();
@@ -6880,7 +6880,7 @@ uint32_t LongColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot)
         break;
       case 5:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->bitVectors);
+          xfer += iprot->readBinary(this->bitVectors);
           this->__isset.bitVectors = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -6927,7 +6927,7 @@ uint32_t LongColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot
 
   if (this->__isset.bitVectors) {
     xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5);
-    xfer += oprot->writeString(this->bitVectors);
+    xfer += oprot->writeBinary(this->bitVectors);
     xfer += oprot->writeFieldEnd();
   }
   xfer += oprot->writeFieldStop();
@@ -7058,7 +7058,7 @@ uint32_t StringColumnStatsData::read(::apache::thrift::protocol::TProtocol* ipro
         break;
       case 5:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->bitVectors);
+          xfer += iprot->readBinary(this->bitVectors);
           this->__isset.bitVectors = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -7107,7 +7107,7 @@ uint32_t StringColumnStatsData::write(::apache::thrift::protocol::TProtocol* opr
 
   if (this->__isset.bitVectors) {
     xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5);
-    xfer += oprot->writeString(this->bitVectors);
+    xfer += oprot->writeBinary(this->bitVectors);
     xfer += oprot->writeFieldEnd();
   }
   xfer += oprot->writeFieldStop();
@@ -7225,7 +7225,7 @@ uint32_t BinaryColumnStatsData::read(::apache::thrift::protocol::TProtocol* ipro
         break;
       case 4:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->bitVectors);
+          xfer += iprot->readBinary(this->bitVectors);
           this->__isset.bitVectors = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -7268,7 +7268,7 @@ uint32_t BinaryColumnStatsData::write(::apache::thrift::protocol::TProtocol* opr
 
   if (this->__isset.bitVectors) {
     xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 4);
-    xfer += oprot->writeString(this->bitVectors);
+    xfer += oprot->writeBinary(this->bitVectors);
     xfer += oprot->writeFieldEnd();
   }
   xfer += oprot->writeFieldStop();
@@ -7504,7 +7504,7 @@ uint32_t DecimalColumnStatsData::read(::apache::thrift::protocol::TProtocol* ipr
         break;
       case 5:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->bitVectors);
+          xfer += iprot->readBinary(this->bitVectors);
           this->__isset.bitVectors = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -7551,7 +7551,7 @@ uint32_t DecimalColumnStatsData::write(::apache::thrift::protocol::TProtocol* op
 
   if (this->__isset.bitVectors) {
     xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5);
-    xfer += oprot->writeString(this->bitVectors);
+    xfer += oprot->writeBinary(this->bitVectors);
     xfer += oprot->writeFieldEnd();
   }
   xfer += oprot->writeFieldStop();
@@ -7768,7 +7768,7 @@ uint32_t DateColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot)
         break;
       case 5:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->bitVectors);
+          xfer += iprot->readBinary(this->bitVectors);
           this->__isset.bitVectors = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -7815,7 +7815,7 @@ uint32_t DateColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot
 
   if (this->__isset.bitVectors) {
     xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5);
-    xfer += oprot->writeString(this->bitVectors);
+    xfer += oprot->writeBinary(this->bitVectors);
     xfer += oprot->writeFieldEnd();
   }
   xfer += oprot->writeFieldStop();

http://git-wip-us.apache.org/repos/asf/hive/blob/9a36aa90/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java
index eeb5105..cf3bd14 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java
@@ -52,7 +52,7 @@ public class BinaryColumnStatsData implements org.apache.thrift.TBase<BinaryColu
   private long maxColLen; // required
   private double avgColLen; // required
   private long numNulls; // required
-  private String bitVectors; // optional
+  private ByteBuffer bitVectors; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -137,7 +137,7 @@ public class BinaryColumnStatsData implements org.apache.thrift.TBase<BinaryColu
     tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BinaryColumnStatsData.class, metaDataMap);
   }
@@ -168,7 +168,7 @@ public class BinaryColumnStatsData implements org.apache.thrift.TBase<BinaryColu
     this.avgColLen = other.avgColLen;
     this.numNulls = other.numNulls;
     if (other.isSetBitVectors()) {
-      this.bitVectors = other.bitVectors;
+      this.bitVectors = org.apache.thrift.TBaseHelper.copyBinary(other.bitVectors);
     }
   }
 
@@ -253,12 +253,21 @@ public class BinaryColumnStatsData implements org.apache.thrift.TBase<BinaryColu
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value);
   }
 
-  public String getBitVectors() {
-    return this.bitVectors;
+  public byte[] getBitVectors() {
+    setBitVectors(org.apache.thrift.TBaseHelper.rightSize(bitVectors));
+    return bitVectors == null ? null : bitVectors.array();
   }
 
-  public void setBitVectors(String bitVectors) {
-    this.bitVectors = bitVectors;
+  public ByteBuffer bufferForBitVectors() {
+    return org.apache.thrift.TBaseHelper.copyBinary(bitVectors);
+  }
+
+  public void setBitVectors(byte[] bitVectors) {
+    this.bitVectors = bitVectors == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(bitVectors, bitVectors.length));
+  }
+
+  public void setBitVectors(ByteBuffer bitVectors) {
+    this.bitVectors = org.apache.thrift.TBaseHelper.copyBinary(bitVectors);
   }
 
   public void unsetBitVectors() {
@@ -306,7 +315,7 @@ public class BinaryColumnStatsData implements org.apache.thrift.TBase<BinaryColu
       if (value == null) {
         unsetBitVectors();
       } else {
-        setBitVectors((String)value);
+        setBitVectors((ByteBuffer)value);
       }
       break;
 
@@ -514,7 +523,7 @@ public class BinaryColumnStatsData implements org.apache.thrift.TBase<BinaryColu
       if (this.bitVectors == null) {
         sb.append("null");
       } else {
-        sb.append(this.bitVectors);
+        org.apache.thrift.TBaseHelper.toString(this.bitVectors, sb);
       }
       first = false;
     }
@@ -601,7 +610,7 @@ public class BinaryColumnStatsData implements org.apache.thrift.TBase<BinaryColu
             break;
           case 4: // BIT_VECTORS
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.bitVectors = iprot.readString();
+              struct.bitVectors = iprot.readBinary();
               struct.setBitVectorsIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -632,7 +641,7 @@ public class BinaryColumnStatsData implements org.apache.thrift.TBase<BinaryColu
       if (struct.bitVectors != null) {
         if (struct.isSetBitVectors()) {
           oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC);
-          oprot.writeString(struct.bitVectors);
+          oprot.writeBinary(struct.bitVectors);
           oprot.writeFieldEnd();
         }
       }
@@ -662,7 +671,7 @@ public class BinaryColumnStatsData implements org.apache.thrift.TBase<BinaryColu
       }
       oprot.writeBitSet(optionals, 1);
       if (struct.isSetBitVectors()) {
-        oprot.writeString(struct.bitVectors);
+        oprot.writeBinary(struct.bitVectors);
       }
     }
 
@@ -677,7 +686,7 @@ public class BinaryColumnStatsData implements org.apache.thrift.TBase<BinaryColu
       struct.setNumNullsIsSet(true);
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
-        struct.bitVectors = iprot.readString();
+        struct.bitVectors = iprot.readBinary();
         struct.setBitVectorsIsSet(true);
       }
     }

http://git-wip-us.apache.org/repos/asf/hive/blob/9a36aa90/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java
index de39d21..469dc92 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java
@@ -52,7 +52,7 @@ public class BooleanColumnStatsData implements org.apache.thrift.TBase<BooleanCo
   private long numTrues; // required
   private long numFalses; // required
   private long numNulls; // required
-  private String bitVectors; // optional
+  private ByteBuffer bitVectors; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -137,7 +137,7 @@ public class BooleanColumnStatsData implements org.apache.thrift.TBase<BooleanCo
     tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BooleanColumnStatsData.class, metaDataMap);
   }
@@ -168,7 +168,7 @@ public class BooleanColumnStatsData implements org.apache.thrift.TBase<BooleanCo
     this.numFalses = other.numFalses;
     this.numNulls = other.numNulls;
     if (other.isSetBitVectors()) {
-      this.bitVectors = other.bitVectors;
+      this.bitVectors = org.apache.thrift.TBaseHelper.copyBinary(other.bitVectors);
     }
   }
 
@@ -253,12 +253,21 @@ public class BooleanColumnStatsData implements org.apache.thrift.TBase<BooleanCo
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value);
   }
 
-  public String getBitVectors() {
-    return this.bitVectors;
+  public byte[] getBitVectors() {
+    setBitVectors(org.apache.thrift.TBaseHelper.rightSize(bitVectors));
+    return bitVectors == null ? null : bitVectors.array();
   }
 
-  public void setBitVectors(String bitVectors) {
-    this.bitVectors = bitVectors;
+  public ByteBuffer bufferForBitVectors() {
+    return org.apache.thrift.TBaseHelper.copyBinary(bitVectors);
+  }
+
+  public void setBitVectors(byte[] bitVectors) {
+    this.bitVectors = bitVectors == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(bitVectors, bitVectors.length));
+  }
+
+  public void setBitVectors(ByteBuffer bitVectors) {
+    this.bitVectors = org.apache.thrift.TBaseHelper.copyBinary(bitVectors);
   }
 
   public void unsetBitVectors() {
@@ -306,7 +315,7 @@ public class BooleanColumnStatsData implements org.apache.thrift.TBase<BooleanCo
       if (value == null) {
         unsetBitVectors();
       } else {
-        setBitVectors((String)value);
+        setBitVectors((ByteBuffer)value);
       }
       break;
 
@@ -514,7 +523,7 @@ public class BooleanColumnStatsData implements org.apache.thrift.TBase<BooleanCo
       if (this.bitVectors == null) {
         sb.append("null");
       } else {
-        sb.append(this.bitVectors);
+        org.apache.thrift.TBaseHelper.toString(this.bitVectors, sb);
       }
       first = false;
     }
@@ -601,7 +610,7 @@ public class BooleanColumnStatsData implements org.apache.thrift.TBase<BooleanCo
             break;
           case 4: // BIT_VECTORS
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.bitVectors = iprot.readString();
+              struct.bitVectors = iprot.readBinary();
               struct.setBitVectorsIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -632,7 +641,7 @@ public class BooleanColumnStatsData implements org.apache.thrift.TBase<BooleanCo
       if (struct.bitVectors != null) {
         if (struct.isSetBitVectors()) {
           oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC);
-          oprot.writeString(struct.bitVectors);
+          oprot.writeBinary(struct.bitVectors);
           oprot.writeFieldEnd();
         }
       }
@@ -662,7 +671,7 @@ public class BooleanColumnStatsData implements org.apache.thrift.TBase<BooleanCo
       }
       oprot.writeBitSet(optionals, 1);
       if (struct.isSetBitVectors()) {
-        oprot.writeString(struct.bitVectors);
+        oprot.writeBinary(struct.bitVectors);
       }
     }
 
@@ -677,7 +686,7 @@ public class BooleanColumnStatsData implements org.apache.thrift.TBase<BooleanCo
       struct.setNumNullsIsSet(true);
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
-        struct.bitVectors = iprot.readString();
+        struct.bitVectors = iprot.readBinary();
         struct.setBitVectorsIsSet(true);
       }
     }

http://git-wip-us.apache.org/repos/asf/hive/blob/9a36aa90/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DateColumnStatsData.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DateColumnStatsData.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DateColumnStatsData.java
index edc87a1..b6cb24e 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DateColumnStatsData.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DateColumnStatsData.java
@@ -54,7 +54,7 @@ public class DateColumnStatsData implements org.apache.thrift.TBase<DateColumnSt
   private Date highValue; // optional
   private long numNulls; // required
   private long numDVs; // required
-  private String bitVectors; // optional
+  private ByteBuffer bitVectors; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -143,7 +143,7 @@ public class DateColumnStatsData implements org.apache.thrift.TBase<DateColumnSt
     tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DateColumnStatsData.class, metaDataMap);
   }
@@ -176,7 +176,7 @@ public class DateColumnStatsData implements org.apache.thrift.TBase<DateColumnSt
     this.numNulls = other.numNulls;
     this.numDVs = other.numDVs;
     if (other.isSetBitVectors()) {
-      this.bitVectors = other.bitVectors;
+      this.bitVectors = org.apache.thrift.TBaseHelper.copyBinary(other.bitVectors);
     }
   }
 
@@ -285,12 +285,21 @@ public class DateColumnStatsData implements org.apache.thrift.TBase<DateColumnSt
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value);
   }
 
-  public String getBitVectors() {
-    return this.bitVectors;
+  public byte[] getBitVectors() {
+    setBitVectors(org.apache.thrift.TBaseHelper.rightSize(bitVectors));
+    return bitVectors == null ? null : bitVectors.array();
   }
 
-  public void setBitVectors(String bitVectors) {
-    this.bitVectors = bitVectors;
+  public ByteBuffer bufferForBitVectors() {
+    return org.apache.thrift.TBaseHelper.copyBinary(bitVectors);
+  }
+
+  public void setBitVectors(byte[] bitVectors) {
+    this.bitVectors = bitVectors == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(bitVectors, bitVectors.length));
+  }
+
+  public void setBitVectors(ByteBuffer bitVectors) {
+    this.bitVectors = org.apache.thrift.TBaseHelper.copyBinary(bitVectors);
   }
 
   public void unsetBitVectors() {
@@ -346,7 +355,7 @@ public class DateColumnStatsData implements org.apache.thrift.TBase<DateColumnSt
       if (value == null) {
         unsetBitVectors();
       } else {
-        setBitVectors((String)value);
+        setBitVectors((ByteBuffer)value);
       }
       break;
 
@@ -599,7 +608,7 @@ public class DateColumnStatsData implements org.apache.thrift.TBase<DateColumnSt
       if (this.bitVectors == null) {
         sb.append("null");
       } else {
-        sb.append(this.bitVectors);
+        org.apache.thrift.TBaseHelper.toString(this.bitVectors, sb);
       }
       first = false;
     }
@@ -698,7 +707,7 @@ public class DateColumnStatsData implements org.apache.thrift.TBase<DateColumnSt
             break;
           case 5: // BIT_VECTORS
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.bitVectors = iprot.readString();
+              struct.bitVectors = iprot.readBinary();
               struct.setBitVectorsIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -740,7 +749,7 @@ public class DateColumnStatsData implements org.apache.thrift.TBase<DateColumnSt
       if (struct.bitVectors != null) {
         if (struct.isSetBitVectors()) {
           oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC);
-          oprot.writeString(struct.bitVectors);
+          oprot.writeBinary(struct.bitVectors);
           oprot.writeFieldEnd();
         }
       }
@@ -781,7 +790,7 @@ public class DateColumnStatsData implements org.apache.thrift.TBase<DateColumnSt
         struct.highValue.write(oprot);
       }
       if (struct.isSetBitVectors()) {
-        oprot.writeString(struct.bitVectors);
+        oprot.writeBinary(struct.bitVectors);
       }
     }
 
@@ -804,7 +813,7 @@ public class DateColumnStatsData implements org.apache.thrift.TBase<DateColumnSt
         struct.setHighValueIsSet(true);
       }
       if (incoming.get(2)) {
-        struct.bitVectors = iprot.readString();
+        struct.bitVectors = iprot.readBinary();
         struct.setBitVectorsIsSet(true);
       }
     }

http://git-wip-us.apache.org/repos/asf/hive/blob/9a36aa90/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DecimalColumnStatsData.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DecimalColumnStatsData.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DecimalColumnStatsData.java
index ec363dc..6a30944 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DecimalColumnStatsData.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DecimalColumnStatsData.java
@@ -54,7 +54,7 @@ public class DecimalColumnStatsData implements org.apache.thrift.TBase<DecimalCo
   private Decimal highValue; // optional
   private long numNulls; // required
   private long numDVs; // required
-  private String bitVectors; // optional
+  private ByteBuffer bitVectors; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -143,7 +143,7 @@ public class DecimalColumnStatsData implements org.apache.thrift.TBase<DecimalCo
     tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DecimalColumnStatsData.class, metaDataMap);
   }
@@ -176,7 +176,7 @@ public class DecimalColumnStatsData implements org.apache.thrift.TBase<DecimalCo
     this.numNulls = other.numNulls;
     this.numDVs = other.numDVs;
     if (other.isSetBitVectors()) {
-      this.bitVectors = other.bitVectors;
+      this.bitVectors = org.apache.thrift.TBaseHelper.copyBinary(other.bitVectors);
     }
   }
 
@@ -285,12 +285,21 @@ public class DecimalColumnStatsData implements org.apache.thrift.TBase<DecimalCo
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value);
   }
 
-  public String getBitVectors() {
-    return this.bitVectors;
+  public byte[] getBitVectors() {
+    setBitVectors(org.apache.thrift.TBaseHelper.rightSize(bitVectors));
+    return bitVectors == null ? null : bitVectors.array();
   }
 
-  public void setBitVectors(String bitVectors) {
-    this.bitVectors = bitVectors;
+  public ByteBuffer bufferForBitVectors() {
+    return org.apache.thrift.TBaseHelper.copyBinary(bitVectors);
+  }
+
+  public void setBitVectors(byte[] bitVectors) {
+    this.bitVectors = bitVectors == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(bitVectors, bitVectors.length));
+  }
+
+  public void setBitVectors(ByteBuffer bitVectors) {
+    this.bitVectors = org.apache.thrift.TBaseHelper.copyBinary(bitVectors);
   }
 
   public void unsetBitVectors() {
@@ -346,7 +355,7 @@ public class DecimalColumnStatsData implements org.apache.thrift.TBase<DecimalCo
       if (value == null) {
         unsetBitVectors();
       } else {
-        setBitVectors((String)value);
+        setBitVectors((ByteBuffer)value);
       }
       break;
 
@@ -599,7 +608,7 @@ public class DecimalColumnStatsData implements org.apache.thrift.TBase<DecimalCo
       if (this.bitVectors == null) {
         sb.append("null");
       } else {
-        sb.append(this.bitVectors);
+        org.apache.thrift.TBaseHelper.toString(this.bitVectors, sb);
       }
       first = false;
     }
@@ -698,7 +707,7 @@ public class DecimalColumnStatsData implements org.apache.thrift.TBase<DecimalCo
             break;
           case 5: // BIT_VECTORS
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.bitVectors = iprot.readString();
+              struct.bitVectors = iprot.readBinary();
               struct.setBitVectorsIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -740,7 +749,7 @@ public class DecimalColumnStatsData implements org.apache.thrift.TBase<DecimalCo
       if (struct.bitVectors != null) {
         if (struct.isSetBitVectors()) {
           oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC);
-          oprot.writeString(struct.bitVectors);
+          oprot.writeBinary(struct.bitVectors);
           oprot.writeFieldEnd();
         }
       }
@@ -781,7 +790,7 @@ public class DecimalColumnStatsData implements org.apache.thrift.TBase<DecimalCo
         struct.highValue.write(oprot);
       }
       if (struct.isSetBitVectors()) {
-        oprot.writeString(struct.bitVectors);
+        oprot.writeBinary(struct.bitVectors);
       }
     }
 
@@ -804,7 +813,7 @@ public class DecimalColumnStatsData implements org.apache.thrift.TBase<DecimalCo
         struct.setHighValueIsSet(true);
       }
       if (incoming.get(2)) {
-        struct.bitVectors = iprot.readString();
+        struct.bitVectors = iprot.readBinary();
         struct.setBitVectorsIsSet(true);
       }
     }

http://git-wip-us.apache.org/repos/asf/hive/blob/9a36aa90/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java
index e3340e4..e5df337 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java
@@ -54,7 +54,7 @@ public class DoubleColumnStatsData implements org.apache.thrift.TBase<DoubleColu
   private double highValue; // optional
   private long numNulls; // required
   private long numDVs; // required
-  private String bitVectors; // optional
+  private ByteBuffer bitVectors; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -145,7 +145,7 @@ public class DoubleColumnStatsData implements org.apache.thrift.TBase<DoubleColu
     tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DoubleColumnStatsData.class, metaDataMap);
   }
@@ -174,7 +174,7 @@ public class DoubleColumnStatsData implements org.apache.thrift.TBase<DoubleColu
     this.numNulls = other.numNulls;
     this.numDVs = other.numDVs;
     if (other.isSetBitVectors()) {
-      this.bitVectors = other.bitVectors;
+      this.bitVectors = org.apache.thrift.TBaseHelper.copyBinary(other.bitVectors);
     }
   }
 
@@ -283,12 +283,21 @@ public class DoubleColumnStatsData implements org.apache.thrift.TBase<DoubleColu
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value);
   }
 
-  public String getBitVectors() {
-    return this.bitVectors;
+  public byte[] getBitVectors() {
+    setBitVectors(org.apache.thrift.TBaseHelper.rightSize(bitVectors));
+    return bitVectors == null ? null : bitVectors.array();
   }
 
-  public void setBitVectors(String bitVectors) {
-    this.bitVectors = bitVectors;
+  public ByteBuffer bufferForBitVectors() {
+    return org.apache.thrift.TBaseHelper.copyBinary(bitVectors);
+  }
+
+  public void setBitVectors(byte[] bitVectors) {
+    this.bitVectors = bitVectors == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(bitVectors, bitVectors.length));
+  }
+
+  public void setBitVectors(ByteBuffer bitVectors) {
+    this.bitVectors = org.apache.thrift.TBaseHelper.copyBinary(bitVectors);
   }
 
   public void unsetBitVectors() {
@@ -344,7 +353,7 @@ public class DoubleColumnStatsData implements org.apache.thrift.TBase<DoubleColu
       if (value == null) {
         unsetBitVectors();
       } else {
-        setBitVectors((String)value);
+        setBitVectors((ByteBuffer)value);
       }
       break;
 
@@ -589,7 +598,7 @@ public class DoubleColumnStatsData implements org.apache.thrift.TBase<DoubleColu
       if (this.bitVectors == null) {
         sb.append("null");
       } else {
-        sb.append(this.bitVectors);
+        org.apache.thrift.TBaseHelper.toString(this.bitVectors, sb);
       }
       first = false;
     }
@@ -680,7 +689,7 @@ public class DoubleColumnStatsData implements org.apache.thrift.TBase<DoubleColu
             break;
           case 5: // BIT_VECTORS
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.bitVectors = iprot.readString();
+              struct.bitVectors = iprot.readBinary();
               struct.setBitVectorsIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -718,7 +727,7 @@ public class DoubleColumnStatsData implements org.apache.thrift.TBase<DoubleColu
       if (struct.bitVectors != null) {
         if (struct.isSetBitVectors()) {
           oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC);
-          oprot.writeString(struct.bitVectors);
+          oprot.writeBinary(struct.bitVectors);
           oprot.writeFieldEnd();
         }
       }
@@ -759,7 +768,7 @@ public class DoubleColumnStatsData implements org.apache.thrift.TBase<DoubleColu
         oprot.writeDouble(struct.highValue);
       }
       if (struct.isSetBitVectors()) {
-        oprot.writeString(struct.bitVectors);
+        oprot.writeBinary(struct.bitVectors);
       }
     }
 
@@ -780,7 +789,7 @@ public class DoubleColumnStatsData implements org.apache.thrift.TBase<DoubleColu
         struct.setHighValueIsSet(true);
       }
       if (incoming.get(2)) {
-        struct.bitVectors = iprot.readString();
+        struct.bitVectors = iprot.readBinary();
         struct.setBitVectorsIsSet(true);
       }
     }

http://git-wip-us.apache.org/repos/asf/hive/blob/9a36aa90/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java
index 4404706..56cf5b8 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java
@@ -54,7 +54,7 @@ public class LongColumnStatsData implements org.apache.thrift.TBase<LongColumnSt
   private long highValue; // optional
   private long numNulls; // required
   private long numDVs; // required
-  private String bitVectors; // optional
+  private ByteBuffer bitVectors; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -145,7 +145,7 @@ public class LongColumnStatsData implements org.apache.thrift.TBase<LongColumnSt
     tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LongColumnStatsData.class, metaDataMap);
   }
@@ -174,7 +174,7 @@ public class LongColumnStatsData implements org.apache.thrift.TBase<LongColumnSt
     this.numNulls = other.numNulls;
     this.numDVs = other.numDVs;
     if (other.isSetBitVectors()) {
-      this.bitVectors = other.bitVectors;
+      this.bitVectors = org.apache.thrift.TBaseHelper.copyBinary(other.bitVectors);
     }
   }
 
@@ -283,12 +283,21 @@ public class LongColumnStatsData implements org.apache.thrift.TBase<LongColumnSt
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value);
   }
 
-  public String getBitVectors() {
-    return this.bitVectors;
+  public byte[] getBitVectors() {
+    setBitVectors(org.apache.thrift.TBaseHelper.rightSize(bitVectors));
+    return bitVectors == null ? null : bitVectors.array();
   }
 
-  public void setBitVectors(String bitVectors) {
-    this.bitVectors = bitVectors;
+  public ByteBuffer bufferForBitVectors() {
+    return org.apache.thrift.TBaseHelper.copyBinary(bitVectors);
+  }
+
+  public void setBitVectors(byte[] bitVectors) {
+    this.bitVectors = bitVectors == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(bitVectors, bitVectors.length));
+  }
+
+  public void setBitVectors(ByteBuffer bitVectors) {
+    this.bitVectors = org.apache.thrift.TBaseHelper.copyBinary(bitVectors);
   }
 
   public void unsetBitVectors() {
@@ -344,7 +353,7 @@ public class LongColumnStatsData implements org.apache.thrift.TBase<LongColumnSt
       if (value == null) {
         unsetBitVectors();
       } else {
-        setBitVectors((String)value);
+        setBitVectors((ByteBuffer)value);
       }
       break;
 
@@ -589,7 +598,7 @@ public class LongColumnStatsData implements org.apache.thrift.TBase<LongColumnSt
       if (this.bitVectors == null) {
         sb.append("null");
       } else {
-        sb.append(this.bitVectors);
+        org.apache.thrift.TBaseHelper.toString(this.bitVectors, sb);
       }
       first = false;
     }
@@ -680,7 +689,7 @@ public class LongColumnStatsData implements org.apache.thrift.TBase<LongColumnSt
             break;
           case 5: // BIT_VECTORS
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.bitVectors = iprot.readString();
+              struct.bitVectors = iprot.readBinary();
               struct.setBitVectorsIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -718,7 +727,7 @@ public class LongColumnStatsData implements org.apache.thrift.TBase<LongColumnSt
       if (struct.bitVectors != null) {
         if (struct.isSetBitVectors()) {
           oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC);
-          oprot.writeString(struct.bitVectors);
+          oprot.writeBinary(struct.bitVectors);
           oprot.writeFieldEnd();
         }
       }
@@ -759,7 +768,7 @@ public class LongColumnStatsData implements org.apache.thrift.TBase<LongColumnSt
         oprot.writeI64(struct.highValue);
       }
       if (struct.isSetBitVectors()) {
-        oprot.writeString(struct.bitVectors);
+        oprot.writeBinary(struct.bitVectors);
       }
     }
 
@@ -780,7 +789,7 @@ public class LongColumnStatsData implements org.apache.thrift.TBase<LongColumnSt
         struct.setHighValueIsSet(true);
       }
       if (incoming.get(2)) {
-        struct.bitVectors = iprot.readString();
+        struct.bitVectors = iprot.readBinary();
         struct.setBitVectorsIsSet(true);
       }
     }

http://git-wip-us.apache.org/repos/asf/hive/blob/9a36aa90/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java
index c9afe87..52fcce4 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java
@@ -54,7 +54,7 @@ public class StringColumnStatsData implements org.apache.thrift.TBase<StringColu
   private double avgColLen; // required
   private long numNulls; // required
   private long numDVs; // required
-  private String bitVectors; // optional
+  private ByteBuffer bitVectors; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -145,7 +145,7 @@ public class StringColumnStatsData implements org.apache.thrift.TBase<StringColu
     tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StringColumnStatsData.class, metaDataMap);
   }
@@ -180,7 +180,7 @@ public class StringColumnStatsData implements org.apache.thrift.TBase<StringColu
     this.numNulls = other.numNulls;
     this.numDVs = other.numDVs;
     if (other.isSetBitVectors()) {
-      this.bitVectors = other.bitVectors;
+      this.bitVectors = org.apache.thrift.TBaseHelper.copyBinary(other.bitVectors);
     }
   }
 
@@ -289,12 +289,21 @@ public class StringColumnStatsData implements org.apache.thrift.TBase<StringColu
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value);
   }
 
-  public String getBitVectors() {
-    return this.bitVectors;
+  public byte[] getBitVectors() {
+    setBitVectors(org.apache.thrift.TBaseHelper.rightSize(bitVectors));
+    return bitVectors == null ? null : bitVectors.array();
   }
 
-  public void setBitVectors(String bitVectors) {
-    this.bitVectors = bitVectors;
+  public ByteBuffer bufferForBitVectors() {
+    return org.apache.thrift.TBaseHelper.copyBinary(bitVectors);
+  }
+
+  public void setBitVectors(byte[] bitVectors) {
+    this.bitVectors = bitVectors == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(bitVectors, bitVectors.length));
+  }
+
+  public void setBitVectors(ByteBuffer bitVectors) {
+    this.bitVectors = org.apache.thrift.TBaseHelper.copyBinary(bitVectors);
   }
 
   public void unsetBitVectors() {
@@ -350,7 +359,7 @@ public class StringColumnStatsData implements org.apache.thrift.TBase<StringColu
       if (value == null) {
         unsetBitVectors();
       } else {
-        setBitVectors((String)value);
+        setBitVectors((ByteBuffer)value);
       }
       break;
 
@@ -591,7 +600,7 @@ public class StringColumnStatsData implements org.apache.thrift.TBase<StringColu
       if (this.bitVectors == null) {
         sb.append("null");
       } else {
-        sb.append(this.bitVectors);
+        org.apache.thrift.TBaseHelper.toString(this.bitVectors, sb);
       }
       first = false;
     }
@@ -690,7 +699,7 @@ public class StringColumnStatsData implements org.apache.thrift.TBase<StringColu
             break;
           case 5: // BIT_VECTORS
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.bitVectors = iprot.readString();
+              struct.bitVectors = iprot.readBinary();
               struct.setBitVectorsIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -724,7 +733,7 @@ public class StringColumnStatsData implements org.apache.thrift.TBase<StringColu
       if (struct.bitVectors != null) {
         if (struct.isSetBitVectors()) {
           oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC);
-          oprot.writeString(struct.bitVectors);
+          oprot.writeBinary(struct.bitVectors);
           oprot.writeFieldEnd();
         }
       }
@@ -755,7 +764,7 @@ public class StringColumnStatsData implements org.apache.thrift.TBase<StringColu
       }
       oprot.writeBitSet(optionals, 1);
       if (struct.isSetBitVectors()) {
-        oprot.writeString(struct.bitVectors);
+        oprot.writeBinary(struct.bitVectors);
       }
     }
 
@@ -772,7 +781,7 @@ public class StringColumnStatsData implements org.apache.thrift.TBase<StringColu
       struct.setNumDVsIsSet(true);
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
-        struct.bitVectors = iprot.readString();
+        struct.bitVectors = iprot.readBinary();
         struct.setBitVectorsIsSet(true);
       }
     }

http://git-wip-us.apache.org/repos/asf/hive/blob/9a36aa90/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/hive/blob/9a36aa90/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb b/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
index 02c5717..c67f3b0 100644
--- a/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
+++ b/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
@@ -979,7 +979,7 @@ class BooleanColumnStatsData
     NUMTRUES => {:type => ::Thrift::Types::I64, :name => 'numTrues'},
     NUMFALSES => {:type => ::Thrift::Types::I64, :name => 'numFalses'},
     NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
-    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true}
+    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :binary => true, :optional => true}
   }
 
   def struct_fields; FIELDS; end
@@ -1006,7 +1006,7 @@ class DoubleColumnStatsData
     HIGHVALUE => {:type => ::Thrift::Types::DOUBLE, :name => 'highValue', :optional => true},
     NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
     NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'},
-    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true}
+    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :binary => true, :optional => true}
   }
 
   def struct_fields; FIELDS; end
@@ -1032,7 +1032,7 @@ class LongColumnStatsData
     HIGHVALUE => {:type => ::Thrift::Types::I64, :name => 'highValue', :optional => true},
     NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
     NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'},
-    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true}
+    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :binary => true, :optional => true}
   }
 
   def struct_fields; FIELDS; end
@@ -1058,7 +1058,7 @@ class StringColumnStatsData
     AVGCOLLEN => {:type => ::Thrift::Types::DOUBLE, :name => 'avgColLen'},
     NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
     NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'},
-    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true}
+    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :binary => true, :optional => true}
   }
 
   def struct_fields; FIELDS; end
@@ -1084,7 +1084,7 @@ class BinaryColumnStatsData
     MAXCOLLEN => {:type => ::Thrift::Types::I64, :name => 'maxColLen'},
     AVGCOLLEN => {:type => ::Thrift::Types::DOUBLE, :name => 'avgColLen'},
     NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
-    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true}
+    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :binary => true, :optional => true}
   }
 
   def struct_fields; FIELDS; end
@@ -1131,7 +1131,7 @@ class DecimalColumnStatsData
     HIGHVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'highValue', :class => ::Decimal, :optional => true},
     NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
     NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'},
-    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true}
+    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :binary => true, :optional => true}
   }
 
   def struct_fields; FIELDS; end
@@ -1174,7 +1174,7 @@ class DateColumnStatsData
     HIGHVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'highValue', :class => ::Date, :optional => true},
     NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
     NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'},
-    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true}
+    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :binary => true, :optional => true}
   }
 
   def struct_fields; FIELDS; end

http://git-wip-us.apache.org/repos/asf/hive/blob/9a36aa90/standalone-metastore/src/main/thrift/hive_metastore.thrift
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/thrift/hive_metastore.thrift b/standalone-metastore/src/main/thrift/hive_metastore.thrift
index 042a5d8..9b0a846 100644
--- a/standalone-metastore/src/main/thrift/hive_metastore.thrift
+++ b/standalone-metastore/src/main/thrift/hive_metastore.thrift
@@ -384,7 +384,7 @@ struct BooleanColumnStatsData {
 1: required i64 numTrues,
 2: required i64 numFalses,
 3: required i64 numNulls,
-4: optional string bitVectors
+4: optional binary bitVectors
 }
 
 struct DoubleColumnStatsData {
@@ -392,7 +392,7 @@ struct DoubleColumnStatsData {
 2: optional double highValue,
 3: required i64 numNulls,
 4: required i64 numDVs,
-5: optional string bitVectors
+5: optional binary bitVectors
 }
 
 struct LongColumnStatsData {
@@ -400,7 +400,7 @@ struct LongColumnStatsData {
 2: optional i64 highValue,
 3: required i64 numNulls,
 4: required i64 numDVs,
-5: optional string bitVectors
+5: optional binary bitVectors
 }
 
 struct StringColumnStatsData {
@@ -408,14 +408,14 @@ struct StringColumnStatsData {
 2: required double avgColLen,
 3: required i64 numNulls,
 4: required i64 numDVs,
-5: optional string bitVectors
+5: optional binary bitVectors
 }
 
 struct BinaryColumnStatsData {
 1: required i64 maxColLen,
 2: required double avgColLen,
 3: required i64 numNulls,
-4: optional string bitVectors
+4: optional binary bitVectors
 }
 
 
@@ -429,7 +429,7 @@ struct DecimalColumnStatsData {
 2: optional Decimal highValue,
 3: required i64 numNulls,
 4: required i64 numDVs,
-5: optional string bitVectors
+5: optional binary bitVectors
 }
 
 struct Date {
@@ -441,7 +441,7 @@ struct DateColumnStatsData {
 2: optional Date highValue,
 3: required i64 numNulls,
 4: required i64 numDVs,
-5: optional string bitVectors
+5: optional binary bitVectors
 }
 
 union ColumnStatisticsData {


Mime
View raw message