Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed Jun 13, 2024
1 parent 942c6ab commit e4a588d
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions parquet/src/file/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,20 +450,17 @@ fn write_bloom_filters<W: Write + Send>(
.expect("Negative row group ordinal");
let row_group_idx = row_group_idx as usize;
for (column_idx, column_chunk) in row_group.columns_mut().iter_mut().enumerate() {
match bloom_filters[row_group_idx][column_idx].take() {
Some(bloom_filter) => {
let start_offset = buf.bytes_written();
bloom_filter.write(&mut *buf)?;
let end_offset = buf.bytes_written();
// set offset and index for bloom filter
*column_chunk = column_chunk
.clone()
.into_builder()
.set_bloom_filter_offset(Some(start_offset as i64))
.set_bloom_filter_length(Some((end_offset - start_offset) as i32))
.build()?;
}
None => {}
if let Some(bloom_filter) = bloom_filters[row_group_idx][column_idx].take() {
let start_offset = buf.bytes_written();
bloom_filter.write(&mut *buf)?;
let end_offset = buf.bytes_written();
// set offset and index for bloom filter
*column_chunk = column_chunk
.clone()
.into_builder()
.set_bloom_filter_offset(Some(start_offset as i64))
.set_bloom_filter_length(Some((end_offset - start_offset) as i32))
.build()?;
}
}
Ok(())
Expand Down

0 comments on commit e4a588d

Please sign in to comment.