Skip to content

Commit 7b33613

Browse files
committed
PushdownFilter optimizations
- Add a hidden `Filter::new` constructor that skips type-checking - Less allocations, more modification of mutable plan nodes - Less cloning, use references when possible
1 parent bc992f3 commit 7b33613

3 files changed

Lines changed: 270 additions & 341 deletions

File tree

datafusion/expr/src/logical_plan/plan.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2481,6 +2481,15 @@ pub struct Filter {
24812481
}
24822482

24832483
impl Filter {
2484+
/// Create a new filter operator.
2485+
///
2486+
/// Skips the type-checking and dealiasing done in [Self::try_new].
2487+
/// For internal use in DataFusion only.
2488+
#[doc(hidden)]
2489+
pub fn new(predicate: Expr, input: Arc<LogicalPlan>) -> Self {
2490+
Self { predicate, input }
2491+
}
2492+
24842493
/// Create a new filter operator.
24852494
///
24862495
/// Notes: as Aliases have no effect on the output of a filter operator,

0 commit comments

Comments
 (0)