vortex_array/arrays/varbin/
mod.rs1mod array;
5pub use array::VarBinArray;
6
7mod compute;
8pub(crate) use compute::varbin_compute_min_max; mod vtable;
11pub use vtable::{VarBinEncoding, VarBinVTable};
12
13pub mod builder;
14
15mod accessor;
16mod operator;
17
18use vortex_buffer::ByteBuffer;
19use vortex_dtype::DType;
20use vortex_error::{VortexUnwrap, vortex_err};
21use vortex_scalar::Scalar;
22
23pub fn varbin_scalar(value: ByteBuffer, dtype: &DType) -> Scalar {
24 if matches!(dtype, DType::Utf8(_)) {
25 Scalar::try_utf8(value, dtype.nullability())
26 .map_err(|err| vortex_err!("Failed to create scalar from utf8 buffer: {}", err))
27 .vortex_unwrap()
28 } else {
29 Scalar::binary(value, dtype.nullability())
30 }
31}
32
33#[cfg(test)]
34mod tests;