Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Fixed divide by zero on empty row group (#1062)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao authored Jun 10, 2022
1 parent b0c601e commit 36973f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/io/parquet/read/deserialize/null.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ where
while let Ok(Some(x)) = iter.next() {
len += x.num_values()
}
if len == 0 {
return Box::new(std::iter::empty());
}

let complete_chunks = chunk_size / len;
let remainder = chunk_size % len;
Expand Down

0 comments on commit 36973f8

Please sign in to comment.