File tree Expand file tree Collapse file tree 5 files changed +22
-10
lines changed
Expand file tree Collapse file tree 5 files changed +22
-10
lines changed Original file line number Diff line number Diff line change @@ -216,8 +216,9 @@ pub async fn register_vortex_files(
216216
217217 let table_url = ListingTableUrl :: parse ( vortex_path) ?;
218218
219- let config =
220- ListingTableConfig :: new ( table_url) . with_listing_options ( ListingOptions :: new ( format) ) ;
219+ let config = ListingTableConfig :: new ( table_url) . with_listing_options (
220+ ListingOptions :: new ( format) . with_session_config_options ( session. state ( ) . config ( ) ) ,
221+ ) ;
221222
222223 let config = if let Some ( schema) = schema {
223224 config. with_schema ( schema. into ( ) )
@@ -248,7 +249,9 @@ pub fn register_parquet_files(
248249 let table_url = ListingTableUrl :: parse ( table_path) ?;
249250
250251 let config = ListingTableConfig :: new ( table_url)
251- . with_listing_options ( ListingOptions :: new ( format) )
252+ . with_listing_options (
253+ ListingOptions :: new ( format) . with_session_config_options ( session. state ( ) . config ( ) ) ,
254+ )
252255 . with_schema ( schema. clone ( ) . into ( ) ) ;
253256
254257 let listing_table = Arc :: new ( ListingTable :: try_new ( config) ?) ;
Original file line number Diff line number Diff line change @@ -66,8 +66,9 @@ pub async fn register_parquet_files(
6666 info ! ( "Registering table from {}" , & parquet_path) ;
6767 let table_url = ListingTableUrl :: parse ( parquet_path) ?;
6868
69- let config = ListingTableConfig :: new ( table_url)
70- . with_listing_options ( ListingOptions :: new ( format) ) ;
69+ let config = ListingTableConfig :: new ( table_url) . with_listing_options (
70+ ListingOptions :: new ( format) . with_session_config_options ( session. state ( ) . config ( ) ) ,
71+ ) ;
7172
7273 let config = if let Some ( schema) = schema {
7374 config. with_schema ( schema. into ( ) )
@@ -97,8 +98,9 @@ pub async fn register_vortex_files(
9798 // Register the Vortex file
9899 let format = Arc :: new ( VortexFormat :: default ( ) ) ;
99100 let table_url = ListingTableUrl :: parse ( file_url. as_str ( ) ) ?;
100- let config = ListingTableConfig :: new ( table_url)
101- . with_listing_options ( ListingOptions :: new ( format) ) ;
101+ let config = ListingTableConfig :: new ( table_url) . with_listing_options (
102+ ListingOptions :: new ( format) . with_session_config_options ( session. state ( ) . config ( ) ) ,
103+ ) ;
102104
103105 let config = if let Some ( schema) = schema {
104106 config. with_schema ( schema. into ( ) )
Original file line number Diff line number Diff line change @@ -393,7 +393,10 @@ impl PBIData {
393393 let path = self . get_file_path ( & table. name , file_type) ;
394394 let table_url = ListingTableUrl :: parse ( path. to_str ( ) . expect ( "unicode" ) ) ?;
395395 let config = ListingTableConfig :: new ( table_url)
396- . with_listing_options ( ListingOptions :: new ( df_format) )
396+ . with_listing_options (
397+ ListingOptions :: new ( df_format)
398+ . with_session_config_options ( session. state ( ) . config ( ) ) ,
399+ )
397400 . with_schema ( schema. into ( ) ) ;
398401
399402 let listing_table = Arc :: new ( ListingTable :: try_new ( config) ?) ;
Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ async fn main() -> anyhow::Result<()> {
5757 . ok_or_else ( || vortex_err ! ( "Path is not valid UTF-8" ) ) ?,
5858 ) ?;
5959 let config = ListingTableConfig :: new ( table_url)
60- . with_listing_options ( ListingOptions :: new ( format) )
60+ . with_listing_options (
61+ ListingOptions :: new ( format) . with_session_config_options ( ctx. state ( ) . config ( ) ) ,
62+ )
6163 . infer_schema ( & ctx. state ( ) )
6264 . await ?;
6365
Original file line number Diff line number Diff line change @@ -96,7 +96,9 @@ mod tests {
9696 assert ! ( table_url. is_collection( ) ) ;
9797
9898 let config = ListingTableConfig :: new ( table_url)
99- . with_listing_options ( ListingOptions :: new ( format) )
99+ . with_listing_options (
100+ ListingOptions :: new ( format) . with_session_config_options ( ctx. state ( ) . config ( ) ) ,
101+ )
100102 . infer_schema ( & ctx. state ( ) )
101103 . await ?;
102104
You can’t perform that action at this time.
0 commit comments