Skip to content

Conversation

@924060929
Copy link
Contributor

What problem does this PR solve?

the CTE use MultiCastDataSink.destinations to store the destination instead of FragmentExecParams.destinations, but the old Coordinator use FragmentExecParams.destinations for local shuffle, so throw the exception:

[CANCELLED]Rows mismatched! Data may be lost. [Expected enqueue rows=14, Real enqueue rows=0, Detail: Type: HASH_SHUFFLE, Local Exchange Id: -10, Shuffled Map: [0:6], ]

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

@924060929
Copy link
Contributor Author

run buildall

morrySnow
morrySnow previously approved these changes Jul 7, 2025
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jul 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2025

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2025

PR approved by anyone and no changes requested.

@924060929
Copy link
Contributor Author

run buildall

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Jul 7, 2025
@924060929 924060929 added the usercase Important user case type label label Jul 7, 2025
924060929 pushed a commit to 924060929/incubator-doris that referenced this pull request Jul 7, 2025
the CTE use MultiCastDataSink.destinations to store the destination instead of FragmentExecParams.destinations, but the old Coordinator use FragmentExecParams.destinations for local shuffle, so throw the exception:
```
[CANCELLED]Rows mismatched! Data may be lost. [Expected enqueue rows=14, Real enqueue rows=0, Detail: Type: HASH_SHUFFLE, Local Exchange Id: -10, Shuffled Map: [0:6], ]
```
924060929 added a commit to 924060929/incubator-doris that referenced this pull request Jul 7, 2025
the CTE use MultiCastDataSink.destinations to store the destination instead of FragmentExecParams.destinations, but the old Coordinator use FragmentExecParams.destinations for local shuffle, so throw the exception:
```
[CANCELLED]Rows mismatched! Data may be lost. [Expected enqueue rows=14, Real enqueue rows=0, Detail: Type: HASH_SHUFFLE, Local Exchange Id: -10, Shuffled Map: [0:6], ]
```
924060929 added a commit to 924060929/incubator-doris that referenced this pull request Jul 7, 2025
the CTE use MultiCastDataSink.destinations to store the destination instead of FragmentExecParams.destinations, but the old Coordinator use FragmentExecParams.destinations for local shuffle, so throw the exception:
```
[CANCELLED]Rows mismatched! Data may be lost. [Expected enqueue rows=14, Real enqueue rows=0, Detail: Type: HASH_SHUFFLE, Local Exchange Id: -10, Shuffled Map: [0:6], ]
```
@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17618	5373	5052	5052
q2	1929	308	177	177
q3	10302	1295	718	718
q4	10257	1005	527	527
q5	8064	2387	2347	2347
q6	179	158	128	128
q7	899	741	597	597
q8	9306	1304	1075	1075
q9	7134	5109	5095	5095
q10	6933	2396	1981	1981
q11	486	294	264	264
q12	343	343	214	214
q13	17761	3664	3098	3098
q14	227	226	208	208
q15	581	480	478	478
q16	424	425	383	383
q17	596	876	347	347
q18	7514	7187	7155	7155
q19	1339	943	549	549
q20	318	370	205	205
q21	3820	2573	2311	2311
q22	346	314	298	298
Total cold run time: 106376 ms
Total hot run time: 33207 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5156	5078	5070	5070
q2	240	326	216	216
q3	2129	2669	2293	2293
q4	1423	1841	1356	1356
q5	4242	4152	4134	4134
q6	205	164	122	122
q7	1905	1791	1698	1698
q8	2520	2519	2403	2403
q9	6774	6735	6765	6735
q10	2939	3146	2711	2711
q11	579	500	505	500
q12	678	708	570	570
q13	3315	3731	3097	3097
q14	260	280	249	249
q15	514	468	458	458
q16	412	471	416	416
q17	1105	1527	1316	1316
q18	7391	7153	7049	7049
q19	777	743	790	743
q20	1931	1961	1817	1817
q21	4751	4490	4254	4254
q22	642	616	537	537
Total cold run time: 49888 ms
Total hot run time: 47744 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 185544 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 29a62b37cb011167754cb52fbdd13e88fbc71235, data reload: false

