Skip to content

Commit 00e180f

Browse files
kosiewtimsaucer
andauthored
Update src/dataframe.rs
Co-authored-by: Tim Saucer <[email protected]>
1 parent 79c5899 commit 00e180f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/dataframe.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,9 @@ impl PyDataFrame {
764764
let df = self.df.as_ref().clone();
765765
let fut: JoinHandle<datafusion::common::Result<Vec<SendableRecordBatchStream>>> =
766766
rt.spawn(async move { df.execute_stream_partitioned().await });
767-
let stream = wait_for_future(py, async { fut.await.expect("Tokio task panicked") })?
767+
let stream = wait_for_future(py, async { fut.await })?
768+
.map_err(|e| PyRuntimeError::new_err(format!("{e}")))?
769+
.map_err(py_datafusion_err)?;
768770
.map_err(py_datafusion_err)?;
769771

770772
Ok(stream.into_iter().map(PyRecordBatchStream::new).collect())

0 commit comments

Comments
 (0)