peasee commented on code in PR #13405:
URL: https://github.com/apache/datafusion/pull/13405#discussion_r1845679344
##########
datafusion/sql/src/unparser/plan.rs:
##########
@@ -158,10 +158,12 @@ impl Unparser<'_> {
}
let mut twj = select_builder.pop_from().unwrap();
- twj.relation(relation_builder);
+ twj.relation(relation_builder.clone());
Review Comment:
Because `twj.relation()` takes ownership of the `relation_builder` causing
it to move, so we can't borrow it again later.
The only thing I use the relation builder for is to retrieve the list of all
the identifiers, so I could probably do that before the `twj.relation()` then
just pass those like:
```
let valid_idents = select_builder.collect_valid_idents();
twj.relation();
```
which shouldn't require a clone.
--
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]