File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed
Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change 1616// under the License.
1717
1818use crate :: {
19- catalog:: PyTable ,
2019 common:: data_type:: PyScalarValue ,
21- dataframe:: PyDataFrame ,
2220 errors:: { py_datafusion_err, PyDataFusionError , PyDataFusionResult } ,
23- table:: PyTableProvider ,
2421 TokioRuntime ,
2522} ;
2623use datafusion:: {
@@ -144,28 +141,6 @@ pub(crate) fn table_provider_from_pycapsule(
144141 }
145142}
146143
147- pub ( crate ) fn extract_table_provider (
148- py_obj : & Bound < PyAny > ,
149- ) -> PyResult < Option < Arc < dyn TableProvider > > > {
150- if let Ok ( py_table) = py_obj. extract :: < PyTable > ( ) {
151- return Ok ( Some ( py_table. table ( ) ) ) ;
152- }
153-
154- if let Ok ( py_provider) = py_obj. extract :: < PyTableProvider > ( ) {
155- return Ok ( Some ( py_provider. into_inner ( ) ) ) ;
156- }
157-
158- if py_obj. extract :: < PyDataFrame > ( ) . is_ok ( ) {
159- return Err ( PyDataFusionError :: Common ( EXPECTED_PROVIDER_MSG . to_string ( ) ) . into ( ) ) ;
160- }
161-
162- if let Some ( provider) = table_provider_from_pycapsule ( py_obj) ? {
163- return Ok ( Some ( provider) ) ;
164- }
165-
166- Ok ( None )
167- }
168-
169144pub ( crate ) fn py_obj_to_scalar_value ( py : Python , obj : PyObject ) -> PyResult < ScalarValue > {
170145 // convert Python object to PyScalarValue to ScalarValue
171146
You can’t perform that action at this time.
0 commit comments