@@ -36,11 +36,8 @@ use datafusion_physical_plan::filter_pushdown::PushedDown;
3636use datafusion_physical_plan:: stream:: RecordBatchStreamAdapter ;
3737use futures:: StreamExt ;
3838use futures:: TryStreamExt ;
39- use futures:: future:: try_join_all;
4039use vortex:: array:: VortexSessionExecute ;
4140use vortex:: array:: arrow:: ArrowArrayExecutor ;
42- use vortex:: dtype:: DType ;
43- use vortex:: dtype:: FieldPath ;
4441use vortex:: dtype:: Nullability ;
4542use vortex:: error:: VortexExpect ;
4643use vortex:: error:: VortexResult ;
@@ -61,7 +58,6 @@ use crate::convert::exprs::DefaultExpressionConvertor;
6158use crate :: convert:: exprs:: ExpressionConvertor ;
6259use crate :: convert:: exprs:: ProcessedProjection ;
6360use crate :: convert:: exprs:: make_vortex_predicate;
64- use crate :: convert:: stats:: stats_set_to_df;
6561
6662/// A builder for a [`VortexDataSource`].
6763pub struct VortexDataSourceBuilder {
@@ -137,35 +133,14 @@ impl VortexDataSourceBuilder {
137133 ) ) ;
138134 }
139135
140- let DType :: Struct ( fields, ..) = projection. return_dtype ( self . data_source . dtype ( ) ) ? else {
141- vortex_bail ! ( "Projection does not evaluate to a struct" ) ;
142- } ;
143-
144- // We now compute initial statistics.
145- let field_paths: Vec < _ > = fields
146- . names ( )
147- . iter ( )
148- . cloned ( )
149- . map ( FieldPath :: from_name)
150- . collect ( ) ;
151- let statistics = try_join_all (
152- field_paths
153- . iter ( )
154- . map ( |path| self . data_source . field_statistics ( path) ) ,
155- )
156- . await ?
157- . iter ( )
158- . zip ( fields. fields ( ) )
159- . map ( |( stats, dtype) | stats_set_to_df ( stats, & dtype) )
160- . collect :: < VortexResult < Vec < _ > > > ( ) ?;
161-
136+ let statistics = Vec :: new ( ) ;
162137 Ok ( VortexDataSource {
163138 data_source : self . data_source ,
164139 session : self . session ,
165140 initial_schema : Arc :: clone ( & arrow_schema) ,
166141 initial_projection : projection. clone ( ) ,
167142 initial_statistics : statistics. clone ( ) ,
168- projected_projection : projection. clone ( ) ,
143+ projected_projection : projection,
169144 projected_schema : Arc :: clone ( & arrow_schema) ,
170145 projected_statistics : statistics. clone ( ) ,
171146 leftover_projection : None ,
0 commit comments