Skip to content

[fix](scan) Disable unsafe scan prelimits for row filters - #65916

Open
Hastyshell wants to merge 1 commit into
apache:masterfrom
Hastyshell:codex/ann-topn-prefilter-rf
Open

Hastyshell wants to merge 1 commit into
apache:masterfrom
Hastyshell:codex/ann-topn-prefilter-rf

Conversation

@Hastyshell

@Hastyshell Hastyshell commented Jul 22, 2026 •

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

Issue Number: close None

Related PR: None

Problem Summary: Storage TopN prelimit is unsafe when a lower-level collector ranks rows before all row restrictions have been applied. ANN TopN can keep only the nearest topK segment rows before scanner residual conjuncts run. BM25 score() has two similar prelimit stages: SEARCH DSL can set IndexQueryContext::query_limit before storage key/common/delete restrictions are applied, and score materialization can shrink the row bitmap before remaining batch predicates or rowset delete predicates run. These paths may under-return when the selected topK rows are later filtered out even though more candidates could satisfy the final LIMIT.

This PR disables ANN TopN runtime whenever residual scan conjuncts remain. For score(), it preserves ScoreRuntime so score() is still materialized, but disables score prelimit when residual scan conjuncts remain. SegmentIterator now keeps SEARCH query_limit disabled by default and enables it only for a pure SEARCH expression over the full segment with no other row restrictions. BM25 topK score materialization is used only after the row bitmap represents the final visible predicate-qualified candidate set; otherwise Doris materializes full scores and lets the upper TopN choose the final rows.

The regression coverage is result-based and covers ANN residual predicates plus BM25 score residual, key range, common expression, and delete predicate cases.

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
Copy Markdown
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?

@Hastyshell

Copy link
Copy Markdown
Collaborator Author

run buildall

@Hastyshell
Hastyshell force-pushed the codex/ann-topn-prefilter-rf branch from 4243a6f to 8a501f3 Compare July 22, 2026 12:10
@Hastyshell
Hastyshell requested a review from Copilot July 22, 2026 12:10
@Hastyshell

Copy link
Copy Markdown
Collaborator Author

run buildall

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Disables ANN TopN pushdown when residual scan predicates remain to prevent under-returning rows, and adds a regression test covering the residual-predicate + ANN TopN scenario.

Changes:

  • Reset/disable ANN TopN runtime when residual scan conjuncts are present after conjunct processing.
  • Add a new regression test suite and golden output verifying correct results with residual predicates.
  • Configure session variables in the test to exercise the ANN path deterministically (as intended).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
be/src/exec/operator/olap_scan_operator.cpp Disables ANN TopN runtime when residual scan conjuncts remain to ensure correctness.
regression-test/suites/ann_index_p0/ann_topn_residual_predicate.groovy Adds regression coverage for ANN TopN + residual predicate correctness.
regression-test/data/ann_index_p0/ann_topn_residual_predicate.out Adds expected output for the new regression query.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Hastyshell

Copy link
Copy Markdown
Collaborator Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29179 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 8a501f33fe2432d768a1cee8569b3ce39b1e9d4f, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17748	4096	4038	4038
q2	2082	311	197	197
q3	10226	1407	878	878
q4	4716	467	340	340
q5	7679	838	554	554
q6	206	173	139	139
q7	764	831	607	607
q8	10097	1536	1556	1536
q9	5957	4285	4331	4285
q10	6832	1740	1463	1463
q11	513	369	312	312
q12	772	582	452	452
q13	18106	3350	2750	2750
q14	264	258	248	248
q15	q16	777	773	703	703
q17	1022	971	959	959
q18	6677	5595	5511	5511
q19	1424	1296	1016	1016
q20	756	717	612	612
q21	5966	2595	2287	2287
q22	435	366	292	292
Total cold run time: 103019 ms
Total hot run time: 29179 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4378	4307	4286	4286
q2	292	309	210	210
q3	4532	4903	4393	4393
q4	2054	2115	1354	1354
q5	4368	4229	4303	4229
q6	238	176	133	133
q7	1711	1907	1776	1776
q8	2419	2181	2086	2086
q9	7754	7814	7710	7710
q10	4641	4593	4196	4196
q11	565	397	391	391
q12	762	748	556	556
q13	3413	3587	2983	2983
q14	297	324	285	285
q15	q16	718	748	641	641
q17	1343	1314	1298	1298
q18	7990	7203	7009	7009
q19	1157	1085	1068	1068
q20	2202	2214	1951	1951
q21	5147	4501	4347	4347
q22	521	448	408	408
Total cold run time: 56502 ms
Total hot run time: 51310 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29528 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 8a501f33fe2432d768a1cee8569b3ce39b1e9d4f, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17848	4092	4097	4092
q2	2001	318	201	201
q3	10313	1402	837	837
q4	4712	490	345	345
q5	7687	863	551	551
q6	201	181	151	151
q7	760	832	610	610
q8	10266	1546	1566	1546
q9	5973	4308	4324	4308
q10	6862	1726	1458	1458
q11	512	368	327	327
q12	798	592	450	450
q13	18092	3342	2776	2776
q14	269	260	239	239
q15	q16	792	779	708	708
q17	997	956	1097	956
q18	6930	5903	5519	5519
q19	1431	1356	1150	1150
q20	832	682	576	576
q21	5629	2575	2431	2431
q22	428	346	297	297
Total cold run time: 103333 ms
Total hot run time: 29528 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4482	4433	4402	4402
q2	302	331	212	212
q3	4641	5004	4429	4429
q4	2073	2189	1373	1373
q5	4400	4252	4221	4221
q6	242	186	131	131
q7	2199	1889	1622	1622
q8	2488	2154	2096	2096
q9	7904	7640	7681	7640
q10	4739	4776	4275	4275
q11	610	414	372	372
q12	772	745	569	569
q13	3208	3532	3010	3010
q14	302	304	266	266
q15	q16	712	737	649	649
q17	1348	1325	1333	1325
q18	8081	7302	7006	7006
q19	1148	1072	1081	1072
q20	2234	2205	1961	1961
q21	5250	4569	4434	4434
q22	512	467	443	443
Total cold run time: 57647 ms
Total hot run time: 51508 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 177750 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 8a501f33fe2432d768a1cee8569b3ce39b1e9d4f, data reload: false

query5	4328	637	494	494
query6	455	223	202	202
query7	4838	590	334	334
query8	335	190	174	174
query9	8778	4111	4087	4087
query10	452	349	304	304
query11	5948	2322	2172	2172
query12	163	103	99	99
query13	1283	627	430	430
query14	6493	5261	4904	4904
query14_1	4313	4249	4240	4240
query15	221	219	182	182
query16	1021	470	443	443
query17	1167	764	548	548
query18	2718	460	340	340
query19	213	188	143	143
query20	109	106	107	106
query21	236	161	136	136
query22	13681	13560	13427	13427
query23	17196	16383	15963	15963
query23_1	16133	16196	16291	16196
query24	7528	1793	1314	1314
query24_1	1334	1293	1284	1284
query25	532	442	363	363
query26	1324	343	214	214
query27	2622	601	374	374
query28	4395	2012	1991	1991
query29	1058	596	472	472
query30	341	270	224	224
query31	1119	1094	980	980
query32	110	60	62	60
query33	535	314	246	246
query34	1183	1114	653	653
query35	769	785	664	664
query36	1211	1145	989	989
query37	154	111	89	89
query38	1890	1694	1665	1665
query39	872	864	845	845
query39_1	833	833	846	833
query40	245	165	148	148
query41	65	62	62	62
query42	95	92	93	92
query43	331	328	278	278
query44	1472	776	763	763
query45	195	194	169	169
query46	1058	1190	734	734
query47	2078	2085	1950	1950
query48	393	401	282	282
query49	576	408	313	313
query50	1077	425	344	344
query51	10855	10674	10798	10674
query52	85	90	75	75
query53	267	283	206	206
query54	276	245	224	224
query55	76	72	64	64
query56	312	328	309	309
query57	1326	1256	1192	1192
query58	285	259	257	257
query59	1574	1625	1384	1384
query60	312	272	246	246
query61	157	150	152	150
query62	538	490	428	428
query63	242	202	205	202
query64	2764	1077	819	819
query65	4735	4615	4612	4612
query66	1765	515	380	380
query67	29395	29057	29057	29057
query68	3127	1514	949	949
query69	416	299	269	269
query70	1074	991	963	963
query71	388	355	327	327
query72	3158	2749	2555	2555
query73	894	791	424	424
query74	5084	4894	4713	4713
query75	2557	2535	2135	2135
query76	2344	1197	772	772
query77	384	408	284	284
query78	11812	11693	11323	11323
query79	1210	1210	753	753
query80	629	590	496	496
query81	475	349	294	294
query82	238	157	124	124
query83	332	334	305	305
query84	292	160	137	137
query85	961	684	607	607
query86	320	304	278	278
query87	1816	1820	1810	1810
query88	3708	2826	2814	2814
query89	415	384	333	333
query90	2164	211	195	195
query91	202	201	162	162
query92	68	60	55	55
query93	1735	1526	958	958
query94	550	351	324	324
query95	775	580	474	474
query96	1112	812	339	339
query97	2600	2611	2513	2513
query98	214	212	204	204
query99	1090	1107	967	967
Total cold run time: 262947 ms
Total hot run time: 177750 ms

