Skip to content

[Fix](QueryCache) Fix cache order different may cause error#47961

Merged
HappenLee merged 1 commit intoapache:masterfrom
HappenLee:old
Feb 18, 2025
Merged

[Fix](QueryCache) Fix cache order different may cause error#47961
HappenLee merged 1 commit intoapache:masterfrom
HappenLee:old

Conversation

@HappenLee
Copy link
Contributor

What problem does this PR solve?

the origin judge may cause the need reorder judge error:

   bool need_reorder = _slot_orders.size() != hit_cache_slot_orders->size();
        if (!need_reorder) {
            for (int i = 0; i < _slot_orders.size(); ++i) {
                need_reorder = _slot_orders[i] != (*hit_cache_slot_orders)[i];
            }
        }

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

@Thearas
Copy link
Contributor

Thearas commented Feb 17, 2025

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?

@HappenLee
Copy link
Contributor Author

run buildall

@HappenLee
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17589	5214	5071	5071
q2	2044	300	165	165
q3	10416	1247	755	755
q4	10209	1004	541	541
q5	7557	2357	2332	2332
q6	187	173	136	136
q7	898	744	595	595
q8	9298	1283	1136	1136
q9	4858	4656	4567	4567
q10	6818	2306	1911	1911
q11	481	270	263	263
q12	351	359	219	219
q13	17762	3653	3082	3082
q14	236	219	202	202
q15	500	476	458	458
q16	613	615	587	587
q17	569	853	360	360
q18	6596	6361	6183	6183
q19	1497	944	561	561
q20	321	317	189	189
q21	2713	2188	1942	1942
q22	358	333	307	307
Total cold run time: 101871 ms
Total hot run time: 31562 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5168	5119	5165	5119
q2	238	327	224	224
q3	2171	2654	2281	2281
q4	1468	1834	1385	1385
q5	4223	4120	4161	4120
q6	204	161	123	123
q7	1841	1814	1628	1628
q8	2573	2586	2570	2570
q9	7253	7276	7154	7154
q10	3013	3238	2761	2761
q11	582	519	499	499
q12	687	787	615	615
q13	3564	3787	3257	3257
q14	276	292	262	262
q15	496	470	454	454
q16	643	695	652	652
q17	1132	1606	1314	1314
q18	7613	7214	7293	7214
q19	801	794	853	794
q20	1956	2020	1892	1892
q21	5451	4929	4762	4762
q22	587	594	526	526
Total cold run time: 51940 ms
Total hot run time: 49606 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 43.81% (11447/26126)
Line Coverage: 33.82% (96408/285062)
Region Coverage: 32.52% (49305/151597)
Branch Coverage: 28.19% (24773/87868)
Coverage Report: http://coverage.selectdb-in.cc/coverage/4921cfff8593d6565cb4370f2d37e770690b08c3_4921cfff8593d6565cb4370f2d37e770690b08c3/report/index.html

@doris-robot
Copy link

TPC-DS: Total hot run time: 189032 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 4921cfff8593d6565cb4370f2d37e770690b08c3, data reload: false

query1	1295	946	915	915
query2	6223	1810	1831	1810
query3	10975	4525	4330	4330
query4	56630	26045	23257	23257
query5	5241	488	474	474
query6	403	191	179	179
query7	5299	509	296	296
query8	334	250	236	236
query9	7125	2488	2504	2488
query10	409	330	269	269
query11	15183	15085	14765	14765
query12	163	108	113	108
query13	1267	515	384	384
query14	10606	6656	6874	6656
query15	192	202	182	182
query16	6962	626	500	500
query17	1074	729	573	573
query18	1518	414	308	308
query19	205	192	158	158
query20	125	119	120	119
query21	205	124	106	106
query22	4487	4649	4281	4281
query23	34070	33079	33327	33079
query24	5571	2467	2418	2418
query25	454	485	405	405
query26	653	285	155	155
query27	1861	489	334	334
query28	2749	2452	2417	2417
query29	567	552	413	413
query30	213	192	149	149
query31	876	887	805	805
query32	73	62	61	61
query33	447	354	295	295
query34	770	856	504	504
query35	814	834	780	780
query36	956	963	897	897
query37	120	98	81	81
query38	4229	4322	4251	4251
query39	1479	1430	1448	1430
query40	210	122	110	110
query41	57	60	57	57
query42	136	122	110	110
query43	510	489	471	471
query44	1292	847	790	790
query45	178	169	167	167
query46	878	1064	663	663
query47	1869	1899	1806	1806
query48	378	418	326	326
query49	732	513	427	427
query50	708	739	421	421
query51	4309	4305	4250	4250
query52	108	103	93	93
query53	242	254	190	190
query54	489	525	415	415
query55	86	86	80	80
query56	276	330	261	261
query57	1146	1184	1115	1115
query58	256	233	239	233
query59	2939	2868	2665	2665
query60	285	268	273	268
query61	128	115	120	115
query62	735	724	700	700
query63	240	195	192	192
query64	1423	1064	698	698
query65	3213	3133	3135	3133
query66	717	378	298	298
query67	15844	15552	15398	15398
query68	4605	795	523	523
query69	507	298	269	269
query70	1198	1102	1112	1102
query71	417	290	270	270
query72	6317	3504	3772	3504
query73	876	742	342	342
query74	9233	9098	8861	8861
query75	3269	3125	2654	2654
query76	3355	1153	731	731
query77	554	383	314	314
query78	10097	10334	9214	9214
query79	2027	824	584	584
query80	787	532	438	438
query81	524	270	239	239
query82	396	126	96	96
query83	185	168	144	144
query84	286	95	68	68
query85	738	349	318	318
query86	336	323	279	279
query87	4597	4524	4355	4355
query88	2809	2183	2156	2156
query89	392	314	280	280
query90	1772	193	193	193
query91	137	131	110	110
query92	64	60	57	57
query93	1510	1003	570	570
query94	604	413	296	296
query95	354	268	262	262
query96	478	547	266	266
query97	2794	2853	2762	2762
query98	224	217	196	196
query99	1277	1399	1259	1259
Total cold run time: 293926 ms
Total hot run time: 189032 ms

