gruuya commented on PR #7188:
URL: https://github.com/apache/arrow-rs/pull/7188#issuecomment-2679178692

   > I can't help feeling it would make more sense to just use 
`FlightDataDecoder` directly, tbh `FlightRecordBatchStream` appears to be 
pretty much just a thin wrapper.
   
   Yeah, agreed, though I guess the point of `FlightRecordBatchStream` is to 
make a high-level converter of record batches. 
   
   So I still think it's surprising/counter-intuitive that this 
[test](https://github.com/apache/arrow-rs/issues/6412#issuecomment-2678325269) 
fails
   ```rust
       #[tokio::test]
       async fn test_empty_batch_round_trip() {
           let schema = Schema::new(vec![Field::new("data", DataType::Int32, 
false)]);
           let empty_batch = RecordBatch::new_empty(Arc::new(schema));
           let stream = FlightDataEncoderBuilder::new()
               .build(futures::stream::iter(vec![Ok(empty_batch.clone())]));
   
           let data: Vec<RecordBatch> = 
FlightRecordBatchStream::new_from_flight_data(stream)
               .try_collect()
               .await
               .unwrap();
   
           assert_eq!(data, vec![empty_batch]);
       }
   ```
   


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

Reply via email to