@@ -41,6 +41,7 @@ pub const DEFAULT_DATA_PAGE_ROW_COUNT_LIMIT: usize = 20_000;
41
41
/// Default value for [`WriterProperties::statistics_enabled`]
42
42
pub const DEFAULT_STATISTICS_ENABLED : EnabledStatistics = EnabledStatistics :: Page ;
43
43
/// Default value for [`WriterProperties::max_statistics_size`]
44
+ #[ deprecated( since = "54.0.0" , note = "Unused; will be removed in 56.0.0" ) ]
44
45
pub const DEFAULT_MAX_STATISTICS_SIZE : usize = 4096 ;
45
46
/// Default value for [`WriterProperties::max_row_group_size`]
46
47
pub const DEFAULT_MAX_ROW_GROUP_SIZE : usize = 1024 * 1024 ;
@@ -350,7 +351,9 @@ impl WriterProperties {
350
351
351
352
/// Returns max size for statistics.
352
353
/// Only applicable if statistics are enabled.
354
+ #[ deprecated( since = "54.0.0" , note = "Unused; will be removed in 56.0.0" ) ]
353
355
pub fn max_statistics_size ( & self , col : & ColumnPath ) -> usize {
356
+ #[ allow( deprecated) ]
354
357
self . column_properties
355
358
. get ( col)
356
359
. and_then ( |c| c. max_statistics_size ( ) )
@@ -601,7 +604,9 @@ impl WriterPropertiesBuilder {
601
604
/// Sets default max statistics size for all columns (defaults to `4096`).
602
605
///
603
606
/// Applicable only if statistics are enabled.
607
+ #[ deprecated( since = "54.0.0" , note = "Unused; will be removed in 56.0.0" ) ]
604
608
pub fn set_max_statistics_size ( mut self , value : usize ) -> Self {
609
+ #[ allow( deprecated) ]
605
610
self . default_column_properties
606
611
. set_max_statistics_size ( value) ;
607
612
self
@@ -706,7 +711,9 @@ impl WriterPropertiesBuilder {
706
711
/// Sets max size for statistics for a specific column.
707
712
///
708
713
/// Takes precedence over [`Self::set_max_statistics_size`].
714
+ #[ deprecated( since = "54.0.0" , note = "Unused; will be removed in 56.0.0" ) ]
709
715
pub fn set_column_max_statistics_size ( mut self , col : ColumnPath , value : usize ) -> Self {
716
+ #[ allow( deprecated) ]
710
717
self . get_mut_props ( col) . set_max_statistics_size ( value) ;
711
718
self
712
719
}
@@ -896,6 +903,7 @@ struct ColumnProperties {
896
903
codec : Option < Compression > ,
897
904
dictionary_enabled : Option < bool > ,
898
905
statistics_enabled : Option < EnabledStatistics > ,
906
+ #[ deprecated( since = "54.0.0" , note = "Unused; will be removed in 56.0.0" ) ]
899
907
max_statistics_size : Option < usize > ,
900
908
/// bloom filter related properties
901
909
bloom_filter_properties : Option < BloomFilterProperties > ,
@@ -934,6 +942,8 @@ impl ColumnProperties {
934
942
}
935
943
936
944
/// Sets max size for statistics for this column.
945
+ #[ deprecated( since = "54.0.0" , note = "Unused; will be removed in 56.0.0" ) ]
946
+ #[ allow( deprecated) ]
937
947
fn set_max_statistics_size ( & mut self , value : usize ) {
938
948
self . max_statistics_size = Some ( value) ;
939
949
}
@@ -998,7 +1008,9 @@ impl ColumnProperties {
998
1008
}
999
1009
1000
1010
/// Returns optional max size in bytes for statistics.
1011
+ #[ deprecated( since = "54.0.0" , note = "Unused; will be removed in 56.0.0" ) ]
1001
1012
fn max_statistics_size ( & self ) -> Option < usize > {
1013
+ #[ allow( deprecated) ]
1002
1014
self . max_statistics_size
1003
1015
}
1004
1016
@@ -1142,10 +1154,6 @@ mod tests {
1142
1154
props. statistics_enabled( & ColumnPath :: from( "col" ) ) ,
1143
1155
DEFAULT_STATISTICS_ENABLED
1144
1156
) ;
1145
- assert_eq ! (
1146
- props. max_statistics_size( & ColumnPath :: from( "col" ) ) ,
1147
- DEFAULT_MAX_STATISTICS_SIZE
1148
- ) ;
1149
1157
assert ! ( props
1150
1158
. bloom_filter_properties( & ColumnPath :: from( "col" ) )
1151
1159
. is_none( ) ) ;
@@ -1222,13 +1230,11 @@ mod tests {
1222
1230
. set_compression ( Compression :: GZIP ( Default :: default ( ) ) )
1223
1231
. set_dictionary_enabled ( false )
1224
1232
. set_statistics_enabled ( EnabledStatistics :: None )
1225
- . set_max_statistics_size ( 50 )
1226
1233
// specific column settings
1227
1234
. set_column_encoding ( ColumnPath :: from ( "col" ) , Encoding :: RLE )
1228
1235
. set_column_compression ( ColumnPath :: from ( "col" ) , Compression :: SNAPPY )
1229
1236
. set_column_dictionary_enabled ( ColumnPath :: from ( "col" ) , true )
1230
1237
. set_column_statistics_enabled ( ColumnPath :: from ( "col" ) , EnabledStatistics :: Chunk )
1231
- . set_column_max_statistics_size ( ColumnPath :: from ( "col" ) , 123 )
1232
1238
. set_column_bloom_filter_enabled ( ColumnPath :: from ( "col" ) , true )
1233
1239
. set_column_bloom_filter_ndv ( ColumnPath :: from ( "col" ) , 100_u64 )
1234
1240
. set_column_bloom_filter_fpp ( ColumnPath :: from ( "col" ) , 0.1 )
@@ -1260,7 +1266,6 @@ mod tests {
1260
1266
props. statistics_enabled( & ColumnPath :: from( "a" ) ) ,
1261
1267
EnabledStatistics :: None
1262
1268
) ;
1263
- assert_eq ! ( props. max_statistics_size( & ColumnPath :: from( "a" ) ) , 50 ) ;
1264
1269
1265
1270
assert_eq ! (
1266
1271
props. encoding( & ColumnPath :: from( "col" ) ) ,
@@ -1275,7 +1280,6 @@ mod tests {
1275
1280
props. statistics_enabled( & ColumnPath :: from( "col" ) ) ,
1276
1281
EnabledStatistics :: Chunk
1277
1282
) ;
1278
- assert_eq ! ( props. max_statistics_size( & ColumnPath :: from( "col" ) ) , 123 ) ;
1279
1283
assert_eq ! (
1280
1284
props. bloom_filter_properties( & ColumnPath :: from( "col" ) ) ,
1281
1285
Some ( & BloomFilterProperties { fpp: 0.1 , ndv: 100 } )
0 commit comments