Skip to content

Commit 0374b7f

Browse files
committed
layout
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent a748b68 commit 0374b7f

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

vortex-layout/src/scan/arrow.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use vortex_array::VortexSessionExecute;
1818
use vortex_array::arrow::ArrowArrayExecutor;
1919
use vortex_error::VortexResult;
2020
use vortex_io::runtime::BlockingRuntime;
21-
use vortex_io::session::RuntimeSessionExt;
2221

2322
use 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)

0 commit comments

Comments
 (0)