diff --git a/vortex-sampling-compressor/src/compressors/chunked.rs b/vortex-sampling-compressor/src/compressors/chunked.rs index f752b7ef2d..23ff730d17 100644 --- a/vortex-sampling-compressor/src/compressors/chunked.rs +++ b/vortex-sampling-compressor/src/compressors/chunked.rs @@ -39,9 +39,7 @@ impl EncodingCompressor for ChunkedCompressor { } fn can_compress(&self, array: &Array) -> Option<&dyn EncodingCompressor> { - ChunkedArray::try_from(array) - .ok() - .map(|_| self as &dyn EncodingCompressor) + array.is_encoding(Chunked::ID).then_some(self) } fn compress<'a>(