query1	1020	394	382	382
query2	6524	1795	1749	1749
query3	6745	228	219	219
query4	26139	23563	23076	23076
query5	4763	592	424	424
query6	324	215	210	210
query7	4621	493	289	289
query8	265	218	222	218
query9	8624	2609	2599	2599
query10	491	331	272	272
query11	15361	14977	14891	14891
query12	174	107	106	106
query13	1655	512	386	386
query14	9412	5881	5858	5858
query15	221	189	177	177
query16	7635	426	249	249
query17	1385	762	580	580
query18	2007	394	295	295
query19	190	188	152	152
query20	121	114	108	108
query21	207	131	117	117
query22	4107	4175	3923	3923
query23	33982	33085	32846	32846
query24	8438	2374	2392	2374
query25	512	477	398	398
query26	1223	268	145	145
query27	2761	519	352	352
query28	4296	2128	2099	2099
query29	767	604	494	494
query30	288	224	200	200
query31	931	873	756	756
query32	74	70	65	65
query33	558	340	294	294
query34	809	837	507	507
query35	620	672	576	576
query36	916	990	883	883
query37	113	97	76	76
query38	4185	4144	4030	4030
query39	1472	1442	1416	1416
query40	215	121	109	109
query41	63	63	60	60
query42	128	109	110	109
query43	515	519	501	501
query44	1314	845	878	845
query45	174	169	161	161
query46	833	1021	635	635
query47	1762	1778	1765	1765
query48	395	416	316	316
query49	736	483	398	398
query50	637	684	417	417
query51	4202	4241	4187	4187
query52	109	104	109	104
query53	233	256	177	177
query54	578	577	504	504
query55	81	81	82	81
query56	318	302	289	289
query57	1190	1190	1121	1121
query58	262	260	254	254
query59	2588	2710	2636	2636
query60	320	297	313	297
query61	123	119	116	116
query62	840	738	660	660
query63	228	191	190	190
query64	4374	1164	848	848
query65	4279	4181	4152	4152
query66	1064	438	325	325
query67	16178	15279	15225	15225
query68	9587	886	538	538
query69	491	320	266	266
query70	1246	1137	1121	1121
query71	478	306	296	296
query72	5656	4727	4767	4727
query73	745	650	359	359
query74	8924	8862	9102	8862
query75	4299	3233	2693	2693
query76	3876	1139	703	703
query77	985	378	296	296
query78	10883	11239	10261	10261
query79	1522	789	589	589
query80	663	521	447	447
query81	461	261	219	219
query82	252	123	97	97
query83	290	250	233	233
query84	305	109	164	109
query85	749	367	318	318
query86	329	309	290	290
query87	4449	4481	4375	4375
query88	2921	2291	2302	2291
query89	379	322	285	285
query90	2081	207	204	204
query91	137	144	111	111
query92	69	59	56	56
query93	1071	988	599	599
query94	668	318	208	208
query95	368	284	281	281
query96	481	573	281	281
query97	2717	2767	2655	2655
query98	223	216	211	211
query99	1409	1405	1290	1290
Total cold run time: 276389 ms
Total hot run time: 185544 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.07	0.04	0.04
query3	0.24	0.08	0.07
query4	1.61	0.11	0.11
query5	0.42	0.42	0.43
query6	1.13	0.67	0.66
query7	0.03	0.02	0.02
query8	0.05	0.04	0.03
query9	0.62	0.50	0.52
query10	0.56	0.56	0.56
query11	0.16	0.11	0.12
query12	0.16	0.13	0.11
query13	0.63	0.60	0.61
query14	0.79	0.82	0.81
query15	0.90	0.87	0.86
query16	0.40	0.40	0.38
query17	1.08	1.10	1.05
query18	0.23	0.21	0.21
query19	1.96	1.88	1.81
query20	0.01	0.01	0.01
query21	15.43	0.90	0.54
query22	0.74	1.18	0.97
query23	14.71	1.37	0.66
query24	7.38	1.39	0.89
query25	0.44	0.17	0.13
query26	0.68	0.16	0.13
query27	0.06	0.06	0.05
query28	9.31	0.91	0.44
query29	12.58	3.92	3.34
query30	0.26	0.09	0.06
query31	2.83	0.62	0.39
query32	3.24	0.59	0.47
query33	3.06	3.12	3.16
query34	16.10	5.44	4.75
query35	4.84	4.81	4.86
query36	0.69	0.50	0.49
query37	0.10	0.07	0.06
query38	0.05	0.05	0.03
query39	0.03	0.03	0.02
query40	0.16	0.14	0.13
query41	0.08	0.02	0.03
query42	0.04	0.03	0.03
query43	0.04	0.03	0.03
Total cold run time: 103.94 s
Total hot run time: 29.95 s

