File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -405,7 +405,7 @@ impl PyDataFrame {
405405 /// https://github.com/apache/datafusion-python/pull/1016#discussion_r1983239116
406406 /// - we have not decided on the table_provider approach yet
407407 #[ allow( clippy:: wrong_self_convention) ]
408- fn into_view ( & self ) -> PyDataFusionResult < PyTableProvider > {
408+ pub fn into_view ( & self ) -> PyDataFusionResult < PyTableProvider > {
409409 // Call the underlying Rust DataFrame::into_view method.
410410 // Note that the Rust method consumes self; here we clone the inner Arc<DataFrame>
411411 // so that we don’t invalidate this PyDataFrame.
Original file line number Diff line number Diff line change @@ -30,9 +30,10 @@ fn dataframe_into_view_returns_table_provider() {
3030 . unwrap ( ) ;
3131
3232 let rt = tokio:: runtime:: Runtime :: new ( ) . unwrap ( ) ;
33- let batches = rt
34- . block_on ( ctx. sql ( "SELECT * FROM view" ) . unwrap ( ) . collect ( ) )
35- . unwrap ( ) ;
33+ let batches = rt. block_on ( async {
34+ let df = ctx. sql ( "SELECT * FROM view" ) . await . unwrap ( ) ;
35+ df. collect ( ) . await . unwrap ( )
36+ } ) ;
3637
3738 assert_eq ! ( batches. len( ) , 1 ) ;
3839 assert_eq ! ( batches[ 0 ] . num_rows( ) , 3 ) ;
You can’t perform that action at this time.
0 commit comments