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

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

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


##########
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:
   yeah, this is a good example of where the protobuf defaults (0) is different than what the spec says 



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