@@ -966,9 +966,6 @@ fn summarize_distinct_counts(
966966 }
967967
968968 Ok ( match max_distinct_count {
969- Some ( distinct_count) if num_row_groups == 1 => {
970- Precision :: Exact ( distinct_count as usize )
971- }
972969 Some ( distinct_count) => Precision :: Inexact ( distinct_count as usize ) ,
973970 None => Precision :: Absent ,
974971 } )
@@ -1533,7 +1530,7 @@ mod tests {
15331530
15341531 #[ test]
15351532 fn test_distinct_count_single_row_group_with_ndv ( ) {
1536- // Single row group with distinct count should return Exact
1533+ // Single row group with distinct count should return Inexact
15371534 let schema_descr = create_schema_descr ( 1 ) ;
15381535 let arrow_schema = create_arrow_schema ( 1 ) ;
15391536
@@ -1558,7 +1555,7 @@ mod tests {
15581555
15591556 assert_eq ! (
15601557 result. column_statistics[ 0 ] . distinct_count,
1561- Precision :: Exact ( 42 )
1558+ Precision :: Inexact ( 42 )
15621559 ) ;
15631560 }
15641561
@@ -1745,15 +1742,15 @@ mod tests {
17451742
17461743 assert_eq ! (
17471744 result. column_statistics[ 0 ] . distinct_count,
1748- Precision :: Exact ( 5 )
1745+ Precision :: Inexact ( 5 )
17491746 ) ;
17501747 assert_eq ! (
17511748 result. column_statistics[ 1 ] . distinct_count,
17521749 Precision :: Absent
17531750 ) ;
17541751 assert_eq ! (
17551752 result. column_statistics[ 2 ] . distinct_count,
1756- Precision :: Exact ( 100 )
1753+ Precision :: Inexact ( 100 )
17571754 ) ;
17581755 }
17591756
@@ -1922,15 +1919,15 @@ mod tests {
19221919 // category: 10 distinct values
19231920 assert_eq ! (
19241921 result. column_statistics[ 1 ] . distinct_count,
1925- Precision :: Exact ( 10 ) ,
1926- "category column should have Exact (10) distinct_count"
1922+ Precision :: Inexact ( 10 ) ,
1923+ "category column should have Inexact (10) distinct_count"
19271924 ) ;
19281925
19291926 // name: 5 distinct values
19301927 assert_eq ! (
19311928 result. column_statistics[ 2 ] . distinct_count,
1932- Precision :: Exact ( 5 ) ,
1933- "name column should have Exact (5) distinct_count"
1929+ Precision :: Inexact ( 5 ) ,
1930+ "name column should have Inexact (5) distinct_count"
19341931 ) ;
19351932 }
19361933 }
0 commit comments