From ca696bd5e66a5bf8726faf3dec5912d70c5f6334 Mon Sep 17 00:00:00 2001 From: Robert Kruszewski Date: Fri, 17 Jul 2026 15:08:55 +0100 Subject: [PATCH] LayoutEncodingAdapter::build doesn't need to panic, it can error Signed-off-by: Robert Kruszewski --- vortex-layout/src/encoding.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vortex-layout/src/encoding.rs b/vortex-layout/src/encoding.rs index 90d33eecb5e..b6e10b3b38a 100644 --- a/vortex-layout/src/encoding.rs +++ b/vortex-layout/src/encoding.rs @@ -11,7 +11,7 @@ use vortex_array::DeserializeMetadata; use vortex_array::dtype::DType; use vortex_error::VortexExpect; use vortex_error::VortexResult; -use vortex_error::vortex_panic; +use vortex_error::vortex_bail; use vortex_session::registry::Id; use crate::IntoLayout; @@ -88,14 +88,14 @@ impl LayoutEncoding for LayoutEncodingAdapter { // Validate that the builder function returned the expected values. if layout.row_count() != row_count { - vortex_panic!( + vortex_bail!( "Layout row count mismatch: {} != {}", layout.row_count(), row_count ); } if layout.dtype() != dtype { - vortex_panic!("Layout dtype mismatch: {} != {}", layout.dtype(), dtype); + vortex_bail!("Layout dtype mismatch: {} != {}", layout.dtype(), dtype); } Ok(layout.into_layout())