Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions datafusion/core/src/physical_plan/file_format/parquet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ impl ParquetExec {
&self.base_config
}

/// Optional predicate.
pub fn predicate(&self) -> Option<&Arc<dyn PhysicalExpr>> {
self.predicate.as_ref()
}

/// Optional reference to this parquet scan's pruning predicate
pub fn pruning_predicate(&self) -> Option<&Arc<PruningPredicate>> {
self.pruning_predicate.as_ref()
Expand Down
8 changes: 4 additions & 4 deletions datafusion/proto/src/physical_plan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -956,15 +956,15 @@ impl AsExecutionPlan for PhysicalPlanNode {
)),
})
} else if let Some(exec) = plan.downcast_ref::<ParquetExec>() {
let pruning_expr = exec
.pruning_predicate()
.map(|pred| pred.orig_expr().clone().try_into())
let predicate = exec
.predicate()
.map(|pred| pred.clone().try_into())
.transpose()?;
Ok(protobuf::PhysicalPlanNode {
physical_plan_type: Some(PhysicalPlanType::ParquetScan(
protobuf::ParquetScanExecNode {
base_conf: Some(exec.base_config().try_into()?),
predicate: pruning_expr,
predicate,
},
)),
})
Expand Down