Skip to content

Commit 87169f0

Browse files
authored
Stop copying LogicalPlan and Exprs in PushDownFilter (#10444)
1 parent 842f393 commit 87169f0

File tree

2 files changed

+343
-290
lines changed

2 files changed

+343
-290
lines changed

datafusion/expr/src/logical_plan/plan.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2407,6 +2407,16 @@ pub enum Distinct {
24072407
On(DistinctOn),
24082408
}
24092409

2410+
impl Distinct {
2411+
/// return a reference to the nodes input
2412+
pub fn input(&self) -> &Arc<LogicalPlan> {
2413+
match self {
2414+
Distinct::All(input) => input,
2415+
Distinct::On(DistinctOn { input, .. }) => input,
2416+
}
2417+
}
2418+
}
2419+
24102420
/// Removes duplicate rows from the input
24112421
#[derive(Clone, PartialEq, Eq, Hash)]
24122422
pub struct DistinctOn {

0 commit comments

Comments
 (0)