lidavidm commented on pull request #8962: URL: https://github.com/apache/arrow/pull/8962#issuecomment-748197373
Thanks for catching & taking a look at this! I think, rather than change the IPC class, we should make the FlightData Protobuf deserializer act more like a real Protobuf parser, and fill in an empty body instead of leaving the buffer as null if there was not a buffer read from the wire. That should probably happen here: https://github.com/apache/arrow/blob/519e9da4fc1698f686525f4226295f3680a3f3db/cpp/src/arrow/flight/serialization_internal.cc#L376-L377 I'll admit that even having written the code, it's hard to trace the path from here to where you currently have the fix... Here is where we invoke the deserializer: https://github.com/apache/arrow/blob/25c736d48dc289f457e74d15d05db65f6d539447/cpp/src/arrow/flight/serialization_internal.cc#L429-L432 That in turn is called from a peekable reader: https://github.com/apache/arrow/blob/25c736d48dc289f457e74d15d05db65f6d539447/cpp/src/arrow/flight/serialization_internal.h#L133 The reader fills in a FlightData which gets passed to the RecordBatchReader here: https://github.com/apache/arrow/blob/519e9da4fc1698f686525f4226295f3680a3f3db/cpp/src/arrow/flight/server.cc#L190 Calling ReadNext implicitly bounces through this glue class: https://github.com/apache/arrow/blob/519e9da4fc1698f686525f4226295f3680a3f3db/cpp/src/arrow/flight/server.cc#L96-L119 Which finally actually constructs the IPC Message in this PR: https://github.com/apache/arrow/blob/25c736d48dc289f457e74d15d05db65f6d539447/cpp/src/arrow/flight/serialization_internal.cc#L382-L384 ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
