jayzhan211 commented on code in PR #9595:
URL: https://github.com/apache/arrow-datafusion/pull/9595#discussion_r1528462605
##########
datafusion/core/src/dataframe/mod.rs:
##########
@@ -1309,24 +1314,25 @@ impl DataFrame {
Column::from_qualified_name_ignore_case(old_name)
};
- let field_to_rename = match
self.plan.schema().field_from_column(&old_column) {
- Ok(field) => field,
- // no-op if field not found
- Err(DataFusionError::SchemaError(SchemaError::FieldNotFound { ..
}, _)) => {
- return Ok(self)
- }
- Err(err) => return Err(err),
- };
+ let (qualifier_rename, field_rename) =
+ match self.plan.schema().qualified_field_from_column(&old_column) {
Review Comment:
I think it is possible to avoid clone for `Field` here since we can do
comparison with `&Field`
--
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]