pub struct ScalarZipper {
    zip_impl: Arc<dyn ZipImpl>,
}Expand description
Zipper for 2 scalars
Useful for using in IF <expr> THEN <scalar> ELSE <scalar> END expressions
§Example
let scalar_truthy = Scalar::new(Int32Array::from_value(42, 1));
let scalar_falsy = Scalar::new(Int32Array::from_value(123, 1));
let zipper = ScalarZipper::try_new(&scalar_truthy, &scalar_falsy).unwrap();
// Later when we have a boolean mask
let mask = BooleanArray::from(vec![true, false, true, false, true]);
let result = zipper.zip(&mask).unwrap();
let actual = result.as_primitive::<Int32Type>();
let expected = Int32Array::from(vec![Some(42), Some(123), Some(42), Some(123), Some(42)]);Fields§
§zip_impl: Arc<dyn ZipImpl>Implementations§
Trait Implementations§
Source§impl Clone for ScalarZipper
 
impl Clone for ScalarZipper
Source§fn clone(&self) -> ScalarZipper
 
fn clone(&self) -> ScalarZipper
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreAuto Trait Implementations§
impl Freeze for ScalarZipper
impl !RefUnwindSafe for ScalarZipper
impl Send for ScalarZipper
impl Sync for ScalarZipper
impl Unpin for ScalarZipper
impl !UnwindSafe for ScalarZipper
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more