Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more rusty
Co-authored-by: Ed Seidl <[email protected]>
  • Loading branch information
adriangb and etseidl committed Aug 28, 2024
commit d60d918529cedf88907910003f9ff7448ff88465
21 changes: 11 additions & 10 deletions parquet/src/file/page_index/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,17 @@ impl<T: ParquetValueType> NativeIndex<T> {
}

pub(crate) fn to_thrift(&self) -> ColumnIndex {
let mut min_values = vec![vec![]; self.indexes.len()];
let mut max_values = vec![vec![]; self.indexes.len()];
for (i, index) in self.indexes.iter().enumerate() {
if let Some(min) = index.min_bytes() {
min_values[i].extend_from_slice(min);
}
if let Some(max) = index.max_bytes() {
max_values[i].extend_from_slice(max);
}
}
let min_values = self
.indexes
.iter()
.map(|x| x.min_bytes().unwrap_or(&[]).to_vec())
.collect::<Vec<_>>();

let max_values = self
.indexes
.iter()
.map(|x| x.max_bytes().unwrap_or(&[]).to_vec())
.collect::<Vec<_>>();

let null_counts = self
.indexes
Expand Down