MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / renumber_bindings

Function renumber_bindings

src/transform/src/normalize_lets.rs:950–958  ·  view source on GitHub ↗

Re-assign an identifier to each `Let`. Under the assumption that `id_gen` produces identifiers in order, this process maintains in-orderness of `LetRec` identifiers.

(
        relation: &mut MirRelationExpr,
        id_gen: &mut IdGen,
    )

Source from the content-addressed store, hash-verified

948 /// Under the assumption that `id_gen` produces identifiers in order, this process
949 /// maintains in-orderness of `LetRec` identifiers.
950 pub fn renumber_bindings(
951 relation: &mut MirRelationExpr,
952 id_gen: &mut IdGen,
953 ) -> Result<(), crate::TransformError> {
954 let mut renaming = BTreeMap::new();
955 determine(&*relation, &mut renaming, id_gen)?;
956 implement(relation, &renaming)?;
957 Ok(())
958 }
959
960 /// Performs an in-order traversal of the AST, assigning identifiers as it goes.
961 fn determine(

Callers 3

inline_viewsFunction · 0.85
actionMethod · 0.85

Calls 2

determineFunction · 0.85
implementFunction · 0.85

Tested by

no test coverage detected