Skip to content

Conversation

@924060929
Copy link
Contributor

@924060929 924060929 commented Jan 28, 2026

What problem does this PR solve?

query cache shouldn't be hitted when session variable changed or use udf

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

@Thearas
Copy link
Contributor

Thearas commented Jan 28, 2026

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?

@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17630	5329	5089	5089
q2	1985	303	189	189
q3	10262	1293	738	738
q4	10226	844	318	318
q5	7509	2158	1895	1895
q6	205	180	148	148
q7	864	716	597	597
q8	9284	1397	1073	1073
q9	5136	4828	4779	4779
q10	6822	1927	1567	1567
q11	510	291	282	282
q12	334	382	214	214
q13	17792	4056	3213	3213
q14	237	242	214	214
q15	910	832	809	809
q16	684	676	614	614
q17	644	818	502	502
q18	6692	6544	6356	6356
q19	1277	989	619	619
q20	378	337	234	234
q21	2595	2001	1891	1891
q22	348	309	274	274
Total cold run time: 102324 ms
Total hot run time: 31615 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5314	5302	5302	5302
q2	260	336	258	258
q3	2152	2658	2281	2281
q4	1356	1695	1290	1290
q5	4337	4156	4176	4156
q6	218	188	140	140
q7	1887	2213	1902	1902
q8	2695	2496	2392	2392
q9	7427	7405	7510	7405
q10	2894	3042	2604	2604
q11	554	482	459	459
q12	712	725	638	638
q13	3875	4364	3636	3636
q14	289	308	280	280
q15	872	839	842	839
q16	675	735	702	702
q17	1154	1421	1448	1421
q18	8166	7933	7721	7721
q19	865	807	824	807
q20	2075	2141	2060	2060
q21	4706	4283	4069	4069
q22	567	554	530	530
Total cold run time: 53050 ms
Total hot run time: 50892 ms

@doris-robot
Copy link

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

query1	0.06	0.04	0.05
query2	0.10	0.05	0.04
query3	0.26	0.09	0.08
query4	1.60	0.11	0.11
query5	0.26	0.25	0.25
query6	1.18	0.68	0.67
query7	0.03	0.02	0.03
query8	0.06	0.04	0.04
query9	0.58	0.50	0.50
query10	0.54	0.55	0.54
query11	0.15	0.09	0.10
query12	0.13	0.10	0.11
query13	0.65	0.61	0.61
query14	1.09	1.05	1.05
query15	0.88	0.86	0.86
query16	0.40	0.39	0.38
query17	1.08	1.12	1.11
query18	0.23	0.21	0.21
query19	2.10	1.91	2.06
query20	0.02	0.02	0.02
query21	15.40	0.26	0.14
query22	5.12	0.05	0.05
query23	15.95	0.28	0.10
query24	1.43	0.47	0.27
query25	0.09	0.12	0.07
query26	0.17	0.13	0.13
query27	0.06	0.07	0.05
query28	4.26	1.16	0.97
query29	12.56	3.91	3.18
query30	0.29	0.13	0.11
query31	2.82	0.65	0.40
query32	3.24	0.59	0.48
query33	3.25	3.20	3.26
query34	16.11	5.36	4.74
query35	4.84	4.75	4.78
query36	0.66	0.50	0.51
query37	0.12	0.07	0.08
query38	0.08	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.05	0.03	0.03
query43	0.05	0.04	0.03
Total cold run time: 98.28 s
Total hot run time: 28.15 s

@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17597	5245	5063	5063
q2	2063	312	187	187
q3	10245	1333	740	740
q4	10218	855	322	322
q5	7544	2160	1897	1897
q6	196	185	153	153
q7	884	742	591	591
q8	9261	1367	1129	1129
q9	5179	4884	4776	4776
q10	6844	1963	1562	1562
q11	513	302	282	282
q12	335	385	228	228
q13	17849	4029	3222	3222
q14	243	235	216	216
q15	915	826	805	805
q16	681	663	626	626
q17	625	833	482	482
q18	6765	6502	6217	6217
q19	1283	972	622	622
q20	391	343	231	231
q21	2713	2061	1925	1925
q22	348	310	277	277
Total cold run time: 102692 ms
Total hot run time: 31553 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5296	5257	5266	5257
q2	263	340	254	254
q3	2147	2708	2232	2232
q4	1354	1733	1294	1294
q5	4314	4130	4213	4130
q6	218	189	139	139
q7	2036	2153	1855	1855
q8	2606	2482	2379	2379
q9	7596	7565	7566	7565
q10	2920	3130	2595	2595
q11	585	502	469	469
q12	728	769	605	605
q13	3795	4552	3396	3396
q14	306	344	327	327
q15	896	835	851	835
q16	711	707	703	703
q17	1288	1306	1354	1306
q18	8180	7879	7757	7757
q19	894	860	854	854
q20	2069	2277	2045	2045
q21	4692	4196	4018	4018
q22	565	520	507	507
Total cold run time: 53459 ms
Total hot run time: 50522 ms

@doris-robot
Copy link

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

query1	0.06	0.05	0.05
query2	0.09	0.05	0.04
query3	0.25	0.08	0.08
query4	1.60	0.11	0.11
query5	0.26	0.25	0.26
query6	1.18	0.67	0.68
query7	0.03	0.02	0.03
query8	0.05	0.03	0.04
query9	0.59	0.51	0.49
query10	0.55	0.57	0.54
query11	0.14	0.10	0.11
query12	0.14	0.11	0.11
query13	0.62	0.61	0.61
query14	1.04	1.06	1.07
query15	0.89	0.86	0.88
query16	0.39	0.42	0.42
query17	1.16	1.17	1.12
query18	0.22	0.20	0.21
query19	2.09	1.89	2.10
query20	0.02	0.02	0.01
query21	15.42	0.25	0.14
query22	5.16	0.04	0.04
query23	15.88	0.28	0.10
query24	1.29	0.77	0.28
query25	0.10	0.06	0.06
query26	0.14	0.14	0.13
query27	0.08	0.09	0.04
query28	4.48	1.16	0.97
query29	12.58	3.91	3.20
query30	0.28	0.14	0.11
query31	2.82	0.64	0.40
query32	3.23	0.59	0.48
query33	3.34	3.21	3.27
query34	16.16	5.37	4.76
query35	4.81	4.73	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.04	0.03	0.04
query40	0.19	0.16	0.16
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.05	0.04	0.04
Total cold run time: 98.37 s
Total hot run time: 28.18 s

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 71.62% (53/74) 🎉
Increment coverage report
Complete coverage report

@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17658	5378	5125	5125
q2	2034	318	191	191
q3	10233	1317	745	745
q4	10216	841	311	311
q5	7537	2142	1869	1869
q6	195	176	147	147
q7	873	727	602	602
q8	9268	1318	1085	1085
q9	5252	4801	4870	4801
q10	6944	2002	1604	1604
q11	513	304	284	284
q12	341	382	232	232
q13	17795	4040	3243	3243
q14	231	238	221	221
q15	893	823	798	798
q16	692	671	614	614
q17	648	810	457	457
q18	6815	6661	6377	6377
q19	1270	977	602	602
q20	375	334	224	224
q21	2605	2023	1945	1945
q22	350	312	273	273
Total cold run time: 102738 ms
Total hot run time: 31750 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5332	5281	5313	5281
q2	259	340	250	250
q3	2130	2683	2256	2256
q4	1329	1731	1291	1291
q5	4280	4187	4208	4187
q6	218	182	137	137
q7	2175	2084	1923	1923
q8	2531	2357	2411	2357
q9	7548	7286	7409	7286
q10	2925	3076	2582	2582
q11	522	458	463	458
q12	648	736	589	589
q13	3998	4453	3514	3514
q14	300	333	305	305
q15	900	823	801	801
q16	710	726	696	696
q17	1119	1374	1350	1350
q18	8097	8147	7926	7926
q19	874	809	806	806
q20	2048	2233	1969	1969
q21	4439	4196	4051	4051
q22	578	551	515	515
Total cold run time: 52960 ms
Total hot run time: 50530 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.05
query2	0.08	0.05	0.04
query3	0.26	0.08	0.08
query4	1.60	0.11	0.11
query5	0.27	0.25	0.25
query6	1.16	0.67	0.68
query7	0.02	0.02	0.02
query8	0.05	0.04	0.04
query9	0.56	0.49	0.49
query10	0.56	0.54	0.54
query11	0.15	0.09	0.10
query12	0.14	0.10	0.11
query13	0.63	0.63	0.62
query14	1.06	1.07	1.06
query15	0.87	0.86	0.88
query16	0.42	0.38	0.39
query17	1.09	1.15	1.16
query18	0.22	0.21	0.22
query19	2.08	2.03	1.97
query20	0.02	0.01	0.02
query21	15.42	0.24	0.14
query22	5.26	0.05	0.04
query23	16.09	0.30	0.10
query24	1.42	0.68	0.61
query25	0.11	0.07	0.06
query26	0.14	0.13	0.14
query27	0.08	0.04	0.05
query28	4.10	1.16	0.97
query29	12.54	3.97	3.17
query30	0.29	0.14	0.12
query31	2.81	0.61	0.40
query32	3.23	0.59	0.49
query33	3.19	3.24	3.22
query34	15.98	5.31	4.81
query35	4.76	4.84	4.81
query36	0.66	0.51	0.49
query37	0.11	0.07	0.07
query38	0.07	0.05	0.04
query39	0.04	0.04	0.03
query40	0.18	0.17	0.16
query41	0.09	0.04	0.03
query42	0.04	0.03	0.02
query43	0.06	0.04	0.03
Total cold run time: 97.96 s
Total hot run time: 28.71 s

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 71.62% (53/74) 🎉
Increment coverage report
Complete coverage report

2 similar comments
@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 71.62% (53/74) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 71.62% (53/74) 🎉
Increment coverage report
Complete coverage report

@924060929 924060929 force-pushed the master-query-cache-check-meta branch from 586fb32 to d732ab4 Compare January 29, 2026 14:27
@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17619	5349	5046	5046
q2	2020	339	188	188
q3	10188	1271	746	746
q4	10213	903	337	337
q5	7776	2229	1877	1877
q6	196	181	151	151
q7	912	764	603	603
q8	9302	1369	1098	1098
q9	5208	4838	4826	4826
q10	6779	1954	1542	1542
q11	516	293	291	291
q12	332	377	230	230
q13	17787	4089	3225	3225
q14	235	240	219	219
q15	907	820	825	820
q16	662	675	623	623
q17	658	822	455	455
q18	6667	6502	7412	6502
q19	1617	1053	642	642
q20	404	359	247	247
q21	3028	2314	2183	2183
q22	388	329	323	323
Total cold run time: 103414 ms
Total hot run time: 32174 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5574	5546	5448	5448
q2	268	348	276	276
q3	2351	2912	2579	2579
q4	1492	1860	1405	1405
q5	4919	4502	4489	4489
q6	221	175	147	147
q7	2034	1939	1841	1841
q8	2489	2340	2348	2340
q9	7464	7370	7589	7370
q10	2897	3132	2660	2660
q11	579	465	459	459
q12	687	722	569	569
q13	3558	4053	3268	3268
q14	285	283	272	272
q15	839	804	800	800
q16	636	700	638	638
q17	1071	1201	1283	1201
q18	7525	7342	7277	7277
q19	868	790	816	790
q20	1970	2101	1923	1923
q21	4552	4229	4136	4136
q22	588	570	455	455
Total cold run time: 52867 ms
Total hot run time: 50343 ms

@doris-robot
Copy link

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

query1	0.06	0.05	0.05
query2	0.09	0.04	0.04
query3	0.26	0.09	0.08
query4	1.61	0.11	0.10
query5	0.27	0.24	0.25
query6	1.16	0.67	0.67
query7	0.03	0.03	0.03
query8	0.05	0.04	0.04
query9	0.56	0.50	0.50
query10	0.55	0.56	0.56
query11	0.14	0.09	0.10
query12	0.16	0.11	0.10
query13	0.65	0.62	0.64
query14	1.09	1.06	1.08
query15	0.90	0.87	0.88
query16	0.40	0.40	0.40
query17	1.09	1.10	1.09
query18	0.24	0.23	0.22
query19	2.07	2.02	1.96
query20	0.03	0.02	0.01
query21	15.41	0.26	0.14
query22	5.13	0.06	0.05
query23	16.05	0.29	0.10
query24	1.45	0.24	0.36
query25	0.11	0.05	0.09
query26	0.15	0.13	0.13
query27	0.12	0.06	0.05
query28	3.39	1.16	0.96
query29	12.57	3.86	3.15
query30	0.28	0.15	0.12
query31	2.83	0.64	0.41
query32	3.26	0.60	0.52
query33	3.24	3.26	3.22
query34	16.29	5.39	4.76
query35	4.79	4.80	4.79
query36	0.65	0.49	0.51
query37	0.11	0.08	0.07
query38	0.07	0.04	0.04
query39	0.05	0.03	0.03
query40	0.19	0.17	0.16
query41	0.08	0.03	0.04
query42	0.04	0.04	0.03
query43	0.05	0.04	0.04
Total cold run time: 97.72 s
Total hot run time: 28.31 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 71.62% (53/74) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 71.62% (53/74) 🎉
Increment coverage report
Complete coverage report

1 similar comment
@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 71.62% (53/74) 🎉
Increment coverage report
Complete coverage report

@924060929 924060929 changed the title [fix](query cache) query cache should be hit when session variable changed or use udf [fix](query cache) query cache shouldn't be hitted when session variable changed or use udf Jan 30, 2026
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