Skip to main content

vortex_array/scalar_fn/unstable/row/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4//! Experimental support for strict scalar functions computed one row at a time.
5//!
6//! This module is experimental and has no compatibility guarantees. External users must enable
7//! the `unstable_row_fns` Cargo feature before importing it.
8//!
9//! A [`RowFn`] describes the typed operation while the framework owns columnar concerns such as
10//! decoding, constant handling, null propagation, allocation, and validity. Its
11//! [`RowFn::dispatch`] implementation uses a [`RowVisitor`] to select an [`ElementTuple`] and
12//! either an [`OutputElement`] or [`OutputSink`] for each supported dtype combination.
13//!
14//! Unlike a general strict function, a [`RowFn`] cannot produce null from valid inputs.
15//!
16//! A _partially valid_ batch contains both valid and invalid rows. _Skip-invalid_ runs the kernel
17//! only for valid rows without changing row positions.
18//!
19//! Prepared visits move work derived from constant operands outside the hot loop. Deferred visits
20//! reduce compact failure evidence without constructing errors in that loop.
21
22mod execute;
23
24mod batch;
25
26mod row_fn;
27pub use row_fn::RowFn;
28
29mod types;
30pub use types::ElementTuple;
31pub use types::FailureEvidence;
32pub use types::IndexedElementTuple;
33pub use types::InitializedElement;
34pub use types::InputElement;
35pub use types::OutputElement;
36pub use types::OutputSink;
37pub use types::SinkResult;
38pub use types::UninitElementSink;
39pub use types::ViewLen;
40
41mod visitor;
42pub use visitor::RowVisitor;
43
44mod vtable;
45pub use vtable::execute_rows;
46pub use vtable::row_fn_return_dtype;