sxt-proof-of-sql icon indicating copy to clipboard operation
sxt-proof-of-sql copied to clipboard

Expand `column_operation.rs` to include column-literal operations

Open iajoiner opened this issue 3 months ago • 0 comments

Background and Motivation

We need to expand column_operation.rs to include column-literal operations so that we can define accurate and fast operations on ColumnarValues.

Changes Required

  • [ ] Add the following functions to column_operation.rs or start a separate column_literal_operation.rs.
  • [ ] Make sure the code is well tested.

Examples of functions we need:

pub(super) fn slice_literal_and(slice: &[bool], lit: bool) -> Vec<bool>;
pub(super) fn slice_literal_or(slice: &[bool], lit: bool) -> Vec<bool>;
pub(super) fn slice_literal_eq<T>(slice: &[T], lit: T) -> Vec<T>
where
    T: PartialEq + Debug;
pub(super) fn slice_literal_le_casting_slice<SmallerType, LargerType>(
    slice_of_smaller_type: &[SmallerType],
    literal_of_larger_type: LargerType,
) -> Vec<bool>
where
    SmallerType: Copy + Debug + Into<LargerType>,
    LargerType: PartialOrd + Copy + Debug;
pub(super) fn slice_literal_le_casting_literal<SmallerType, LargerType>(
    slice_of_larger_type: &[LargerType],
    literal_of_smaller_type: SmallerType,
) -> Vec<bool>
where
    SmallerType: Copy + Debug + Into<LargerType>,
    LargerType: PartialOrd + Copy + Debug;

iajoiner avatar Nov 01 '24 13:11 iajoiner