alamb commented on code in PR #3594:
URL: https://github.com/apache/arrow-rs/pull/3594#discussion_r1087732786


##########
arrow-flight/src/encode.rs:
##########
@@ -122,6 +125,15 @@ impl FlightDataEncoderBuilder {
         self
     }
 
+    /// Specify a schema for the RecordBatches being sent. If a schema
+    /// is not specified, an encoded Schema message will be sent when
+    /// the first [`RecordBatch`], if any, is encoded. Some clients
+    /// expect a Schema message even if there is no data sent.
+    pub fn with_schema(mut self, schema: SchemaRef) -> Self {

Review Comment:
   FWIW I hit an issue downstream 
https://github.com/influxdata/influxdb_iox/pull/6711 that makes me think 
@viirya 's idea to always require a schema is the best (otherwise it is easy to 
use this interface incorrectly). I'll make another PR shortly



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