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
2 changes: 2 additions & 0 deletions datafusion/proto/proto/datafusion.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,8 @@ message ParquetScanExecNode {
reserved 2;

PhysicalExprNode predicate = 3;

datafusion_common.TableParquetOptions parquet_options = 4;
}

message CsvScanExecNode {
Expand Down
18 changes: 18 additions & 0 deletions datafusion/proto/src/generated/pbjson.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions datafusion/proto/src/generated/prost.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions datafusion/proto/src/physical_plan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ impl AsExecutionPlan for protobuf::PhysicalPlanNode {
})
.transpose()?;
let mut builder = ParquetExec::builder(base_config);

if let Some(options) = scan.parquet_options.as_ref() {
builder = builder.with_table_parquet_options(options.try_into()?)
}

if let Some(predicate) = predicate {
builder = builder.with_predicate(predicate)
}
Expand Down Expand Up @@ -1654,6 +1659,7 @@ impl AsExecutionPlan for protobuf::PhysicalPlanNode {
extension_codec,
)?),
predicate,
parquet_options: Some(exec.table_parquet_options().try_into()?),
},
)),
});
Expand Down
5 changes: 5 additions & 0 deletions datafusion/proto/tests/cases/roundtrip_physical_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,9 +730,14 @@ fn roundtrip_parquet_exec_with_pruning_predicate() -> Result<()> {
Operator::Eq,
lit("1"),
));

let mut options = TableParquetOptions::new();
options.global.pushdown_filters = true;

roundtrip_test(
ParquetExec::builder(scan_config)
.with_predicate(predicate)
.with_table_parquet_options(options)
.build_arc(),
)
}
Expand Down