Skip to content

Commit

Permalink
chore: nit in layouts/chunked/reader.rs (#1926)
Browse files Browse the repository at this point in the history
  • Loading branch information
danking authored Jan 13, 2025
1 parent c5a8e20 commit 3406526
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions vortex-layout/src/layouts/chunked/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,12 @@ impl ChunkedReader {
pub(crate) async fn stats_table(&self) -> VortexResult<Option<&StatsTable>> {
self.stats_table
.get_or_try_init(async {
// The number of chunks
let mut nchunks = self.layout.nchildren();
if self.layout.metadata().is_some() {
// The final child is the statistics table.
nchunks -= 1;
}

Ok(match self.layout.metadata() {
None => None,
Some(metadata) => {
// The final child is the statistics table.
let nchunks = self.layout.nchildren() - 1;

// Figure out which stats are present
let present_stats: Arc<[Stat]> =
Arc::from(stats_from_bitset_bytes(metadata.as_ref()));
Expand Down

0 comments on commit 3406526

Please sign in to comment.