@924060929 924060929 force-pushed the fix_cte_with_local_shuffle branch from 29a62b3 to 63d78a4 Compare July 8, 2025 07:13
@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17627	5388	5224	5224
q2	1958	287	196	196
q3	10444	1430	761	761
q4	10244	1070	519	519
q5	8148	2522	2486	2486
q6	204	172	130	130
q7	981	757	621	621
q8	9322	1501	1289	1289
q9	6853	5297	5297	5297
q10	6945	2423	1986	1986
q11	504	328	271	271
q12	352	380	219	219
q13	17780	3806	3102	3102
q14	234	240	208	208
q15	540	479	494	479
q16	424	443	384	384
q17	613	944	357	357
q18	8159	7161	7215	7161
q19	1324	1110	607	607
q20	328	364	215	215
q21	3844	3198	2350	2350
q22	363	320	295	295
Total cold run time: 107191 ms
Total hot run time: 34157 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5414	5375	5409	5375
q2	248	332	220	220
q3	2232	2709	2305	2305
q4	1403	1801	1340	1340
q5	4267	4179	4139	4139
q6	244	174	121	121
q7	1903	1829	1662	1662
q8	2743	2625	2440	2440
q9	6866	6814	6799	6799
q10	3032	3156	2726	2726
q11	602	507	475	475
q12	652	742	569	569
q13	3408	3798	3079	3079
q14	269	283	261	261
q15	522	473	455	455
q16	422	492	418	418
q17	1167	1630	1367	1367
q18	7238	7204	7012	7012
q19	805	821	1040	821
q20	1988	1966	1832	1832
q21	4857	4421	4249	4249
q22	706	591	553	553
Total cold run time: 50988 ms
Total hot run time: 48218 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 185400 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 63d78a4efc1fc0c7384e575c25418b9a19b448a8, data reload: false