@doris-robot
Copy link

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

query1	0.03	0.04	0.04
query2	0.06	0.04	0.03
query3	0.23	0.07	0.07
query4	1.61	0.10	0.10
query5	0.42	0.42	0.39
query6	1.16	0.67	0.66
query7	0.02	0.02	0.02
query8	0.04	0.03	0.02
query9	0.60	0.51	0.51
query10	0.56	0.58	0.57
query11	0.15	0.10	0.10
query12	0.14	0.11	0.12
query13	0.62	0.59	0.60
query14	2.68	2.69	2.73
query15	0.91	0.83	0.84
query16	0.37	0.39	0.37
query17	1.01	1.03	1.05
query18	0.22	0.20	0.20
query19	1.89	1.79	1.96
query20	0.01	0.01	0.01
query21	15.36	0.91	0.53
query22	0.78	1.33	0.93
query23	14.70	1.36	0.66
query24	11.82	1.04	0.36
query25	0.35	0.16	0.07
query26	0.94	0.19	0.13
query27	0.05	0.04	0.04
query28	6.39	0.79	0.44
query29	12.55	4.00	3.32
query30	0.25	0.08	0.05
query31	2.84	0.58	0.38
query32	3.22	0.54	0.47
query33	3.02	3.04	3.08
query34	15.79	5.12	4.46
query35	4.50	4.52	4.49
query36	0.65	0.49	0.49
query37	0.08	0.06	0.07
query38	0.05	0.05	0.04
query39	0.03	0.02	0.03
query40	0.17	0.13	0.12
query41	0.07	0.02	0.02
query42	0.03	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 106.41 s
Total hot run time: 30.3 s

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Feb 18, 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.

@HappenLee HappenLee merged commit e9a34e4 into apache:master Feb 18, 2025
24 of 26 checks passed
lzyy2024 pushed a commit to lzyy2024/doris that referenced this pull request Feb 21, 2025
…7961)

the origin judge may cause the need reorder judge error:
```
   bool need_reorder = _slot_orders.size() != hit_cache_slot_orders->size();
        if (!need_reorder) {
            for (int i = 0; i < _slot_orders.size(); ++i) {
                need_reorder = _slot_orders[i] != (*hit_cache_slot_orders)[i];
            }
        }
```
BiteTheDDDDt pushed a commit to BiteTheDDDDt/incubator-doris that referenced this pull request May 22, 2025
…7961)

the origin judge may cause the need reorder judge error:
```
   bool need_reorder = _slot_orders.size() != hit_cache_slot_orders->size();
        if (!need_reorder) {
            for (int i = 0; i < _slot_orders.size(); ++i) {
                need_reorder = _slot_orders[i] != (*hit_cache_slot_orders)[i];
            }
        }
```
924060929 pushed a commit to 924060929/incubator-doris that referenced this pull request May 23, 2025
…7961)

the origin judge may cause the need reorder judge error:
```
   bool need_reorder = _slot_orders.size() != hit_cache_slot_orders->size();
        if (!need_reorder) {
            for (int i = 0; i < _slot_orders.size(); ++i) {
                need_reorder = _slot_orders[i] != (*hit_cache_slot_orders)[i];
            }
        }
```

(cherry picked from commit e9a34e4)
dataroaring pushed a commit that referenced this pull request May 27, 2025
…51204)

cherry pick from #47883, #47961, #51202

---------

Co-authored-by: HappenLee <happenlee@selectdb.com>
koarz pushed a commit to koarz/doris that referenced this pull request Jun 4, 2025
…7961)

the origin judge may cause the need reorder judge error:
```
   bool need_reorder = _slot_orders.size() != hit_cache_slot_orders->size();
        if (!need_reorder) {
            for (int i = 0; i < _slot_orders.size(); ++i) {
                need_reorder = _slot_orders[i] != (*hit_cache_slot_orders)[i];
            }
        }
```
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.0.6-merged p0_c reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

Comments