Skip to content

Commit

Permalink
update impl HeapSize for ValueStatistics to use new min and max api
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-J-Ward committed Aug 9, 2024
1 parent 87c375a commit 6950994
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions parquet/src/file/metadata/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,7 @@ impl<T: ParquetValueType> HeapSize for PageIndex<T> {

impl<T: ParquetValueType> HeapSize for ValueStatistics<T> {
fn heap_size(&self) -> usize {
if self.has_min_max_set() {
return self.min_unchecked().heap_size() + self.max_unchecked().heap_size();
} else if self.min_is_exact() {
return self.min_unchecked().heap_size();
} else if self.max_is_exact() {
return self.max_unchecked().heap_size();
}
0
self.min().map(T::heap_size).unwrap_or(0) + self.max().map(T::heap_size).unwrap_or(0)
}
}
impl HeapSize for bool {
Expand Down

0 comments on commit 6950994

Please sign in to comment.