Struct sql::query_model::mir::Lowerer [−][src]
struct Lowerer<'a> {
model: &'a Model,
}
Fields
model: &'a Model
Implementations
fn apply(
&mut self,
box_id: BoxId,
get_outer: MirRelationExpr,
outer_column_map: &HashMap<ColumnReference, usize>,
id_gen: &mut IdGen
) -> MirRelationExpr
fn apply(
&mut self,
box_id: BoxId,
get_outer: MirRelationExpr,
outer_column_map: &HashMap<ColumnReference, usize>,
id_gen: &mut IdGen
) -> MirRelationExpr
Applies the given box identified by its ID to the given outer relation.
fn lower_join(
&mut self,
get_outer: MirRelationExpr,
outer_column_map: &HashMap<ColumnReference, usize>,
quantifiers: &BTreeSet<QuantifierId>,
id_gen: &mut IdGen
) -> (MirRelationExpr, HashMap<ColumnReference, usize>)
fn lower_join(
&mut self,
get_outer: MirRelationExpr,
outer_column_map: &HashMap<ColumnReference, usize>,
quantifiers: &BTreeSet<QuantifierId>,
id_gen: &mut IdGen
) -> (MirRelationExpr, HashMap<ColumnReference, usize>)
Generates a join among the result of applying the outer relation to the given quantifiers. Returns a relation and a map of column references that can be used to lower expressions that sit directly on top of the join.
The quantifiers are joined on the columns of the outer relation. TODO(asenac) Since decorrelation is not yet supported the outer relation is currently always the join identity, so the result of this method is always a cross-join of the given quantifiers, which makes part of this code untesteable at the moment.
fn lower_quantifier(
&mut self,
quantifier_id: QuantifierId,
get_outer: MirRelationExpr,
outer_column_map: &HashMap<ColumnReference, usize>,
id_gen: &mut IdGen
) -> MirRelationExpr
fn lower_quantifier(
&mut self,
quantifier_id: QuantifierId,
get_outer: MirRelationExpr,
outer_column_map: &HashMap<ColumnReference, usize>,
id_gen: &mut IdGen
) -> MirRelationExpr
Lowers the given quantifier by applying it to the outer relation.
Join the given inputs on a shared common prefix.
TODO(asenac) Given the lack of support for decorrelation at the moment, this
method is always called with prefix_length
0, and hence, it remains untested.
fn lower_expression(
expr: &BoxScalarExpr,
column_map: &HashMap<ColumnReference, usize>
) -> MirScalarExpr
fn lower_expression(
expr: &BoxScalarExpr,
column_map: &HashMap<ColumnReference, usize>
) -> MirScalarExpr
Lowers a scalar expression, resolving the column references using the supplied column map.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Lowerer<'a>
impl<'a> !UnwindSafe for Lowerer<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more