Skip to content

Conversation

@feiniaofeiafei
Copy link
Contributor

@feiniaofeiafei feiniaofeiafei commented Feb 24, 2025

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:
before this pr:
send multi statements in one request: sq1(e.g. select 1 from t1);sql2(e.g. select 2 from t2);sql3(e.g. use db1)
The sqlhash of sql1, sql2 and sql3 is same.
after this pr:
the sqlhash of sql1 and sql2 and sql3 is different.

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 24, 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?

@morrySnow morrySnow changed the title [fix] fix sql has same sqlhash in one request [fix](audit) fix sql has same sqlhash in one request Feb 24, 2025
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Feb 24, 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.

@feiniaofeiafei
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17620	5339	5146	5146
q2	2047	297	177	177
q3	10444	1292	765	765
q4	10210	1029	534	534
q5	7505	2424	2304	2304
q6	189	166	138	138
q7	896	751	610	610
q8	9302	1315	1188	1188
q9	5038	4693	4563	4563
q10	6830	2301	1889	1889
q11	471	279	255	255
q12	355	359	216	216
q13	17757	3698	3119	3119
q14	217	217	207	207
q15	497	471	451	451
q16	615	595	571	571
q17	557	867	326	326
q18	6588	6224	6115	6115
q19	1214	944	512	512
q20	305	316	192	192
q21	2802	2214	1881	1881
q22	370	333	302	302
Total cold run time: 101829 ms
Total hot run time: 31461 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5209	5161	5155	5155
q2	234	329	229	229
q3	2161	2665	2315	2315
q4	1431	1845	1378	1378
q5	4238	4121	4138	4121
q6	204	161	125	125
q7	1870	1814	1685	1685
q8	2602	2631	2559	2559
q9	7348	7190	7064	7064
q10	3012	3201	2787	2787
q11	592	496	486	486
q12	666	788	620	620
q13	3495	3928	3357	3357
q14	268	290	275	275
q15	528	458	451	451
q16	623	668	621	621
q17	1129	1627	1336	1336
q18	7554	7403	7273	7273
q19	785	791	794	791
q20	1919	2037	1860	1860
q21	5377	4884	4878	4878
q22	612	586	522	522
Total cold run time: 51857 ms
Total hot run time: 49888 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 183721 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 5c09ea54037dc6515fac6031148ab1c57b272b71, data reload: false

