You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2024/02/08 13:21:50 UTC

(arrow-datafusion) branch main updated: RecordBatchReceiverStreamBuilder: don't stringify errors (#9155)

This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 10ae934336 RecordBatchReceiverStreamBuilder: don't stringify errors (#9155)
10ae934336 is described below

commit 10ae9343368a893012aa80b66c02d45b4f461f9f
Author: Tv <tv...@eagain.net>
AuthorDate: Thu Feb 8 13:21:44 2024 +0000

    RecordBatchReceiverStreamBuilder: don't stringify errors (#9155)
    
    The error is a DataFusionError already, so don't stringify it, just
    use it as-is.
---
 datafusion/physical-plan/src/stream.rs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

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