askoa commented on code in PR #2729:
URL: https://github.com/apache/arrow-rs/pull/2729#discussion_r972001715


##########
arrow/src/record_batch.rs:
##########
@@ -412,16 +412,47 @@ pub struct RecordBatchOptions {
     /// Optional row count, useful for specifying a row count for a 
RecordBatch with no columns
     pub row_count: Option<usize>,
 }
+/// Builder to create new RecordBatchOptions object
+#[derive(Debug)]
+pub struct RecordBatchOptionsBuilder {
+    /// Match field names of structs and lists. If set to `true`, the names 
must match.
+    match_field_names: bool,
 
-impl Default for RecordBatchOptions {
+    /// Optional row count, useful for specifying a row count for a 
RecordBatch with no columns
+    row_count: Option<usize>,
+}
+impl Default for RecordBatchOptionsBuilder {
     fn default() -> Self {
+        Self::new()
+    }
+}
+
+impl RecordBatchOptionsBuilder {
+    pub fn new() -> Self {
         Self {
             match_field_names: true,
             row_count: None,
         }
     }
+    pub fn match_field_names(mut self, match_field_names: bool) -> Self {

Review Comment:
   Updated to use `with_` prefix.



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