armitage420 commented on code in PR #5550:
URL: https://github.com/apache/hive/pull/5550#discussion_r1861169000
##########
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:
Returning an empty array instead of null can compromise data consistency and
risk misinterpreting the data in ways the user may not intend. I don't think we
should do so.
--
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]