jackwener commented on code in PR #9974:
URL: https://github.com/apache/arrow-datafusion/pull/9974#discussion_r1554815513
##########
datafusion/optimizer/src/analyzer/mod.rs:
##########
@@ -156,18 +155,21 @@ impl Analyzer {
/// Do necessary check and fail the invalid plan
fn check_plan(plan: &LogicalPlan) -> Result<()> {
plan.apply(&mut |plan: &LogicalPlan| {
- for expr in plan.expressions().iter() {
+ plan.inspect_expressions(|expr| {
Review Comment:
A great catch! `expressions()` will invoke clone() inside, we can notice it
to reduce some loss
--
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]