1717
1818use arrow:: array:: { StringBuilder , TimestampNanosecondBuilder , UInt64Builder } ;
1919use arrow:: record_batch:: RecordBatch ;
20- use arrow_schema:: { DataType , Field , Schema , SchemaRef , TimeUnit } ;
20+ use arrow_schema:: { DataType , Field , TimeUnit } ;
2121use async_trait:: async_trait;
22+ use datafusion:: arrow:: datatypes:: { Schema , SchemaRef } ;
2223use datafusion:: catalog:: SchemaProvider ;
2324use datafusion:: catalog:: { CatalogProvider , Session } ;
2425use datafusion:: datasource:: listing:: ListingTableUrl ;
@@ -35,7 +36,7 @@ use datafusion::physical_plan::{
3536use datafusion:: {
3637 catalog:: CatalogProviderList , execution:: TaskContext , physical_plan:: SendableRecordBatchStream ,
3738} ;
38- use datafusion_common:: { DataFusionError , Result , ScalarValue , ToDFSchema } ;
39+ use datafusion_common:: { DFSchema , DataFusionError , Result , ScalarValue } ;
3940use datafusion_expr:: { Expr , Operator , TableProviderFilterPushDown , TableType } ;
4041use datafusion_physical_plan:: execution_plan:: { Boundedness , EmissionType } ;
4142use futures:: stream:: { self , BoxStream } ;
@@ -103,7 +104,7 @@ impl TableProvider for FileMetadata {
103104 filters : & [ Expr ] ,
104105 limit : Option < usize > ,
105106 ) -> Result < Arc < dyn ExecutionPlan > > {
106- let dfschema = self . table_schema . clone ( ) . to_dfschema ( ) ?;
107+ let dfschema = DFSchema :: try_from ( self . table_schema . as_ref ( ) . clone ( ) ) ?;
107108
108109 let filters = filters
109110 . iter ( )
0 commit comments