@hello-stephen

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

query1	0.01	0.01	0.01
query2	0.09	0.05	0.05
query3	0.25	0.14	0.14
query4	1.61	0.18	0.13
query5	0.24	0.22	0.22
query6	1.27	1.08	1.08
query7	0.03	0.01	0.00
query8	0.05	0.04	0.04
query9	0.39	0.31	0.31
query10	0.59	0.55	0.58
query11	0.20	0.14	0.13
query12	0.17	0.14	0.15
query13	0.46	0.47	0.48
query14	1.03	1.01	1.01
query15	0.61	0.59	0.60
query16	0.32	0.32	0.32
query17	1.08	1.11	1.10
query18	0.23	0.21	0.21
query19	2.06	1.90	1.99
query20	0.02	0.01	0.02
query21	15.44	0.22	0.13
query22	4.90	0.05	0.05
query23	16.12	0.31	0.12
query24	3.07	0.42	0.34
query25	0.10	0.04	0.04
query26	0.75	0.22	0.16
query27	0.05	0.03	0.05
query28	3.50	0.97	0.53
query29	12.54	4.12	3.29
query30	0.27	0.15	0.16
query31	2.76	0.58	0.31
query32	3.22	0.60	0.48
query33	3.14	3.28	3.16
query34	15.46	4.19	3.51
query35	3.56	3.51	3.53
query36	0.55	0.43	0.45
query37	0.09	0.06	0.07
query38	0.05	0.04	0.03
query39	0.04	0.03	0.03
query40	0.19	0.16	0.16
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 96.67 s
Total hot run time: 25.03 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/3) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 57.88% (24445/42233)
Line Coverage 41.88% (243198/580708)
Region Coverage 37.80% (193277/511379)
Branch Coverage 38.87% (86908/223594)

@Hastyshell
Hastyshell marked this pull request as ready for review July 22, 2026 14:56
@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (3/3) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.16% (30967/41199)
Line Coverage 59.57% (343809/577126)
Region Coverage 56.30% (288979/513247)
Branch Coverage 57.54% (128726/223728)

@Hastyshell

Copy link
Copy Markdown
Collaborator Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Request changes: the ANN reset is sound for genuine scanner residuals, but the functionally parallel ScoreRuntime/BM25 path can still pre-limit rows before those same residuals (inline comment).

