Skip to content

Commit e0240af

Browse files
committed
fix pushdown
1 parent 68c3c43 commit e0240af

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

datafusion/physical-expr-common/src/physical_expr.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,12 @@ impl PhysicalExpr for OptionalFilterPhysicalExpr {
797797
}
798798

799799
fn snapshot(&self) -> Result<Option<Arc<dyn PhysicalExpr>>> {
800-
self.inner.snapshot()
800+
// Always unwrap the Optional wrapper for snapshot consumers (e.g. PruningPredicate).
801+
// If inner has a snapshot, use it; otherwise return the inner directly.
802+
Ok(Some(match self.inner.snapshot()? {
803+
Some(snap) => snap,
804+
None => Arc::clone(&self.inner),
805+
}))
801806
}
802807

803808
fn snapshot_generation(&self) -> u64 {

0 commit comments

Comments
 (0)