Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangb committed Jan 20, 2025
1 parent feb6650 commit dfe74d1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions parquet/src/file/metadata/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,11 @@ impl ParquetMetaDataReader {
let range = range.start - fetched_start..range.end - fetched_start;
// santity check: `fetched` should always go until the end of the file
// so if our range is beyond that, something is wrong!
assert!(range.end <= fetched_start + fetched.len(), "range: {range:?}, fetched: {}, fetched_start: {fetched_start}", fetched.len());
assert!(
range.end <= fetched_start + fetched.len(),
"range: {range:?}, fetched: {}, fetched_start: {fetched_start}",
fetched.len()
);
fetched.slice(range)
}
// Note: this will potentially fetch data already in remainder, this keeps things simple
Expand Down Expand Up @@ -587,10 +591,7 @@ impl ParquetMetaDataReader {
} else {
let metadata_start = file_size - length - FOOTER_SIZE - footer_start;
let slice = &suffix[metadata_start..suffix_len - FOOTER_SIZE];
Ok((
Self::decode_metadata(slice)?,
Some((footer_start, suffix)),
))
Ok((Self::decode_metadata(slice)?, Some((footer_start, suffix))))
}
}

Expand Down Expand Up @@ -1065,7 +1066,7 @@ mod async_tests {
let f = MetadataFetchFn(&mut fetch);
let metadata = ParquetMetaDataReader::new()
.with_page_indexes(true)
.with_prefetch_hint(Some(len)) // prefetch entire file
.with_prefetch_hint(Some(len)) // prefetch entire file
.load_and_finish(f, len)
.await
.unwrap();
Expand Down

0 comments on commit dfe74d1

Please sign in to comment.