deniskuzZ commented on code in PR #5550:
URL: https://github.com/apache/hive/pull/5550#discussion_r1861045687


##########
serde/src/java/org/apache/hadoop/hive/serde2/json/HiveJsonReader.java:
##########
@@ -450,22 +455,36 @@ private Object visitLeafNode(final JsonNode leafNode,
    */
   private byte[] getByteValue(final JsonNode binaryNode) throws SerDeException 
{
     try {
-      switch (this.binaryEncoding) {
+      BinaryEncoding binaryEncoding = getBinaryEncodingForNode(binaryNode);
+      switch (binaryEncoding) {
       case RAWSTRING:
-        final String byteText = binaryNode.textValue();
+        final String byteText = binaryNode.asText();
+        if (byteText == null) {
+          return null;

Review Comment:
   should we return an empty array instead of null?



-- 
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]

Reply via email to