Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(interactive): Support Multiple Matches in IR Core (#3134)
<!-- Thanks for your contribution! please review https://github.com/alibaba/GraphScope/blob/main/CONTRIBUTING.md before opening an issue. --> ## What do these changes do? <!-- Please give a short brief about these changes. --> As titled, support Multiple Matches in IR Core 1. From now, the logical plan will contain contain a dummy `RootScan` after initialization by default. This dummy `RootScan` may be later used to support multiple `scan`. 2. When a plan of a pattern matching is append to a node, if the plan is naive plan, it will directly append to the assigned node. Otherwise, it the plan is extend plan, then it must have its own scan operator, so it have to be append to the dummy `RootScan` 3. When a sink operator is append to the logical plan, it suggests that the logical plan building is finished. Therefore, it will call `clean_redundant_nodes` method to clean useless nodes. There are two kinds of reduandant nodes: `Scan `node with no child and dummy `RootScan` with zero or only single child. ## Related issue number <!-- Are there any issues opened that will be resolved by merging this change? --> Fixes #3052 #3062 --------- Co-authored-by: Yufan Yang <[email protected]> Co-authored-by: shirly121 <[email protected]>
- Loading branch information