query1	1002	382	395	382
query2	6515	1767	1749	1749
query3	6764	216	213	213
query4	26650	24202	23409	23409
query5	5745	570	444	444
query6	309	218	217	217
query7	4623	508	283	283
query8	256	217	208	208
query9	8619	2586	2593	2586
query10	532	333	265	265
query11	15252	15078	14830	14830
query12	166	113	103	103
query13	1656	542	399	399
query14	9569	5764	5708	5708
query15	198	191	186	186
query16	7627	637	473	473
query17	1597	751	581	581
query18	2031	416	354	354
query19	237	180	162	162
query20	118	126	120	120
query21	213	121	103	103
query22	4229	4077	4201	4077
query23	34072	33150	33026	33026
query24	8332	2353	2367	2353
query25	534	486	389	389
query26	1226	262	148	148
query27	2704	492	340	340
query28	4394	2123	2109	2109
query29	712	557	426	426
query30	291	217	189	189
query31	917	848	740	740
query32	70	65	62	62
query33	555	384	317	317
query34	797	840	524	524
query35	783	803	739	739
query36	959	965	885	885
query37	119	97	74	74
query38	4092	4208	4118	4118
query39	1464	1390	1411	1390
query40	211	118	113	113
query41	57	52	51	51
query42	124	105	104	104
query43	512	514	462	462
query44	1359	828	826	826
query45	171	170	167	167
query46	844	1005	619	619
query47	1734	1818	1708	1708
query48	376	421	305	305
query49	768	461	395	395
query50	634	688	409	409
query51	4127	4170	4110	4110
query52	108	104	100	100
query53	223	262	192	192
query54	578	567	501	501
query55	83	81	84	81
query56	317	296	285	285
query57	1194	1205	1122	1122
query58	259	262	259	259
query59	2703	2787	2625	2625
query60	333	327	317	317
query61	135	126	124	124
query62	783	728	676	676
query63	220	184	184	184
query64	4276	1021	647	647
query65	4262	4176	4165	4165
query66	1004	420	309	309
query67	15795	15496	15440	15440
query68	7926	886	524	524
query69	524	305	267	267
query70	1155	1156	1077	1077
query71	432	324	295	295
query72	5310	4790	4845	4790
query73	674	637	356	356
query74	9034	9282	9106	9106
query75	3474	3189	2725	2725
query76	3470	1151	700	700
query77	734	368	282	282
query78	9924	10053	9143	9143
query79	2049	821	592	592
query80	595	504	462	462
query81	470	253	223	223
query82	192	125	97	97
query83	249	248	240	240
query84	253	113	90	90
query85	827	442	398	398
query86	330	297	292	292
query87	4417	4525	4241	4241
query88	3658	2286	2282	2282
query89	423	318	279	279
query90	1870	219	205	205
query91	135	135	111	111
query92	74	59	58	58
query93	1645	958	586	586
query94	655	402	309	309
query95	365	295	289	289
query96	501	559	277	277
query97	2725	2737	2691	2691
query98	236	213	201	201
query99	1350	1405	1235	1235
Total cold run time: 274795 ms
Total hot run time: 185400 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.08	0.05	0.04
query3	0.24	0.07	0.08
query4	1.62	0.10	0.11
query5	0.41	0.43	0.42
query6	1.18	0.67	0.66
query7	0.02	0.02	0.02
query8	0.05	0.03	0.03
query9	0.60	0.52	0.51
query10	0.57	0.57	0.57
query11	0.16	0.11	0.11
query12	0.15	0.11	0.12
query13	0.63	0.61	0.61
query14	0.80	0.82	0.80
query15	0.89	0.87	0.87
query16	0.38	0.39	0.40
query17	1.13	1.09	1.03
query18	0.22	0.22	0.21
query19	1.93	1.87	1.86
query20	0.02	0.01	0.01
query21	15.37	0.88	0.53
query22	0.76	1.33	0.66
query23	14.87	1.37	0.62
query24	7.16	1.21	0.75
query25	0.46	0.13	0.17
query26	0.65	0.16	0.13
query27	0.06	0.06	0.05
query28	9.71	0.88	0.44
query29	12.55	3.98	3.26
query30	0.25	0.09	0.08
query31	2.84	0.60	0.38
query32	3.23	0.55	0.48
query33	3.09	3.15	3.09
query34	15.98	5.36	4.78
query35	4.80	4.84	4.89
query36	0.69	0.51	0.48
query37	0.10	0.07	0.07
query38	0.06	0.04	0.04
query39	0.04	0.02	0.03
query40	0.17	0.14	0.14
query41	0.09	0.02	0.02
query42	0.04	0.03	0.03
query43	0.03	0.04	0.04
Total cold run time: 104.13 s
Total hot run time: 29.52 s

924060929 added a commit that referenced this pull request Jul 8, 2025
…tion #52870 (#52876)

cherry pick from #52870

the CTE use MultiCastDataSink.destinations to store the destination instead of FragmentExecParams.destinations, but the old Coordinator use FragmentExecParams.destinations for local shuffle, so throw the exception:
```
[CANCELLED]Rows mismatched! Data may be lost. [Expected enqueue rows=14, Real enqueue rows=0, Detail: Type: HASH_SHUFFLE, Local Exchange Id: -10, Shuffled Map: [0:6], ]
```
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jul 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 8, 2025

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

@924060929 924060929 merged commit d2140a9 into apache:master Jul 8, 2025
25 of 28 checks passed
@924060929 924060929 deleted the fix_cte_with_local_shuffle branch July 8, 2025 15:01
dataroaring pushed a commit that referenced this pull request Jul 9, 2025
yiguolei pushed a commit that referenced this pull request Jul 9, 2025
…tion #52870 (#52871)

cherry pick from #52870

---------

Co-authored-by: Gabriel <liwenqiang@selectdb.com>
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.11-merged dev/3.0.7-merged dev/3.1.0-merged p0_b reviewed usercase Important user case type label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants