diff --git a/encodings/zigzag/src/compute.rs b/encodings/zigzag/src/compute.rs index 8f26cae34..7277749f9 100644 --- a/encodings/zigzag/src/compute.rs +++ b/encodings/zigzag/src/compute.rs @@ -29,6 +29,13 @@ impl ComputeVTable for ZigZagEncoding { } } +impl FilterFn for ZigZagEncoding { + fn filter(&self, array: &ZigZagArray, mask: FilterMask) -> VortexResult { + let encoded = filter(&array.encoded(), mask)?; + Ok(ZigZagArray::try_new(encoded)?.into_array()) + } +} + impl ScalarAtFn for ZigZagEncoding { fn scalar_at(&self, array: &ZigZagArray, index: usize) -> VortexResult { let scalar = scalar_at(array.encoded(), index)?; @@ -65,13 +72,6 @@ impl TakeFn for ZigZagEncoding { } } -impl FilterFn for ZigZagEncoding { - fn filter(&self, array: &ZigZagArray, mask: FilterMask) -> VortexResult { - let encoded = filter(&array.encoded(), mask)?; - Ok(ZigZagArray::try_new(encoded)?.into_array()) - } -} - trait ZigZagEncoded { type Int: ZigZag; }