-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[chore](cte) use a better way to get child in enforce regulator #59395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 36514 ms |
TPC-DS: Total hot run time: 179688 ms |
ClickBench: Total hot run time: 27.14 s |
FE UT Coverage ReportIncrement line coverage |
FE Regression Coverage ReportIncrement line coverage |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
yujun777
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
1fb7c9a to
f7a8837
Compare
|
run buildall |
TPC-H: Total hot run time: 33929 ms |
TPC-DS: Total hot run time: 174590 ms |
ClickBench: Total hot run time: 26.81 s |
FE Regression Coverage ReportIncrement line coverage |
related PR #58964 Problem Summary: This pull request refactors how child physical plans are accessed in the `ChildrenPropertiesRegulator` class, simplifying the code and improving test clarity. The main change is the removal of the `getChildPhysicalPlan` helper method, replacing its usage with direct access to the plan from the `children` list. The tests are also updated to build child mocks more locally, improving test isolation and readability. Refactoring and Simplification: * Removed the `getChildPhysicalPlan` method from `ChildrenPropertiesRegulator`, and replaced its usage in `visitPhysicalFilter` and `visitPhysicalProject` with direct access to the child plan via `children.get(0).getPlan()`. This simplifies the code by eliminating unnecessary indirection.
What problem does this PR solve?
related PR #58964
Problem Summary:
This pull request refactors how child physical plans are accessed in the
ChildrenPropertiesRegulatorclass, simplifying the code and improving test clarity. The main change is the removal of thegetChildPhysicalPlanhelper method, replacing its usage with direct access to the plan from thechildrenlist. The tests are also updated to build child mocks more locally, improving test isolation and readability.Refactoring and Simplification
getChildPhysicalPlanmethod fromChildrenPropertiesRegulator, and replaced its usage invisitPhysicalFilterandvisitPhysicalProjectwith direct access to the child plan viachildren.get(0).getPlan(). This simplifies the code by eliminating unnecessary indirection. [1] [2] [3]Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)