Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions vortex-array/src/arc_swap_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ impl<K, V> ArcSwapMap<K, V> {
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<HashMap<K, V>> {
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
Expand Down
1 change: 1 addition & 0 deletions vortex-array/src/optimizer/kernels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading