BiteTheDDDDt opened a new pull request, #60952:
URL: https://github.com/apache/doris/pull/60952
### What problem does this PR solve?
This pull request introduces improvements to the runtime filter producer
logic and adds a new regression test for validating CTE EXISTS queries with
runtime filters. The changes enhance the detection and merging logic for local
runtime filters, clarify filter state transitions, and provide comprehensive
test coverage for the new logic.
### Runtime filter producer logic improvements
* Refactored the local merge condition in `RuntimeFilterProducer::publish`
to use the new `_need_do_merge` method, improving clarity and maintainability
of the merge decision logic.
* Added the `_need_do_merge` method to encapsulate the logic for determining
when a local merge is required, based on remote targets and global consumers.
* Replaced `detect_in_filter` with `detect_local_in_filter`, updating its
logic to use `_need_do_merge` and ensuring local in filter optimization is only
enabled when appropriate.
[[1]](diffhunk://#diff-21ae533fb353c1ee2c03ee083e392b59f71e122af89b20b4767380aef83a6502L134-R138)
[[2]](diffhunk://#diff-bddbf8ad6f2ca00f5bd80c7ff32db5ec5d57a8ceab20a80b72e9296ec5281d7eL189-R189)
* Improved the runtime filter state transition message in
`RuntimeFilterWrapper::merge` to clarify when the filter is disabled due to
exceeding the maximum number of IN values during a merge.
### Regression testing
* Added a new regression test suite `test_cte_exists` in
`test_cte_exists.groovy` and corresponding output file, covering CTE EXISTS
queries and validating runtime filter behavior with various configurations and
data.
[[1]](diffhunk://#diff-2170eb63e82f077f69d5cc1c1821c71e0a5f957cdafa03df565e352ff97afcf4R1-R76)
[[2]](diffhunk://#diff-1ebe1b318d8106de4b351bea4577631616ece0b39a027c6bcafcafc8a19a4fb1R1-R44)
### 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)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] 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]