From 56a3f6a878b11c15e1cf634ad6ce098206004afb Mon Sep 17 00:00:00 2001 From: ritchie Date: Fri, 6 Dec 2024 10:45:56 +0100 Subject: [PATCH] fix: Respect parallel argument in parquet --- crates/polars-io/src/parquet/read/read_impl.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/polars-io/src/parquet/read/read_impl.rs b/crates/polars-io/src/parquet/read/read_impl.rs index 9704e8b5e190..b3b128209708 100644 --- a/crates/polars-io/src/parquet/read/read_impl.rs +++ b/crates/polars-io/src/parquet/read/read_impl.rs @@ -886,7 +886,8 @@ pub fn read_parquet( let mut do_prefilter = false; do_prefilter |= prefilter_env == Ok("1"); // Force enable - do_prefilter |= num_live_variables * n_row_groups >= POOL.current_num_threads() + do_prefilter |= matches!(parallel, ParallelStrategy::Auto) + && num_live_variables * n_row_groups >= POOL.current_num_threads() && materialized_projection.len() >= num_live_variables; do_prefilter &= prefilter_env != Ok("0"); // Force disable