Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Clean up join order iteration (#3638)
Missed a comment to #3616 (comment): ``` In [src/daft-logical-plan/src/optimization/rules/reorder_joins/join_graph.rs](#3616 (comment)): > }; -#[derive(Debug)] -struct JoinNode { +// TODO(desmond): In the future these trees should keep track of current cost estimates. +#[derive(Clone, Debug)] +pub(super) enum JoinOrderTree { + Relation(usize), // (id). + Join(Box<JoinOrderTree>, Box<JoinOrderTree>, Vec<usize>), // (subtree, subtree, nodes involved). I dont think you need to keep an explicit stack. I think you should be able to something like std::iter::chain(left.into_iter(), right.into_iter()) ``` This PR removes the stack and simply chains the iterators.
- Loading branch information