imply-cheddar commented on code in PR #13773:
URL: https://github.com/apache/druid/pull/13773#discussion_r1239150177


##########
processing/src/main/java/org/apache/druid/jackson/DruidDefaultSerializersModule.java:
##########
@@ -182,5 +184,21 @@ public ByteOrder deserialize(JsonParser jp, 
DeserializationContext ctxt) throws
         }
     );
     addDeserializer(ResponseContext.class, new ResponseContextDeserializer());
+
+    addSerializer(RowsAndColumns.class, new JsonSerializer<RowsAndColumns>()
+    {
+      @Override
+      public void serialize(
+          RowsAndColumns value,
+          JsonGenerator gen,
+          SerializerProvider serializers
+      ) throws IOException
+      {
+        // It would be really cool if jackson offered an output stream that 
would allow us to push bytes

Review Comment:
   It would seem like it, but switching things around to passing down an 
InputStream just makes the `WireTransferable` code a lot more complex as now it 
needs to lazily convert to bytes based on calls to `InputStream`.  It's likely 
so unwieldy that implementations would just resort to building a `byte[]` and 
using a BAIS anyway.  The natural way to code it would be to say "write 
yourself to this stream".



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