File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ use vortex_array::VortexSessionExecute;
1818use vortex_array:: arrow:: ArrowArrayExecutor ;
1919use vortex_error:: VortexResult ;
2020use vortex_io:: runtime:: BlockingRuntime ;
21- use vortex_io:: session:: RuntimeSessionExt ;
2221
2322use crate :: scan:: scan_builder:: ScanBuilder ;
2423
@@ -53,22 +52,13 @@ impl ScanBuilder {
5352 ) -> VortexResult < impl Stream < Item = Result < RecordBatch , ArrowError > > + Send + ' static > {
5453 let data_type = DataType :: Struct ( schema. fields ( ) . clone ( ) ) ;
5554 let session = self . session ( ) . clone ( ) ;
56- let handle = session. handle ( ) ;
57- let concurrency = std:: thread:: available_parallelism ( )
58- . map ( |n| n. get ( ) )
59- . unwrap_or ( 1 ) ;
6055
6156 let stream = self
6257 . into_stream ( ) ?
6358 . map ( move |chunk| {
64- let session = session. clone ( ) ;
65- let data_type = data_type. clone ( ) ;
66- handle. spawn_blocking ( move || {
67- let mut ctx = session. create_execution_ctx ( ) ;
68- chunk. and_then ( |chunk| to_record_batch ( chunk, & data_type, & mut ctx) )
69- } )
59+ let mut ctx = session. create_execution_ctx ( ) ;
60+ chunk. and_then ( |chunk| to_record_batch ( chunk, & data_type, & mut ctx) )
7061 } )
71- . buffered ( concurrency)
7262 . map_err ( |e| ArrowError :: ExternalError ( Box :: new ( e) ) ) ;
7363
7464 Ok ( stream)
You can’t perform that action at this time.
0 commit comments