pub struct ArithmeticEvaluator<'a> { /* private fields */ }Expand description
Evaluates SQL expressions to compute DataValues (for SELECT clauses)
This is different from RecursiveWhereEvaluator which returns boolean
Implementations§
Source§impl<'a> ArithmeticEvaluator<'a>
impl<'a> ArithmeticEvaluator<'a>
pub fn new(table: &'a DataTable) -> Self
pub fn with_date_notation(table: &'a DataTable, date_notation: String) -> Self
Sourcepub fn with_visible_rows(self, rows: Vec<usize>) -> Self
pub fn with_visible_rows(self, rows: Vec<usize>) -> Self
Set visible rows for aggregate functions (for filtered views)
Sourcepub fn with_table_aliases(self, aliases: HashMap<String, String>) -> Self
pub fn with_table_aliases(self, aliases: HashMap<String, String>) -> Self
Set table aliases for qualified column resolution
pub fn with_date_notation_and_registry( table: &'a DataTable, date_notation: String, function_registry: Arc<FunctionRegistry>, ) -> Self
Sourcepub fn evaluate(
&mut self,
expr: &SqlExpression,
row_index: usize,
) -> Result<DataValue>
pub fn evaluate( &mut self, expr: &SqlExpression, row_index: usize, ) -> Result<DataValue>
Evaluate an SQL expression to produce a DataValue
Sourcepub fn get_or_create_window_context(
&mut self,
spec: &WindowSpec,
) -> Result<Arc<WindowContext>>
pub fn get_or_create_window_context( &mut self, spec: &WindowSpec, ) -> Result<Arc<WindowContext>>
Get or create a WindowContext for the given specification Public to allow pre-creation of contexts in query engine (optimization)
Auto Trait Implementations§
impl<'a> Freeze for ArithmeticEvaluator<'a>
impl<'a> !RefUnwindSafe for ArithmeticEvaluator<'a>
impl<'a> Send for ArithmeticEvaluator<'a>
impl<'a> Sync for ArithmeticEvaluator<'a>
impl<'a> Unpin for ArithmeticEvaluator<'a>
impl<'a> !UnwindSafe for ArithmeticEvaluator<'a>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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