@@ -599,12 +599,12 @@ mod tests {
599599 assert_eq ! ( lookup_res. len( ) , 3 ) ;
600600
601601 let stat_res = backend_manager
602- . get_stats_for_table ( 1 , StatType :: Count as i32 , Some ( epoch_id) )
602+ . get_stats_for_table ( 1 , StatType :: TableRowCount as i32 , Some ( epoch_id) )
603603 . await ;
604604 assert ! ( stat_res. is_ok( ) ) ;
605605 assert_eq ! ( stat_res. unwrap( ) . unwrap( ) , json!( 300 ) ) ;
606606 let stat_res = backend_manager
607- . get_stats_for_attr ( [ 2 ] . to_vec ( ) , StatType :: Count as i32 , None )
607+ . get_stats_for_attr ( [ 2 ] . to_vec ( ) , StatType :: NotNullCount as i32 , None )
608608 . await ;
609609 assert ! ( stat_res. is_ok( ) ) ;
610610 assert_eq ! ( stat_res. unwrap( ) . unwrap( ) , json!( 200 ) ) ;
@@ -624,7 +624,7 @@ mod tests {
624624 . await
625625 . unwrap ( ) ;
626626 let stat = Stat {
627- stat_type : StatType :: Count as i32 ,
627+ stat_type : StatType :: NotNullCount as i32 ,
628628 stat_value : json ! ( 100 ) ,
629629 attr_ids : vec ! [ 1 ] ,
630630 table_id : None ,
@@ -643,7 +643,7 @@ mod tests {
643643 println ! ( "{:?}" , stat_res) ;
644644 assert_eq ! ( stat_res[ 0 ] . number_of_attributes, 1 ) ;
645645 assert_eq ! ( stat_res[ 0 ] . description, "1" . to_string( ) ) ;
646- assert_eq ! ( stat_res[ 0 ] . variant_tag, StatType :: Count as i32 ) ;
646+ assert_eq ! ( stat_res[ 0 ] . variant_tag, StatType :: NotNullCount as i32 ) ;
647647 let stat_attr_res = StatisticToAttributeJunction :: find ( )
648648 . filter ( statistic_to_attribute_junction:: Column :: StatisticId . eq ( stat_res[ 0 ] . id ) )
649649 . all ( & backend_manager. db )
@@ -696,7 +696,7 @@ mod tests {
696696 . await
697697 . unwrap ( ) ;
698698 let stat2 = Stat {
699- stat_type : StatType :: Count as i32 ,
699+ stat_type : StatType :: NotNullCount as i32 ,
700700 stat_value : json ! ( 200 ) ,
701701 attr_ids : vec ! [ 1 ] ,
702702 table_id : None ,
@@ -750,7 +750,7 @@ mod tests {
750750 // 3. Update existed stat with the same value
751751 let epoch_num = Event :: find ( ) . all ( & backend_manager. db ) . await . unwrap ( ) . len ( ) ;
752752 let stat3 = Stat {
753- stat_type : StatType :: Count as i32 ,
753+ stat_type : StatType :: NotNullCount as i32 ,
754754 stat_value : json ! ( 200 ) ,
755755 attr_ids : vec ! [ 1 ] ,
756756 table_id : None ,
@@ -791,21 +791,21 @@ mod tests {
791791
792792 let statistics: Vec < Stat > = vec ! [
793793 Stat {
794- stat_type: StatType :: Count as i32 ,
794+ stat_type: StatType :: TableRowCount as i32 ,
795795 stat_value: json!( 0 ) ,
796796 attr_ids: vec![ ] ,
797797 table_id: Some ( 1 ) ,
798798 name: "row_count" . to_string( ) ,
799799 } ,
800800 Stat {
801- stat_type: StatType :: Count as i32 ,
801+ stat_type: StatType :: TableRowCount as i32 ,
802802 stat_value: json!( 20 ) ,
803803 attr_ids: vec![ ] ,
804804 table_id: Some ( 1 ) ,
805805 name: "row_count" . to_string( ) ,
806806 } ,
807807 Stat {
808- stat_type: StatType :: Count as i32 ,
808+ stat_type: StatType :: TableRowCount as i32 ,
809809 stat_value: json!( 100 ) ,
810810 attr_ids: vec![ ] ,
811811 table_id: Some ( table_inserted_res. last_insert_id) ,
@@ -969,7 +969,7 @@ mod tests {
969969 let backend_manager = binding. as_mut ( ) . unwrap ( ) ;
970970 let epoch_id = 1 ;
971971 let table_id = 1 ;
972- let stat_type = StatType :: Count as i32 ;
972+ let stat_type = StatType :: TableRowCount as i32 ;
973973
974974 // Get initial stats
975975 let res = backend_manager
@@ -986,7 +986,7 @@ mod tests {
986986 . await
987987 . unwrap ( ) ;
988988 let stat = Stat {
989- stat_type : StatType :: Count as i32 ,
989+ stat_type : StatType :: TableRowCount as i32 ,
990990 stat_value : json ! ( 100 ) ,
991991 attr_ids : vec ! [ ] ,
992992 table_id : Some ( table_id) ,
0 commit comments