diff --git a/encodings/alp/src/alp/compute/mod.rs b/encodings/alp/src/alp/compute/mod.rs
index 599b7624dc1..b87ecb37244 100644
--- a/encodings/alp/src/alp/compute/mod.rs
+++ b/encodings/alp/src/alp/compute/mod.rs
@@ -1,8 +1,8 @@
mod between;
mod compare;
-mod filter;
+mod nan_count;
-use vortex_array::compute::{ScalarAtFn, SliceFn, TakeFn, scalar_at, slice, take};
+use vortex_array::compute::{NaNCountFn, ScalarAtFn, SliceFn, TakeFn, scalar_at, slice, take};
use vortex_array::variants::PrimitiveArrayTrait;
use vortex_array::vtable::ComputeVTable;
use vortex_array::{Array, ArrayRef};
@@ -12,6 +12,9 @@ use vortex_scalar::Scalar;
use crate::{ALPArray, ALPEncoding, ALPFloat, match_each_alp_float_ptype};
impl ComputeVTable for ALPEncoding {
+ fn nan_count_fn(&self) -> Option<&dyn NaNCountFn<&dyn Array>> {
+ Some(self)
+ }
fn scalar_at_fn(&self) -> Option<&dyn ScalarAtFn<&dyn Array>> {
Some(self)
}
diff --git a/encodings/alp/src/alp/compute/nan_count.rs b/encodings/alp/src/alp/compute/nan_count.rs
new file mode 100644
index 00000000000..102b9cd5340
--- /dev/null
+++ b/encodings/alp/src/alp/compute/nan_count.rs
@@ -0,0 +1,15 @@
+use vortex_array::compute::{NaNCountFn, nan_count};
+use vortex_error::VortexResult;
+
+use crate::{ALPArray, ALPEncoding};
+
+impl NaNCountFn<&ALPArray> for ALPEncoding {
+ fn nan_count(&self, array: &ALPArray) -> VortexResult