2010YOUY01 commented on code in PR #24821:
URL: https://github.com/apache/datafusion/pull/24821#discussion_r3986043527
##########
datafusion/physical-plan/src/filter.rs:
##########
@@ -621,6 +628,18 @@ impl ExecutionPlan for FilterExec {
context.session_id(),
context.task_id()
);
+ // A predicate that is provably `true` (e.g. after statistics-driven
+ // simplification dropped all conjuncts) makes this operator a
+ // pass-through: hand back the input stream directly instead of
+ // paying mask evaluation, `filter_record_batch`, coalescing and
+ // metrics per batch. Only valid when no projection / fetch needs to
+ // be applied on top of the input batches.
+ if self.predicate.eq(&lit(true))
Review Comment:
I don't think we should add some special case in the execution path for
stat-based expr optimization.
--
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]