timsaucer commented on code in PR #14636: URL: https://github.com/apache/datafusion/pull/14636#discussion_r1956153542
########## datafusion/expr/src/logical_plan/builder.rs: ########## @@ -834,10 +834,16 @@ impl LogicalPlanBuilder { plan: &LogicalPlan, column: impl Into<Column>, ) -> Result<Column> { + let column = column.into(); + if column.relation.is_some() { + // column is already normalized + return Ok(column); + } + Review Comment: This looks like a no brainer performance boost. Thanks! ########## datafusion/core/src/dataframe/mod.rs: ########## @@ -1801,7 +1801,8 @@ impl DataFrame { .iter() .map(|(qualifier, field)| { if qualifier.eq(&qualifier_rename) && field.as_ref() == field_rename { - col(Column::from((qualifier, field))).alias(new_name) + col(Column::from((qualifier, field))) + .alias_qualified(qualifier.cloned(), new_name) Review Comment: This looks like the right thing to do, but appears to me to be unrelated to the change in the builder to exit early. What problem does this solve? More for my own knowledge and not that I think there's anything wrong with the change. -- 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...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org