Skip to content

Commit 38efa22

Browse files
committed
fix[array]: get_item reduce + struct
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent 04fc7f6 commit 38efa22

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

vortex-array/src/arrays/struct_/compute/rules.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl ArrayParentReduceRule<Struct> for StructGetItemRule {
109109
Validity::AllInvalid => {
110110
// If everything is invalid, the field is also all invalid
111111
Ok(Some(
112-
ConstantArray::new(Scalar::null(field.dtype().clone()), field.len())
112+
ConstantArray::new(Scalar::null(field.dtype().as_nullable()), field.len())
113113
.into_array(),
114114
))
115115
}

vortex-array/src/scalar_fn/fns/get_item.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ mod tests {
258258
}
259259

260260
#[test]
261-
#[should_panic = "Cannot create null scalar with non-nullable dtype i32"]
262261
fn get_nullable_field() {
263262
let st = StructArray::try_new(
264263
FieldNames::from(["a"]),

0 commit comments

Comments
 (0)