use crate::value::Value;
use smallvec::SmallVec;
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
pub enum PredicateState {
#[default]
Undecided,
Pass,
Fail,
}
pub(crate) struct RowBuffer {
pub(crate) fields: SmallVec<[(u32, Value<'static>); 32]>,
pub(crate) state: PredicateState,
pub(crate) predicate_mask: SmallVec<[u64; 1]>,
pub(crate) direct: bool,
pub(crate) predicate_ordinal: Option<u32>,
pub(crate) buffer_worthwhile: bool,
pub(crate) pred_names: SmallVec<[String; 4]>,
}
impl RowBuffer {
#[allow(dead_code)]
pub(crate) fn new() -> Self {
Self {
fields: SmallVec::new(),
state: PredicateState::Undecided,
predicate_mask: SmallVec::new(),
direct: false,
predicate_ordinal: None,
buffer_worthwhile: true,
pred_names: SmallVec::new(),
}
}
}