diff --git a/datafusion/core/src/dataframe.rs b/datafusion/core/src/dataframe.rs index d7dd04f886ce..d8e93c76029c 100644 --- a/datafusion/core/src/dataframe.rs +++ b/datafusion/core/src/dataframe.rs @@ -457,7 +457,7 @@ impl DataFrame { pub async fn execute_stream(&self) -> Result { let plan = self.create_physical_plan().await?; let task_ctx = Arc::new(TaskContext::from(&self.session_state.read().clone())); - execute_stream(plan, task_ctx).await + execute_stream(plan, task_ctx) } /// Executes this DataFrame and collects all results into a vector of vector of RecordBatch @@ -498,7 +498,7 @@ impl DataFrame { ) -> Result> { let plan = self.create_physical_plan().await?; let task_ctx = Arc::new(TaskContext::from(&self.session_state.read().clone())); - execute_stream_partitioned(plan, task_ctx).await + execute_stream_partitioned(plan, task_ctx) } /// Returns the schema describing the output of this DataFrame in terms of columns returned, diff --git a/datafusion/core/src/physical_plan/mod.rs b/datafusion/core/src/physical_plan/mod.rs index 2b4cd63c60b6..03e22272b21d 100644 --- a/datafusion/core/src/physical_plan/mod.rs +++ b/datafusion/core/src/physical_plan/mod.rs @@ -406,12 +406,12 @@ pub async fn collect( plan: Arc, context: Arc, ) -> Result> { - let stream = execute_stream(plan, context).await?; + let stream = execute_stream(plan, context)?; common::collect(stream).await } /// Execute the [ExecutionPlan] and return a single stream of results -pub async fn execute_stream( +pub fn execute_stream( plan: Arc, context: Arc, ) -> Result { @@ -433,7 +433,7 @@ pub async fn collect_partitioned( plan: Arc, context: Arc, ) -> Result>> { - let streams = execute_stream_partitioned(plan, context).await?; + let streams = execute_stream_partitioned(plan, context)?; let mut batches = Vec::with_capacity(streams.len()); for stream in streams { batches.push(common::collect(stream).await?); @@ -442,7 +442,7 @@ pub async fn collect_partitioned( } /// Execute the [ExecutionPlan] and return a vec with one stream per output partition -pub async fn execute_stream_partitioned( +pub fn execute_stream_partitioned( plan: Arc, context: Arc, ) -> Result> {