File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -359,16 +359,6 @@ impl PySessionContext {
359359 file_sort_order : Option < Vec < Vec < PySortExpr > > > ,
360360 py : Python ,
361361 ) -> PyDataFusionResult < ( ) > {
362- let options = ListingOptions :: new ( Arc :: new ( ParquetFormat :: new ( ) ) )
363- . with_file_extension ( file_extension)
364- . with_table_partition_cols ( convert_table_partition_cols ( table_partition_cols) ?)
365- . with_file_sort_order (
366- file_sort_order
367- . unwrap_or_default ( )
368- . into_iter ( )
369- . map ( |e| e. into_iter ( ) . map ( |f| f. into ( ) ) . collect ( ) )
370- . collect ( ) ,
371- ) ;
372362 let table_path = ListingTableUrl :: parse ( path) ?;
373363 let resolved_schema: SchemaRef = match schema {
374364 Some ( s) => Arc :: new ( s. 0 ) ,
@@ -399,6 +389,17 @@ impl PySessionContext {
399389 }
400390 } ;
401391
392+ // Recreate options outside the match block for the table configuration
393+ let options = ListingOptions :: new ( Arc :: new ( ParquetFormat :: new ( ) ) )
394+ . with_file_extension ( file_extension)
395+ . with_table_partition_cols ( convert_table_partition_cols ( table_partition_cols) ?)
396+ . with_file_sort_order (
397+ file_sort_order
398+ . unwrap_or_default ( )
399+ . into_iter ( )
400+ . map ( |e| e. into_iter ( ) . map ( |f| f. into ( ) ) . collect ( ) )
401+ . collect ( ) ,
402+ ) ;
402403 let config = ListingTableConfig :: new ( table_path)
403404 . with_listing_options ( options)
404405 . with_schema ( resolved_schema) ;
You can’t perform that action at this time.
0 commit comments