mod scalar;
use crate::{
db::{data::CanonicalSlotReader, query::plan::EffectiveRuntimeFilterProgram},
error::InternalError,
value::Value,
};
use std::borrow::Cow;
pub(in crate::db) use crate::db::query::plan::expr::ProjectionEvalError;
pub(in crate::db::executor) use scalar::eval_compiled_expr_with_required_slot_reader_cow;
pub(in crate::db::executor) use scalar::eval_compiled_expr_with_value_reader;
pub(in crate::db::executor) use scalar::eval_compiled_expr_with_value_ref_reader;
pub(in crate::db) use scalar::{
eval_compiled_filter_expr_with_required_slot_reader,
eval_compiled_filter_expr_with_value_cow_reader,
eval_compiled_filter_expr_with_value_ref_reader,
};
#[cfg(any(test, feature = "sql"))]
pub(in crate::db::executor) fn eval_effective_runtime_filter_program_with_slot_reader(
filter_program: &EffectiveRuntimeFilterProgram,
slots: &dyn CanonicalSlotReader,
) -> Result<bool, InternalError> {
filter_program.eval_with_slot_reader(slots)
}
#[cfg(any(test, feature = "sql"))]
pub(in crate::db::executor) fn eval_effective_runtime_filter_program_with_value_ref_reader<'a, F>(
filter_program: &EffectiveRuntimeFilterProgram,
read_slot: &mut F,
missing_slot_context: &str,
) -> Result<bool, InternalError>
where
F: FnMut(usize) -> Option<&'a Value>,
{
filter_program.eval_with_value_ref_reader(read_slot, missing_slot_context)
}
#[cfg(any(test, feature = "sql"))]
pub(in crate::db::executor) fn eval_effective_runtime_filter_program_with_value_cow_reader<'a, F>(
filter_program: &EffectiveRuntimeFilterProgram,
read_slot: &mut F,
missing_slot_context: &str,
) -> Result<bool, InternalError>
where
F: FnMut(usize) -> Option<Cow<'a, Value>>,
{
filter_program.eval_with_value_cow_reader(read_slot, missing_slot_context)
}