Critical checkpoint conclusions:

  • Goal and scope: clearing _ann_topn_runtime after normalization correctly prevents ANN per-segment TopN from running before residual _conjuncts; the retained upper TopN and independent virtual-distance expression preserve final ordering and limit semantics. The change is small and focused for ANN.
  • Parallel paths: BM25 score() TopN remains unsafe when an indexed MATCH/SEARCH is consumed but a scanner-only residual remains. Both score pre-limit stages need the same residual gate.
  • Concurrency and lifecycle: _process_conjuncts() runs before scanner construction, so serial and parallel scanner/tablet/segment copies all observe the ANN reset without a new lock or ownership hazard. A late join runtime filter cannot target this direct ANN scan because the retained physical TopN is a runtime-filter pushdown barrier; ready filters are normalized before the guard.
  • Error, memory, compatibility, and persistence: no ignored status, ownership cycle, configuration, thrift/storage-format, transaction, persisted-state, or mixed-version change was found.
  • Tests and results: the new output is deterministic and follows suite conventions, but abs(id) > 2 is moved to common-expression pushdown on this DUP_KEYS table, whose existing fallback already disables ANN TopN. Thus the test can pass before this patch and does not exercise the new guard; existing discussion r3630166258 already covers that path-proof gap, so I did not duplicate it. Current PR checks report P0 Regression, BE UT, compile, formatting/checkstyle, and coverage passing.
  • Performance and observability: disabling ANN only for true residuals is a correctness-first fallback; existing ANN profile counters are sufficient, while the score fix should add a causal path assertion or counter.
  • User focus: no additional focus was supplied.

Validation was static only, as required by the review runner; no local build or test command was run.

@Hastyshell

Copy link
Copy Markdown
Collaborator Author

/review

@Hastyshell
Hastyshell force-pushed the codex/ann-topn-prefilter-rf branch from 92c5df1 to ea6b46b Compare July 23, 2026 02:29
@Hastyshell

Copy link
Copy Markdown
Collaborator Author

run buildall

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Request changes: the live head fixes ANN and score pre-limits when true scanner residuals remain, but score pre-limit can still rank rows before storage visibility and predicate restrictions; see the inline P1.

Critical checkpoint conclusions:

  • Goal and results: resetting ANN and zeroing the ScoreRuntime pre-limit for residual _conjuncts are correct. The goal remains incomplete because restrictions outside _conjuncts can still remove selected score leaders.
  • Scope and metadata: the implementation is localized, but the PR title/body remain ANN-only despite the live score-runtime and score-test additions.
  • Concurrency and lifecycle: _process_conjuncts() runs before scanner construction and pointer fan-out, so no race, lock, ownership, or lifetime defect was found. Ready runtime filters are acquired before this guard, and the retained PhysicalTopN blocks a semantically required late join runtime filter.
  • Parallel paths and conditions: a zero limit disables both SEARCH query_limit and BM25 top-k while preserving score materialization and the upper TopN. Scan keys, remaining common expressions, persisted rowset delete predicates, and MOW delete bitmaps are nevertheless invisible to this guard; the inline comment covers their shared invariant.
  • Error and memory handling: no ignored Status, nullability issue, allocation/accounting problem, or ownership cycle was introduced.
  • Configuration, compatibility, persistence, and writes: there is no production configuration, wire/storage-format, EditLog, transaction, write-path, or mixed-version change. The MOW case is a read-time visibility boundary.
  • Tests and results: the two score cases genuinely exercise both residual score consumers and have deterministic output. The ANN result is correct but does not prove the new branch; existing discussion r3630166258 already covers that gap. Key/common/delete cases remain missing.
  • Performance and observability: full scoring is required whenever a collector lacks the final eligible candidate set; the normal no-residual fast path remains, and no separate metric or profile-counter gap was found.
  • CI immediately before submission: 11 checks passed; macOS BE UT, BE UT, compile, performance, and code-review were pending; none failed.
  • User focus: no additional focus was supplied.

Validation was static only, as required by the review runner; no local build or test command was run.

@github-actions

Copy link
Copy Markdown
Contributor

Codex automated review failed and did not complete.

