@@ -26,6 +26,7 @@ use crate::{
2626} ;
2727
2828use arrow_schema:: Schema ;
29+ #[ allow( deprecated) ]
2930use parquet:: {
3031 arrow:: ARROW_SCHEMA_META_KEY ,
3132 basic:: { BrotliLevel , GzipLevel , ZstdLevel } ,
@@ -157,8 +158,10 @@ impl TryFrom<&TableParquetOptions> for WriterPropertiesBuilder {
157158 }
158159
159160 if let Some ( max_statistics_size) = options. max_statistics_size {
160- builder =
161- builder. set_column_max_statistics_size ( path, max_statistics_size) ;
161+ builder = {
162+ #[ allow( deprecated) ]
163+ builder. set_column_max_statistics_size ( path, max_statistics_size)
164+ }
162165 }
163166 }
164167
@@ -244,15 +247,19 @@ impl ParquetOptions {
244247 . and_then ( |s| parse_statistics_string ( s) . ok ( ) )
245248 . unwrap_or ( DEFAULT_STATISTICS_ENABLED ) ,
246249 )
247- . set_max_statistics_size (
248- max_statistics_size. unwrap_or ( DEFAULT_MAX_STATISTICS_SIZE ) ,
249- )
250250 . set_max_row_group_size ( * max_row_group_size)
251251 . set_created_by ( created_by. clone ( ) )
252252 . set_column_index_truncate_length ( * column_index_truncate_length)
253253 . set_data_page_row_count_limit ( * data_page_row_count_limit)
254254 . set_bloom_filter_enabled ( * bloom_filter_on_write) ;
255255
256+ builder = {
257+ #[ allow( deprecated) ]
258+ builder. set_max_statistics_size (
259+ max_statistics_size. unwrap_or ( DEFAULT_MAX_STATISTICS_SIZE ) ,
260+ )
261+ } ;
262+
256263 if let Some ( bloom_filter_fpp) = bloom_filter_fpp {
257264 builder = builder. set_bloom_filter_fpp ( * bloom_filter_fpp) ;
258265 } ;
@@ -528,6 +535,7 @@ mod tests {
528535 ) ,
529536 bloom_filter_fpp : bloom_filter_default_props. map ( |p| p. fpp ) ,
530537 bloom_filter_ndv : bloom_filter_default_props. map ( |p| p. ndv ) ,
538+ #[ allow( deprecated) ]
531539 max_statistics_size : Some ( props. max_statistics_size ( & col) ) ,
532540 }
533541 }
0 commit comments