Skip to content

Commit

Permalink
Enable row pushdown and predicate reordering by default
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Nov 26, 2022
1 parent ba73c81 commit 9359dfa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions datafusion/core/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,20 +240,20 @@ impl BuiltInConfigs {
OPT_PARQUET_PUSHDOWN_FILTERS,
"If true, filter expressions are be applied during the parquet decoding operation to \
reduce the number of rows decoded.",
false,
true,
),
ConfigDefinition::new_bool(
OPT_PARQUET_REORDER_FILTERS,
"If true, filter expressions evaluated during the parquet decoding opearation \
will be reordered heuristically to minimize the cost of evaluation. If false, \
the filters are applied in the same order as written in the query.",
false,
true,
),
ConfigDefinition::new_bool(
OPT_PARQUET_ENABLE_PAGE_INDEX,
"If true, uses parquet data page level metadata (Page Index) statistics \
to reduce the number of rows decoded.",
false,
true,
),
ConfigDefinition::new_bool(
OPT_OPTIMIZER_SKIP_FAILED_RULES,
Expand Down
12 changes: 4 additions & 8 deletions datafusion/core/src/physical_plan/file_format/parquet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ mod tests {
let file_groups = meta.into_iter().map(Into::into).collect();

// prepare the scan
let mut parquet_exec = ParquetExec::new(
let parquet_exec = ParquetExec::new(
FileScanConfig {
object_store_url: ObjectStoreUrl::local_filesystem(),
file_groups: vec![file_groups],
Expand All @@ -817,13 +817,9 @@ mod tests {
},
predicate,
None,
);

if pushdown_predicate {
parquet_exec = parquet_exec
.with_pushdown_filters(true)
.with_reorder_filters(true);
}
)
.with_pushdown_filters(pushdown_predicate)
.with_reorder_filters(pushdown_predicate);

if page_index_predicate {
parquet_exec = parquet_exec.with_enable_page_index(true);
Expand Down

0 comments on commit 9359dfa

Please sign in to comment.