This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/master by this push:
new aad82fbb3 Make ParquetScanOptions public and add method to get a
reference from ParquetExec (#3551)
aad82fbb3 is described below
commit aad82fbb32dc1bb4d03e8b36297f8c9a3148df89
Author: Dan Harris <[email protected]>
AuthorDate: Tue Sep 20 15:47:17 2022 -0400
Make ParquetScanOptions public and add method to get a reference from
ParquetExec (#3551)
---
datafusion/core/src/physical_plan/file_format/mod.rs | 4 +++-
datafusion/core/src/physical_plan/file_format/parquet.rs | 7 +++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/datafusion/core/src/physical_plan/file_format/mod.rs
b/datafusion/core/src/physical_plan/file_format/mod.rs
index 295fef27b..2926f18a2 100644
--- a/datafusion/core/src/physical_plan/file_format/mod.rs
+++ b/datafusion/core/src/physical_plan/file_format/mod.rs
@@ -30,7 +30,9 @@ mod row_filter;
pub(crate) use self::csv::plan_to_csv;
pub use self::csv::CsvExec;
pub(crate) use self::parquet::plan_to_parquet;
-pub use self::parquet::{ParquetExec, ParquetFileMetrics,
ParquetFileReaderFactory};
+pub use self::parquet::{
+ ParquetExec, ParquetFileMetrics, ParquetFileReaderFactory,
ParquetScanOptions,
+};
use arrow::{
array::{ArrayData, ArrayRef, DictionaryArray},
buffer::Buffer,
diff --git a/datafusion/core/src/physical_plan/file_format/parquet.rs
b/datafusion/core/src/physical_plan/file_format/parquet.rs
index a6ce44b22..f4c52e5dc 100644
--- a/datafusion/core/src/physical_plan/file_format/parquet.rs
+++ b/datafusion/core/src/physical_plan/file_format/parquet.rs
@@ -81,11 +81,13 @@ pub struct ParquetScanOptions {
}
impl ParquetScanOptions {
+ /// Set whether to pushdown pruning predicate to the parquet scan
pub fn with_pushdown_filters(mut self, pushdown_filters: bool) -> Self {
self.pushdown_filters = pushdown_filters;
self
}
+ /// Set whether to reorder pruning predicate expressions in order to
minimize evaluation cost
pub fn with_reorder_predicates(mut self, reorder_predicates: bool) -> Self
{
self.reorder_predicates = reorder_predicates;
self
@@ -182,6 +184,11 @@ impl ParquetExec {
self.scan_options = scan_options;
self
}
+
+ /// Ref to the `ParquetScanOptions`
+ pub fn parquet_scan_options(&self) -> &ParquetScanOptions {
+ &self.scan_options
+ }
}
/// Stores metrics about the parquet execution for a particular parquet file.