pub struct CombinedExpressionEvaluator<'a> { /* private fields */ }Expand description
Evaluates expressions with combined schema (for JOINs)
Implementations§
Source§impl CombinedExpressionEvaluator<'_>
impl CombinedExpressionEvaluator<'_>
Sourcepub fn apply_affinity_for_comparison(
&self,
left_expr: &Expression,
left_val: SqlValue,
right_expr: &Expression,
right_val: SqlValue,
) -> (SqlValue, SqlValue)
pub fn apply_affinity_for_comparison( &self, left_expr: &Expression, left_val: SqlValue, right_expr: &Expression, right_val: SqlValue, ) -> (SqlValue, SqlValue)
Apply SQLite affinity rules for comparisons.
When comparing a TEXT-affinity column to an INTEGER literal, SQLite:
- Converts the INTEGER to TEXT
- Performs string comparison
This method is public for use in GROUP BY expression evaluation.
Sourcepub fn apply_affinity_for_in_comparison(
&self,
left_expr: &Expression,
left_val: SqlValue,
right_expr: &Expression,
right_val: SqlValue,
) -> (SqlValue, SqlValue)
pub fn apply_affinity_for_in_comparison( &self, left_expr: &Expression, left_val: SqlValue, right_expr: &Expression, right_val: SqlValue, ) -> (SqlValue, SqlValue)
Apply SQLite type affinity rules for IN expression comparisons.
IN expressions have different affinity rules than regular comparisons:
- For INTEGER columns, string literals are NOT coerced to integers
- For REAL columns, string literals ARE coerced to REAL
- For TEXT columns, numeric literals are converted to text
Source§impl<'a> CombinedExpressionEvaluator<'a>
impl<'a> CombinedExpressionEvaluator<'a>
Sourcepub fn set_outer_rows(&mut self, outer_rows: &'a [Row])
pub fn set_outer_rows(&mut self, outer_rows: &'a [Row])
Set all outer rows for outer-correlated aggregates (issue #4930).
When an aggregate function in a scalar subquery references only outer columns, it should aggregate over ALL outer rows, not just the current one.
Sourcepub fn clone_for_new_expression(&self) -> Self
pub fn clone_for_new_expression(&self) -> Self
Clone the evaluator for evaluating a different expression
Shares the subquery cache (safe because non-correlated subqueries produce the same results regardless of the current row) but creates a fresh CSE cache (necessary because CSE results depend on row values). Also shares correlation and hash caches (keyed by AST pointer, not row-dependent).
Auto Trait Implementations§
impl<'a> !Freeze for CombinedExpressionEvaluator<'a>
impl<'a> !RefUnwindSafe for CombinedExpressionEvaluator<'a>
impl<'a> !Send for CombinedExpressionEvaluator<'a>
impl<'a> !Sync for CombinedExpressionEvaluator<'a>
impl<'a> Unpin for CombinedExpressionEvaluator<'a>
impl<'a> !UnwindSafe for CombinedExpressionEvaluator<'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
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