Skip to content

Commit

Permalink
fix: Revert automatically turning on Parquet prefiltered (#18720)
Browse files Browse the repository at this point in the history
  • Loading branch information
coastalwhite authored Sep 12, 2024
1 parent 0e5e554 commit dddf0b7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions crates/polars-io/src/parquet/read/read_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -753,14 +753,16 @@ pub fn read_parquet<R: MmapBytesReader>(
.map(Cow::Borrowed)
.unwrap_or_else(|| Cow::Owned((0usize..reader_schema.len()).collect::<Vec<_>>()));

if let ParallelStrategy::Auto = parallel {
if predicate.is_some_and(|predicate| {
predicate.live_variables().map_or(0, |v| v.len()) * n_row_groups
if let Some(predicate) = predicate {
if std::env::var("POLARS_PARQUET_AUTO_PREFILTERED").is_ok_and(|v| v == "1")
&& predicate.live_variables().map_or(0, |v| v.len()) * n_row_groups
>= POOL.current_num_threads()
}) {
{
parallel = ParallelStrategy::Prefiltered;
} else if n_row_groups > materialized_projection.len()
|| n_row_groups > POOL.current_num_threads()
}
}
if ParallelStrategy::Auto == parallel {
if n_row_groups > materialized_projection.len() || n_row_groups > POOL.current_num_threads()
{
parallel = ParallelStrategy::RowGroups;
} else {
Expand Down

0 comments on commit dddf0b7

Please sign in to comment.