From 16ca2eabc0f1b7240f0c2194aa6c54927d3f2ee2 Mon Sep 17 00:00:00 2001 From: Luke Kim <80174+lukekim@users.noreply.github.com> Date: Thu, 25 Jun 2026 14:42:00 -0700 Subject: [PATCH] fix(vortex-array): restore load_full + HashMap import dropped in rebase The spiceai-54 rebase onto the 0.75.0 base (e09ec32c) dropped two symbols still used by the per-ExecutionCtx ArrayKernels snapshot path: - ArcSwapMap::load_full (arc_swap_map.rs), called by ArrayKernels::snapshot() - the `vortex_utils::aliases::hash_map::HashMap` import in kernels.rs, used by the KernelSnapshot struct field Without them vortex-array fails to compile (E0599 load_full not found, E0425 HashMap not in scope). executor.rs still consumes snapshot()/ KernelSnapshot, so the correct fix is to restore the symbols (byte-identical to the prior good commit 729249dd), not to remove the usages. Co-Authored-By: Claude Opus 4.8 (1M context) --- vortex-array/src/arc_swap_map.rs | 8 ++++++++ vortex-array/src/optimizer/kernels.rs | 1 + 2 files changed, 9 insertions(+) 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;