Skip to content

Commit 0288f11

Browse files
break: remove all compute public functions (#6752)
This PR remove deprecated public functions # Breaks We have moved all array::compute function into ArrayBuiltIns --------- Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent 5a716a8 commit 0288f11

35 files changed

Lines changed: 318 additions & 581 deletions

File tree

encodings/pco/src/array.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use pco::wrapped::ChunkDecompressor;
1515
use pco::wrapped::FileCompressor;
1616
use pco::wrapped::FileDecompressor;
1717
use prost::Message;
18+
use vortex_array::Array;
1819
use vortex_array::ArrayEq;
1920
use vortex_array::ArrayHash;
2021
use vortex_array::ArrayRef;
@@ -26,7 +27,6 @@ use vortex_array::ToCanonical;
2627
use vortex_array::arrays::PrimitiveArray;
2728
use vortex_array::arrays::PrimitiveVTable;
2829
use vortex_array::buffer::BufferHandle;
29-
use vortex_array::compute::filter;
3030
use vortex_array::dtype::DType;
3131
use vortex_array::dtype::PType;
3232
use vortex_array::dtype::half;
@@ -293,7 +293,7 @@ pub(crate) fn number_type_from_dtype(dtype: &DType) -> NumberType {
293293

294294
fn collect_valid(parray: &PrimitiveArray) -> VortexResult<PrimitiveArray> {
295295
let mask = parray.validity_mask()?;
296-
Ok(filter(&parray.to_array(), &mask)?.to_primitive())
296+
Ok(parray.to_array().filter(mask)?.to_primitive())
297297
}
298298

299299
pub(crate) fn vortex_err_from_pco(err: PcoError) -> VortexError {

encodings/sparse/src/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use vortex_array::ToCanonical;
1919
use vortex_array::arrays::ConstantArray;
2020
use vortex_array::buffer::BufferHandle;
2121
use vortex_array::builtins::ArrayBuiltins;
22-
use vortex_array::compute::filter;
2322
use vortex_array::dtype::DType;
2423
use vortex_array::dtype::Nullability;
2524
use vortex_array::patches::Patches;
@@ -394,7 +393,8 @@ impl SparseArray {
394393
);
395394
} else if mask.false_count() as f64 > (0.9 * mask.len() as f64) {
396395
// Array is dominated by NULL but has non-NULL values
397-
let non_null_values = filter(array, &mask)?;
396+
// TODO(joe): use exe ctx?
397+
let non_null_values = array.filter(mask.clone())?.to_canonical()?.into_array();
398398
let non_null_indices = match mask.indices() {
399399
AllOr::All => {
400400
// We already know that the mask is 90%+ false
@@ -445,7 +445,10 @@ impl SparseArray {
445445
.to_bit_buffer(),
446446
);
447447

448-
let non_top_values = filter(array, &non_top_mask)?;
448+
let non_top_values = array
449+
.filter(non_top_mask.clone())?
450+
.to_canonical()?
451+
.into_array();
449452

450453
let indices: Buffer<u64> = match non_top_mask {
451454
Mask::AllTrue(count) => {

encodings/zstd/src/array.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use std::sync::Arc;
77

88
use itertools::Itertools as _;
99
use prost::Message as _;
10+
use vortex_array::Array;
1011
use vortex_array::ArrayEq;
1112
use vortex_array::ArrayHash;
1213
use vortex_array::ArrayRef;
@@ -22,7 +23,6 @@ use vortex_array::arrays::PrimitiveArray;
2223
use vortex_array::arrays::VarBinViewArray;
2324
use vortex_array::arrays::build_views::BinaryView;
2425
use vortex_array::buffer::BufferHandle;
25-
use vortex_array::compute::filter;
2626
use vortex_array::dtype::DType;
2727
use vortex_array::scalar::Scalar;
2828
use vortex_array::serde::ArrayChildren;
@@ -341,7 +341,7 @@ fn choose_max_dict_size(uncompressed_size: usize) -> usize {
341341

342342
fn collect_valid_primitive(parray: &PrimitiveArray) -> VortexResult<PrimitiveArray> {
343343
let mask = parray.validity_mask()?;
344-
Ok(filter(&parray.to_array(), &mask)?.to_primitive())
344+
Ok(parray.to_array().filter(mask)?.to_primitive())
345345
}
346346

347347
fn collect_valid_vbv(vbv: &VarBinViewArray) -> VortexResult<(ByteBuffer, Vec<usize>)> {

vortex-array/public-api.lock

Lines changed: 12 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -652,9 +652,9 @@ impl vortex_array::scalar_fn::fns::mask::MaskKernel for vortex_array::arrays::Ch
652652

653653
pub fn vortex_array::arrays::ChunkedVTable::mask(array: &vortex_array::arrays::ChunkedArray, mask: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
654654

655-
impl vortex_array::scalar_fn::fns::zip::ZipReduce for vortex_array::arrays::ChunkedVTable
655+
impl vortex_array::scalar_fn::fns::zip::ZipKernel for vortex_array::arrays::ChunkedVTable
656656

657-
pub fn vortex_array::arrays::ChunkedVTable::zip(if_true: &vortex_array::arrays::ChunkedArray, if_false: &vortex_array::ArrayRef, mask: &vortex_mask::Mask) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
657+
pub fn vortex_array::arrays::ChunkedVTable::zip(if_true: &vortex_array::arrays::ChunkedArray, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
658658

659659
impl vortex_array::vtable::OperationsVTable<vortex_array::arrays::ChunkedVTable> for vortex_array::arrays::ChunkedVTable
660660

@@ -3290,7 +3290,7 @@ pub fn vortex_array::arrays::StructVTable::mask(array: &vortex_array::arrays::St
32903290

32913291
impl vortex_array::scalar_fn::fns::zip::ZipKernel for vortex_array::arrays::StructVTable
32923292

3293-
pub fn vortex_array::arrays::StructVTable::zip(if_true: &vortex_array::arrays::StructArray, if_false: &vortex_array::ArrayRef, mask: &vortex_mask::Mask, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
3293+
pub fn vortex_array::arrays::StructVTable::zip(if_true: &vortex_array::arrays::StructArray, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
32943294

32953295
impl vortex_array::vtable::OperationsVTable<vortex_array::arrays::StructVTable> for vortex_array::arrays::StructVTable
32963296

@@ -3834,7 +3834,7 @@ pub fn vortex_array::arrays::VarBinViewVTable::mask(array: &vortex_array::arrays
38343834

38353835
impl vortex_array::scalar_fn::fns::zip::ZipKernel for vortex_array::arrays::VarBinViewVTable
38363836

3837-
pub fn vortex_array::arrays::VarBinViewVTable::zip(if_true: &vortex_array::arrays::VarBinViewArray, if_false: &vortex_array::ArrayRef, mask: &vortex_mask::Mask, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
3837+
pub fn vortex_array::arrays::VarBinViewVTable::zip(if_true: &vortex_array::arrays::VarBinViewArray, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
38383838

38393839
impl vortex_array::vtable::OperationsVTable<vortex_array::arrays::VarBinViewVTable> for vortex_array::arrays::VarBinViewVTable
38403840

@@ -6308,26 +6308,6 @@ impl vortex_array::compute::SumKernel for vortex_array::arrays::PrimitiveVTable
63086308

63096309
pub fn vortex_array::arrays::PrimitiveVTable::sum(&self, array: &vortex_array::arrays::PrimitiveArray, accumulator: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult<vortex_array::scalar::Scalar>
63106310

6311-
pub fn vortex_array::compute::add(lhs: &vortex_array::ArrayRef, rhs: &vortex_array::ArrayRef) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6312-
6313-
pub fn vortex_array::compute::add_scalar(lhs: &vortex_array::ArrayRef, rhs: vortex_array::scalar::Scalar) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6314-
6315-
pub fn vortex_array::compute::and_kleene(lhs: &vortex_array::ArrayRef, rhs: &vortex_array::ArrayRef) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6316-
6317-
pub fn vortex_array::compute::arrow_filter_fn(array: &vortex_array::ArrayRef, mask: &vortex_mask::Mask) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6318-
6319-
pub fn vortex_array::compute::cast(array: &dyn vortex_array::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6320-
6321-
pub fn vortex_array::compute::div(lhs: &vortex_array::ArrayRef, rhs: &vortex_array::ArrayRef) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6322-
6323-
pub fn vortex_array::compute::div_scalar(lhs: &vortex_array::ArrayRef, rhs: vortex_array::scalar::Scalar) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6324-
6325-
pub fn vortex_array::compute::fill_null(array: &vortex_array::ArrayRef, fill_value: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6326-
6327-
pub fn vortex_array::compute::filter(array: &vortex_array::ArrayRef, mask: &vortex_mask::Mask) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6328-
6329-
pub fn vortex_array::compute::invert(array: &vortex_array::ArrayRef) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6330-
63316311
pub fn vortex_array::compute::is_constant(array: &vortex_array::ArrayRef) -> vortex_error::VortexResult<core::option::Option<bool>>
63326312

63336313
pub fn vortex_array::compute::is_constant_opts(array: &vortex_array::ArrayRef, options: &vortex_array::compute::IsConstantOpts) -> vortex_error::VortexResult<core::option::Option<bool>>
@@ -6338,34 +6318,16 @@ pub fn vortex_array::compute::is_sorted_opts(array: &vortex_array::ArrayRef, str
63386318

63396319
pub fn vortex_array::compute::is_strict_sorted(array: &vortex_array::ArrayRef) -> vortex_error::VortexResult<core::option::Option<bool>>
63406320

6341-
pub fn vortex_array::compute::list_contains(array: &vortex_array::ArrayRef, value: &vortex_array::ArrayRef) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6342-
6343-
pub fn vortex_array::compute::mask(array: &vortex_array::ArrayRef, mask: &vortex_mask::Mask) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6344-
63456321
pub fn vortex_array::compute::min_max(array: &vortex_array::ArrayRef) -> vortex_error::VortexResult<core::option::Option<vortex_array::compute::MinMaxResult>>
63466322

6347-
pub fn vortex_array::compute::mul(lhs: &vortex_array::ArrayRef, rhs: &vortex_array::ArrayRef) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6348-
6349-
pub fn vortex_array::compute::mul_scalar(lhs: &vortex_array::ArrayRef, rhs: vortex_array::scalar::Scalar) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6350-
63516323
pub fn vortex_array::compute::nan_count(array: &vortex_array::ArrayRef) -> vortex_error::VortexResult<usize>
63526324

6353-
pub fn vortex_array::compute::numeric(lhs: &vortex_array::ArrayRef, rhs: &vortex_array::ArrayRef, op: vortex_array::scalar::NumericOperator) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6354-
6355-
pub fn vortex_array::compute::or_kleene(lhs: &vortex_array::ArrayRef, rhs: &vortex_array::ArrayRef) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6356-
6357-
pub fn vortex_array::compute::sub(lhs: &vortex_array::ArrayRef, rhs: &vortex_array::ArrayRef) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6358-
6359-
pub fn vortex_array::compute::sub_scalar(lhs: &vortex_array::ArrayRef, rhs: vortex_array::scalar::Scalar) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6360-
63616325
pub fn vortex_array::compute::sum(array: &vortex_array::ArrayRef) -> vortex_error::VortexResult<vortex_array::scalar::Scalar>
63626326

63636327
pub fn vortex_array::compute::sum_impl(array: &vortex_array::ArrayRef, accumulator: &vortex_array::scalar::Scalar, kernels: &[arcref::ArcRef<dyn vortex_array::compute::Kernel>]) -> vortex_error::VortexResult<vortex_array::scalar::Scalar>
63646328

63656329
pub fn vortex_array::compute::warm_up_vtables()
63666330

6367-
pub fn vortex_array::compute::zip(if_true: &vortex_array::ArrayRef, if_false: &vortex_array::ArrayRef, mask: &vortex_mask::Mask) -> vortex_error::VortexResult<vortex_array::ArrayRef>
6368-
63696331
pub mod vortex_array::display
63706332

63716333
pub enum vortex_array::display::DisplayOptions
@@ -14662,23 +14624,23 @@ pub fn vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor<V>::reduce_parent(&se
1466214624

1466314625
pub trait vortex_array::scalar_fn::fns::zip::ZipKernel: vortex_array::vtable::VTable
1466414626

14665-
pub fn vortex_array::scalar_fn::fns::zip::ZipKernel::zip(array: &Self::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
14627+
pub fn vortex_array::scalar_fn::fns::zip::ZipKernel::zip(array: &Self::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
14628+
14629+
impl vortex_array::scalar_fn::fns::zip::ZipKernel for vortex_array::arrays::ChunkedVTable
14630+
14631+
pub fn vortex_array::arrays::ChunkedVTable::zip(if_true: &vortex_array::arrays::ChunkedArray, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
1466614632

1466714633
impl vortex_array::scalar_fn::fns::zip::ZipKernel for vortex_array::arrays::StructVTable
1466814634

14669-
pub fn vortex_array::arrays::StructVTable::zip(if_true: &vortex_array::arrays::StructArray, if_false: &vortex_array::ArrayRef, mask: &vortex_mask::Mask, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
14635+
pub fn vortex_array::arrays::StructVTable::zip(if_true: &vortex_array::arrays::StructArray, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
1467014636

1467114637
impl vortex_array::scalar_fn::fns::zip::ZipKernel for vortex_array::arrays::VarBinViewVTable
1467214638

14673-
pub fn vortex_array::arrays::VarBinViewVTable::zip(if_true: &vortex_array::arrays::VarBinViewArray, if_false: &vortex_array::ArrayRef, mask: &vortex_mask::Mask, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
14639+
pub fn vortex_array::arrays::VarBinViewVTable::zip(if_true: &vortex_array::arrays::VarBinViewArray, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
1467414640

1467514641
pub trait vortex_array::scalar_fn::fns::zip::ZipReduce: vortex_array::vtable::VTable
1467614642

14677-
pub fn vortex_array::scalar_fn::fns::zip::ZipReduce::zip(array: &Self::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_mask::Mask) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
14678-
14679-
impl vortex_array::scalar_fn::fns::zip::ZipReduce for vortex_array::arrays::ChunkedVTable
14680-
14681-
pub fn vortex_array::arrays::ChunkedVTable::zip(if_true: &vortex_array::arrays::ChunkedArray, if_false: &vortex_array::ArrayRef, mask: &vortex_mask::Mask) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
14643+
pub fn vortex_array::scalar_fn::fns::zip::ZipReduce::zip(array: &Self::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult<core::option::Option<vortex_array::ArrayRef>>
1468214644

1468314645
pub mod vortex_array::scalar_fn::session
1468414646

vortex-array/src/array/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ use crate::DynArrayEq;
2929
use crate::DynArrayHash;
3030
use crate::ExecutionCtx;
3131
use crate::LEGACY_SESSION;
32+
use crate::ToCanonical;
3233
use crate::VortexSessionExecute;
3334
use crate::arrays::BoolVTable;
3435
use crate::arrays::ConstantVTable;
@@ -603,7 +604,7 @@ impl<V: VTable> Array for ArrayAdapter<V> {
603604
match self.validity()? {
604605
Validity::NonNullable | Validity::AllValid => Ok(Mask::new_true(self.len())),
605606
Validity::AllInvalid => Ok(Mask::new_false(self.len())),
606-
Validity::Array(a) => a.try_to_mask_fill_null_false(),
607+
Validity::Array(a) => Ok(a.to_bool().to_mask()),
607608
}
608609
}
609610

vortex-array/src/arrays/chunked/compute/kernel.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ use crate::arrays::SliceExecuteAdaptor;
77
use crate::arrays::TakeExecuteAdaptor;
88
use crate::kernel::ParentKernelSet;
99
use crate::scalar_fn::fns::mask::MaskExecuteAdaptor;
10+
use crate::scalar_fn::fns::zip::ZipExecuteAdaptor;
1011

1112
pub(crate) static PARENT_KERNELS: ParentKernelSet<ChunkedVTable> = ParentKernelSet::new(&[
1213
ParentKernelSet::lift(&FilterExecuteAdaptor(ChunkedVTable)),
1314
ParentKernelSet::lift(&MaskExecuteAdaptor(ChunkedVTable)),
1415
ParentKernelSet::lift(&SliceExecuteAdaptor(ChunkedVTable)),
1516
ParentKernelSet::lift(&TakeExecuteAdaptor(ChunkedVTable)),
17+
ParentKernelSet::lift(&ZipExecuteAdaptor(ChunkedVTable)),
1618
]);

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@ use crate::optimizer::rules::ArrayParentReduceRule;
1717
use crate::optimizer::rules::ParentRuleSet;
1818
use crate::scalar_fn::fns::cast::CastReduceAdaptor;
1919
use crate::scalar_fn::fns::fill_null::FillNullReduceAdaptor;
20-
use crate::scalar_fn::fns::zip::ZipReduceAdaptor;
2120

2221
pub(crate) const PARENT_RULES: ParentRuleSet<ChunkedVTable> = ParentRuleSet::new(&[
2322
ParentRuleSet::lift(&CastReduceAdaptor(ChunkedVTable)),
2423
ParentRuleSet::lift(&ChunkedUnaryScalarFnPushDownRule),
2524
ParentRuleSet::lift(&ChunkedConstantScalarFnPushDownRule),
2625
ParentRuleSet::lift(&FillNullReduceAdaptor(ChunkedVTable)),
27-
ParentRuleSet::lift(&ZipReduceAdaptor(ChunkedVTable)),
2826
]);
2927

3028
/// Push down any unary scalar function through chunked arrays.

vortex-array/src/arrays/chunked/compute/zip.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

44
use vortex_error::VortexResult;
5-
use vortex_mask::Mask;
65

76
use crate::Array;
87
use crate::ArrayRef;
9-
use crate::IntoArray;
8+
use crate::ExecutionCtx;
109
use crate::arrays::ChunkedArray;
1110
use crate::arrays::ChunkedVTable;
1211
use crate::builtins::ArrayBuiltins;
13-
use crate::scalar_fn::fns::zip::ZipReduce;
12+
use crate::scalar_fn::fns::zip::ZipKernel;
1413

1514
// Push down the zip call to the chunks. Without this rule
1615
// the default implementation canonicalises the chunked array
1716
// then zips once.
18-
impl ZipReduce for ChunkedVTable {
17+
impl ZipKernel for ChunkedVTable {
1918
fn zip(
2019
if_true: &ChunkedArray,
2120
if_false: &ArrayRef,
22-
mask: &Mask,
21+
mask: &ArrayRef,
22+
_ctx: &mut ExecutionCtx,
2323
) -> VortexResult<Option<ArrayRef>> {
2424
let Some(if_false) = if_false.as_opt::<ChunkedVTable>() else {
2525
return Ok(None);
@@ -44,11 +44,11 @@ impl ZipReduce for ChunkedVTable {
4444
let rhs_rem = rhs_chunk.len() - rhs_offset;
4545
let take_until = lhs_rem.min(rhs_rem);
4646

47-
let mask_slice = mask.slice(pos..pos + take_until);
47+
let mask_slice = mask.slice(pos..pos + take_until)?;
4848
let lhs_slice = lhs_chunk.slice(lhs_offset..lhs_offset + take_until)?;
4949
let rhs_slice = rhs_chunk.slice(rhs_offset..rhs_offset + take_until)?;
5050

51-
out_chunks.push(lhs_slice.zip(rhs_slice, mask_slice.into_array())?);
51+
out_chunks.push(lhs_slice.zip(rhs_slice, mask_slice)?);
5252

5353
pos += take_until;
5454
lhs_offset += take_until;
@@ -79,8 +79,7 @@ mod tests {
7979
use crate::ToCanonical;
8080
use crate::arrays::ChunkedArray;
8181
use crate::arrays::ChunkedVTable;
82-
#[expect(deprecated)]
83-
use crate::compute::zip;
82+
use crate::builtins::ArrayBuiltins;
8483
use crate::dtype::DType;
8584
use crate::dtype::Nullability;
8685
use crate::dtype::PType;
@@ -109,8 +108,10 @@ mod tests {
109108

110109
let mask = Mask::from_iter([true, false, true, false, true]);
111110

112-
#[expect(deprecated)]
113-
let zipped = zip(&if_true.to_array(), &if_false.to_array(), &mask).unwrap();
111+
let zipped = &if_true
112+
.to_array()
113+
.zip(if_false.to_array(), mask.into_array())
114+
.unwrap();
114115
let zipped = zipped
115116
.as_opt::<ChunkedVTable>()
116117
.expect("zip should keep chunked encoding");

vortex-array/src/arrays/constant/compute/fill_null.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ mod test {
2222
use crate::arrays::ConstantArray;
2323
use crate::arrow::IntoArrowArray as _;
2424
use crate::builtins::ArrayBuiltins;
25+
use crate::dtype::DType;
26+
use crate::dtype::Nullability;
27+
use crate::dtype::PType;
2528
use crate::scalar::Scalar;
2629

2730
#[test]
@@ -70,7 +73,10 @@ mod test {
7073
fn test_non_nullable_with_nullable() {
7174
let actual = ConstantArray::new(Scalar::from(1), 3)
7275
.into_array()
73-
.fill_null(Scalar::from(Some(1)))
76+
.fill_null(Scalar::new(
77+
DType::Primitive(PType::I32, Nullability::Nullable),
78+
Some(1.into()),
79+
))
7480
.unwrap();
7581
let expected = ConstantArray::new(Scalar::from(1), 3).into_array();
7682

0 commit comments

Comments
 (0)