@@ -25,6 +25,8 @@ use crate::{
25
25
DataFusionError , Result , _internal_datafusion_err,
26
26
} ;
27
27
28
+ pub const DEFAULT_MAX_STATISTICS_SIZE : usize = 4096 ;
29
+
28
30
use arrow:: datatypes:: Schema ;
29
31
// TODO: handle once deprecated
30
32
#[ allow( deprecated) ]
@@ -35,7 +37,7 @@ use parquet::{
35
37
metadata:: KeyValue ,
36
38
properties:: {
37
39
EnabledStatistics , WriterProperties , WriterPropertiesBuilder , WriterVersion ,
38
- DEFAULT_MAX_STATISTICS_SIZE , DEFAULT_STATISTICS_ENABLED ,
40
+ DEFAULT_STATISTICS_ENABLED ,
39
41
} ,
40
42
} ,
41
43
schema:: types:: ColumnPath ,
@@ -167,13 +169,13 @@ impl TryFrom<&TableParquetOptions> for WriterPropertiesBuilder {
167
169
168
170
// max_statistics_size is deprecated, currently it is not being used
169
171
// 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
+ // }
177
179
}
178
180
179
181
Ok ( builder)
@@ -222,7 +224,7 @@ impl ParquetOptions {
222
224
dictionary_enabled,
223
225
dictionary_page_size_limit,
224
226
statistics_enabled,
225
- max_statistics_size,
227
+ max_statistics_size : _max_statistics_size ,
226
228
max_row_group_size,
227
229
created_by,
228
230
column_index_truncate_length,
@@ -268,12 +270,12 @@ impl ParquetOptions {
268
270
. set_data_page_row_count_limit ( * data_page_row_count_limit)
269
271
. set_bloom_filter_enabled ( * bloom_filter_on_write) ;
270
272
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
+ // };
277
279
278
280
if let Some ( bloom_filter_fpp) = bloom_filter_fpp {
279
281
builder = builder. set_bloom_filter_fpp ( * bloom_filter_fpp) ;
@@ -557,7 +559,7 @@ mod tests {
557
559
) ,
558
560
bloom_filter_fpp : bloom_filter_default_props. map ( |p| p. fpp ) ,
559
561
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 ) ,
561
563
}
562
564
}
563
565
0 commit comments