Skip to content

Apache DataFusion SQL Query Engine

RecordBatchReceiverStreamBuilder: don't stringify errors (#9155)

Tv10ae9343368a
diff --git a/datafusion/physical-plan/src/stream.rs b/datafusion/physical-plan/src/stream.rs
index e4ef6c4238..b780a50cdc 100644
--- a/datafusion/physical-plan/src/stream.rs
+++ b/datafusion/physical-plan/src/stream.rs
@@ -24,9 +24,9 @@ use std::task::Poll;
use crate::displayable;
use arrow::{datatypes::SchemaRef, record_batch::RecordBatch};
+use datafusion_common::internal_err;
use datafusion_common::DataFusionError;
use datafusion_common::Result;
-use datafusion_common::{exec_err, internal_err};
use datafusion_execution::TaskContext;
use futures::stream::BoxStream;
use futures::{Future, Stream, StreamExt};
@@ -116,9 +116,7 @@ impl<O: Send + 'static> ReceiverStreamBuilder<O> {
// nothing to report
Ok(_) => continue,
// This means a blocking task error
- Err(e) => {
- return Some(exec_err!("Spawned Task error: {e}"));
- }
+ Err(error) => return Some(Err(error)),
}
}
// This means a tokio task error, likely a panic