Error: Codex completed, but no new pull request review was submitted for the current head SHA.
Workflow run: https://github.com/apache/doris/actions/runs/29974462337

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29758 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit ea6b46b34c28a16e587d13ee9b60c05585d9578c, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17731	4125	4101	4101
q2	2029	335	205	205
q3	10282	1519	837	837
q4	4682	477	339	339
q5	7589	879	577	577
q6	188	177	140	140
q7	750	836	624	624
q8	9356	1544	1635	1544
q9	5656	4382	4433	4382
q10	6793	1718	1473	1473
q11	514	348	316	316
q12	758	591	462	462
q13	18108	3424	2764	2764
q14	272	269	241	241
q15	q16	792	775	704	704
q17	1033	911	966	911
q18	7016	5853	5673	5673
q19	1337	1349	1113	1113
q20	801	693	601	601
q21	5913	2607	2454	2454
q22	435	359	297	297
Total cold run time: 102035 ms
Total hot run time: 29758 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4489	4441	4377	4377
q2	293	320	218	218
q3	4594	4967	4404	4404
q4	2083	2180	1381	1381
q5	4443	4264	4358	4264
q6	229	175	131	131
q7	1876	2096	1736	1736
q8	2634	2239	2296	2239
q9	7997	8231	7890	7890
q10	4702	4729	4207	4207
q11	613	457	411	411
q12	779	782	535	535
q13	3359	3647	2949	2949
q14	309	301	277	277
q15	q16	701	747	671	671
q17	1419	1373	1391	1373
q18	8109	7515	7364	7364
q19	1196	1104	1060	1060
q20	2222	2234	1930	1930
q21	5360	4708	4460	4460
q22	524	463	395	395
Total cold run time: 57931 ms
Total hot run time: 52272 ms

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Storage TopN prelimit is unsafe when a lower-level collector ranks rows before all row restrictions have been applied. ANN TopN can keep only the nearest topK segment rows before scanner residual conjuncts run. BM25 score() has two similar prelimit stages: SEARCH DSL can set IndexQueryContext::query_limit before storage key/common/delete restrictions are applied, and score materialization can shrink the row bitmap before remaining batch predicates or rowset delete predicates run. These paths may under-return when the selected topK rows are later filtered out even though more candidates could satisfy the final LIMIT.

Disable ANN TopN runtime whenever residual scan conjuncts remain. For score(), preserve ScoreRuntime so score() is still materialized, but set its limit to zero when residual scan conjuncts remain. In SegmentIterator, keep SEARCH query_limit disabled by default and enable it only for a pure SEARCH expression over the full segment with no other row restrictions. Also use BM25 topK score materialization only after the row bitmap represents the final visible predicate-qualified candidate set; otherwise materialize full scores and let the upper TopN choose the final rows.

### Release note

Fix ANN and BM25 score TopN queries to avoid under-returning rows when scan filters, storage predicates, or delete predicates remove preselected candidates.

### Check List (For Author)

- Test: Manual test

    - git diff --check

    - Added regression test ann_topn_residual_predicate with expected result file, not run locally per request

    - Added regression test test_search_score_residual_predicate with expected result file covering residual, key range, common expression, and delete predicate cases, not run locally per request

    - build-support/clang-format.sh was attempted but could not run because llvm@16 is not installed locally

- Behavior changed: Yes. Unsafe ANN and BM25 score prelimit paths are disabled when they cannot rank the final visible candidate set; score() materialization and final upper TopN semantics are preserved.

- Does this need documentation: No
@Hastyshell
Hastyshell force-pushed the codex/ann-topn-prefilter-rf branch from ea6b46b to d160bbb Compare July 23, 2026 03:34
@Hastyshell Hastyshell changed the title [fix](ann-index) Disable ANN TopN pushdown for residual predicates [fix](scan) Disable unsafe scan prelimits for row filters Jul 23, 2026
@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 177568 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 ea6b46b34c28a16e587d13ee9b60c05585d9578c, data reload: false

