Skip to content
Open
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
6 changes: 3 additions & 3 deletions vortex-array/src/scalar/typed_view/extension/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -75,8 +74,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
Expand Down
Loading