@@ -280,7 +280,7 @@ impl SessionState {
280280 SessionStateBuilder :: new ( )
281281 . with_config ( config)
282282 . with_runtime_env ( runtime)
283- . with_catalog_list ( catalog_list)
283+ . with_catalog_list ( Some ( catalog_list) )
284284 . with_default_features ( )
285285 . build ( )
286286 }
@@ -296,7 +296,7 @@ impl SessionState {
296296 SessionStateBuilder :: new ( )
297297 . with_config ( config)
298298 . with_runtime_env ( runtime)
299- . with_catalog_list ( catalog_list)
299+ . with_catalog_list ( Some ( catalog_list) )
300300 . with_default_features ( )
301301 . build ( )
302302 }
@@ -1140,9 +1140,9 @@ impl SessionStateBuilder {
11401140 /// Set the [`CatalogProviderList`]
11411141 pub fn with_catalog_list (
11421142 mut self ,
1143- catalog_list : Arc < dyn CatalogProviderList > ,
1143+ catalog_list : Option < Arc < dyn CatalogProviderList > > ,
11441144 ) -> Self {
1145- self . catalog_list = Some ( catalog_list) ;
1145+ self . catalog_list = catalog_list;
11461146 self
11471147 }
11481148
@@ -1876,7 +1876,7 @@ mod tests {
18761876 let table = MemTable :: try_new ( batch. schema ( ) , vec ! [ vec![ batch] ] ) ?;
18771877
18781878 let session_state = SessionStateBuilder :: new ( )
1879- . with_catalog_list ( Arc :: new ( MemoryCatalogProviderList :: new ( ) ) )
1879+ . with_catalog_list ( Some ( Arc :: new ( MemoryCatalogProviderList :: new ( ) ) ) )
18801880 . build ( ) ;
18811881 let table_ref = session_state. resolve_table_ref ( "employee" ) . to_string ( ) ;
18821882 session_state
0 commit comments