@@ -25,6 +25,8 @@ use crate::{
2525 DataFusionError , Result , _internal_datafusion_err,
2626} ;
2727
28+ pub const DEFAULT_MAX_STATISTICS_SIZE : usize = 4096 ;
29+
2830use arrow:: datatypes:: Schema ;
2931// TODO: handle once deprecated
3032#[ allow( deprecated) ]
@@ -35,7 +37,7 @@ use parquet::{
3537 metadata:: KeyValue ,
3638 properties:: {
3739 EnabledStatistics , WriterProperties , WriterPropertiesBuilder , WriterVersion ,
38- DEFAULT_MAX_STATISTICS_SIZE , DEFAULT_STATISTICS_ENABLED ,
40+ DEFAULT_STATISTICS_ENABLED ,
3941 } ,
4042 } ,
4143 schema:: types:: ColumnPath ,
@@ -167,13 +169,13 @@ impl TryFrom<&TableParquetOptions> for WriterPropertiesBuilder {
167169
168170 // max_statistics_size is deprecated, currently it is not being used
169171 // TODO: remove once deprecated
170- #[ allow( deprecated) ]
171- if let Some ( max_statistics_size) = options. max_statistics_size {
172- builder = {
173- #[ allow( deprecated) ]
174- builder. set_column_max_statistics_size ( path, max_statistics_size)
175- }
176- }
172+ // #[allow(deprecated)]
173+ // if let Some(max_statistics_size) = options.max_statistics_size {
174+ // builder = {
175+ // #[allow(deprecated)]
176+ // builder.set_column_max_statistics_size(path, max_statistics_size)
177+ // }
178+ // }
177179 }
178180
179181 Ok ( builder)
@@ -222,7 +224,7 @@ impl ParquetOptions {
222224 dictionary_enabled,
223225 dictionary_page_size_limit,
224226 statistics_enabled,
225- max_statistics_size,
227+ max_statistics_size : _max_statistics_size ,
226228 max_row_group_size,
227229 created_by,
228230 column_index_truncate_length,
@@ -268,12 +270,12 @@ impl ParquetOptions {
268270 . set_data_page_row_count_limit ( * data_page_row_count_limit)
269271 . set_bloom_filter_enabled ( * bloom_filter_on_write) ;
270272
271- builder = {
272- #[ allow( deprecated) ]
273- builder. set_max_statistics_size (
274- max_statistics_size. unwrap_or ( DEFAULT_MAX_STATISTICS_SIZE ) ,
275- )
276- } ;
273+ // builder = {
274+ // #[allow(deprecated)]
275+ // builder.set_max_statistics_size(
276+ // max_statistics_size.unwrap_or(DEFAULT_MAX_STATISTICS_SIZE),
277+ // )
278+ // };
277279
278280 if let Some ( bloom_filter_fpp) = bloom_filter_fpp {
279281 builder = builder. set_bloom_filter_fpp ( * bloom_filter_fpp) ;
@@ -557,7 +559,7 @@ mod tests {
557559 ) ,
558560 bloom_filter_fpp : bloom_filter_default_props. map ( |p| p. fpp ) ,
559561 bloom_filter_ndv : bloom_filter_default_props. map ( |p| p. ndv ) ,
560- max_statistics_size : Some ( props . max_statistics_size ( & col ) ) ,
562+ max_statistics_size : Some ( DEFAULT_MAX_STATISTICS_SIZE ) ,
561563 }
562564 }
563565
0 commit comments