Skip to content

Commit bbba3ca

Browse files
committed
skipss
Signed-off-by: Baris Palaska <barispalaska@gmail.com>
1 parent c4feed7 commit bbba3ca

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

vortex-array/src/array/erased.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,11 @@ impl ArrayRef {
224224
/// Execute the array to extract a scalar at the given index.
225225
pub fn execute_scalar(&self, index: usize, ctx: &mut ExecutionCtx) -> VortexResult<Scalar> {
226226
vortex_ensure!(index < self.len(), OutOfBounds: index, 0, self.len());
227-
if self.is_invalid(index, ctx)? {
227+
if self.dtype().is_nullable() && self.is_invalid(index, ctx)? {
228228
return Ok(Scalar::null(self.dtype().clone()));
229229
}
230230
let scalar = self.0.execute_scalar(self, index, ctx)?;
231-
vortex_ensure!(self.dtype() == scalar.dtype(), "Scalar dtype mismatch");
231+
debug_assert_eq!(self.dtype(), scalar.dtype(), "Scalar dtype mismatch");
232232
Ok(scalar)
233233
}
234234

0 commit comments

Comments
 (0)