@@ -51,8 +51,8 @@ use crate::physical_plan::PyExecutionPlan;
5151use crate :: record_batch:: { poll_next_batch, PyRecordBatchStream } ;
5252use crate :: sql:: logical:: PyLogicalPlan ;
5353use crate :: utils:: {
54- get_tokio_runtime, is_ipython_env, py_obj_to_scalar_value, spawn_stream , spawn_streams ,
55- validate_pycapsule , wait_for_future,
54+ get_tokio_runtime, is_ipython_env, py_obj_to_scalar_value, spawn_future , validate_pycapsule ,
55+ wait_for_future,
5656} ;
5757use crate :: {
5858 errors:: PyDataFusionResult ,
@@ -967,7 +967,7 @@ impl PyDataFrame {
967967 requested_schema : Option < Bound < ' py , PyCapsule > > ,
968968 ) -> PyDataFusionResult < Bound < ' py , PyCapsule > > {
969969 let df = self . df . as_ref ( ) . clone ( ) ;
970- let streams = spawn_streams ( py, async move { df. execute_stream_partitioned ( ) . await } ) ?;
970+ let streams = spawn_future ( py, async move { df. execute_stream_partitioned ( ) . await } ) ?;
971971
972972 let mut schema: Schema = self . df . schema ( ) . to_owned ( ) . into ( ) ;
973973 let mut projection: Option < SchemaRef > = None ;
@@ -1020,13 +1020,13 @@ impl PyDataFrame {
10201020
10211021 fn execute_stream ( & self , py : Python ) -> PyDataFusionResult < PyRecordBatchStream > {
10221022 let df = self . df . as_ref ( ) . clone ( ) ;
1023- let stream = spawn_stream ( py, async move { df. execute_stream ( ) . await } ) ?;
1023+ let stream = spawn_future ( py, async move { df. execute_stream ( ) . await } ) ?;
10241024 Ok ( PyRecordBatchStream :: new ( stream) )
10251025 }
10261026
10271027 fn execute_stream_partitioned ( & self , py : Python ) -> PyResult < Vec < PyRecordBatchStream > > {
10281028 let df = self . df . as_ref ( ) . clone ( ) ;
1029- let streams = spawn_streams ( py, async move { df. execute_stream_partitioned ( ) . await } ) ?;
1029+ let streams = spawn_future ( py, async move { df. execute_stream_partitioned ( ) . await } ) ?;
10301030 Ok ( streams. into_iter ( ) . map ( PyRecordBatchStream :: new) . collect ( ) )
10311031 }
10321032
0 commit comments