diff --git a/vortex-array/src/arc_swap_map.rs b/vortex-array/src/arc_swap_map.rs index aff46c22d73..567e025d48c 100644 --- a/vortex-array/src/arc_swap_map.rs +++ b/vortex-array/src/arc_swap_map.rs @@ -50,6 +50,14 @@ impl ArcSwapMap { f(&self.inner.load()) } + /// Load the current snapshot as an owned [`Arc`]. + /// + /// This is zero-copy: a single `Arc` refcount bump returning the same map + /// instance held inside the [`ArcSwap`], with no allocation or map copy. + pub(crate) fn load_full(&self) -> Arc> { + self.inner.load_full() + } + /// Replace the map with the result of applying `f` to a private copy. /// /// Writes are copy-on-write via [`ArcSwap::rcu`], so `f` may run more than diff --git a/vortex-array/src/optimizer/kernels.rs b/vortex-array/src/optimizer/kernels.rs index 001b6cb6c23..e16e59abd17 100644 --- a/vortex-array/src/optimizer/kernels.rs +++ b/vortex-array/src/optimizer/kernels.rs @@ -35,6 +35,7 @@ use vortex_session::SessionExt; use vortex_session::SessionVar; use vortex_session::registry::Id; use vortex_utils::aliases::DefaultHashBuilder; +use vortex_utils::aliases::hash_map::HashMap; use crate::ArrayRef; use crate::ExecutionCtx;