@@ -31,7 +31,7 @@ use datafusion::physical_plan::execution_plan::{Boundedness, EmissionType};
3131use datafusion:: physical_plan:: stream:: RecordBatchStreamAdapter ;
3232use datafusion:: physical_plan:: {
3333 DisplayAs , DisplayFormatType , ExecutionPlan , ExecutionPlanProperties , Partitioning ,
34- SendableRecordBatchStream , Statistics ,
34+ SendableRecordBatchStream ,
3535} ;
3636use futures:: { TryStreamExt , stream} ;
3737/// Implements a Datafusion physical ExecutionPlan that delegates to a PyArrow Dataset
@@ -70,7 +70,6 @@ pub(crate) struct DatasetExec {
7070 fragments : Py < PyList > ,
7171 columns : Option < Vec < String > > ,
7272 filter_expr : Option < Py < PyAny > > ,
73- projected_statistics : Statistics ,
7473 plan_properties : datafusion:: physical_plan:: PlanProperties ,
7574}
7675
@@ -111,7 +110,7 @@ impl DatasetExec {
111110
112111 let scanner = dataset. call_method ( "scanner" , ( ) , Some ( & kwargs) ) ?;
113112
114- let schema = Arc :: new (
113+ let schema: SchemaRef = Arc :: new (
115114 scanner
116115 . getattr ( "projected_schema" ) ?
117116 . extract :: < PyArrowType < _ > > ( ) ?
@@ -130,7 +129,6 @@ impl DatasetExec {
130129 let fragments_iter = pylist. call1 ( ( fragments_iterator, ) ) ?;
131130 let fragments = fragments_iter. downcast :: < PyList > ( ) . map_err ( PyErr :: from) ?;
132131
133- let projected_statistics = Statistics :: new_unknown ( & schema) ;
134132 let plan_properties = datafusion:: physical_plan:: PlanProperties :: new (
135133 EquivalenceProperties :: new ( schema. clone ( ) ) ,
136134 Partitioning :: UnknownPartitioning ( fragments. len ( ) ) ,
@@ -144,7 +142,6 @@ impl DatasetExec {
144142 fragments : fragments. clone ( ) . unbind ( ) ,
145143 columns,
146144 filter_expr,
147- projected_statistics,
148145 plan_properties,
149146 } )
150147 }
@@ -235,10 +232,6 @@ impl ExecutionPlan for DatasetExec {
235232 } )
236233 }
237234
238- fn statistics ( & self ) -> DFResult < Statistics > {
239- Ok ( self . projected_statistics . clone ( ) )
240- }
241-
242235 fn properties ( & self ) -> & datafusion:: physical_plan:: PlanProperties {
243236 & self . plan_properties
244237 }
0 commit comments