houqp commented on a change in pull request #749:
URL: https://github.com/apache/arrow-datafusion/pull/749#discussion_r671878480
##########
File path: datafusion/src/datasource/parquet.rs
##########
@@ -38,11 +38,22 @@ pub struct ParquetTable {
schema: SchemaRef,
statistics: Statistics,
max_concurrency: usize,
+ enable_pruning: bool,
}
impl ParquetTable {
/// Attempt to initialize a new `ParquetTable` from a file path.
pub fn try_new(path: impl Into<String>, max_concurrency: usize) ->
Result<Self> {
+ ParquetTable::try_new_with_pruning_config(path, max_concurrency, true)
+ }
+
+ /// Attempt to initialize a new `ParquetTable` from a file path. And
enable or
+ /// disable the parquet pruning features.
+ pub fn try_new_with_pruning_config(
Review comment:
how about adopting the same builder design you went with `pub fn
with_parquet_pruning`? then you can initialize it as:
```rust
ParquetTable::try_new(
filename,
m.config.concurrency,
)?.with_enable_pruning(m.config.parquet_pruning)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]