pub enum Ring0Predicate {
Eq {
column_index: usize,
value: ScalarValue,
},
NotEq {
column_index: usize,
value: ScalarValue,
},
Gt {
column_index: usize,
value: ScalarValue,
},
GtEq {
column_index: usize,
value: ScalarValue,
},
Lt {
column_index: usize,
value: ScalarValue,
},
LtEq {
column_index: usize,
value: ScalarValue,
},
Between {
column_index: usize,
low: ScalarValue,
high: ScalarValue,
},
IsNull {
column_index: usize,
},
IsNotNull {
column_index: usize,
},
In {
column_index: usize,
values: SmallVec<[ScalarValue; 8]>,
},
}Expand description
Ring 0 predicate (must be zero-allocation, < 50ns).
Supports column-level checks that can be evaluated with no heap allocation. Complex expressions (AND/OR, multi-column, UDFs) are deferred to Ring 1.
Variants§
Eq
Column equals a constant value: column = value
Fields
value: ScalarValueThe constant value to compare against.
NotEq
Column not equal: column != value / column <> value
Fields
value: ScalarValueThe constant value to compare against.
Gt
Column greater than: column > value
Fields
value: ScalarValueThe constant value to compare against.
GtEq
Column greater than or equal: column >= value
Fields
value: ScalarValueThe constant value to compare against.
Lt
Column less than: column < value
Fields
value: ScalarValueThe constant value to compare against.
LtEq
Column less than or equal: column <= value
Fields
value: ScalarValueThe constant value to compare against.
Between
Column is between two values (inclusive): column BETWEEN low AND high
IsNull
Column is null: column IS NULL
IsNotNull
Column is not null: column IS NOT NULL
In
Column value is in a set: column IN (v1, v2, ...)
Limited to 8 values to stay on the stack via [SmallVec].
Fields
values: SmallVec<[ScalarValue; 8]>Fixed-capacity inline set. Max 8 values to stay on stack.
Implementations§
Source§impl Ring0Predicate
impl Ring0Predicate
Sourcepub fn evaluate(
&self,
batch: &RecordBatch,
row: usize,
intern: &StringInternTable,
) -> bool
pub fn evaluate( &self, batch: &RecordBatch, row: usize, intern: &StringInternTable, ) -> bool
Evaluates the predicate against a single row in a RecordBatch.
Returns true if the row matches the predicate.
This runs on the Ring 0 hot path.
Trait Implementations§
Source§impl Clone for Ring0Predicate
impl Clone for Ring0Predicate
Source§fn clone(&self) -> Ring0Predicate
fn clone(&self) -> Ring0Predicate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Ring0Predicate
impl RefUnwindSafe for Ring0Predicate
impl Send for Ring0Predicate
impl Sync for Ring0Predicate
impl Unpin for Ring0Predicate
impl UnsafeUnpin for Ring0Predicate
impl UnwindSafe for Ring0Predicate
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more