diff --git a/datafusion/common/src/column.rs b/datafusion/common/src/column.rs index 911ff079def1..3e2bc0ad7c3a 100644 --- a/datafusion/common/src/column.rs +++ b/datafusion/common/src/column.rs @@ -109,21 +109,21 @@ impl Column { /// `foo.BAR` would be parsed to a reference to relation `foo`, column name `bar` (lower case) /// where `"foo.BAR"` would be parsed to a reference to column named `foo.BAR` pub fn from_qualified_name(flat_name: impl Into) -> Self { - let flat_name: &str = &flat_name.into(); - Self::from_idents(&mut parse_identifiers_normalized(flat_name, false)) + let flat_name = flat_name.into(); + Self::from_idents(&mut parse_identifiers_normalized(&flat_name, false)) .unwrap_or_else(|| Self { relation: None, - name: flat_name.to_owned(), + name: flat_name, }) } /// Deserialize a fully qualified name string into a column preserving column text case pub fn from_qualified_name_ignore_case(flat_name: impl Into) -> Self { - let flat_name: &str = &flat_name.into(); - Self::from_idents(&mut parse_identifiers_normalized(flat_name, true)) + let flat_name = flat_name.into(); + Self::from_idents(&mut parse_identifiers_normalized(&flat_name, true)) .unwrap_or_else(|| Self { relation: None, - name: flat_name.to_owned(), + name: flat_name, }) }