Skip to content

Commit ebca708

Browse files
committed
add detailed message to assertion
1 parent 245ffd2 commit ebca708

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

vortex-array/src/validity.rs

+9-3
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,15 @@ impl Validity {
300300
Ok(match self {
301301
Self::NonNullable | Self::AllValid => Mask::AllTrue(length),
302302
Self::AllInvalid => Mask::AllFalse(length),
303-
Self::Array(a) => {
304-
assert_eq!(a.len(), length);
305-
Mask::try_from(a.clone())?
303+
Self::Array(is_valid) => {
304+
assert_eq!(
305+
is_valid.len(),
306+
length,
307+
"Validity::Array length must equal to_logical's argument: {}, {}.",
308+
is_valid.len(),
309+
length,
310+
);
311+
Mask::try_from(is_valid.clone())?
306312
}
307313
})
308314
}

0 commit comments

Comments
 (0)