alamb commented on code in PR #3810:
URL: https://github.com/apache/arrow-datafusion/pull/3810#discussion_r993559271
##########
benchmarks/src/bin/tpch.rs:
##########
@@ -766,7 +766,8 @@ mod tests {
if !actual.is_empty() {
actual += "\n";
}
- actual += &format!("{}", plan.display_indent());
+ use std::fmt::Write as _;
Review Comment:
clippy told me to do this
##########
datafusion/optimizer/src/filter_push_down.rs:
##########
@@ -341,8 +341,7 @@ fn optimize(plan: &LogicalPlan, mut state: State) ->
Result<LogicalPlan> {
}
LogicalPlan::Analyze { .. } => push_down(&state, plan),
LogicalPlan::Filter(Filter { input, predicate }) => {
- let mut predicates = vec![];
- utils::split_conjunction(predicate, &mut predicates);
+ let predicates = utils::split_conjunction(predicate);
Review Comment:
here is an example where the `split_conjuntion` API is easier to use now
##########
datafusion/optimizer/src/decorrelate_where_in.rs:
##########
@@ -175,7 +173,7 @@ fn optimize_where_in(
// build subquery side of join - the thing the subquery was querying
let subqry_alias = format!("__sq_{}", optimizer_config.next_id());
let mut subqry_plan = LogicalPlanBuilder::from((*subqry_input).clone());
- if let Some(expr) = combine_filters(&other_subqry_exprs) {
+ if let Some(expr) = conjunction(other_subqry_exprs) {
Review Comment:
here is an example of less copying (can use `other_subqry_exprs`directly)
--
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]