You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Constant propagation through bindings is done in NormalizeLets, but the LetRec case currently returns an error.
LetRec implementation (basic)
Just remove the
Err(crate::TransformError::LetRecUnsupported)?;
clause from the MirRelationExpr::LetRec case in FoldConstants::action.
LetRec implementation (advanced)
We could to something similar to the "basic" or even of the "advanced" case of column_knowledge:
Introduce a context with the current bindings.
On LetRec, extend this context with the ids of the enclosing LetRec node and update those iteratively, descending sequentially in FoldConstants::action to each binding before descending to the body.
Doing the above step once is akin to how we estimate column_knowledge now, doing it until the bindings converge before we move to the body is akin to the proposed "advanced" scheme in column_knowledge.
Open questions
Can the inductive case from the Implementation sketch above diverge? (cc: @mgree I think in our offline discussion earlier today you came up with some good reasons against that concern)
The text was updated successfully, but these errors were encountered:
@ggevay assigning this to myself as this is one of the three that will also enable FuseAndCollapse (the others are redundant_join and projection_lifting).
Size estimate
S
Notes
Constant propagation through bindings is done in
NormalizeLets
, but theLetRec
case currently returns an error.LetRec
implementation (basic)Just remove the
clause from the
MirRelationExpr::LetRec
case inFoldConstants::action
.LetRec
implementation (advanced)We could to something similar to the "basic" or even of the "advanced" case of
column_knowledge
:LetRec
, extend this context with theids
of the enclosingLetRec
node and update those iteratively, descending sequentially inFoldConstants::action
to each binding before descending to the body.column_knowledge
now, doing it until the bindings converge before we move to the body is akin to the proposed "advanced" scheme incolumn_knowledge
.Open questions
The text was updated successfully, but these errors were encountered: