We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4feed7 commit bbba3caCopy full SHA for bbba3ca
1 file changed
vortex-array/src/array/erased.rs
@@ -224,11 +224,11 @@ impl ArrayRef {
224
/// Execute the array to extract a scalar at the given index.
225
pub fn execute_scalar(&self, index: usize, ctx: &mut ExecutionCtx) -> VortexResult<Scalar> {
226
vortex_ensure!(index < self.len(), OutOfBounds: index, 0, self.len());
227
- if self.is_invalid(index, ctx)? {
+ if self.dtype().is_nullable() && self.is_invalid(index, ctx)? {
228
return Ok(Scalar::null(self.dtype().clone()));
229
}
230
let scalar = self.0.execute_scalar(self, index, ctx)?;
231
- vortex_ensure!(self.dtype() == scalar.dtype(), "Scalar dtype mismatch");
+ debug_assert_eq!(self.dtype(), scalar.dtype(), "Scalar dtype mismatch");
232
Ok(scalar)
233
234
0 commit comments