@@ -59,11 +59,6 @@ pub struct TableScanBuilder<'a> {
5959 concurrency_limit_manifest_files : usize ,
6060 row_group_filtering_enabled : bool ,
6161 row_selection_enabled : bool ,
62-
63- // TODO: defaults to false for now whilst delete file processing
64- // is still being worked on but will switch to a default of true
65- // once this work is complete
66- delete_file_processing_enabled : bool ,
6762}
6863
6964impl < ' a > TableScanBuilder < ' a > {
@@ -82,7 +77,6 @@ impl<'a> TableScanBuilder<'a> {
8277 concurrency_limit_manifest_files : num_cpus,
8378 row_group_filtering_enabled : true ,
8479 row_selection_enabled : false ,
85- delete_file_processing_enabled : false ,
8680 }
8781 }
8882
@@ -189,17 +183,6 @@ impl<'a> TableScanBuilder<'a> {
189183 self
190184 }
191185
192- /// Determines whether to enable delete file processing (currently disabled by default)
193- ///
194- /// When disabled, delete files are ignored.
195- pub fn with_delete_file_processing_enabled (
196- mut self ,
197- delete_file_processing_enabled : bool ,
198- ) -> Self {
199- self . delete_file_processing_enabled = delete_file_processing_enabled;
200- self
201- }
202-
203186 /// Build the table scan.
204187 pub fn build ( self ) -> Result < TableScan > {
205188 let snapshot = match self . snapshot_id {
@@ -226,7 +209,6 @@ impl<'a> TableScanBuilder<'a> {
226209 concurrency_limit_manifest_files : self . concurrency_limit_manifest_files ,
227210 row_group_filtering_enabled : self . row_group_filtering_enabled ,
228211 row_selection_enabled : self . row_selection_enabled ,
229- delete_file_processing_enabled : self . delete_file_processing_enabled ,
230212 } ) ;
231213 } ;
232214 current_snapshot_id. clone ( )
@@ -317,7 +299,6 @@ impl<'a> TableScanBuilder<'a> {
317299 concurrency_limit_manifest_files : self . concurrency_limit_manifest_files ,
318300 row_group_filtering_enabled : self . row_group_filtering_enabled ,
319301 row_selection_enabled : self . row_selection_enabled ,
320- delete_file_processing_enabled : self . delete_file_processing_enabled ,
321302 } )
322303 }
323304}
@@ -346,7 +327,6 @@ pub struct TableScan {
346327
347328 row_group_filtering_enabled : bool ,
348329 row_selection_enabled : bool ,
349- delete_file_processing_enabled : bool ,
350330}
351331
352332impl TableScan {
@@ -368,12 +348,7 @@ impl TableScan {
368348 // used to stream the results back to the caller
369349 let ( file_scan_task_tx, file_scan_task_rx) = channel ( concurrency_limit_manifest_entries) ;
370350
371- let delete_file_idx_and_tx: Option < ( DeleteFileIndex , Sender < DeleteFileContext > ) > =
372- if self . delete_file_processing_enabled {
373- Some ( DeleteFileIndex :: new ( ) )
374- } else {
375- None
376- } ;
351+ let ( delete_file_idx, delete_file_tx) = DeleteFileIndex :: new ( ) ;
377352
378353 let manifest_list = plan_context. get_manifest_list ( ) . await ?;
379354
@@ -383,9 +358,8 @@ impl TableScan {
383358 let manifest_file_contexts = plan_context. build_manifest_file_contexts (
384359 manifest_list,
385360 manifest_entry_data_ctx_tx,
386- delete_file_idx_and_tx. as_ref ( ) . map ( |( delete_file_idx, _) | {
387- ( delete_file_idx. clone ( ) , manifest_entry_delete_ctx_tx)
388- } ) ,
361+ delete_file_idx. clone ( ) ,
362+ manifest_entry_delete_ctx_tx,
389363 ) ?;
390364
391365 let mut channel_for_manifest_error = file_scan_task_tx. clone ( ) ;
@@ -404,34 +378,30 @@ impl TableScan {
404378 } ) ;
405379
406380 let mut channel_for_data_manifest_entry_error = file_scan_task_tx. clone ( ) ;
381+ let mut channel_for_delete_manifest_entry_error = file_scan_task_tx. clone ( ) ;
407382
408- if let Some ( ( _, delete_file_tx) ) = delete_file_idx_and_tx {
409- let mut channel_for_delete_manifest_entry_error = file_scan_task_tx. clone ( ) ;
410-
411- // Process the delete file [`ManifestEntry`] stream in parallel
412- spawn ( async move {
413- let result = manifest_entry_delete_ctx_rx
414- . map ( |me_ctx| Ok ( ( me_ctx, delete_file_tx. clone ( ) ) ) )
415- . try_for_each_concurrent (
416- concurrency_limit_manifest_entries,
417- |( manifest_entry_context, tx) | async move {
418- spawn ( async move {
419- Self :: process_delete_manifest_entry ( manifest_entry_context, tx)
420- . await
421- } )
422- . await
423- } ,
424- )
425- . await ;
383+ // Process the delete file [`ManifestEntry`] stream in parallel
384+ spawn ( async move {
385+ let result = manifest_entry_delete_ctx_rx
386+ . map ( |me_ctx| Ok ( ( me_ctx, delete_file_tx. clone ( ) ) ) )
387+ . try_for_each_concurrent (
388+ concurrency_limit_manifest_entries,
389+ |( manifest_entry_context, tx) | async move {
390+ spawn ( async move {
391+ Self :: process_delete_manifest_entry ( manifest_entry_context, tx) . await
392+ } )
393+ . await
394+ } ,
395+ )
396+ . await ;
426397
427- if let Err ( error) = result {
428- let _ = channel_for_delete_manifest_entry_error
429- . send ( Err ( error) )
430- . await ;
431- }
432- } )
433- . await ;
434- }
398+ if let Err ( error) = result {
399+ let _ = channel_for_delete_manifest_entry_error
400+ . send ( Err ( error) )
401+ . await ;
402+ }
403+ } )
404+ . await ;
435405
436406 // Process the data file [`ManifestEntry`] stream in parallel
437407 spawn ( async move {
0 commit comments