File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -982,7 +982,7 @@ impl PySessionContext {
982982 ) -> PyResult < PyRecordBatchStream > {
983983 let ctx: TaskContext = TaskContext :: from ( & self . ctx . state ( ) ) ;
984984 // create a Tokio runtime to run the async code
985- let rt = & get_tokio_runtime ( py ) . 0 ;
985+ let rt = & get_tokio_runtime ( ) . 0 ;
986986 let plan = plan. plan . clone ( ) ;
987987 let fut: JoinHandle < datafusion:: common:: Result < SendableRecordBatchStream > > =
988988 rt. spawn ( async move { plan. execute ( part, Arc :: new ( ctx) ) } ) ;
Original file line number Diff line number Diff line change @@ -543,7 +543,7 @@ impl PyDataFrame {
543543
544544 fn execute_stream ( & self , py : Python ) -> PyResult < PyRecordBatchStream > {
545545 // create a Tokio runtime to run the async code
546- let rt = & get_tokio_runtime ( py ) . 0 ;
546+ let rt = & get_tokio_runtime ( ) . 0 ;
547547 let df = self . df . as_ref ( ) . clone ( ) ;
548548 let fut: JoinHandle < datafusion:: common:: Result < SendableRecordBatchStream > > =
549549 rt. spawn ( async move { df. execute_stream ( ) . await } ) ;
@@ -553,7 +553,7 @@ impl PyDataFrame {
553553
554554 fn execute_stream_partitioned ( & self , py : Python ) -> PyResult < Vec < PyRecordBatchStream > > {
555555 // create a Tokio runtime to run the async code
556- let rt = & get_tokio_runtime ( py ) . 0 ;
556+ let rt = & get_tokio_runtime ( ) . 0 ;
557557 let df = self . df . as_ref ( ) . clone ( ) ;
558558 let fut: JoinHandle < datafusion:: common:: Result < Vec < SendableRecordBatchStream > > > =
559559 rt. spawn ( async move { df. execute_stream_partitioned ( ) . await } ) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ use std::sync::{Arc, OnceLock};
2424use tokio:: runtime:: Runtime ;
2525
2626/// Utility to get the Tokio Runtime from Python
27- pub ( crate ) fn get_tokio_runtime ( _ : Python ) -> Arc < TokioRuntime > {
27+ pub ( crate ) fn get_tokio_runtime ( ) -> Arc < TokioRuntime > {
2828 static RUNTIME : OnceLock < Arc < TokioRuntime > > = OnceLock :: new ( ) ;
2929 RUNTIME
3030 . get_or_init ( || {
4040 F : Future + Send ,
4141 F :: Output : Send ,
4242{
43- let runtime: & Runtime = & get_tokio_runtime ( py ) . 0 ;
43+ let runtime: & Runtime = & get_tokio_runtime ( ) . 0 ;
4444 py. allow_threads ( || runtime. block_on ( f) )
4545}
4646
You can’t perform that action at this time.
0 commit comments