You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/09/17 11:41:36 UTC
[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #3522: Config support type conversion
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org