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


##########
datafusion/core/src/config.rs:
##########
@@ -288,26 +288,37 @@ impl ConfigOptions {
     }
 
     /// get a boolean configuration option
-    pub fn get_bool(&self, key: &str) -> bool {
+    pub fn get_bool(&self, key: &str) -> Option<bool> {
         match self.get(key) {
-            Some(ScalarValue::Boolean(Some(b))) => b,
-            _ => false,
+            Some(ScalarValue::Boolean(b)) => b,
+            Some(b) => Some(
+                b.to_string()
+                    .parse::<bool>()
+                    .unwrap_or_else(|_| panic!("Cannot parse bool from {:?}", 
&b)),

Review Comment:
   I agree. We don't want to introduce more panics at this point. There is an 
effort to remove as many of the existing panics as is practical.



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to