@@ -38,7 +38,6 @@ use crate::dataset::Dataset;
3838use crate :: errors:: { py_datafusion_err, DataFusionError } ;
3939use crate :: expr:: sort_expr:: PySortExpr ;
4040use crate :: expr:: PyExpr ;
41- use crate :: ffi:: table_provider:: FFI_TableProvider ;
4241use crate :: physical_plan:: PyExecutionPlan ;
4342use crate :: record_batch:: PyRecordBatchStream ;
4443use crate :: sql:: logical:: PyLogicalPlan ;
@@ -70,6 +69,7 @@ use datafusion::physical_plan::SendableRecordBatchStream;
7069use datafusion:: prelude:: {
7170 AvroReadOptions , CsvReadOptions , DataFrame , NdJsonReadOptions , ParquetReadOptions ,
7271} ;
72+ use datafusion_ffi:: table_provider:: { FFI_TableProvider , ForeignTableProvider } ;
7373use pyo3:: types:: { PyCapsule , PyDict , PyList , PyTuple } ;
7474use tokio:: task:: JoinHandle ;
7575
@@ -582,9 +582,7 @@ impl PySessionContext {
582582 // validate_pycapsule(capsule, "arrow_array_stream")?;
583583
584584 let provider = unsafe { FFI_TableProvider :: from_raw ( capsule. pointer ( ) as _ ) } ;
585-
586- println ! ( "Found provider version {}" , provider. version) ;
587-
585+ let provider = ForeignTableProvider :: new ( provider) ;
588586 let schema = provider. schema ( ) ;
589587 println ! ( "Got schema through TableProvider trait." ) ;
590588
0 commit comments