@@ -79,7 +79,7 @@ pub struct DeletionVectorView<'a> {
79
79
index : usize ,
80
80
}
81
81
82
- impl < ' a > DeletionVectorView < ' a > {
82
+ impl DeletionVectorView < ' _ > {
83
83
/// get a unique idenitfier for the deletion vector
84
84
pub fn unique_id ( & self ) -> String {
85
85
if let Some ( offset) = self . offset ( ) {
@@ -569,32 +569,30 @@ mod datafusion {
569
569
}
570
570
571
571
match array. data_type ( ) {
572
- ArrowDataType :: Struct ( fields) => {
573
- return fields
574
- . iter ( )
575
- . map ( |f| {
576
- self . column_bounds (
577
- path_step,
578
- & format ! ( "{name}.{}" , f. name( ) ) ,
579
- fun_type. clone ( ) ,
580
- )
581
- } )
582
- . map ( |s| match s {
583
- Precision :: Exact ( s) => Some ( s) ,
584
- _ => None ,
585
- } )
586
- . collect :: < Option < Vec < _ > > > ( )
587
- . map ( |o| {
588
- let arrays = o
589
- . into_iter ( )
590
- . map ( |sv| sv. to_array ( ) )
591
- . collect :: < Result < Vec < _ > , datafusion_common:: DataFusionError > > ( )
592
- . unwrap ( ) ;
593
- let sa = StructArray :: new ( fields. clone ( ) , arrays, None ) ;
594
- Precision :: Exact ( ScalarValue :: Struct ( Arc :: new ( sa) ) )
595
- } )
596
- . unwrap_or ( Precision :: Absent ) ;
597
- }
572
+ ArrowDataType :: Struct ( fields) => fields
573
+ . iter ( )
574
+ . map ( |f| {
575
+ self . column_bounds (
576
+ path_step,
577
+ & format ! ( "{name}.{}" , f. name( ) ) ,
578
+ fun_type. clone ( ) ,
579
+ )
580
+ } )
581
+ . map ( |s| match s {
582
+ Precision :: Exact ( s) => Some ( s) ,
583
+ _ => None ,
584
+ } )
585
+ . collect :: < Option < Vec < _ > > > ( )
586
+ . map ( |o| {
587
+ let arrays = o
588
+ . into_iter ( )
589
+ . map ( |sv| sv. to_array ( ) )
590
+ . collect :: < Result < Vec < _ > , datafusion_common:: DataFusionError > > ( )
591
+ . unwrap ( ) ;
592
+ let sa = StructArray :: new ( fields. clone ( ) , arrays, None ) ;
593
+ Precision :: Exact ( ScalarValue :: Struct ( Arc :: new ( sa) ) )
594
+ } )
595
+ . unwrap_or ( Precision :: Absent ) ,
598
596
_ => Precision :: Absent ,
599
597
}
600
598
}
@@ -721,9 +719,9 @@ mod datafusion {
721
719
return None ;
722
720
}
723
721
let expression = if self . metadata . partition_columns . contains ( & column. name ) {
724
- Expression :: Column ( format ! ( "add. partitionValues_parsed.{} " , column. name) )
722
+ Expression :: column ( [ "add" , " partitionValues_parsed", & column. name ] )
725
723
} else {
726
- Expression :: Column ( format ! ( "add. stats_parsed.{}.{} " , stats_field, column. name) )
724
+ Expression :: column ( [ "add" , " stats_parsed", stats_field, & column. name ] )
727
725
} ;
728
726
let evaluator = ARROW_HANDLER . get_evaluator (
729
727
crate :: kernel:: models:: fields:: log_schema_ref ( ) . clone ( ) ,
@@ -735,7 +733,7 @@ mod datafusion {
735
733
let engine = ArrowEngineData :: new ( batch. clone ( ) ) ;
736
734
let result = evaluator. evaluate ( & engine) . ok ( ) ?;
737
735
let result = result
738
- . as_any ( )
736
+ . any_ref ( )
739
737
. downcast_ref :: < ArrowEngineData > ( )
740
738
. ok_or ( DeltaTableError :: generic (
741
739
"failed to downcast evaluator result to ArrowEngineData." ,
@@ -744,11 +742,11 @@ mod datafusion {
744
742
results. push ( result. record_batch ( ) . clone ( ) ) ;
745
743
}
746
744
let batch = concat_batches ( results[ 0 ] . schema_ref ( ) , & results) . ok ( ) ?;
747
- batch. column_by_name ( "output" ) . map ( |c| c . clone ( ) )
745
+ batch. column_by_name ( "output" ) . cloned ( )
748
746
}
749
747
}
750
748
751
- impl < ' a > PruningStatistics for LogDataHandler < ' a > {
749
+ impl PruningStatistics for LogDataHandler < ' _ > {
752
750
/// return the minimum values for the named column, if known.
753
751
/// Note: the returned array must contain `num_containers()` rows
754
752
fn min_values ( & self , column : & Column ) -> Option < ArrayRef > {
@@ -799,7 +797,7 @@ mod datafusion {
799
797
lazy_static:: lazy_static! {
800
798
static ref ROW_COUNTS_EVAL : Arc <dyn ExpressionEvaluator > = ARROW_HANDLER . get_evaluator(
801
799
crate :: kernel:: models:: fields:: log_schema_ref( ) . clone( ) ,
802
- Expression :: column( "add. stats_parsed. numRecords" ) ,
800
+ Expression :: column( [ "add" , " stats_parsed" , " numRecords"] ) ,
803
801
DataType :: Primitive ( PrimitiveType :: Long ) ,
804
802
) ;
805
803
}
@@ -808,7 +806,7 @@ mod datafusion {
808
806
let engine = ArrowEngineData :: new ( batch. clone ( ) ) ;
809
807
let result = ROW_COUNTS_EVAL . evaluate ( & engine) . ok ( ) ?;
810
808
let result = result
811
- . as_any ( )
809
+ . any_ref ( )
812
810
. downcast_ref :: < ArrowEngineData > ( )
813
811
. ok_or ( DeltaTableError :: generic (
814
812
"failed to downcast evaluator result to ArrowEngineData." ,
0 commit comments