refactor(optimizer): use getters to access plan base, with runtime convention checking #12980
Task list completed / task-list-completed
Started
2023-10-24 06:29:57
ago
3 / 4 tasks completed
1 task still to be completed
Details
Required Tasks
Task | Status |
---|---|
src/frontend/src/optimizer/plan_node/mod.rs | Incomplete |
src/frontend/src/optimizer/plan_node/plan_base.rs | Incomplete |
src/frontend/src/optimizer/plan_node/stream.rs | Incomplete |
All fields in PlanBase are actually copied from the core when constructing. Exposing the fields then the mutability may lead to inconsistency and confusion. |
Incomplete |
It's nonsense to access a stream-specific field on a logical plan node. Currently we always fill in a dummy value for them, which is unsound. Making fields private gives us more flexibility on the internal structure, enable us to replace the product type with the sum type. | Incomplete |
By forcing to access the fields through traits, we're able to further constrain the accessing through the type system. Will explore this in the next PRs. | Incomplete |
I have written necessary rustdoc comments | Completed |
I have added necessary unit tests and integration tests | Completed |
All checks passed in ./risedev check (or alias, ./risedev c ) |
Completed |
My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users) | Incomplete |
Loading