Skip to content

Commit

Permalink
Remove null count rom write_batch_with_statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Jul 11, 2022
1 parent ca5fe7d commit 75648a9
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions parquet/src/column/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ impl<'a, T: DataType> ColumnWriterImpl<'a, T> {
rep_levels: Option<&[i16]>,
min: Option<&T::T>,
max: Option<&T::T>,
null_count: Option<u64>,
distinct_count: Option<u64>,
) -> Result<usize> {
// We check for DataPage limits only after we have inserted the values. If a user
Expand Down Expand Up @@ -346,10 +345,6 @@ impl<'a, T: DataType> ColumnWriterImpl<'a, T> {
self.column_distinct_count = None;
}

if let Some(nulls) = null_count {
self.num_column_nulls += nulls;
}

let mut values_offset = 0;
let mut levels_offset = 0;
for _ in 0..num_batches {
Expand Down Expand Up @@ -389,7 +384,7 @@ impl<'a, T: DataType> ColumnWriterImpl<'a, T> {
def_levels: Option<&[i16]>,
rep_levels: Option<&[i16]>,
) -> Result<usize> {
self.write_batch_internal(values, def_levels, rep_levels, None, None, None, None)
self.write_batch_internal(values, def_levels, rep_levels, None, None, None)
}

/// Writer may optionally provide pre-calculated statistics for use when computing
Expand All @@ -406,7 +401,6 @@ impl<'a, T: DataType> ColumnWriterImpl<'a, T> {
rep_levels: Option<&[i16]>,
min: Option<&T::T>,
max: Option<&T::T>,
nulls_count: Option<u64>,
distinct_count: Option<u64>,
) -> Result<usize> {
self.write_batch_internal(
Expand All @@ -415,7 +409,6 @@ impl<'a, T: DataType> ColumnWriterImpl<'a, T> {
rep_levels,
min,
max,
nulls_count,
distinct_count,
)
}
Expand Down Expand Up @@ -1726,7 +1719,6 @@ mod tests {
None,
Some(&-17),
Some(&9000),
Some(21),
Some(55),
)
.unwrap();
Expand Down Expand Up @@ -1774,7 +1766,6 @@ mod tests {
None,
Some(&5),
Some(&7),
Some(0),
Some(3),
)
.unwrap();
Expand Down

0 comments on commit 75648a9

Please sign in to comment.