Jefffrey commented on code in PR #11293:
URL: https://github.com/apache/arrow-rs/pull/11293#discussion_r4190728965


##########
arrow-flight/src/encode.rs:
##########
@@ -269,6 +274,8 @@ impl FlightDataEncoderBuilder {
 pub struct FlightDataEncoder {
     /// Input stream
     inner: BoxStream<'static, Result<RecordBatch>>,
+    /// Schema of input batches before dictionary handling
+    input_schema: Option<SchemaRef>,

Review Comment:
   why do we need a separate field here instead of using existing `schema` 
below?



##########
arrow-flight/src/encode.rs:
##########
@@ -38,6 +38,10 @@ use futures::{Stream, StreamExt, ready, stream::BoxStream};
 /// several have already been successfully produced.
 ///
 /// # Caveats
+/// All input record batches must have the same schema. The first batch sets 
the
+/// expected schema unless [`FlightDataEncoderBuilder::with_schema`] supplies 
it.
+/// A batch with a different schema produces an error and ends the stream.

Review Comment:
   can we format it consistently? i.e.
   
   ```
   # Caveats
   1. All input record batches must have the same schema. The first batch sets 
the
      expected schema unless [`FlightDataEncoderBuilder::with_schema`] supplies 
it.
      A batch with a different schema produces an error and ends the stream.
   2. When [`DictionaryHandling`] is [`DictionaryHandling::Hydrate`],
   ...
   ```



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