You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "avantgardnerio (via GitHub)" <gi...@apache.org> on 2023/05/25 14:41:56 UTC

[GitHub] [arrow-rs] avantgardnerio commented on a diff in pull request #4282: RFC: `FlightInfoBuilder` for helping create FlightInfo structures

avantgardnerio commented on code in PR #4282:
URL: https://github.com/apache/arrow-rs/pull/4282#discussion_r1205621692


##########
arrow-flight/src/lib.rs:
##########
@@ -444,6 +461,112 @@ impl FlightInfo {
     }
 }
 
+// TODO put it in its own module
+/// A builder for creating [`FlightInfo`]
+///
+/// # Example:
+/// ```
+/// TODO
+/// ```
+#[derive(Debug)]
+pub struct FlightInfoBuilder {
+    inner: FlightInfo,
+}
+
+impl FlightInfoBuilder {
+    /// Create a new `FlightInfoBuilder`
+    pub fn new() -> Self {
+        Self {
+            inner: FlightInfo {
+                schema: Bytes::new(),
+                flight_descriptor: None,
+                endpoint: vec![],
+                ordered: false,
+
+                // Flight says "Set these to -1 if unknown."

Review Comment:
   Oh, cool, I did not know that!



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org