Skip to content

Commit 79c5899

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dataframe.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,8 @@ impl PyDataFrame {
753753
let df = self.df.as_ref().clone();
754754
let fut: JoinHandle<datafusion::common::Result<SendableRecordBatchStream>> =
755755
rt.spawn(async move { df.execute_stream().await });
756-
let stream = wait_for_future(py, async { fut.await.expect("Tokio task panicked") })??;
756+
let stream = wait_for_future(py, async { fut.await })?
757+
.map_err(|e| PyRuntimeError::new_err(format!("{e}")))??;
757758
Ok(PyRecordBatchStream::new(stream))
758759
}
759760

0 commit comments

Comments
 (0)