roeap commented on code in PR #4294:
URL: https://github.com/apache/arrow-rs/pull/4294#discussion_r1209206884
##########
arrow-flight/src/lib.rs:
##########
@@ -459,6 +511,51 @@ impl FlightInfo {
let msg = IpcMessage(self.schema);
msg.try_into()
}
+
+ /// Specify the schema for the response.
+ ///
+ /// Note this takes the arrow [`Schema`] (not the IPC schema) and
+ /// encodes it using the default IPC options.
+ ///
+ /// Returns an error if `schema` can not be encoded into IPC form.
+ pub fn with_schema(mut self, schema: &Schema) -> ArrowResult<Self> {
Review Comment:
Just minor, but personally, I like to make the the fact that its fallible
explicit in the name.
```suggestion
pub fn try_with_schema(mut self, schema: &Schema) -> ArrowResult<Self> {
```
--
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]