morrySnow opened a new pull request, #59395:
URL: https://github.com/apache/doris/pull/59395
### What problem does this PR solve?
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.
[[1]](diffhunk://#diff-79d8abdb9d7855b95a985ffa9b4ddbe1c646b58245fc2d0c02bef33374743777L284-R284)
[[2]](diffhunk://#diff-79d8abdb9d7855b95a985ffa9b4ddbe1c646b58245fc2d0c02bef33374743777L605-R591)
[[3]](diffhunk://#diff-79d8abdb9d7855b95a985ffa9b4ddbe1c646b58245fc2d0c02bef33374743777L323-L335)
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [x] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [x] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [x] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should
merge into -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]