@@ -611,12 +611,12 @@ mod tests {
611611 assert_eq ! ( lookup_res. len( ) , 3 ) ;
612612
613613 let stat_res = backend_manager
614- . get_stats_for_table ( 1 , StatType :: Count as i32 , Some ( epoch_id) )
614+ . get_stats_for_table ( 1 , StatType :: TableRowCount as i32 , Some ( epoch_id) )
615615 . await ;
616616 assert ! ( stat_res. is_ok( ) ) ;
617617 assert_eq ! ( stat_res. unwrap( ) . unwrap( ) , json!( 300 ) ) ;
618618 let stat_res = backend_manager
619- . get_stats_for_attr ( [ 2 ] . to_vec ( ) , StatType :: Count as i32 , None )
619+ . get_stats_for_attr ( [ 2 ] . to_vec ( ) , StatType :: NotNullCount as i32 , None )
620620 . await ;
621621 assert ! ( stat_res. is_ok( ) ) ;
622622 assert_eq ! ( stat_res. unwrap( ) . unwrap( ) , json!( 200 ) ) ;
@@ -636,7 +636,7 @@ mod tests {
636636 . await
637637 . unwrap ( ) ;
638638 let stat = Stat {
639- stat_type : StatType :: Count as i32 ,
639+ stat_type : StatType :: NotNullCount as i32 ,
640640 stat_value : json ! ( 100 ) ,
641641 attr_ids : vec ! [ 1 ] ,
642642 table_id : None ,
@@ -655,7 +655,7 @@ mod tests {
655655 println ! ( "{:?}" , stat_res) ;
656656 assert_eq ! ( stat_res[ 0 ] . number_of_attributes, 1 ) ;
657657 assert_eq ! ( stat_res[ 0 ] . description, "1" . to_string( ) ) ;
658- assert_eq ! ( stat_res[ 0 ] . variant_tag, StatType :: Count as i32 ) ;
658+ assert_eq ! ( stat_res[ 0 ] . variant_tag, StatType :: NotNullCount as i32 ) ;
659659 let stat_attr_res = StatisticToAttributeJunction :: find ( )
660660 . filter ( statistic_to_attribute_junction:: Column :: StatisticId . eq ( stat_res[ 0 ] . id ) )
661661 . all ( & backend_manager. db )
@@ -708,7 +708,7 @@ mod tests {
708708 . await
709709 . unwrap ( ) ;
710710 let stat2 = Stat {
711- stat_type : StatType :: Count as i32 ,
711+ stat_type : StatType :: NotNullCount as i32 ,
712712 stat_value : json ! ( 200 ) ,
713713 attr_ids : vec ! [ 1 ] ,
714714 table_id : None ,
@@ -762,7 +762,7 @@ mod tests {
762762 // 3. Update existed stat with the same value
763763 let epoch_num = Event :: find ( ) . all ( & backend_manager. db ) . await . unwrap ( ) . len ( ) ;
764764 let stat3 = Stat {
765- stat_type : StatType :: Count as i32 ,
765+ stat_type : StatType :: NotNullCount as i32 ,
766766 stat_value : json ! ( 200 ) ,
767767 attr_ids : vec ! [ 1 ] ,
768768 table_id : None ,
@@ -803,21 +803,21 @@ mod tests {
803803
804804 let statistics: Vec < Stat > = vec ! [
805805 Stat {
806- stat_type: StatType :: Count as i32 ,
806+ stat_type: StatType :: TableRowCount as i32 ,
807807 stat_value: json!( 0 ) ,
808808 attr_ids: vec![ ] ,
809809 table_id: Some ( 1 ) ,
810810 name: "row_count" . to_string( ) ,
811811 } ,
812812 Stat {
813- stat_type: StatType :: Count as i32 ,
813+ stat_type: StatType :: TableRowCount as i32 ,
814814 stat_value: json!( 20 ) ,
815815 attr_ids: vec![ ] ,
816816 table_id: Some ( 1 ) ,
817817 name: "row_count" . to_string( ) ,
818818 } ,
819819 Stat {
820- stat_type: StatType :: Count as i32 ,
820+ stat_type: StatType :: TableRowCount as i32 ,
821821 stat_value: json!( 100 ) ,
822822 attr_ids: vec![ ] ,
823823 table_id: Some ( table_inserted_res. last_insert_id) ,
@@ -981,7 +981,7 @@ mod tests {
981981 let backend_manager = binding. as_mut ( ) . unwrap ( ) ;
982982 let epoch_id = 1 ;
983983 let table_id = 1 ;
984- let stat_type = StatType :: Count as i32 ;
984+ let stat_type = StatType :: TableRowCount as i32 ;
985985
986986 // Get initial stats
987987 let res = backend_manager
@@ -998,7 +998,7 @@ mod tests {
998998 . await
999999 . unwrap ( ) ;
10001000 let stat = Stat {
1001- stat_type : StatType :: Count as i32 ,
1001+ stat_type : StatType :: TableRowCount as i32 ,
10021002 stat_value : json ! ( 100 ) ,
10031003 attr_ids : vec ! [ ] ,
10041004 table_id : Some ( table_id) ,
0 commit comments