query5	4331	628	479	479
query6	466	222	225	222
query7	4847	610	314	314
query8	333	195	171	171
query9	8749	4055	4002	4002
query10	503	366	304	304
query11	5854	2320	2128	2128
query12	192	103	101	101
query13	1244	600	374	374
query14	6195	5178	4839	4839
query14_1	4216	4197	4217	4197
query15	213	205	173	173
query16	992	464	393	393
query17	892	705	556	556
query18	2417	471	338	338
query19	201	181	140	140
query20	109	107	104	104
query21	240	156	136	136
query22	13539	13449	13321	13321
query23	17378	16546	16086	16086
query23_1	16242	16218	16298	16218
query24	7633	1755	1281	1281
query24_1	1329	1291	1287	1287
query25	582	473	409	409
query26	1345	379	227	227
query27	2579	615	379	379
query28	4480	1988	2009	1988
query29	1113	650	496	496
query30	352	279	229	229
query31	1126	1103	977	977
query32	133	65	64	64
query33	551	327	275	275
query34	1196	1180	663	663
query35	774	793	673	673
query36	1182	1199	1043	1043
query37	163	112	95	95
query38	1879	1707	1676	1676
query39	883	897	846	846
query39_1	849	832	843	832
query40	252	172	146	146
query41	72	69	68	68
query42	103	96	92	92
query43	329	326	280	280
query44	1405	786	759	759
query45	204	205	171	171
query46	1093	1177	740	740
query47	2163	2132	1987	1987
query48	404	426	281	281
query49	597	422	358	358
query50	1126	431	341	341
query51	10505	10711	10721	10711
query52	89	89	76	76
query53	261	284	204	204
query54	272	244	220	220
query55	74	71	68	68
query56	309	274	297	274
query57	1311	1293	1202	1202
query58	278	304	289	289
query59	1529	1670	1467	1467
query60	310	285	249	249
query61	151	141	139	139
query62	567	502	437	437
query63	245	196	203	196
query64	2819	1069	902	902
query65	4755	4636	4647	4636
query66	1845	514	371	371
query67	29292	29228	29076	29076
query68	3208	1512	971	971
query69	426	308	264	264
query70	1097	971	930	930
query71	383	335	322	322
query72	3100	2702	2370	2370
query73	848	798	391	391
query74	5063	4908	4712	4712
query75	2538	2509	2111	2111
query76	2320	1208	746	746
query77	357	373	279	279
query78	11938	11819	11219	11219
query79	1442	1158	733	733
query80	645	527	468	468
query81	453	332	294	294
query82	581	158	121	121
query83	404	327	297	297
query84	328	161	132	132
query85	943	599	532	532
query86	361	284	271	271
query87	1827	1828	1757	1757
query88	3666	2787	2746	2746
query89	430	382	325	325
query90	1870	201	190	190
query91	203	190	168	168
query92	62	59	56	56
query93	1677	1526	991	991
query94	564	374	344	344
query95	806	497	581	497
query96	1085	875	342	342
query97	2666	2626	2491	2491
query98	215	212	210	210
query99	1096	1119	977	977
Total cold run time: 262642 ms
Total hot run time: 177568 ms

@hello-stephen

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

query1	0.00	0.00	0.00
query2	0.10	0.05	0.06
query3	0.26	0.14	0.14
query4	1.62	0.14	0.14
query5	0.23	0.23	0.22
query6	1.24	1.07	1.07
query7	0.04	0.00	0.00
query8	0.06	0.04	0.04
query9	0.40	0.32	0.32
query10	0.55	0.58	0.59
query11	0.20	0.13	0.14
query12	0.18	0.14	0.14
query13	0.47	0.48	0.48
query14	0.99	0.99	1.02
query15	0.63	0.60	0.61
query16	0.32	0.32	0.31
query17	1.15	1.11	1.17
query18	0.23	0.21	0.23
query19	2.00	1.98	1.93
query20	0.02	0.01	0.01
query21	15.45	0.22	0.15
query22	4.80	0.06	0.05
query23	16.09	0.32	0.13
query24	2.90	0.44	0.35
query25	0.11	0.04	0.03
query26	0.74	0.22	0.14
query27	0.03	0.03	0.04
query28	3.58	0.91	0.56
query29	12.51	4.17	3.31
query30	0.27	0.16	0.15
query31	2.77	0.59	0.31
query32	3.22	0.60	0.49
query33	3.18	3.23	3.20
query34	15.67	4.25	3.56
query35	3.56	3.55	3.56
query36	0.56	0.43	0.43
query37	0.10	0.07	0.06
query38	0.05	0.05	0.04
query39	0.03	0.04	0.03
query40	0.17	0.16	0.16
query41	0.09	0.04	0.03
query42	0.04	0.03	0.03
query43	0.05	0.03	0.04
Total cold run time: 96.66 s
Total hot run time: 25.29 s

!_col_predicates.empty()) {
return false;
}
if (_common_expr_ctxs_push_down.size() != 1) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

== 0 的时候是否可以?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants