Ted-Jiang commented on code in PR #3859:
URL: https://github.com/apache/arrow-datafusion/pull/3859#discussion_r998237800
##########
datafusion/optimizer/src/filter_push_down.rs:
##########
@@ -529,7 +529,8 @@ fn optimize(plan: &LogicalPlan, mut state: State) ->
Result<LogicalPlan> {
}
LogicalPlan::Analyze { .. } => push_down(&state, plan),
LogicalPlan::Filter(filter) => {
- let predicates = utils::split_conjunction(filter.predicate());
+ let filter_cnf =
utils::CnfHelper::new().rewrite_to_cnf_impl(filter.predicate());
+ let predicates = utils::split_conjunction(&filter_cnf);
Review Comment:
@alamb @Dandandan I prefer keep this just in `filter_push_down`, as you
seen in `test_rewrite_cnf_overflow`, this is a heavy operation. It makes the
exprs size expansion. IMO, we only need to spilt the filter expr to `CNF` to
push filter down as many as possible, we should use normal expr to pass throuh
plan.🤔
--
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]