From 01bb8fd497357723a5db221ff2605fd3021565a1 Mon Sep 17 00:00:00 2001 From: Robert Kruszewski Date: Mon, 14 Sep 2026 17:21:40 -0400 Subject: [PATCH 1/2] Skip validation when accessing storage scalar of extension scalar Signed-off-by: Robert Kruszewski --- vortex-array/src/scalar/typed_view/extension/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vortex-array/src/scalar/typed_view/extension/mod.rs b/vortex-array/src/scalar/typed_view/extension/mod.rs index ba33c2ce91f..a2ace1c5b60 100644 --- a/vortex-array/src/scalar/typed_view/extension/mod.rs +++ b/vortex-array/src/scalar/typed_view/extension/mod.rs @@ -75,8 +75,9 @@ impl<'a> ExtScalar<'a> { /// Returns the storage scalar of the extension scalar. pub fn to_storage_scalar(&self) -> Scalar { - Scalar::try_new(self.ext_dtype.storage_dtype().clone(), self.value.cloned()) - .vortex_expect("ExtScalar is invalid") + unsafe { + Scalar::new_unchecked(self.ext_dtype.storage_dtype().clone(), self.value.cloned()) + } } /// Returns a reference to the underlying value From a06f918044fdd5cab6ffb744d1abae0dde996608 Mon Sep 17 00:00:00 2001 From: Robert Kruszewski Date: Mon, 14 Sep 2026 17:25:46 -0400 Subject: [PATCH 2/2] more Signed-off-by: Robert Kruszewski --- vortex-array/src/scalar/typed_view/extension/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/vortex-array/src/scalar/typed_view/extension/mod.rs b/vortex-array/src/scalar/typed_view/extension/mod.rs index a2ace1c5b60..56e91aa8152 100644 --- a/vortex-array/src/scalar/typed_view/extension/mod.rs +++ b/vortex-array/src/scalar/typed_view/extension/mod.rs @@ -6,7 +6,6 @@ use std::fmt; use std::hash::Hash; -use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_bail; use vortex_error::vortex_panic;