Skip to content
Open
Changes from all commits
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
14 changes: 6 additions & 8 deletions vortex-array/src/arrays/chunked/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,18 @@ pub trait ChunkedArrayExt: TypedArrayRef<Chunked> {
.vortex_expect("validated chunk slot")
}

fn iter_chunks<'a>(&'a self) -> Box<dyn Iterator<Item = &'a ArrayRef> + 'a> {
Box::new(
self.as_ref().slots()[ChunkedSlots::CHUNKS_OFFSET..]
.iter()
.map(|slot| slot.as_ref().vortex_expect("validated chunk slot")),
)
fn iter_chunks(&self) -> impl Iterator<Item = &ArrayRef> {
self.as_ref().slots()[ChunkedSlots::CHUNKS_OFFSET..]
.iter()
.map(|slot| slot.as_ref().vortex_expect("validated chunk slot"))
}

fn chunks(&self) -> Vec<ArrayRef> {
self.iter_chunks().cloned().collect()
}

fn non_empty_chunks<'a>(&'a self) -> Box<dyn Iterator<Item = &'a ArrayRef> + 'a> {
Box::new(self.iter_chunks().filter(|chunk| !chunk.is_empty()))
fn non_empty_chunks(&self) -> impl Iterator<Item = &ArrayRef> {
self.iter_chunks().filter(|chunk| !chunk.is_empty())
}

/// Returns the cached chunk boundary offsets.
Expand Down
Loading