query1	1000	374	393	374
query2	6539	1756	1839	1756
query3	6805	211	212	211
query4	25959	23337	23349	23337
query5	4357	643	518	518
query6	312	197	191	191
query7	4617	506	289	289
query8	283	227	229	227
query9	8609	2544	2550	2544
query10	451	318	243	243
query11	15354	15481	14977	14977
query12	152	110	104	104
query13	1648	509	381	381
query14	9146	6165	6157	6157
query15	208	205	179	179
query16	7217	616	472	472
query17	1174	719	535	535
query18	1930	396	292	292
query19	188	208	146	146
query20	120	124	113	113
query21	205	120	100	100
query22	4290	4334	4418	4334
query23	34414	33696	33019	33019
query24	8314	2364	2389	2364
query25	545	489	411	411
query26	1238	277	157	157
query27	2705	496	347	347
query28	4387	2406	2376	2376
query29	732	564	408	408
query30	225	189	150	150
query31	930	860	787	787
query32	73	61	58	58
query33	564	346	299	299
query34	767	855	480	480
query35	831	851	750	750
query36	983	995	872	872
query37	121	99	73	73
query38	4037	4291	3974	3974
query39	1460	1400	1408	1400
query40	202	142	98	98
query41	58	63	50	50
query42	122	101	102	101
query43	493	489	480	480
query44	1283	768	769	768
query45	173	166	161	161
query46	865	1052	632	632
query47	1756	1824	1772	1772
query48	392	418	310	310
query49	765	504	403	403
query50	677	756	407	407
query51	4169	4206	4122	4122
query52	105	110	95	95
query53	226	259	180	180
query54	470	465	402	402
query55	90	83	77	77
query56	280	257	242	242
query57	1124	1130	1053	1053
query58	250	228	235	228
query59	2456	2692	2598	2598
query60	286	274	248	248
query61	116	112	116	112
query62	822	706	669	669
query63	224	188	190	188
query64	4336	1068	758	758
query65	3260	3106	3156	3106
query66	1148	403	301	301
query67	15894	15577	15330	15330
query68	2290	757	539	539
query69	415	299	275	275
query70	1190	1144	1115	1115
query71	345	294	261	261
query72	5914	3604	3686	3604
query73	630	747	351	351
query74	9122	9193	9123	9123
query75	3120	3174	2697	2697
query76	2271	1170	754	754
query77	332	376	293	293
query78	9859	10129	9337	9337
query79	990	906	600	600
query80	1140	544	457	457
query81	545	274	236	236
query82	312	131	93	93
query83	265	170	145	145
query84	237	92	82	82
query85	800	425	371	371
query86	381	297	301	297
query87	4440	4486	4348	4348
query88	2876	2266	2202	2202
query89	398	319	289	289
query90	1819	197	192	192
query91	128	135	106	106
query92	60	57	56	56
query93	1105	1005	567	567
query94	651	419	300	300
query95	356	332	258	258
query96	510	538	267	267
query97	2731	2896	2716	2716
query98	216	204	197	197
query99	1282	1434	1297	1297
Total cold run time: 261662 ms
Total hot run time: 183721 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.04	0.04
query3	0.23	0.07	0.06
query4	1.61	0.10	0.10
query5	0.40	0.42	0.40
query6	1.17	0.68	0.67
query7	0.02	0.02	0.02
query8	0.04	0.04	0.03
query9	0.59	0.51	0.53
query10	0.58	0.57	0.58
query11	0.15	0.11	0.12
query12	0.14	0.11	0.12
query13	0.63	0.60	0.61
query14	2.67	2.74	2.75
query15	0.92	0.86	0.84
query16	0.38	0.39	0.36
query17	1.03	1.00	1.02
query18	0.22	0.20	0.19
query19	1.88	1.85	1.97
query20	0.01	0.01	0.01
query21	15.38	0.88	0.54
query22	0.76	1.03	0.72
query23	14.98	1.40	0.62
query24	7.33	0.87	1.34
query25	0.48	0.23	0.14
query26	0.70	0.17	0.13
query27	0.06	0.05	0.05
query28	8.92	0.84	0.42
query29	12.54	3.97	3.29
query30	0.25	0.09	0.06
query31	2.83	0.60	0.39
query32	3.23	0.55	0.47
query33	3.10	3.08	3.12
query34	15.80	5.17	4.53
query35	4.58	4.55	4.60
query36	0.68	0.49	0.48
query37	0.08	0.06	0.06
query38	0.05	0.04	0.04
query39	0.02	0.02	0.02
query40	0.17	0.14	0.13
query41	0.07	0.03	0.02
query42	0.04	0.02	0.02
query43	0.03	0.03	0.02
Total cold run time: 104.85 s
Total hot run time: 30.89 s

@morrySnow morrySnow merged commit 726c857 into apache:master Feb 25, 2025
31 of 32 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 25, 2025
### What problem does this PR solve?

Problem Summary:

before this pr:
send multi statements in one request: sq1(e.g. select 1 from
t1);sql2(e.g. select 2 from t2);sql3(e.g. use db1)
The sqlhash of sql1, sql2 and sql3 is same.

after this pr:
the sqlhash of sql1 and sql2 and sql3 is different.
github-actions bot pushed a commit that referenced this pull request Feb 25, 2025
### What problem does this PR solve?

Problem Summary:

before this pr:
send multi statements in one request: sq1(e.g. select 1 from
t1);sql2(e.g. select 2 from t2);sql3(e.g. use db1)
The sqlhash of sql1, sql2 and sql3 is same.

after this pr:
the sqlhash of sql1 and sql2 and sql3 is different.
yiguolei pushed a commit that referenced this pull request Feb 25, 2025
… (#48270)

Cherry-picked from #48242

Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
@shuke987 shuke987 added the usercase Important user case type label label Feb 26, 2025
dataroaring pushed a commit that referenced this pull request Feb 27, 2025
… (#48269)

Cherry-picked from #48242

Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
seawinde pushed a commit to seawinde/doris that referenced this pull request Feb 28, 2025
### What problem does this PR solve?

Problem Summary:

before this pr:
send multi statements in one request: sq1(e.g. select 1 from
t1);sql2(e.g. select 2 from t2);sql3(e.g. use db1)
The sqlhash of sql1, sql2 and sql3 is same.

after this pr:
the sqlhash of sql1 and sql2 and sql3 is different.
@yiguolei yiguolei mentioned this pull request Mar 25, 2025
@gavinchou gavinchou mentioned this pull request Apr 23, 2025
koarz pushed a commit to koarz/doris that referenced this pull request Jun 4, 2025
### What problem does this PR solve?

Problem Summary:

before this pr:
send multi statements in one request: sq1(e.g. select 1 from
t1);sql2(e.g. select 2 from t2);sql3(e.g. use db1)
The sqlhash of sql1, sql2 and sql3 is same.

after this pr:
the sqlhash of sql1 and sql2 and sql3 is different.
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/2.1.9-merged dev/3.0.5-merged p0_w reviewed usercase Important user case type label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants