itsjunetime commented on code in PR #6690:
URL: https://github.com/apache/arrow-rs/pull/6690#discussion_r1835082863
##########
arrow-flight/src/encode.rs:
##########
@@ -327,6 +327,10 @@ impl FlightDataEncoder {
/// Encodes batch into one or more `FlightData` messages in self.queue
fn encode_batch(&mut self, batch: RecordBatch) -> Result<()> {
+ if batch.num_rows() == 0 {
Review Comment:
This is not an optimization, but rather due to a difference in behavior that
the tests dictate - in some of the tests, encoding an empty batch should result
in an IPC header + empty data, but in some other tests, encoding an empty batch
should result in nothing. I haven't yet figured out exactly why that is, and
need to do some more poking to figure out why different parts of the code want
this different behavior.
--
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]