@@ -323,47 +323,7 @@ class PARQUET_EXPORT WriterProperties {
323323 properties.content_defined_chunking_enabled()),
324324 content_defined_chunking_options_(
325325 properties.content_defined_chunking_options()) {
326- for (const auto & [col_path, col_props] : properties.column_properties_ ) {
327- if (col_props.statistics_enabled () !=
328- default_column_properties_.statistics_enabled ()) {
329- if (col_props.statistics_enabled ()) {
330- this ->enable_statistics (col_path);
331- } else {
332- this ->disable_statistics (col_path);
333- }
334- }
335-
336- if (col_props.dictionary_enabled () !=
337- default_column_properties_.dictionary_enabled ()) {
338- if (col_props.dictionary_enabled ()) {
339- this ->enable_dictionary (col_path);
340- } else {
341- this ->disable_dictionary (col_path);
342- }
343- }
344-
345- if (col_props.page_index_enabled () !=
346- default_column_properties_.page_index_enabled ()) {
347- if (col_props.page_index_enabled ()) {
348- this ->enable_write_page_index (col_path);
349- } else {
350- this ->disable_write_page_index (col_path);
351- }
352- }
353-
354- if (col_props.compression () != default_column_properties_.compression ()) {
355- this ->compression (col_path, col_props.compression ());
356- }
357-
358- if (col_props.compression_level () !=
359- default_column_properties_.compression_level ()) {
360- this ->compression_level (col_path, col_props.compression_level ());
361- }
362-
363- if (col_props.encoding () != default_column_properties_.encoding ()) {
364- this ->encoding (col_path, col_props.encoding ());
365- }
366- }
326+ CopyColumnSpecificProperties (properties);
367327 }
368328
369329 // / \brief EXPERIMENTAL: Use content-defined page chunking for all columns.
@@ -826,6 +786,8 @@ class PARQUET_EXPORT WriterProperties {
826786 }
827787
828788 private:
789+ void CopyColumnSpecificProperties (const WriterProperties& properties);
790+
829791 MemoryPool* pool_;
830792 int64_t dictionary_pagesize_limit_;
831793 int64_t write_batch_size_;
0 commit comments