File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
rust/cubestore/cubestore/src/queryplanner Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ use datafusion::parquet::arrow::async_reader::AsyncFileReader;
55use datafusion:: parquet:: file:: encryption:: ParquetEncryptionConfig ;
66use datafusion:: parquet:: file:: metadata:: ParquetMetaData ;
77use datafusion:: physical_plan:: metrics:: ExecutionPlanMetricsSet ;
8+ use datafusion:: prelude:: SessionConfig ;
89use futures_util:: future:: BoxFuture ;
910use futures_util:: FutureExt ;
1011use std:: fmt;
@@ -23,6 +24,9 @@ pub trait MetadataCacheFactory: Sync + Send {
2324 max_capacity : u64 ,
2425 time_to_idle : Duration ,
2526 ) -> Arc < dyn ParquetFileReaderFactory > ;
27+ fn make_session_config ( & self ) -> SessionConfig {
28+ SessionConfig :: new ( )
29+ }
2630}
2731/// Default MetadataCache, does not cache anything
2832#[ derive( Debug ) ]
Original file line number Diff line number Diff line change @@ -245,8 +245,7 @@ impl QueryPlannerImpl {
245245}
246246
247247impl QueryPlannerImpl {
248- pub fn make_execution_context ( ) -> SessionContext {
249- let config = SessionConfig :: new ( ) ;
248+ pub fn execution_context_helper ( config : SessionConfig ) -> SessionContext {
250249 let context = SessionContext :: new_with_config ( config) ;
251250 // TODO upgrade DF: build SessionContexts consistently -- that now means check all appropriate SessionContext constructors use this make_execution_context or execution_context function.
252251 for udaf in registerable_aggregate_udfs ( ) {
@@ -267,8 +266,12 @@ impl QueryPlannerImpl {
267266 context
268267 }
269268
269+ pub fn make_execution_context ( ) -> SessionContext {
270+ Self :: execution_context_helper ( SessionConfig :: new ( ) )
271+ }
272+
270273 async fn execution_context ( & self ) -> Result < Arc < SessionContext > , CubeError > {
271- Ok ( Arc :: new ( Self :: make_execution_context ( ) ) )
274+ Ok ( Arc :: new ( Self :: execution_context_helper ( self . metadata_cache_factory . make_session_config ( ) ) ) )
272275 }
273276}
274277
You can’t perform that action at this time.
0 commit comments