deniskuzZ commented on code in PR #5550:
URL: https://github.com/apache/hive/pull/5550#discussion_r1861043481
##########
serde/src/java/org/apache/hadoop/hive/serde2/json/HiveJsonReader.java:
##########
@@ -466,6 +476,16 @@ private byte[] getByteValue(final JsonNode binaryNode)
throws SerDeException {
}
}
+ private BinaryEncoding getBinaryEncodingForNode(JsonNode binaryNode) {
+ String jsonValue = binaryNode.textValue();
+
+ if(jsonValue == null || jsonValue.length() % 4 != 0 ||
!BASE64_PATTERN.matcher(jsonValue).matches()) {
+ return BinaryEncoding.RAWSTRING;
+ }
+
+ return BinaryEncoding.BASE64;
Review Comment:
@armitage420 ,` HiveJsonWriter` seems to be parametrized and should be able
to support both RAWSTRING & BASE64 isn't it?
--
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]