tustvold commented on code in PR #2191:
URL: https://github.com/apache/arrow-rs/pull/2191#discussion_r930955836
##########
parquet/src/column/writer/mod.rs:
##########
@@ -746,26 +747,28 @@ impl<'a, E: ColumnValueEncoder> GenericColumnWriter<'a,
E> {
None => data_page_offset + total_compressed_size,
};
- let statistics = Statistics::new(
- self.min_column_value.clone(),
- self.max_column_value.clone(),
- self.column_distinct_count,
- self.num_column_nulls,
- false,
- );
-
- let metadata = ColumnChunkMetaData::builder(self.descr.clone())
+ let mut builder = ColumnChunkMetaData::builder(self.descr.clone())
.set_compression(self.codec)
.set_encodings(self.encodings.iter().cloned().collect())
.set_file_offset(file_offset)
.set_total_compressed_size(total_compressed_size)
.set_total_uncompressed_size(total_uncompressed_size)
.set_num_values(num_values)
.set_data_page_offset(data_page_offset)
- .set_dictionary_page_offset(dict_page_offset)
- .set_statistics(statistics)
- .build()?;
+ .set_dictionary_page_offset(dict_page_offset);
+
+ if self.statistics_enabled != EnabledStatistics::None {
Review Comment:
Previously we would still put the column statistics, even if we hadn't
actually computed them :scream:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]