clintropolis commented on code in PR #15735:
URL: https://github.com/apache/druid/pull/15735#discussion_r1470829632


##########
processing/src/main/java/org/apache/druid/data/input/Rows.java:
##########
@@ -77,6 +79,8 @@ public static List<String> objectToStrings(final Object 
inputValue)
     } else if (inputValue instanceof byte[]) {
       // convert byte[] to base64 encoded string
       return Collections.singletonList(StringUtils.encodeBase64String((byte[]) 
inputValue));
+    } else if (inputValue instanceof ByteBuffer) {
+      return Collections.singletonList(StringUtils.fromUtf8(((ByteBuffer) 
inputValue).array()));

Review Comment:
   hmm, why would we assume any binary values are utf8 encoded strings? These 
values can be coming from external input formats, the idea to use base64 was so 
that way they are at least convertible to other binary types.
   
   I actually think utf8 bytebuffers are somewhat unexpected here since this is 
all of the stuff that makes it out of the input format, so if it came out as a 
bytebuffer then it is likely some sort of binary data



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