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
The transform maintains a Let-based context in the form of Vec<ProvInfo> for each LocalId in scope.
LetRec implementation (basic)
As a first approximation, we can descend in LetRec values and body by just setting the Vec<ProvInfo> of each LetRec binding to ProvInfo::make_leaf(*id, typ.arity()). In other words, we don't attempt to derive additional provenance information for a binding from its associated value definition.
LetRec implementation (intermediate)
Taken from a PR comment: We can add the result of the action to lets the same way as the Let case does. Gets that reach across iteration boundaries would still be leaves, but Gets that refer to the same iteration would have some provenance that they collected within the iteration. I think this would be equivalent to doing exactly one step of a pessimistic fixpoint loop. (ProvInfo::make_leaf is the top, right?)
(This will only be sound if we can assert that the transfer functions for ProvInfo inference for all possible MirRelationExpr variants are monotonic.)
LetRec implementation (advanced)
We can do something similar to ColumnKnowledge and try to run the ProvInfo analysis (without acting on it) until we reach a fixpoint. We can then descend and apply all transformations. This should be safe as rewriting the join based on the ProvInfo should not invalidate gathered ProvInfo (even for recursive bindings).
The text was updated successfully, but these errors were encountered:
Size estimate
L
Notes
The transform maintains a
Let
-based context in the form ofVec<ProvInfo>
for eachLocalId
in scope.LetRec
implementation (basic)As a first approximation, we can descend in
LetRec
values and body by just setting theVec<ProvInfo>
of eachLetRec
binding toProvInfo::make_leaf(*id, typ.arity())
. In other words, we don't attempt to derive additional provenance information for a binding from its associatedvalue
definition.LetRec
implementation (intermediate)Taken from a PR comment: We can add the result of the
action
tolets
the same way as theLet
case does.Get
s that reach across iteration boundaries would still be leaves, butGet
s that refer to the same iteration would have some provenance that they collected within the iteration. I think this would be equivalent to doing exactly one step of a pessimistic fixpoint loop. (ProvInfo::make_leaf
is thetop
, right?)(This will only be sound if we can assert that the transfer functions for
ProvInfo
inference for all possibleMirRelationExpr
variants are monotonic.)LetRec
implementation (advanced)We can do something similar to
ColumnKnowledge
and try to run theProvInfo
analysis (without acting on it) until we reach a fixpoint. We can then descend and apply all transformations. This should be safe as rewriting the join based on theProvInfo
should not invalidate gatheredProvInfo
(even for recursive bindings).The text was updated successfully, but these errors were encountered: