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 {
138
138
impl ArrowReader {
139
139
/// Take a stream of FileScanTasks and reads all the files.
140
140
/// 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 > {
142
142
let file_io = self . file_io . clone ( ) ;
143
143
let batch_size = self . batch_size ;
144
144
let concurrency_limit_data_files = self . concurrency_limit_data_files ;
@@ -1751,7 +1751,6 @@ message schema {
1751
1751
1752
1752
let result = reader
1753
1753
. read ( tasks)
1754
- . await
1755
1754
. unwrap ( )
1756
1755
. try_collect :: < Vec < RecordBatch > > ( )
1757
1756
. await
Original file line number Diff line number Diff line change @@ -437,10 +437,7 @@ impl TableScan {
437
437
arrow_reader_builder = arrow_reader_builder. with_batch_size ( batch_size) ;
438
438
}
439
439
440
- arrow_reader_builder
441
- . build ( )
442
- . read ( self . plan_files ( ) . await ?)
443
- . await
440
+ arrow_reader_builder. build ( ) . read ( self . plan_files ( ) . await ?)
444
441
}
445
442
446
443
/// Returns a reference to the column names of the table scan.
@@ -1332,14 +1329,12 @@ pub mod tests {
1332
1329
let batch_stream = reader
1333
1330
. clone ( )
1334
1331
. read ( Box :: pin ( stream:: iter ( vec ! [ Ok ( plan_task. remove( 0 ) ) ] ) ) )
1335
- . await
1336
1332
. unwrap ( ) ;
1337
1333
let batch_1: Vec < _ > = batch_stream. try_collect ( ) . await . unwrap ( ) ;
1338
1334
1339
1335
let reader = ArrowReaderBuilder :: new ( fixture. table . file_io ( ) . clone ( ) ) . build ( ) ;
1340
1336
let batch_stream = reader
1341
1337
. read ( Box :: pin ( stream:: iter ( vec ! [ Ok ( plan_task. remove( 0 ) ) ] ) ) )
1342
- . await
1343
1338
. unwrap ( ) ;
1344
1339
let batch_2: Vec < _ > = batch_stream. try_collect ( ) . await . unwrap ( ) ;
1345
1340
You can’t perform that action at this time.
0 commit comments