Skip to content

Commit

Permalink
ALP Mask clone (#1522)
Browse files Browse the repository at this point in the history
  • Loading branch information
gatesn authored Dec 2, 2024
1 parent 1b10f05 commit ceb2798
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions encodings/alp/src/alp/compute/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,14 @@ impl SliceFn<ALPArray> for ALPEncoding {

impl FilterFn<ALPArray> for ALPEncoding {
fn filter(&self, array: &ALPArray, mask: FilterMask) -> VortexResult<ArrayData> {
Ok(ALPArray::try_new(
filter(&array.encoded(), mask.clone())?,
array.exponents(),
array.patches().map(|p| filter(&p, mask)).transpose()?,
)?
.into_array())
let patches = array
.patches()
.map(|p| filter(&p, mask.clone()))
.transpose()?;

Ok(
ALPArray::try_new(filter(&array.encoded(), mask)?, array.exponents(), patches)?
.into_array(),
)
}
}

0 comments on commit ceb2798

Please sign in to comment.