diff --git a/src/query/mod.rs b/src/query/mod.rs index 9fb50b94e..df230ef07 100644 --- a/src/query/mod.rs +++ b/src/query/mod.rs @@ -65,7 +65,6 @@ pub static QUERY_SESSION: Lazy = pub static QUERY_RUNTIME: Lazy = Lazy::new(|| Runtime::new().expect("Runtime should be constructible")); - /// This function executes a query on the dedicated runtime, ensuring that the query is not isolated to a single thread/CPU /// at a time and has access to the entire thread pool, enabling better concurrent processing, and thus quicker results. pub async fn execute( @@ -126,6 +125,14 @@ impl Query { .execution .use_row_number_estimates_to_optimize_partitioning = true; + //adding this config as it improves query performance as explained here - + // https://github.com/apache/datafusion/pull/13101 + config + .options_mut() + .execution + .parquet + .schema_force_view_types = true; + let state = SessionStateBuilder::new() .with_default_features() .with_config(config)