Uh oh!
There was an error while loading. Please reload this page.
[fix](search) add restriction for search function - #56706
Conversation
Thearas
commented
Oct 5, 2025
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
airborne12
commented
Oct 5, 2025
run buildall |
There was a problem hiding this comment.
Pull Request Overview
This PR adds restrictions for the search() function to ensure it can only be used in WHERE clauses on single-table OLAP scans. The implementation includes validation rules that reject search() usage in other contexts like SELECT projections, GROUP BY clauses, HAVING clauses, and multi-table scenarios.
- Added a new analysis rule
CheckSearchUsagethat validates search() function usage patterns - Created comprehensive unit tests covering valid and invalid search() usage scenarios
- Integrated the validation rule into the analyzer pipeline before other optimizations
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| CheckSearchUsage.java | Main validation rule that checks search() usage restrictions recursively through the plan tree |
| CheckSearchUsageTest.java | Comprehensive unit tests covering valid WHERE clause usage and invalid usage in projections, GROUP BY, joins, etc. |
| RuleType.java | Added CHECK_SEARCH_USAGE rule type enum |
| Analyzer.java | Integrated CheckSearchUsage rule into analyzer pipeline |
| test_search_usage_restrictions.out | Test output file for regression tests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
airborne12
commented
Oct 5, 2025
run buildall |
doris-robot
commented
Oct 5, 2025
ClickBench: Total hot run time: 30.25 s |
hello-stephen
commented
Oct 5, 2025
FE UT Coverage ReportIncrement line coverage |
hello-stephen
commented
Oct 5, 2025
FE Regression Coverage ReportIncrement line coverage |
1 similar comment
hello-stephen
commented
Oct 5, 2025
FE Regression Coverage ReportIncrement line coverage |
PR approved by at least one committer and no changes requested. |
1 similar comment
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
1 similar comment
PR approved by anyone and no changes requested. |
Uh oh!
There was an error while loading. Please reload this page.
### What problem does this PR solve? Issue Number: close #xxx Related PR: #56139 Problem Summary: This PR adds restrictions for the search() function to ensure it can only be used in WHERE clauses on single-table OLAP scans. The implementation includes validation rules that reject search() usage in other contexts like SELECT projections, GROUP BY clauses, HAVING clauses, and multi-table scenarios.
### What problem does this PR solve? Issue Number: close #xxx Related PR: apache#56139 Problem Summary: This PR adds restrictions for the search() function to ensure it can only be used in WHERE clauses on single-table OLAP scans. The implementation includes validation rules that reject search() usage in other contexts like SELECT projections, GROUP BY clauses, HAVING clauses, and multi-table scenarios.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #56139
Problem Summary:
This PR adds restrictions for the search() function to ensure it can only be used in WHERE clauses on single-table OLAP scans. The implementation includes validation rules that reject search() usage in other contexts like SELECT projections, GROUP BY clauses, HAVING clauses, and multi-table scenarios.
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)