Skip to content

[Improve](Variant) use COUNT_ON_INDEX on variant subcolumns#60404

Merged
eldenmoon merged 1 commit intoapache:masterfrom
eldenmoon:count-on-index-variant
Feb 3, 2026
Merged

[Improve](Variant) use COUNT_ON_INDEX on variant subcolumns#60404
eldenmoon merged 1 commit intoapache:masterfrom
eldenmoon:count-on-index-variant

Conversation

@eldenmoon
Copy link
Copy Markdown
Member

@eldenmoon eldenmoon commented Jan 31, 2026

What problem does this PR solve?

related PR #57461
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
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?

@eldenmoon
Copy link
Copy Markdown
Member Author

run buildall

@eldenmoon eldenmoon force-pushed the count-on-index-variant branch from b4506c2 to d222675 Compare January 31, 2026 15:47
@eldenmoon
Copy link
Copy Markdown
Member Author

run buildall

@doris-robot
Copy link
Copy Markdown

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

------ Round 1 ----------------------------------
q1	17649	5301	5140	5140
q2	2065	314	204	204
q3	10162	1306	736	736
q4	10202	808	318	318
q5	7541	2138	1856	1856
q6	198	179	147	147
q7	899	748	611	611
q8	9265	1357	1066	1066
q9	5132	4839	4872	4839
q10	6852	1950	1587	1587
q11	502	297	274	274
q12	343	381	226	226
q13	17807	4079	3249	3249
q14	251	248	224	224
q15	894	835	818	818
q16	695	660	612	612
q17	650	763	542	542
q18	6682	6759	7445	6759
q19	1641	1070	686	686
q20	422	392	243	243
q21	3009	2290	2006	2006
q22	367	310	270	270
Total cold run time: 103228 ms
Total hot run time: 32413 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5558	5644	5572	5572
q2	253	349	274	274
q3	2424	2862	2539	2539
q4	1449	1914	1523	1523
q5	4762	4670	4684	4670
q6	227	182	146	146
q7	2080	1911	1867	1867
q8	2519	2395	2411	2395
q9	7706	7444	7376	7376
q10	2598	2788	2412	2412
q11	538	444	440	440
q12	627	721	570	570
q13	3528	4005	3246	3246
q14	278	280	268	268
q15	843	800	797	797
q16	642	689	650	650
q17	1074	1295	1319	1295
q18	7593	7328	7347	7328
q19	815	765	777	765
q20	2005	2069	1884	1884
q21	4453	4179	4130	4130
q22	581	539	515	515
Total cold run time: 52553 ms
Total hot run time: 50662 ms

@doris-robot
Copy link
Copy Markdown

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

query1	0.05	0.05	0.05
query2	0.10	0.04	0.04
query3	0.26	0.09	0.08
query4	1.60	0.11	0.11
query5	0.27	0.24	0.25
query6	1.17	0.70	0.68
query7	0.03	0.02	0.02
query8	0.05	0.04	0.04
query9	0.56	0.50	0.51
query10	0.55	0.56	0.56
query11	0.13	0.09	0.10
query12	0.14	0.11	0.10
query13	0.65	0.61	0.61
query14	1.09	1.07	1.06
query15	0.88	0.88	0.86
query16	0.39	0.40	0.39
query17	1.08	1.09	1.09
query18	0.23	0.22	0.21
query19	2.10	1.94	1.98
query20	0.02	0.01	0.02
query21	15.39	0.28	0.15
query22	4.98	0.05	0.06
query23	15.66	0.28	0.11
query24	1.72	0.27	0.20
query25	0.08	0.08	0.07
query26	0.15	0.13	0.14
query27	0.08	0.06	0.04
query28	3.27	1.16	0.96
query29	12.57	3.92	3.17
query30	0.27	0.13	0.12
query31	2.81	0.64	0.41
query32	3.23	0.61	0.50
query33	3.18	3.32	3.20
query34	16.35	5.42	4.70
query35	4.83	4.78	4.78
query36	0.67	0.50	0.50
query37	0.11	0.07	0.07
query38	0.07	0.04	0.04
query39	0.05	0.03	0.03
query40	0.19	0.16	0.15
query41	0.09	0.03	0.03
query42	0.04	0.03	0.03
query43	0.05	0.04	0.04
Total cold run time: 97.19 s
Total hot run time: 28.16 s

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 100.00% (5/5) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.49% (19277/36723)
Line Coverage 35.96% (179071/497963)
Region Coverage 32.35% (138809/429038)
Branch Coverage 33.32% (60101/180351)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (5/5) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.52% (25745/35998)
Line Coverage 54.19% (269215/496786)
Region Coverage 51.81% (224565/433448)
Branch Coverage 53.19% (96310/181083)

airborne12
airborne12 previously approved these changes Feb 2, 2026
Copy link
Copy Markdown
Member

@airborne12 airborne12 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 Feb 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 2, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 2, 2026

PR approved by anyone and no changes requested.

Copilot AI review requested due to automatic review settings February 2, 2026 08:15
@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Feb 2, 2026
@eldenmoon eldenmoon force-pushed the count-on-index-variant branch from 79ba961 to 0345ce7 Compare February 2, 2026 08:19
Copy link
Copy Markdown
Contributor

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@eldenmoon eldenmoon force-pushed the count-on-index-variant branch from 0345ce7 to 1367ada Compare February 2, 2026 13:56
@eldenmoon
Copy link
Copy Markdown
Member Author

run buildall

@eldenmoon eldenmoon force-pushed the count-on-index-variant branch from 1367ada to 76119fb Compare February 2, 2026 14:01
@eldenmoon
Copy link
Copy Markdown
Member Author

run buildall

@doris-robot
Copy link
Copy Markdown

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

------ Round 1 ----------------------------------
q1	17664	5251	5064	5064
q2	2095	313	196	196
q3	10139	1357	759	759
q4	10200	829	328	328
q5	7527	2188	1914	1914
q6	196	180	149	149
q7	906	746	609	609
q8	9263	1427	1101	1101
q9	5217	4858	4860	4858
q10	6807	1962	1579	1579
q11	515	299	278	278
q12	339	394	240	240
q13	17781	4069	3258	3258
q14	240	236	234	234
q15	893	809	818	809
q16	677	684	624	624
q17	656	767	566	566
q18	6722	6633	6620	6620
q19	1237	992	656	656
q20	419	349	233	233
q21	2774	2320	1966	1966
q22	361	320	281	281
Total cold run time: 102628 ms
Total hot run time: 32322 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5299	5313	5329	5313
q2	271	339	266	266
q3	2205	2727	2265	2265
q4	1370	1766	1305	1305
q5	4258	4156	4269	4156
q6	221	186	139	139
q7	2427	2044	1901	1901
q8	2583	2387	2409	2387
q9	7621	7562	7670	7562
q10	2812	2970	2676	2676
q11	568	521	448	448
q12	688	750	625	625
q13	3962	4436	3613	3613
q14	319	315	287	287
q15	878	826	845	826
q16	678	735	661	661
q17	1119	1345	1349	1345
q18	8336	8059	7865	7865
q19	980	914	923	914
q20	2117	2182	2040	2040
q21	4851	4699	4180	4180
q22	591	523	502	502
Total cold run time: 54154 ms
Total hot run time: 51276 ms

@doris-robot
Copy link
Copy Markdown

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

query1	0.05	0.04	0.04
query2	0.10	0.05	0.05
query3	0.26	0.09	0.08
query4	1.61	0.11	0.11
query5	0.25	0.25	0.25
query6	1.15	0.68	0.67
query7	0.03	0.03	0.03
query8	0.05	0.04	0.04
query9	0.57	0.49	0.49
query10	0.56	0.55	0.55
query11	0.15	0.10	0.10
query12	0.14	0.11	0.11
query13	0.63	0.62	0.61
query14	1.06	1.06	1.06
query15	0.89	0.87	0.88
query16	0.40	0.41	0.38
query17	1.14	1.12	1.13
query18	0.23	0.21	0.22
query19	2.04	2.06	2.03
query20	0.02	0.01	0.01
query21	15.43	0.24	0.14
query22	5.40	0.05	0.05
query23	15.78	0.28	0.10
query24	1.25	0.53	0.23
query25	0.08	0.09	0.06
query26	0.14	0.13	0.14
query27	0.07	0.06	0.06
query28	3.45	1.15	0.96
query29	12.58	3.94	3.16
query30	0.27	0.14	0.11
query31	2.82	0.64	0.40
query32	3.25	0.60	0.49
query33	3.19	3.23	3.21
query34	16.13	5.38	4.76
query35	4.78	4.76	4.78
query36	0.65	0.50	0.48
query37	0.11	0.07	0.07
query38	0.07	0.04	0.03
query39	0.05	0.03	0.03
query40	0.18	0.17	0.15
query41	0.09	0.04	0.03
query42	0.05	0.04	0.03
query43	0.05	0.04	0.04
Total cold run time: 97.2 s
Total hot run time: 28.29 s

@doris-robot
Copy link
Copy Markdown

BE UT Coverage Report

Increment line coverage 55.56% (5/9) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.54% (19354/36838)
Line Coverage 36.00% (179704/499178)
Region Coverage 32.39% (139443/430468)
Branch Coverage 33.35% (60307/180844)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (9/9) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.64% (25864/36103)
Line Coverage 54.29% (270372/497980)
Region Coverage 51.96% (225941/434861)
Branch Coverage 53.28% (96734/181570)

Copy link
Copy Markdown
Contributor

@csun5285 csun5285 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@airborne12 airborne12 left a comment

Choose a reason for hiding this comment

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

Minor typo in the new comment:

// Exmple: CAST(v['a'] AS VARCHAR) MATCH 'hello', do not add CAST expr to index tracking.

Should be:

// Example: CAST(v['a'] AS VARCHAR) MATCH 'hello', do not add CAST expr to index tracking.

Copy link
Copy Markdown
Member

@airborne12 airborne12 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 Feb 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 3, 2026

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

@eldenmoon eldenmoon merged commit bc494f5 into apache:master Feb 3, 2026
29 of 32 checks passed
yiguolei pushed a commit that referenced this pull request Feb 4, 2026
#60404 (#60461)

Cherry-picked from #60404

Co-authored-by: lihangyu <lihangyu@selectdb.com>
ybtsdst pushed a commit to ybtsdst/doris that referenced this pull request Feb 27, 2026
@yiguolei yiguolei mentioned this pull request Mar 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/3.1.x dev/4.0.4-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants