kgyrtkirk commented on a change in pull request #2556:
URL: https://github.com/apache/hive/pull/2556#discussion_r682708324
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionColumnStatistics.java
##########
@@ -281,11 +281,20 @@ public void setDecimalHighValue(String decimalHighValue) {
}
public byte[] getBitVector() {
+ // workaround for DN bug in persisting nulls in pg bytea column
+ // instead set empty bit vector with header.
+ // https://issues.apache.org/jira/browse/HIVE-17836
+ if (bitVector != null && bitVector.length == 2 && bitVector[0] == 'H' &&
bitVector[1] == 'L') {
+ return null;
+ }
return bitVector;
}
public void setBitVector(byte[] bitVector) {
- this.bitVector = bitVector;
+ // workaround for DN bug in persisting nulls in pg bytea column
Review comment:
is the DN serialization happens thru the getters or thru the fields?
if its reading the fields; what happens if we create an instance of this
class and never call the `setBitVector(null)`? will that be okay?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]