We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68c3c43 commit e0240afCopy full SHA for e0240af
1 file changed
datafusion/physical-expr-common/src/physical_expr.rs
@@ -797,7 +797,12 @@ impl PhysicalExpr for OptionalFilterPhysicalExpr {
797
}
798
799
fn snapshot(&self) -> Result<Option<Arc<dyn PhysicalExpr>>> {
800
- self.inner.snapshot()
+ // 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
+ }))
806
807
808
fn snapshot_generation(&self) -> u64 {
0 commit comments