jayzhan211 commented on code in PR #13134:
URL: https://github.com/apache/datafusion/pull/13134#discussion_r1818994526
##########
datafusion/expr/src/logical_plan/builder.rs:
##########
@@ -1324,6 +1325,25 @@ pub fn change_redundant_column(fields: &Fields) ->
Vec<Field> {
})
.collect()
}
+
+fn mark_field(schema: &DFSchema) -> (Option<TableReference>, Arc<Field>) {
+ let mut table_references = schema
+ .iter()
+ .filter_map(|(qualifier, _)| qualifier)
+ .collect::<Vec<_>>();
+ table_references.dedup();
+ let table_reference = if table_references.len() == 1 {
+ table_references.first().cloned().cloned()
Review Comment:
Is this doing double clone?
Is `table_references[0].clone()` better?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]