ozankabak commented on code in PR #12060: URL: https://github.com/apache/datafusion/pull/12060#discussion_r1721588432
########## datafusion/expr/src/utils.rs: ########## @@ -838,16 +838,41 @@ pub fn exprlist_len( qualifier: Some(qualifier), options, } => { + let related_wildcard_schema = wildcard_schema.as_ref().map_or_else( + || Ok(Arc::clone(schema)), + |schema| { + // Eliminate the fields coming from other tables. + let qualified_fields = schema + .fields() + .iter() + .enumerate() + .filter_map(|(idx, field)| { + let (maybe_table_ref, _field) = + schema.qualified_field(idx); + if maybe_table_ref == Some(qualifier) + || maybe_table_ref.is_none() + { Review Comment: ```suggestion let (maybe_table_ref, _) = schema.qualified_field(idx); if maybe_table_ref.map_or(true, |q| q == qualifier) { ``` -- 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