Skip to content

Commit fdb81ea

Browse files
committed
chore: Fix fuzzers baseline nullability for decimal fillnull
Signed-off-by: Robert Kruszewski <[email protected]>
1 parent ca770ed commit fdb81ea

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

fuzz/src/array/fill_null.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use vortex_array::compute::fill_null;
88
use vortex_array::validity::Validity;
99
use vortex_array::vtable::ValidityHelper;
1010
use vortex_array::{ArrayRef, Canonical, IntoArray, ToCanonical};
11-
use vortex_buffer::Buffer;
11+
use vortex_buffer::{Buffer, BufferMut};
1212
use vortex_dtype::{DType, Nullability, match_each_decimal_value_type, match_each_native_ptype};
1313
use vortex_error::{VortexExpect, VortexResult, VortexUnwrap};
1414
use vortex_scalar::Scalar;
@@ -136,7 +136,7 @@ fn fill_decimal_array(
136136
let validity_bits = validity_bool_array.bit_buffer();
137137
let data_buffer = array.buffer::<D>();
138138

139-
let mut new_data = Vec::with_capacity(array.len());
139+
let mut new_data = BufferMut::with_capacity(array.len());
140140
for i in 0..array.len() {
141141
if validity_bits.value(i) {
142142
new_data.push(data_buffer[i]);
@@ -145,7 +145,8 @@ fn fill_decimal_array(
145145
}
146146
}
147147

148-
DecimalArray::from_option_iter(new_data.into_iter().map(Some), decimal_dtype)
148+
DecimalArray::try_new(new_data.freeze(), decimal_dtype, result_nullability.into())
149+
.vortex_unwrap()
149150
.into_array()
150151
}
151152
}

0 commit comments

Comments
 (0)