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


##########
datafusion/core/src/config.rs:
##########
@@ -307,7 +315,8 @@ impl ConfigOptions {
     pub fn get_string(&self, key: &str) -> String {
         match self.get(key) {
             Some(ScalarValue::Utf8(Some(s))) => s,
-            _ => "".into(),
+            Some(s) => s.to_string(),
+            _ => "".to_string(),

Review Comment:
   I think a more common thing in Rust would be to return `Option<String>` so 
if the string wasn't set the caller can react to 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-unsubscr...@arrow.apache.org

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

Reply via email to