Skip to content

Commit 81de01e

Browse files
committed
test: cover all-null constant in fill_null then mask
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent e8b77a5 commit 81de01e

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

vortex-array/src/mask.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ mod tests {
5151
use crate::LEGACY_SESSION;
5252
use crate::VortexSessionExecute;
5353
use crate::arrays::BoolArray;
54+
use crate::arrays::ConstantArray;
5455
use crate::builtins::ArrayBuiltins;
56+
use crate::dtype::DType;
57+
use crate::dtype::Nullability;
58+
use crate::scalar::Scalar;
5559

5660
fn ctx() -> ExecutionCtx {
5761
LEGACY_SESSION.create_execution_ctx()
@@ -78,4 +82,13 @@ mod tests {
7882
assert_eq!(mask, Mask::from_iter([true, false, false, false]));
7983
Ok(())
8084
}
85+
86+
#[test]
87+
fn fill_null_then_mask_null_constant() -> VortexResult<()> {
88+
let array =
89+
ConstantArray::new(Scalar::null(DType::Bool(Nullability::Nullable)), 4).into_array();
90+
let mask = array.fill_null(false)?.execute::<Mask>(&mut ctx())?;
91+
assert_eq!(mask, Mask::new_false(4));
92+
Ok(())
93+
}
8194
}

0 commit comments

Comments
 (0)