Skip to content

Conversation

@airborne12
Copy link
Member

@airborne12 airborne12 commented Oct 14, 2025

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • 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
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@airborne12
Copy link
Member Author

run buildall

@airborne12 airborne12 requested a review from Copilot October 14, 2025 06:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes merge-on-write (MOW) support for the search function by modifying the search validation logic to allow projections and other single-child operators in the query pipeline.

  • Updated CheckSearchUsage to use a more flexible pipeline validation instead of strict LogicalOlapScan checking
  • Added comprehensive regression test for MOW tables with search functionality
  • Enhanced validation logic to traverse single-child operator chains to find the underlying table scan

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
regression-test/suites/search/test_search_mow_support.groovy Adds comprehensive test coverage for search functionality on MOW tables
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/CheckSearchUsage.java Updates validation logic to support single-table pipelines with projections

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

if (current.arity() != 1) {
return false;
}
current = current.child(0);
Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method can result in an infinite loop or null pointer exception. The while loop lacks a null check for current.child(0) and has no termination condition if the plan tree doesn't contain a LogicalOlapScan. Add a null check and ensure proper termination.

Suggested change
current = current.child(0);
Plan next = current.child(0);
if (next == null) {
return false;
}
current = next;

Copilot uses AI. Check for mistakes.
@doris-robot
Copy link

TPC-DS: Total hot run time: 187958 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit d0baeb1b383f051fb2d943f8a38c7be1e5dec8c6, data reload: false

query1	1073	430	404	404
query2	6563	1684	1681	1681
query3	6755	226	228	226
query4	26266	23555	23235	23235
query5	4962	650	512	512
query6	362	266	267	266
query7	4660	494	308	308
query8	312	262	254	254
query9	8742	2576	2571	2571
query10	520	362	298	298
query11	15443	15145	14972	14972
query12	196	125	113	113
query13	1683	573	450	450
query14	11859	9193	9262	9193
query15	269	194	177	177
query16	7922	756	611	611
query17	1750	853	726	726
query18	2224	462	359	359
query19	416	218	180	180
query20	134	130	125	125
query21	211	140	121	121
query22	4744	4661	4519	4519
query23	34954	33696	33722	33696
query24	8868	2493	2591	2493
query25	639	523	457	457
query26	1218	279	161	161
query27	2767	518	375	375
query28	4459	2246	2182	2182
query29	805	640	554	554
query30	313	248	223	223
query31	984	851	779	779
query32	87	68	72	68
query33	582	379	320	320
query34	792	864	520	520
query35	804	854	747	747
query36	956	1013	973	973
query37	126	111	84	84
query38	3631	3544	3489	3489
query39	1497	1406	1467	1406
query40	215	126	116	116
query41	60	62	58	58
query42	118	114	113	113
query43	489	507	483	483
query44	1340	829	828	828
query45	184	185	178	178
query46	832	988	642	642
query47	1777	1842	1719	1719
query48	413	429	315	315
query49	771	528	417	417
query50	655	730	413	413
query51	3900	4008	3946	3946
query52	112	117	107	107
query53	233	258	195	195
query54	596	596	535	535
query55	90	84	83	83
query56	319	312	312	312
query57	1173	1193	1117	1117
query58	291	284	273	273
query59	2658	2678	2424	2424
query60	350	346	340	340
query61	162	158	157	157
query62	806	750	670	670
query63	239	195	198	195
query64	4423	1163	834	834
query65	4046	3969	3964	3964
query66	1096	446	332	332
query67	15777	15469	15001	15001
query68	8163	937	604	604
query69	464	326	295	295
query70	1330	1288	1361	1288
query71	472	336	306	306
query72	5808	4918	2615	2615
query73	558	578	358	358
query74	9219	9151	8883	8883
query75	4241	3316	2830	2830
query76	4132	1190	757	757
query77	954	417	325	325
query78	9642	9627	8906	8906
query79	4500	831	586	586
query80	747	564	521	521
query81	491	263	230	230
query82	837	165	132	132
query83	285	266	253	253
query84	302	124	98	98
query85	894	481	435	435
query86	415	337	305	305
query87	3785	3723	3662	3662
query88	3240	2255	2244	2244
query89	445	337	301	301
query90	1988	283	226	226
query91	164	162	139	139
query92	83	69	62	62
query93	2477	990	638	638
query94	717	451	336	336
query95	409	327	321	321
query96	483	581	290	290
query97	2962	2985	2897	2897
query98	240	221	213	213
query99	1451	1466	1307	1307
Total cold run time: 285571 ms
Total hot run time: 187958 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 29.98 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit d0baeb1b383f051fb2d943f8a38c7be1e5dec8c6, data reload: false

query1	0.06	0.05	0.04
query2	0.10	0.05	0.05
query3	0.26	0.09	0.09
query4	1.61	0.11	0.12
query5	0.27	0.26	0.25
query6	1.18	0.64	0.65
query7	0.04	0.03	0.03
query8	0.06	0.05	0.04
query9	0.63	0.52	0.52
query10	0.58	0.60	0.58
query11	0.17	0.11	0.11
query12	0.14	0.12	0.12
query13	0.63	0.62	0.62
query14	1.03	1.02	1.02
query15	0.88	0.87	0.87
query16	0.40	0.41	0.40
query17	1.11	1.05	1.05
query18	0.22	0.20	0.20
query19	1.92	1.82	1.93
query20	0.02	0.01	0.02
query21	15.42	0.94	0.57
query22	0.75	1.18	0.59
query23	15.04	1.41	0.65
query24	6.84	3.04	0.41
query25	0.30	0.15	0.12
query26	0.59	0.16	0.14
query27	0.06	0.06	0.05
query28	9.38	1.33	0.94
query29	12.54	3.99	3.24
query30	0.29	0.14	0.12
query31	2.83	0.61	0.38
query32	3.26	0.56	0.47
query33	3.11	3.17	3.08
query34	16.18	5.46	4.84
query35	4.92	4.91	4.92
query36	0.68	0.52	0.50
query37	0.11	0.08	0.07
query38	0.07	0.05	0.05
query39	0.04	0.03	0.04
query40	0.19	0.15	0.15
query41	0.10	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 104.09 s
Total hot run time: 29.98 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 85.71% (12/14) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 100.00% (14/14) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 100.00% (14/14) 🎉
Increment coverage report
Complete coverage report

Copy link
Member

@eldenmoon eldenmoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 14, 2025
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

Copy link
Contributor

@zzzxl1993 zzzxl1993 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@airborne12 airborne12 merged commit c4ff082 into apache:master Oct 15, 2025
34 of 35 checks passed
@airborne12 airborne12 deleted the fix-search2 branch October 15, 2025 03:00
yiguolei pushed a commit that referenced this pull request Oct 16, 2025
…56980)

Cherry-picked from #56927

Co-authored-by: Jack <jiangkai@selectdb.com>
@yiguolei yiguolei mentioned this pull request Nov 5, 2025
airborne12 added a commit to airborne12/apache-doris that referenced this pull request Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/4.0.1-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants