andygrove commented on code in PR #2771:
URL: https://github.com/apache/arrow-datafusion/pull/2771#discussion_r906046132


##########
datafusion/core/src/execution/context.rs:
##########
@@ -1118,10 +1117,24 @@ impl SessionConfig {
         self
     }
 
-    /// Convert configuration to name-value pairs
+    /// Get the currently configured batch size
+    pub fn batch_size(&self) -> usize {
+        self.config_options.get_u32(OPT_BATCH_SIZE) as usize
+    }
+
+    /// Get the current configuration options
+    pub fn config_options(&self) -> &ConfigOptions {
+        &self.config_options
+    }
+
+    /// Convert configuration options to name-value pairs with values 
converted to strings. Note
+    /// that this method will eventually be deprecated and replaced by 
[config_options].
     pub fn to_props(&self) -> HashMap<String, String> {
         let mut map = HashMap::new();
-        map.insert(BATCH_SIZE.to_owned(), format!("{}", self.batch_size));
+        map.insert(
+            BATCH_SIZE.to_owned(),
+            format!("{}", self.config_options.get_u32(OPT_BATCH_SIZE)),
+        );

Review Comment:
   So we use these names internally as well so I ended up removing the 
duplicate option. This will require Ballista to look for the new name but that 
is a small change, I filed https://github.com/apache/arrow-ballista/issues/73 
to track this.



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