Skip to content

Commit

Permalink
simplify traversal without predicates
Browse files Browse the repository at this point in the history
  • Loading branch information
jopereira committed Nov 15, 2024
1 parent 69c8779 commit 9538ebf
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions optd-core/src/cascades/optimizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,11 @@ impl<T: NodeType, M: Memo<T>> CascadesOptimizer<T, M> {
let expr = memo.get_expr_memoed(*expr_id);
//writeln!(writer, "\"g{}\" -> \"e{}\";", i, e)?;
for child in expr.children.iter() {
if groups.contains(child) {
writeln!(
writer,
"e{} -> g{} [lhead=\"cluster_{}\"];",
expr_id.0, child.0, child.0
)?;
}
writeln!(
writer,
"e{} -> g{} [lhead=\"cluster_{}\"];",
expr_id.0, child.0, child.0
)?;
}
}
}
Expand Down

0 comments on commit 9538ebf

Please sign in to comment.