File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ pub struct ArrowReader {
138138impl ArrowReader {
139139 /// Take a stream of FileScanTasks and reads all the files.
140140 /// Returns a stream of Arrow RecordBatches containing the data from the files
141- pub async fn read ( self , tasks : FileScanTaskStream ) -> Result < ArrowRecordBatchStream > {
141+ pub fn read ( self , tasks : FileScanTaskStream ) -> Result < ArrowRecordBatchStream > {
142142 let file_io = self . file_io . clone ( ) ;
143143 let batch_size = self . batch_size ;
144144 let concurrency_limit_data_files = self . concurrency_limit_data_files ;
@@ -1751,7 +1751,6 @@ message schema {
17511751
17521752 let result = reader
17531753 . read ( tasks)
1754- . await
17551754 . unwrap ( )
17561755 . try_collect :: < Vec < RecordBatch > > ( )
17571756 . await
Original file line number Diff line number Diff line change @@ -437,10 +437,7 @@ impl TableScan {
437437 arrow_reader_builder = arrow_reader_builder. with_batch_size ( batch_size) ;
438438 }
439439
440- arrow_reader_builder
441- . build ( )
442- . read ( self . plan_files ( ) . await ?)
443- . await
440+ arrow_reader_builder. build ( ) . read ( self . plan_files ( ) . await ?)
444441 }
445442
446443 /// Returns a reference to the column names of the table scan.
@@ -1332,14 +1329,12 @@ pub mod tests {
13321329 let batch_stream = reader
13331330 . clone ( )
13341331 . read ( Box :: pin ( stream:: iter ( vec ! [ Ok ( plan_task. remove( 0 ) ) ] ) ) )
1335- . await
13361332 . unwrap ( ) ;
13371333 let batch_1: Vec < _ > = batch_stream. try_collect ( ) . await . unwrap ( ) ;
13381334
13391335 let reader = ArrowReaderBuilder :: new ( fixture. table . file_io ( ) . clone ( ) ) . build ( ) ;
13401336 let batch_stream = reader
13411337 . read ( Box :: pin ( stream:: iter ( vec ! [ Ok ( plan_task. remove( 0 ) ) ] ) ) )
1342- . await
13431338 . unwrap ( ) ;
13441339 let batch_2: Vec < _ > = batch_stream. try_collect ( ) . await . unwrap ( ) ;
13451340
You can’t perform that action at this time.
0 commit comments