You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2025/10/31 19:37:59 UTC
Re: [PR] Optimize planning / stop cloning Strings / Fields so much [datafusion]
alamb commented on code in PR #18415:
URL: https://github.com/apache/datafusion/pull/18415#discussion_r2482493456
##########
datafusion/expr/src/expr_schema.rs:
##########
@@ -429,38 +430,36 @@ impl ExprSchemable for Expr {
schema: &dyn ExprSchema,
) -> Result<(Option<TableReference>, Arc<Field>)> {
let (relation, schema_name) = self.qualified_name();
- #[allow(deprecated)]
+ #[expect(deprecated)]
let field = match self {
Expr::Alias(Alias {
expr,
name: _,
metadata,
..
}) => {
- let field = expr.to_field(schema).map(|(_, f)| f.as_ref().clone())?;
Review Comment:
these `as_ref().clone()` type methods are doing a deep clone on the Fields each time...
--
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@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org